summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorUdo Walter2019-03-28 19:20:28 +0100
committerUdo Walter2019-03-28 19:20:28 +0100
commite37434a39ef5a1c2779b1862296e1ebdae8256b7 (patch)
treed7517933cd7d368d13d069d57af15a022b265662 /webapp
parent[eventmanager] rename module name in german frontend (diff)
downloadbas-e37434a39ef5a1c2779b1862296e1ebdae8256b7.tar.gz
bas-e37434a39ef5a1c2779b1862296e1ebdae8256b7.tar.xz
bas-e37434a39ef5a1c2779b1862296e1ebdae8256b7.zip
[webapp] fix disabled animation causing bug
Diffstat (limited to 'webapp')
-rw-r--r--webapp/src/assets/styles.css2
-rw-r--r--webapp/src/components/BackToTopButton.vue1
-rw-r--r--webapp/src/components/GroupModuleClientList.vue6
-rw-r--r--webapp/src/components/LogModuleEntry.vue17
-rw-r--r--webapp/src/components/SettingsModule.vue11
-rw-r--r--webapp/src/main.js23
6 files changed, 50 insertions, 10 deletions
diff --git a/webapp/src/assets/styles.css b/webapp/src/assets/styles.css
index 77222e1..f8051c6 100644
--- a/webapp/src/assets/styles.css
+++ b/webapp/src/assets/styles.css
@@ -15,7 +15,7 @@ html {
}
.no-animations *, .no-animations :before, .no-animations :after {
- transition-property: none !important;
+ transition: none !important;
animation: none !important;
}
diff --git a/webapp/src/components/BackToTopButton.vue b/webapp/src/components/BackToTopButton.vue
index f70b636..8067f2f 100644
--- a/webapp/src/components/BackToTopButton.vue
+++ b/webapp/src/components/BackToTopButton.vue
@@ -52,5 +52,6 @@ export default {
position: fixed;
right: 16px;
bottom: 16px;
+ z-index: 4;
}
</style>
diff --git a/webapp/src/components/GroupModuleClientList.vue b/webapp/src/components/GroupModuleClientList.vue
index 88d1332..557d664 100644
--- a/webapp/src/components/GroupModuleClientList.vue
+++ b/webapp/src/components/GroupModuleClientList.vue
@@ -28,7 +28,7 @@
<template>
<div>
<v-card>
- <data-table v-model="selected" :headers="headers" :items="clients" :loading="loading" @dblclick="loadClient($event)" min-width="1000px">
+ <data-table v-model="selected" :headers="headers" :items="clients" :loading="loading" @dblclick="loadClient($event)" min-width="1300px">
<div slot="actions" slot-scope="row" style="text-align: right">
<v-btn icon @click.stop @mousedown="loadClient(row.item)" style="margin: 0"><v-icon>keyboard_arrow_right</v-icon></v-btn>
</div>
@@ -69,9 +69,9 @@ export default {
return [
{ key: 'id', text: this.$t('id'), width: '50px' },
{ key: 'name', text: this.$t('name') },
- { key: 'ip', text: this.$t('ip'), width: '100px' },
+ { key: 'ip', text: this.$t('ip'), width: '120px' },
{ key: 'mac', text: this.$t('mac'), width: '160px' },
- { key: 'uuid', text: this.$t('uuid'), width: '180px' },
+ { key: 'uuid', text: this.$t('uuid'), width: '300px' },
{ key: 'actions', width: '60px' }
]
},
diff --git a/webapp/src/components/LogModuleEntry.vue b/webapp/src/components/LogModuleEntry.vue
index 2e9ce67..e6ccead 100644
--- a/webapp/src/components/LogModuleEntry.vue
+++ b/webapp/src/components/LogModuleEntry.vue
@@ -35,6 +35,9 @@
<template #default>
<v-card style="user-select: text;"><v-card-text>
<div v-if="item.client.deleted" class="error--text" style="text-align: center; font-weight: bold;">{{ $t('deleted') }}</div>
+ <v-btn v-else :to="{ name: 'GroupModule.client', params: { id: item.client.id } }" @click.native="scrollToTop" class="open-button" icon small>
+ <v-icon small>open_in_new</v-icon>
+ </v-btn>
<table>
<tr><td class="snapshot-key">{{ $t('id') }}</td><td>{{ item.clientSnapshot.id }}</td></tr>
<tr><td class="snapshot-key">{{ $t('name') }}</td><td>{{ item.clientSnapshot.name }}</td></tr>
@@ -57,6 +60,10 @@
</template>
<template #default>
<v-card style="user-select: text;"><v-card-text>
+ <div v-if="item.group.deleted" class="error--text" style="text-align: center; font-weight: bold;">{{ $t('deleted') }}</div>
+ <v-btn v-else :to="{ name: 'GroupModule.group', params: { id: item.group.id } }" @click.native="scrollToTop" class="open-button" icon small>
+ <v-icon small>open_in_new</v-icon>
+ </v-btn>
<table>
<tr><td class="snapshot-key">{{ $t('id') }}</td><td>{{ item.groupSnapshot.id }}</td></tr>
<tr><td class="snapshot-key">{{ $t('name') }}</td><td>{{ item.groupSnapshot.name }}</td></tr>
@@ -76,6 +83,7 @@
</template>
<template #default>
<v-card style="user-select: text;"><v-card-text>
+ <div v-if="item.user.deleted" class="error--text" style="text-align: center; font-weight: bold;">{{ $t('deleted') }}</div>
<table>
<tr><td class="snapshot-key">{{ $t('id') }}</td><td>{{ item.userSnapshot.id }}</td></tr>
<tr><td class="snapshot-key">{{ $t('username') }}</td><td>{{ item.userSnapshot.username }}</td></tr>
@@ -139,6 +147,9 @@ export default {
}
},
methods: {
+ scrollToTop () {
+ window.scrollTo(0, 0)
+ }
}
}
</script>
@@ -164,6 +175,12 @@ export default {
text-align: right;
padding-right: 16px;
}
+
+.open-button {
+ position: absolute;
+ top: 0;
+ left: 0;
+}
</style>
<style>
diff --git a/webapp/src/components/SettingsModule.vue b/webapp/src/components/SettingsModule.vue
index dc9731b..a1c2909 100644
--- a/webapp/src/components/SettingsModule.vue
+++ b/webapp/src/components/SettingsModule.vue
@@ -26,7 +26,7 @@
</i18n>
<template>
- <v-container fill-height>
+ <v-container fill-height :key="key">
<v-layout>
<v-flex xl10 offset-xl1 lg12>
<v-card class="tabbar-card">
@@ -34,7 +34,6 @@
v-model="tab"
centered
grow
-
>
<v-tab>
<v-icon class="tabbar-tabicon">settings_applications</v-icon>{{ $t('general') }}
@@ -79,7 +78,8 @@ export default {
data () {
return {
langChoices: [ { text: 'Deutsch', value: 'de' }, { text: 'English', value: 'en' } ],
- tab: 0
+ tab: 0,
+ key: true
}
},
computed: {
@@ -87,7 +87,10 @@ export default {
store () { return this.$store.state.settings }
},
methods: {
- save (name, value) { this.$store.commit('saveSetting', { name: name, value: value }) }
+ save (name, value) {
+ if (name === 'noAnimations') setTimeout(() => { this.key = !this.key }, 0)
+ this.$store.commit('saveSetting', { name: name, value: value })
+ }
}
}
</script>
diff --git a/webapp/src/main.js b/webapp/src/main.js
index 70afb40..bd7d9ec 100644
--- a/webapp/src/main.js
+++ b/webapp/src/main.js
@@ -135,7 +135,26 @@ new Vue({
store,
router,
i18n,
- computed: { locale: () => store.state.settings.locale },
- watch: { locale: v => { i18n.locale = v } },
+ computed: {
+ locale: () => store.state.settings.locale,
+ noAnimations: () => store.state.settings.noAnimations
+ },
+ watch: {
+ locale: v => { i18n.locale = v },
+ noAnimations: {
+ immediate: true,
+ handler (value) {
+ if (value) {
+ Vue.component('transition', {
+ render () {
+ return this.$slots.default
+ }
+ })
+ } else {
+ delete Vue.options.components['transition']
+ }
+ }
+ }
+ },
template: '<router-view/>'
}).$mount('#app')