fix deck navigation
This commit is contained in:
parent
3fc427b699
commit
3c65e7b76e
|
@ -10,7 +10,7 @@ import { faExpandAlt, faColumns, faExternalLinkAlt, faLink, faWindowMaximize } f
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
||||||
import { router } from '@/router';
|
import { router } from '@/router';
|
||||||
import { ui, url } from '@/config';
|
import { url } from '@/config';
|
||||||
import { popout } from '@/scripts/popout';
|
import { popout } from '@/scripts/popout';
|
||||||
import { ColdDeviceStorage } from '@/store';
|
import { ColdDeviceStorage } from '@/store';
|
||||||
|
|
||||||
|
@ -115,13 +115,6 @@ export default defineComponent({
|
||||||
if (this.$store.state.defaultSideView && this.sideViewHook && this.to !== '/') {
|
if (this.$store.state.defaultSideView && this.sideViewHook && this.to !== '/') {
|
||||||
return this.sideViewHook(this.to);
|
return this.sideViewHook(this.to);
|
||||||
}
|
}
|
||||||
// TODO: a.vueからdeck-sotreを参照したくないのでなんとかする
|
|
||||||
//if (deckStore.state.device.deckNavWindow && (ui === 'deck') && this.to !== '/') {
|
|
||||||
// return this.window();
|
|
||||||
//}
|
|
||||||
if (ui === 'desktop') {
|
|
||||||
return this.window();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.$router.currentRoute.value.path === this.to) {
|
if (this.$router.currentRoute.value.path === this.to) {
|
||||||
window.scroll({ top: 0, behavior: 'smooth' });
|
window.scroll({ top: 0, behavior: 'smooth' });
|
||||||
|
|
|
@ -50,6 +50,14 @@ export default defineComponent({
|
||||||
DeckColumnCore,
|
DeckColumnCore,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
provide() {
|
||||||
|
return deckStore.state.navWindow ? {
|
||||||
|
navHook: (url) => {
|
||||||
|
os.pageWindow(url);
|
||||||
|
}
|
||||||
|
} : {};
|
||||||
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
deckStore,
|
deckStore,
|
||||||
|
|
|
@ -22,6 +22,14 @@ export default defineComponent({
|
||||||
XSidebar
|
XSidebar
|
||||||
},
|
},
|
||||||
|
|
||||||
|
provide() {
|
||||||
|
return {
|
||||||
|
navHook: (url) => {
|
||||||
|
os.pageWindow(url);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
host: host,
|
host: host,
|
||||||
|
|
Loading…
Reference in New Issue