Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): Use web hash history in ui (fix #3481) #3487

Merged
merged 4 commits into from Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/ui/client/composables/params.ts
Expand Up @@ -3,7 +3,7 @@ export interface Params {
view: null | 'graph' | 'editor' | 'console'
}

export const params = useUrlSearchParams<Params>('hash-params', {
export const params = useUrlSearchParams<Params>('hash', {
initialValue: {
file: '',
view: null,
Expand Down
5 changes: 2 additions & 3 deletions packages/ui/client/global-setup.ts
@@ -1,6 +1,6 @@
/// <reference types="vite-plugin-pages/client" />

import { createRouter as _createRouter, createWebHistory } from 'vue-router'
import { createRouter as _createRouter, createWebHashHistory } from 'vue-router'
import FloatingVue, { VTooltip } from 'floating-vue'
import routes from 'virtual:generated-pages'
import 'd3-graph-controller/default.css'
Expand All @@ -11,7 +11,6 @@ import 'codemirror-theme-vars/base.css'
import './styles/main.css'
import 'floating-vue/dist/style.css'
import 'uno.css'
import { BASE_PATH } from './constants'

export const directives = {
tooltip: VTooltip,
Expand All @@ -22,7 +21,7 @@ FloatingVue.options.distance = 10

export function createRouter() {
return _createRouter({
history: createWebHistory(BASE_PATH),
history: createWebHashHistory(),
routes,
})
}
Expand Down