mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-10-26 19:14:12 +00:00 
			
		
		
		
	fix deck navigation
This commit is contained in:
		
							parent
							
								
									3fc427b699
								
							
						
					
					
						commit
						3c65e7b76e
					
				
					 3 changed files with 17 additions and 8 deletions
				
			
		|  | @ -10,7 +10,7 @@ import { faExpandAlt, faColumns, faExternalLinkAlt, faLink, faWindowMaximize } f | |||
| import * as os from '@/os'; | ||||
| import copyToClipboard from '@/scripts/copy-to-clipboard'; | ||||
| import { router } from '@/router'; | ||||
| import { ui, url } from '@/config'; | ||||
| import { url } from '@/config'; | ||||
| import { popout } from '@/scripts/popout'; | ||||
| import { ColdDeviceStorage } from '@/store'; | ||||
| 
 | ||||
|  | @ -115,13 +115,6 @@ export default defineComponent({ | |||
| 				if (this.$store.state.defaultSideView && 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) { | ||||
| 					window.scroll({ top: 0, behavior: 'smooth' }); | ||||
|  |  | |||
|  | @ -50,6 +50,14 @@ export default defineComponent({ | |||
| 		DeckColumnCore, | ||||
| 	}, | ||||
| 
 | ||||
| 	provide() { | ||||
| 		return deckStore.state.navWindow ? { | ||||
| 			navHook: (url) => { | ||||
| 				os.pageWindow(url); | ||||
| 			} | ||||
| 		} : {}; | ||||
| 	}, | ||||
| 
 | ||||
| 	data() { | ||||
| 		return { | ||||
| 			deckStore, | ||||
|  |  | |||
|  | @ -22,6 +22,14 @@ export default defineComponent({ | |||
| 		XSidebar | ||||
| 	}, | ||||
| 
 | ||||
| 	provide() { | ||||
| 		return { | ||||
| 			navHook: (url) => { | ||||
| 				os.pageWindow(url); | ||||
| 			} | ||||
| 		}; | ||||
| 	}, | ||||
| 
 | ||||
| 	data() { | ||||
| 		return { | ||||
| 			host: host, | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue