✨ Add menu button for opening the settings
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<script setup>
|
||||
import MenuIcon from "./icons/menu-icon.vue";
|
||||
import { computed } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useRoute, RouterLink } from "vue-router";
|
||||
|
||||
const route = useRoute();
|
||||
const routeName = computed(() => route.name);
|
||||
@ -11,7 +11,9 @@ const routeName = computed(() => route.name);
|
||||
<div class="titlebar">
|
||||
<span class="title">{{ routeName }}</span>
|
||||
<div class="settings">
|
||||
<MenuIcon />
|
||||
<RouterLink to="/settings">
|
||||
<MenuIcon />
|
||||
</RouterLink>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -38,4 +40,16 @@ const routeName = computed(() => route.name);
|
||||
justify-content: right;
|
||||
padding-right: 13px;
|
||||
}
|
||||
|
||||
a {
|
||||
display: inherit;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
a.router-link-active {
|
||||
background-color: #335723;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
|
@ -2,6 +2,7 @@ import { createRouter, createWebHistory } from "vue-router";
|
||||
import TimetableView from "../views/TimetableView.vue";
|
||||
import SubstitutionView from "../views/SubstitutionView.vue";
|
||||
import HistoryView from "../views/HistoryView.vue";
|
||||
import SettingsView from "../views/SettingsView.vue";
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
@ -25,6 +26,11 @@ const router = createRouter({
|
||||
name: "History",
|
||||
component: HistoryView,
|
||||
},
|
||||
{
|
||||
path: "/settings",
|
||||
name: "Settings",
|
||||
component: SettingsView,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
|
0
src/views/SettingsView.vue
Normal file
0
src/views/SettingsView.vue
Normal file
Reference in New Issue
Block a user