add impressum, datenschutz und bugs

This commit is contained in:
Tim Gröger 2020-06-27 13:10:57 +02:00
parent d6651046d8
commit 823957da7e
1 changed files with 71 additions and 6 deletions

View File

@ -3,12 +3,28 @@
<TitleBar /> <TitleBar />
<router-view /> <router-view />
<v-footer app> <v-footer app>
<span class="px-4 d-none d-sm-flex" <a href="http://wu5.de"><span class="px-4 d-none d-sm-flex"
>&copy; {{ new Date().getFullYear() }} Studentenclub Wu 5 e.v.</span >&copy; {{ new Date().getFullYear() }} Studentenclub Wu5 e.V.
> </span></a>
<span>
<v-btn text x-small href="https://141.30.30.142/wu5/impressum">
Impressum
</v-btn>
<v-btn text x-small href="https://141.30.30.142/wu5/datenschutz">
Datenschutzerklärung
</v-btn>
<v-btn text x-small v-if="isLoggedIn" href="https://groeger-clan.duckdns.org/redmine/projects/geruecht/issues/new">
Bugs?
</v-btn>
</span>
<v-spacer /> <v-spacer />
<div v-if="isLoggedIn && !change" :key="render"> <div v-if="isLoggedIn && !change" :key="render">
<v-hover v-slot:default="{ hover }" open-delay="200" close-delay="200"> <v-hover
v-slot:default="{ hover }"
open-delay="200"
close-delay="200"
class="d-none d-sm-flex"
>
<v-sheet <v-sheet
:elevation="hover ? 16 : 0" :elevation="hover ? 16 : 0"
color="#f5f5f5" color="#f5f5f5"
@ -16,6 +32,19 @@
>{{ calcTime }}</v-sheet >{{ calcTime }}</v-sheet
> >
</v-hover> </v-hover>
<v-hover
v-slot:default="{ hover }"
open-delay="200"
close-delay="200"
class="d-flex d-sm-none"
>
<v-sheet
:elevation="hover ? 16 : 0"
color="#f5f5f5"
@click="change = !change"
>{{ calcTimeLittle }}</v-sheet
>
</v-hover>
</div> </div>
<v-dialog v-model="change" max-width="300"> <v-dialog v-model="change" max-width="300">
<v-card> <v-card>
@ -23,11 +52,18 @@
Zeit bis zum Logout ändern Zeit bis zum Logout ändern
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
<v-combobox solo :items="lifeTimes" item-text="text" item-value="value" v-model="selectLifeTime" return-object /> <v-combobox
solo
:items="lifeTimes"
item-text="text"
item-value="value"
v-model="selectLifeTime"
return-object
/>
</v-card-text> </v-card-text>
<v-card-actions> <v-card-actions>
<v-spacer /> <v-spacer />
<v-btn text @click="change=false">Abbrechen</v-btn> <v-btn text @click="change = false">Abbrechen</v-btn>
<v-btn color="primary" text @click="save()">Speichern</v-btn> <v-btn color="primary" text @click="save()">Speichern</v-btn>
</v-card-actions> </v-card-actions>
</v-card> </v-card>
@ -152,6 +188,35 @@ export default {
} else { } else {
return minutesString + ':' + secondsString + ' Minuten bis zum Logout' return minutesString + ':' + secondsString + ' Minuten bis zum Logout'
} }
},
calcTimeLittle() {
var minutes = this.lifeTime / 60
var seconds = this.lifeTime % 60
var minutesString =
minutes < 10 ? '0' + Math.floor(minutes % 60) : Math.floor(minutes % 60)
var secondsString =
seconds < 10 ? '0' + Math.floor(seconds) : Math.floor(seconds)
if (minutes > 60) {
var hours = minutes / 60
if (hours > 24) {
var days = hours / 24
var now = new Date()
var dayMonth = new Date(
now.getFullYear(),
now.getMonth() + 1,
0
).getDate()
if (days >= dayMonth) {
return Math.floor(days / dayMonth) + 'M'
} else {
return Math.floor(days) + 'D'
}
} else {
return Math.floor(hours) + ':' + minutesString + ':' + secondsString
}
} else {
return minutesString + ':' + secondsString
}
} }
}, },
beforeDestroy() { beforeDestroy() {