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