mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-01-11 16:58:58 +01:00
Fix unwanted footer content in management mode
This commit is contained in:
parent
2ad5105378
commit
53e3698076
@ -1,24 +1,19 @@
|
||||
<script setup>
|
||||
import { useAppSettingsStore } from '@/stores/appSettings'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import { useBusStore } from '@/stores/bus'
|
||||
|
||||
const appSettings = useAppSettingsStore()
|
||||
const user = useUserStore()
|
||||
const bus = useBusStore()
|
||||
const $2fauth = inject('2fauth')
|
||||
|
||||
const props = defineProps({
|
||||
showButtons: true
|
||||
showButtons: true,
|
||||
internalFooterType: {
|
||||
type: String,
|
||||
default: 'navLinks'
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['management-mode-exited'])
|
||||
|
||||
function exitManagementMode() {
|
||||
bus.inManagementMode = false
|
||||
emit('management-mode-exited')
|
||||
}
|
||||
|
||||
function logout() {
|
||||
if(confirm(trans('auth.confirm.logout'))) {
|
||||
user.logout()
|
||||
@ -35,8 +30,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="bus.inManagementMode" class="content has-text-centered">
|
||||
<button id="lnkExitEdit" class="button is-ghost is-like-text" @click="exitManagementMode">{{ $t('commons.done') }}</button>
|
||||
<div v-if="internalFooterType == 'doneButton'" class="content has-text-centered">
|
||||
<button id="lnkExitEdit" class="button is-ghost is-like-text" @click.stop="$emit('doneButtonClicked', true)">{{ $t('commons.done') }}</button>
|
||||
</div>
|
||||
<div v-else class="content has-text-centered">
|
||||
<div v-if="$route.meta.showAbout === true" class="is-size-6">
|
||||
|
@ -217,6 +217,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exits from the Management mode
|
||||
*/
|
||||
function exitManagementMode()
|
||||
{
|
||||
bus.inManagementMode = false
|
||||
twofaccounts.selectNone()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -344,7 +353,7 @@
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<VueFooter :showButtons="true" v-on:management-mode-exited="twofaccounts.selectNone()">
|
||||
<VueFooter :showButtons="true" :internalFooterType="bus.inManagementMode && !showDestinationGroupSelector ? 'doneButton' : 'navLinks'" @done-button-clicked="exitManagementMode">
|
||||
<ActionButtons
|
||||
v-model:inManagementMode="bus.inManagementMode"
|
||||
:areDisabled="twofaccounts.hasNoneSelected"
|
||||
|
Loading…
Reference in New Issue
Block a user