Browse Source

feat: Added cmd + click on home button

pull/7619/head
Ruslan Semak 2 months ago
parent
commit
7f4ab7f9d5
1 changed files with 10 additions and 2 deletions
  1. 12
      client/themes/default/components/nav-sidebar.vue

12
client/themes/default/components/nav-sidebar.vue

@ -220,8 +220,16 @@ export default {
await this.fetchBrowseItems(curPage)
}
},
goHome () {
window.location.assign(siteLangs.length > 0 ? `/${this.locale}/home` : '/')
goHome (event) {
const url = siteLangs.length > 0 ? `/${this.locale}/home` : '/'
if (event.ctrlKey || event.metaKey) {
// Если зажат Ctrl или Cmd (на Mac), открываем в новом окне
window.open(url, '_blank')
} else {
// Иначе открываем в текущем окне
window.location.assign(url)
}
}
},
mounted () {

Loading…
Cancel
Save