Merge pull request #6316 from artoscinote/ma_SCI_9400

Add back version modal link [SCI-9400]
This commit is contained in:
Martin Artnik 2023-10-03 10:54:47 +02:00 committed by GitHub
commit b4ce0dda60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 3 deletions

View file

@ -16,8 +16,8 @@
</div> </div>
<MenuDropdown <MenuDropdown
class="ml-auto" class="ml-auto"
v-if="this.settingsMenu && this.settingsMenu.length > 0" v-if="settingsMenu && settingsMenu.length > 0"
:listItems="this.settingsMenu.map((item) => { return { text: item.name, url: item.url } })" :listItems="settingsMenuItems"
:btnClasses="'btn btn-light icon-btn btn-black'" :btnClasses="'btn btn-light icon-btn btn-black'"
:position="'right'" :position="'right'"
:btnIcon="'sn-icon sn-icon-settings'" :btnIcon="'sn-icon sn-icon-settings'"
@ -89,7 +89,6 @@
helpMenu: null, helpMenu: null,
settingsMenu: null, settingsMenu: null,
userMenu: null, userMenu: null,
showAboutModal: false,
notificationsOpened: false, notificationsOpened: false,
unseenNotificationsCount: 0 unseenNotificationsCount: 0
} }
@ -110,6 +109,18 @@
beforeDestroy: function(){ beforeDestroy: function(){
clearTimeout(this.unseenNotificationsTimeout); clearTimeout(this.unseenNotificationsTimeout);
}, },
computed: {
settingsMenuItems() {
return this.settingsMenu.map((item) => {
return { text: item.name, url: item.url } }
).concat(
{
text: this.i18n.t('left_menu_bar.support_links.core_version'),
modalTarget: '#aboutModal', url: ''
}
)
}
},
methods: { methods: {
fetchData() { fetchData() {
$.get(this.url, (result) => { $.get(this.url, (result) => {

View file

@ -21,6 +21,8 @@
<a :href="item.url" v-if="!item.submenu" <a :href="item.url" v-if="!item.submenu"
:traget="item.url_target || '_self'" :traget="item.url_target || '_self'"
:class="{ 'bg-sn-super-light-blue': item.active }" :class="{ 'bg-sn-super-light-blue': item.active }"
:data-toggle="item.modalTarget && 'modal'"
:data-target="item.modalTarget"
class="block whitespace-nowrap rounded px-3 py-2.5 hover:!text-sn-blue hover:no-underline cursor-pointer hover:bg-sn-super-light-grey" class="block whitespace-nowrap rounded px-3 py-2.5 hover:!text-sn-blue hover:no-underline cursor-pointer hover:bg-sn-super-light-grey"
@click="handleClick($event, item)" @click="handleClick($event, item)"
> >