-
-
Notifications
You must be signed in to change notification settings - Fork 67
chore(webapp): migration to vuetify 3 #1173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nils-wisiol
wants to merge
1
commit into
main
Choose a base branch
from
20260109_vuetify3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| .DS_Store | ||
| node_modules | ||
| .vite | ||
|
|
||
| /tests/e2e/videos/ | ||
| /tests/e2e/screenshots/ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,90 +1,91 @@ | ||||||||||
| <template> | ||||||||||
| <v-app id="inspire"> | ||||||||||
| <v-navigation-drawer | ||||||||||
| v-model="drawer" | ||||||||||
| app | ||||||||||
| right | ||||||||||
| disable-resize-watcher | ||||||||||
| v-model="drawer" | ||||||||||
| app | ||||||||||
| location="right" | ||||||||||
| disable-resize-watcher | ||||||||||
| > | ||||||||||
| <v-list dense> | ||||||||||
| <v-list density="compact"> | ||||||||||
| <v-list-item | ||||||||||
| v-for="(item, key) in menu" | ||||||||||
| :key="key" | ||||||||||
| link | ||||||||||
| :to="{name: item.name}" | ||||||||||
| :exact="true"> | ||||||||||
| <v-list-item-action> | ||||||||||
| <v-icon>{{ item.icon }}</v-icon> | ||||||||||
| </v-list-item-action> | ||||||||||
| <v-list-item-content> | ||||||||||
| <v-list-item-title> | ||||||||||
| {{ item.text }} | ||||||||||
| <v-icon :color="item.post_icon_color" class="text--darken-2" small v-if="item.post_icon">{{ item.post_icon }}</v-icon> | ||||||||||
| </v-list-item-title> | ||||||||||
| </v-list-item-content> | ||||||||||
| v-for="(item, key) in menu" | ||||||||||
| :key="key" | ||||||||||
| :to="{name: item.name}" | ||||||||||
| :exact="true" | ||||||||||
| > | ||||||||||
| <template #prepend> | ||||||||||
| <v-icon :icon="item.icon" /> | ||||||||||
| </template> | ||||||||||
| <v-list-item-title> | ||||||||||
| {{ item.text }} | ||||||||||
| <v-icon v-if="item.post_icon" :icon="item.post_icon" :color="item.post_icon_color" size="small" /> | ||||||||||
| </v-list-item-title> | ||||||||||
| </v-list-item> | ||||||||||
| </v-list> | ||||||||||
| </v-navigation-drawer> | ||||||||||
|
|
||||||||||
| <v-app-bar app class="white"> | ||||||||||
| <v-toolbar-title><router-link :to="{name: 'home'}"> | ||||||||||
| <v-app-bar app color="white" :extended="authenticated"> | ||||||||||
| <v-app-bar-title><router-link :to="{name: 'home'}"> | ||||||||||
| <v-img | ||||||||||
| src="./assets/logo.svg" | ||||||||||
| alt="deSEC Logo" | ||||||||||
| eager | ||||||||||
| contain | ||||||||||
| src="./assets/logo.svg" | ||||||||||
| alt="deSEC Logo" | ||||||||||
| class="app-logo" | ||||||||||
| height="32" | ||||||||||
| eager | ||||||||||
| contain | ||||||||||
| ></v-img> | ||||||||||
| </router-link></v-toolbar-title> | ||||||||||
| </router-link></v-app-bar-title> | ||||||||||
| <v-spacer/> | ||||||||||
| <div class="d-none d-md-block"> | ||||||||||
| <span class="mx-2" v-for="(item, key) in menu" :key="key"> | ||||||||||
| <router-link | ||||||||||
| class="primary--text text--darken-2" | ||||||||||
| :to="{name: item.name}" | ||||||||||
| class="text-primary" | ||||||||||
| :to="{name: item.name}" | ||||||||||
| >{{ item.text }}</router-link> | ||||||||||
| <v-icon :color="item.post_icon_color" class="ml-1 text--darken-1" small v-if="item.post_icon">{{ item.post_icon }}</v-icon> | ||||||||||
| <v-icon v-if="item.post_icon" :icon="item.post_icon" :color="item.post_icon_color" class="ml-1" size="small" /> | ||||||||||
| </span> | ||||||||||
| </div> | ||||||||||
| <v-btn class="mx-4" color="primary" depressed :to="{name: 'signup', query: $route.query}" v-if="!user.authenticated">Create Account</v-btn> | ||||||||||
| <v-btn class="mx-4 mr-0" color="primary" depressed :to="{name: 'login'}" v-if="!user.authenticated">Log In</v-btn> | ||||||||||
| <v-btn class="mx-4 mr-0" color="primary" depressed outlined @click="logout" v-if="user.authenticated">Log Out</v-btn> | ||||||||||
| <v-btn class="mx-4" color="primary" variant="flat" :to="{name: 'signup', query: $route.query}" v-if="!authenticated">Create Account</v-btn> | ||||||||||
| <v-btn class="mx-4 mr-0" color="primary" variant="flat" :to="{name: 'login'}" v-if="!authenticated">Log In</v-btn> | ||||||||||
| <v-btn class="mx-4 mr-0" color="primary" variant="outlined" @click="logout" v-if="authenticated">Log Out</v-btn> | ||||||||||
|
Comment on lines
+49
to
+50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Suggested change
|
||||||||||
| <v-app-bar-nav-icon class="d-md-none" @click.stop="drawer = !drawer" /> | ||||||||||
| <template #extension v-if="user.authenticated"> | ||||||||||
| <v-tabs background-color="primary darken-1" fixed-tabs> | ||||||||||
| <v-tab | ||||||||||
| v-for="(item, key) in tabmenu" | ||||||||||
| :key="key" | ||||||||||
| :to="{name: item.name}" | ||||||||||
| > | ||||||||||
| {{ item.text }} | ||||||||||
| </v-tab> | ||||||||||
| <v-spacer></v-spacer> | ||||||||||
| <v-menu | ||||||||||
| bottom | ||||||||||
| left | ||||||||||
| > | ||||||||||
| <template #activator="{ on }"> | ||||||||||
| <template #extension v-if="authenticated"> | ||||||||||
| <div class="d-flex align-center w-100 bg-primary text-white"> | ||||||||||
| <v-tabs v-model="activeTab" class="flex-grow-1 text-white" bg-color="primary" color="white" slider-color="white" grow> | ||||||||||
| <v-tab | ||||||||||
| v-for="(item, key) in tabmenu" | ||||||||||
| :key="key" | ||||||||||
| :value="item.name" | ||||||||||
| :to="{name: item.name}" | ||||||||||
| class="text-white" | ||||||||||
| > | ||||||||||
| {{ item.text }} | ||||||||||
| </v-tab> | ||||||||||
| </v-tabs> | ||||||||||
| <v-menu location="bottom"> | ||||||||||
| <template #activator="{ props }"> | ||||||||||
| <v-btn | ||||||||||
| text | ||||||||||
| class="align-self-center mr-4" | ||||||||||
| v-on="on" | ||||||||||
| variant="text" | ||||||||||
| color="white" | ||||||||||
| class="align-self-center mr-4" | ||||||||||
| v-bind="props" | ||||||||||
| > | ||||||||||
| more | ||||||||||
| <v-icon right>{{ mdiMenuDown }}</v-icon> | ||||||||||
| <v-icon :icon="mdiMenuDown" end /> | ||||||||||
| </v-btn> | ||||||||||
| </template> | ||||||||||
|
|
||||||||||
| <v-list class="grey lighten-3"> | ||||||||||
| <v-list class="bg-grey-lighten-3"> | ||||||||||
| <v-list-item | ||||||||||
| v-for="(item, key) in tabmenumore" | ||||||||||
| :key="key" | ||||||||||
| :to="{name: item.name}" | ||||||||||
| v-for="(item, key) in tabmenumore" | ||||||||||
| :key="key" | ||||||||||
| :to="{name: item.name}" | ||||||||||
| > | ||||||||||
| {{ item.text }} | ||||||||||
| </v-list-item> | ||||||||||
| </v-list> | ||||||||||
| </v-menu> | ||||||||||
| </v-tabs> | ||||||||||
| </div> | ||||||||||
| </template> | ||||||||||
| </v-app-bar> | ||||||||||
|
|
||||||||||
|
|
@@ -94,23 +95,22 @@ | |||||||||
| <v-icon | ||||||||||
| color="warning" | ||||||||||
| size="36" | ||||||||||
| > | ||||||||||
| {{ alert.icon }} | ||||||||||
| </v-icon> | ||||||||||
| :icon="alert.icon" | ||||||||||
| /> | ||||||||||
| </template> | ||||||||||
| {{ alert.teaser }} | ||||||||||
| <template #actions> | ||||||||||
| <v-btn | ||||||||||
| color="primary" | ||||||||||
| depressed | ||||||||||
| variant="flat" | ||||||||||
| :href="alert.href" | ||||||||||
| v-if="alert.href" | ||||||||||
| > | ||||||||||
| {{ alert.button || 'More' }} | ||||||||||
| </v-btn> | ||||||||||
| <v-btn | ||||||||||
| color="primary" | ||||||||||
| text | ||||||||||
| variant="text" | ||||||||||
| @click="user.unalert(alert.id)" | ||||||||||
| > | ||||||||||
| Hide | ||||||||||
|
|
@@ -127,9 +127,9 @@ | |||||||||
| <router-view/> | ||||||||||
| </v-main> | ||||||||||
| <v-footer | ||||||||||
| class="d-flex flex-column align-stretch pa-0 white--text text--darken-1 elevation-12" | ||||||||||
| class="d-flex flex-column align-stretch pa-0 text-white elevation-12" | ||||||||||
| > | ||||||||||
| <div class="grey darken-3 d-sm-flex flex-row justify-space-between pa-4"> | ||||||||||
| <div class="bg-grey-darken-3 d-sm-flex flex-row justify-space-between pa-4"> | ||||||||||
| <div class="pa-2"> | ||||||||||
| <b>deSEC e.V.</b> | ||||||||||
| </div> | ||||||||||
|
|
@@ -141,7 +141,7 @@ | |||||||||
| <div class="px-2"><router-link :to="{name: 'impressum'}">Legal Notice (Impressum)</router-link></div> | ||||||||||
| </div> | ||||||||||
| </div> | ||||||||||
| <div class="grey darken-4 d-md-flex flex-row justify-space-between pa-6"> | ||||||||||
| <div class="bg-grey-darken-4 d-md-flex flex-row justify-space-between pa-6"> | ||||||||||
| <div> | ||||||||||
| <p>{{ email }}</p> | ||||||||||
| <p> | ||||||||||
|
|
@@ -153,7 +153,7 @@ | |||||||||
| <div> | ||||||||||
| <p> | ||||||||||
| Please <router-link :to="{name: 'donate'}">donate</router-link>! | ||||||||||
| <v-icon color="red" class="text--darken-2" dense>{{ mdiHeart }}</v-icon> | ||||||||||
| <v-icon :icon="mdiHeart" color="red" /> | ||||||||||
| </p> | ||||||||||
| <p> | ||||||||||
| European Bank Account:<br> | ||||||||||
|
|
@@ -167,7 +167,7 @@ | |||||||||
| </div> | ||||||||||
| <div> | ||||||||||
| <p>Vorstand</p> | ||||||||||
| <p class="white--text text--darken-2"> | ||||||||||
| <p class="text-white"> | ||||||||||
| Nils Wisiol<br/> | ||||||||||
| Peter Thomassen<br/> | ||||||||||
| Wolfgang Studier<br/> | ||||||||||
|
|
@@ -196,38 +196,10 @@ import { | |||||||||
|
|
||||||||||
| export default { | ||||||||||
| name: 'App', | ||||||||||
| data: () => ({ | ||||||||||
| user: useUserStore(), | ||||||||||
| drawer: false, | ||||||||||
| email: import.meta.env.VITE_APP_EMAIL, | ||||||||||
| mdiHeart, | ||||||||||
| mdiMenuDown, | ||||||||||
| tabmenu: { | ||||||||||
| 'domains': { | ||||||||||
| 'name': 'domains', | ||||||||||
| 'text': 'Domain Management', | ||||||||||
| }, | ||||||||||
| 'tokens': { | ||||||||||
| 'name': 'tokens', | ||||||||||
| 'text': 'Token Management', | ||||||||||
| }, | ||||||||||
| }, | ||||||||||
| tabmenumore: { | ||||||||||
| 'totp': { | ||||||||||
| 'name': 'totp', | ||||||||||
| 'text': 'Manage 2-Factor Authentication', | ||||||||||
| }, | ||||||||||
| 'change-email': { | ||||||||||
| 'name': 'change-email', | ||||||||||
| 'text': 'Change Email Address', | ||||||||||
| }, | ||||||||||
| 'delete-account': { | ||||||||||
| 'name': 'delete-account', | ||||||||||
| 'text': 'Delete Account', | ||||||||||
| }, | ||||||||||
| }, | ||||||||||
| }), | ||||||||||
| computed: { | ||||||||||
| authenticated() { | ||||||||||
| return this.user?.authenticated; | ||||||||||
| }, | ||||||||||
| menu: () => { | ||||||||||
| const user = useUserStore(); | ||||||||||
| const menu_perma = { | ||||||||||
|
|
@@ -277,6 +249,46 @@ export default { | |||||||||
| return {...menu_perma, ...menu_opt}; | ||||||||||
| }, | ||||||||||
| }, | ||||||||||
| data: () => ({ | ||||||||||
| user: useUserStore(), | ||||||||||
| drawer: false, | ||||||||||
| email: import.meta.env.VITE_APP_EMAIL, | ||||||||||
| activeTab: null, | ||||||||||
| mdiHeart, | ||||||||||
| mdiMenuDown, | ||||||||||
| tabmenu: { | ||||||||||
| 'domains': { | ||||||||||
| 'name': 'domains', | ||||||||||
| 'text': 'Domain Management', | ||||||||||
| }, | ||||||||||
| 'tokens': { | ||||||||||
| 'name': 'tokens', | ||||||||||
| 'text': 'Token Management', | ||||||||||
| }, | ||||||||||
| }, | ||||||||||
| tabmenumore: { | ||||||||||
| 'totp': { | ||||||||||
| 'name': 'totp', | ||||||||||
| 'text': 'Manage 2-Factor Authentication', | ||||||||||
| }, | ||||||||||
| 'change-email': { | ||||||||||
| 'name': 'change-email', | ||||||||||
| 'text': 'Change Email Address', | ||||||||||
| }, | ||||||||||
| 'delete-account': { | ||||||||||
| 'name': 'delete-account', | ||||||||||
| 'text': 'Delete Account', | ||||||||||
| }, | ||||||||||
| }, | ||||||||||
| }), | ||||||||||
| watch: { | ||||||||||
| $route: { | ||||||||||
| immediate: true, | ||||||||||
| handler(to) { | ||||||||||
| this.activeTab = to?.name ?? null; | ||||||||||
| }, | ||||||||||
| }, | ||||||||||
| }, | ||||||||||
| methods: { | ||||||||||
| async logout() { | ||||||||||
| await logout(); | ||||||||||
|
|
@@ -285,3 +297,21 @@ export default { | |||||||||
| } | ||||||||||
| } | ||||||||||
| </script> | ||||||||||
|
|
||||||||||
| <style> | ||||||||||
| .v-application a { | ||||||||||
| color: rgb(var(--v-theme-primary)); | ||||||||||
| text-decoration: none; | ||||||||||
| } | ||||||||||
| .v-application a:hover, | ||||||||||
| .v-application a:focus { | ||||||||||
| text-decoration: underline; | ||||||||||
| } | ||||||||||
| .v-application .bg-grey-darken-3 a, | ||||||||||
| .v-application .bg-grey-darken-4 a { | ||||||||||
| color: rgb(var(--v-theme-secondary)); | ||||||||||
| } | ||||||||||
| .app-logo { | ||||||||||
| width: auto; | ||||||||||
| } | ||||||||||
| </style> | ||||||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the img element is too wide and is offset towards the center of the app bar as a result, vuetify is doing some responsive magic and it's not doing it well; setting width seems to fix it