diff --git a/src/assets/themes.css b/src/assets/themes.css index 5a85f9a..28e4d8b 100644 --- a/src/assets/themes.css +++ b/src/assets/themes.css @@ -1,7 +1,7 @@ .app.theme-dark { --bg-color: #353535; - --element-color: #333030; - --element-color-hover: #292424; + --element-color: #212121; + --element-color-hover: #1b1b1b; --element-border-input: #4e7a3a; --element-border-focus: #9ac982; --element-border-action: #1f5b63; diff --git a/src/components/settings/page-card.vue b/src/components/settings/page-card.vue new file mode 100644 index 0000000..c5faa36 --- /dev/null +++ b/src/components/settings/page-card.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/src/components/settings/radio-buttons.vue b/src/components/settings/radio-buttons.vue new file mode 100644 index 0000000..1925c74 --- /dev/null +++ b/src/components/settings/radio-buttons.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/src/components/titlebar-element.vue b/src/components/titlebar-element.vue index 6e1b191..a5d32fe 100644 --- a/src/components/titlebar-element.vue +++ b/src/components/titlebar-element.vue @@ -9,8 +9,8 @@ const router = useRouter(); const routeName = computed(() => route.name); function goBack() { if (!routeName.value.startsWith("title.settings")) return; - if (lastDataRoute.value.name) router.push(lastDataRoute.value.path); - else router.push("/timetable"); + if (lastDataRoute.value) router.push(lastDataRoute.value.path); + else router.push("/"); } diff --git a/src/router/index.js b/src/router/index.js index 3333a19..5b2c9bb 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -7,6 +7,9 @@ import HistoryView from "@/views/HistoryView.vue"; import SettingsView from "@/views/SettingsView.vue"; import LoginView from "@/views/LoginView.vue"; import TokenView from "@/views/TokenView.vue"; +import FilteringSettings from "@/views/settings/FilteringSettings.vue"; +import AppearanceSettings from "@/views/settings/AppearanceSettings.vue"; +import AboutPage from "@/views/settings/AboutPage.vue"; const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), @@ -41,8 +44,25 @@ const router = createRouter({ }, { path: "/settings", - name: "title.settings", + name: "title.settings.main", component: SettingsView, + children: [ + { + path: "filtering", + name: "title.settings.filtering", + component: FilteringSettings, + }, + { + path: "appearance", + name: "title.settings.appearance", + component: AppearanceSettings, + }, + { + path: "about", + name: "title.settings.about", + component: AboutPage, + }, + ], }, { path: "/login", diff --git a/src/strings.js b/src/strings.js index 198ea90..45334ba 100644 --- a/src/strings.js +++ b/src/strings.js @@ -4,9 +4,14 @@ export const strings = { timetable: "Timetable", substitutions: "Substitutions", history: "History", - settings: "Settings", login: "Login", token: "Token", + settings: { + main: "Settings", + filtering: "Filtering", + appearance: "Appearance", + about: "About", + }, }, settings: { heading: { @@ -28,6 +33,7 @@ export const strings = { "Select a Theme to change the colors of the app. The 'Auto' option selects a theme based on your system preferences.", }, other: "Other", + back: "Back", none: "None", version: "Version", theme: { @@ -102,8 +108,13 @@ export const strings = { timetable: "Stundenplan", substitutions: "Vertretungsplan", history: "Verlauf", - settings: "Einstellungen", login: "Anmelden", + settings: { + main: "Einstellungen", + filtering: "Filter", + appearance: "Aussehen", + about: "Über", + }, }, settings: { heading: { @@ -125,6 +136,7 @@ export const strings = { "Wähle ein Farbschema aus, um die Farben dieser Anwendung anzupassen. Die Option 'Automatisch' wählt ein Farbschema basierend auf den Einstellungen deines Systems aus.", }, other: "Andere", + back: "Zurück", none: "Keine", version: "Version", theme: { diff --git a/src/views/SettingsView.vue b/src/views/SettingsView.vue index 581856f..20e173a 100644 --- a/src/views/SettingsView.vue +++ b/src/views/SettingsView.vue @@ -2,126 +2,71 @@ import ScrollableContainer from "@/components/scrollable-container.vue"; import PageCard from "@/components/settings/page-card.vue"; import { - classList, - classFilter, - possibleTimetableGroups, - timetableGroups, - theme, -} from "../store"; -import { language } from "../i18n"; - -// eslint-disable-next-line no-undef -const gitHash = GITVERSION; + FilterIcon, + PaletteIcon, + InfoIcon, + ChevronLeft, +} from "lucide-vue-next"; diff --git a/src/views/settings/AboutPage.vue b/src/views/settings/AboutPage.vue new file mode 100644 index 0000000..64a5d3a --- /dev/null +++ b/src/views/settings/AboutPage.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/src/views/settings/AppearanceSettings.vue b/src/views/settings/AppearanceSettings.vue new file mode 100644 index 0000000..ece240f --- /dev/null +++ b/src/views/settings/AppearanceSettings.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/src/views/settings/FilteringSettings.vue b/src/views/settings/FilteringSettings.vue new file mode 100644 index 0000000..9d4019c --- /dev/null +++ b/src/views/settings/FilteringSettings.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/vite.config.js b/vite.config.js index 7d92bfb..3a0512a 100644 --- a/vite.config.js +++ b/vite.config.js @@ -11,6 +11,9 @@ export default defineConfig({ GITVERSION: JSON.stringify( child.execSync("git rev-parse --short HEAD").toString() ), + GITURL: JSON.stringify( + child.execSync("git config --get remote.origin.url").toString() + ), }, plugins: [ vue(),