fix: Show account switch modal from portal dashboard (#5712)

This commit is contained in:
Nithin David Thomas 2022-10-22 05:54:52 +05:30 committed by GitHub
parent c3426929d7
commit 8d5a9a9daa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,7 @@
<div class="row app-wrapper"> <div class="row app-wrapper">
<sidebar <sidebar
:route="currentRoute" :route="currentRoute"
@toggle-account-modal="toggleAccountModal"
@open-notification-panel="openNotificationPanel" @open-notification-panel="openNotificationPanel"
@open-key-shortcut-modal="toggleKeyShortcutModal" @open-key-shortcut-modal="toggleKeyShortcutModal"
@close-key-shortcut-modal="closeKeyShortcutModal" @close-key-shortcut-modal="closeKeyShortcutModal"
@ -21,6 +22,10 @@
<section class="app-content columns" :class="contentClassName"> <section class="app-content columns" :class="contentClassName">
<router-view /> <router-view />
<command-bar /> <command-bar />
<account-selector
:show-account-modal="showAccountModal"
@close-account-modal="toggleAccountModal"
/>
<woot-key-shortcut-modal <woot-key-shortcut-modal
v-if="showShortcutModal" v-if="showShortcutModal"
@close="closeKeyShortcutModal" @close="closeKeyShortcutModal"
@ -58,6 +63,7 @@ import PortalPopover from '../components/PortalPopover.vue';
import HelpCenterSidebar from '../components/Sidebar/Sidebar.vue'; import HelpCenterSidebar from '../components/Sidebar/Sidebar.vue';
import CommandBar from 'dashboard/routes/dashboard/commands/commandbar.vue'; import CommandBar from 'dashboard/routes/dashboard/commands/commandbar.vue';
import WootKeyShortcutModal from 'dashboard/components/widgets/modal/WootKeyShortcutModal'; import WootKeyShortcutModal from 'dashboard/components/widgets/modal/WootKeyShortcutModal';
import AccountSelector from 'dashboard/components/layout/sidebarComponents/AccountSelector';
import NotificationPanel from 'dashboard/routes/dashboard/notifications/components/NotificationPanel'; import NotificationPanel from 'dashboard/routes/dashboard/notifications/components/NotificationPanel';
import uiSettingsMixin from 'dashboard/mixins/uiSettings'; import uiSettingsMixin from 'dashboard/mixins/uiSettings';
import portalMixin from '../mixins/portalMixin'; import portalMixin from '../mixins/portalMixin';
@ -72,6 +78,7 @@ export default {
NotificationPanel, NotificationPanel,
PortalPopover, PortalPopover,
AddCategory, AddCategory,
AccountSelector,
}, },
mixins: [portalMixin, uiSettingsMixin], mixins: [portalMixin, uiSettingsMixin],
data() { data() {
@ -83,6 +90,7 @@ export default {
showPortalPopover: false, showPortalPopover: false,
showAddCategoryModal: false, showAddCategoryModal: false,
lastActivePortalSlug: '', lastActivePortalSlug: '',
showAccountModal: false,
}; };
}, },
@ -293,6 +301,9 @@ export default {
onClickCloseAddCategoryModal() { onClickCloseAddCategoryModal() {
this.showAddCategoryModal = false; this.showAddCategoryModal = false;
}, },
toggleAccountModal() {
this.showAccountModal = !this.showAccountModal;
},
}, },
}; };
</script> </script>