Footer.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <footer>
  3. <div class="columns is-gapless" v-if="showButtons">
  4. <div class="column has-text-centered">
  5. <div class="field is-grouped">
  6. <slot></slot>
  7. </div>
  8. </div>
  9. </div>
  10. <div v-if="editMode" class="content has-text-centered">
  11. <button id="lnkExitEdit" class="button is-ghost is-like-text" @click="exitEdit">{{ $t('commons.done') }}</button>
  12. </div>
  13. <div v-else class="content has-text-centered">
  14. <div v-if="$route.meta.showAbout === true" class="is-size-6">
  15. <router-link :to="{ name: 'about' }" class="has-text-grey">
  16. 2FAuth – <span class="has-text-weight-bold">v{{ appVersion }}</span>
  17. </router-link>
  18. </div>
  19. <div v-else>
  20. <router-link id="lnkSettings" :to="{ name: 'settings.options' }" class="has-text-grey">
  21. {{ $t('settings.settings') }}<span v-if="$root.appSettings.latestRelease && $root.appSettings.checkForUpdate" class="release-flag"></span>
  22. </router-link>
  23. <span v-if="!this.$root.appConfig.proxyAuth || (this.$root.appConfig.proxyAuth && this.$root.appConfig.proxyLogoutUrl)">
  24. - <button id="lnkSignOut" class="button is-text is-like-text has-text-grey" @click="logout">{{ $t('auth.sign_out') }}</button>
  25. </span>
  26. </div>
  27. </div>
  28. </footer>
  29. </template>
  30. <script>
  31. export default {
  32. name: 'VueFooter',
  33. data(){
  34. return {
  35. }
  36. },
  37. props: {
  38. showButtons: true,
  39. editMode: false,
  40. },
  41. methods: {
  42. logout() {
  43. if(confirm(this.$t('auth.confirm.logout'))) {
  44. this.appLogout()
  45. }
  46. },
  47. exitEdit() {
  48. this.$emit('exit-edit')
  49. }
  50. }
  51. };
  52. </script>