Skip to content

A tray application for accessing the daily menu of the Mensa Lübeck.

License

Notifications You must be signed in to change notification settings

Importantus/speiseplan-tray

Repository files navigation

Speiseplan Tray

This is a small tray application for the Speiseplan of the Studierendenwerk Schleswig Holstein for the Mensa in Lübeck's university district. It is written in TypeScript and Vue.js and uses Electron to run as a tray application.
It builds on top of this Speiseplan API and is inspired by this widget for KDE Plasma.

Speiseplan

Features

  • 📅 View menus for current and next week
  • 🥦 Filter by vegan and vegetarian dishes
  • 🚫 Exclude dishes containing specific allergens
  • ❗ Show allergens without filtering dishes
  • 🌮 Display dishes from Mensa and Cafeteria
  • 🌒 Light and dark mode
  • 🌍 Available for Linux, Windows and MacOS

Local Setup

The following steps will get you up and running with a local development environment. We assume you have Node.js and npm installed:

  1. Clone the repo with
git clone https://github.com/Importantus/speiseplan-tray.git
  1. Change into the directory and install dependencies
cd speiseplan-tray
npm install
  1. Start the local development server
npm run dev
  1. Install and use gitmoji to commit

Build

Run npm run build to build the app for production. The build artifacts will be stored in the release/ directory.
However, the build process is configured to run on GitHub Actions and will automatically create a release draft with the build artifacts, so you don't need to run this command yourself. For more information, see Release.

Gitmoji

This project uses gitmoji to make commits more expressive.

Installation

npm install -g gitmoji-cli

Initialize as git hook

gitmoji -i

Recommended IDE Setup

Type Support For .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Release

When you want to create a new release, follow these steps:

  1. Update the version in the project's package.json file (e.g. 1.2.3)
  2. Commit that change (git commit -am v1.2.3)
  3. Tag the commit (git tag v1.2.3). Make sure your tag name's format is v*.*.* The workflow will use this tag to detect when to create a release
  4. Push the changes to GitHub (git push && git push --tags)
  5. Edit and publish the release draft created by the workflow in GitHub

After building successfully, the action will publish the release artifacts in a new release draft that will be created on GitHub with download links for the app.

Similar projects

Known Issues

On some Linux distributions, the positioning of the window is not correct. This can be due to the window manager and/or the used display protocol. If you encounter this issue, please open an issue and provide information about your distribution and window manager.
With some versions of Windows 10, the same error can occur. Contributions are welcome.