diff --git a/src/preload/DesktopPagePreload.ts b/src/preload/DesktopPagePreload.ts index b6517c5..ca0f28b 100644 --- a/src/preload/DesktopPagePreload.ts +++ b/src/preload/DesktopPagePreload.ts @@ -1,5 +1,5 @@ // @ts-ignore -const { contextBridge, ipcRenderer } = require('electron'); +const { contextBridge, ipcRenderer, webUtils } = require('electron'); contextBridge.exposeInMainWorld('appBridge', { async send(api: string, args: any = {}): Promise { @@ -19,6 +19,9 @@ contextBridge.exposeInMainWorld('appBridge', { getPrivateApiHost(): string { return ipcRenderer.sendSync('getPrivateApiHost'); }, + getFilePath(file: File): string { + return webUtils.getPathForFile(file); + }, }); document.addEventListener('desktop:api', (e: any) => { diff --git a/src/ui/src/pages/desktop/index.ts b/src/ui/src/pages/desktop/index.ts index 6e89a9a..e886b52 100644 --- a/src/ui/src/pages/desktop/index.ts +++ b/src/ui/src/pages/desktop/index.ts @@ -21,7 +21,7 @@ import Versions from './views/datastore-details/Versions.vue'; import Datastores from './views/Datastores.vue'; import GettingStartedChromeAlive from './views/getting-started/ChromeAlive.vue'; import GettingStartedClone from './views/getting-started/Clone.vue'; -import GettingStartedCredit from './views/getting-started/Credit.vue'; +import GettingStartedQueryPayment from './views/getting-started/QueryPayment.vue'; import GettingStartedDatastore from './views/getting-started/Datastore.vue'; import GettingStartedDeploy from './views/getting-started/Deploy.vue'; import GettingStartedHero from './views/getting-started/Hero.vue'; @@ -40,6 +40,7 @@ declare global { appBridge: { send(api: string, args: any): Promise; getPrivateApiHost(): string; + getFilePath(file: File): string; }; load(url: string): void; } @@ -56,6 +57,19 @@ window.load = function load(host: string) { const router = VueRouter.createRouter({ history: VueRouter.createWebHashHistory(), + scrollBehavior(to, from, savedPosition) { + // if (to.hash) { + // // Required because our is wrapped in a + // // So elements are mounted after a delay + // return tryScrollToAnchor(to.hash, 1000, 100); + // } + + if (savedPosition) { + return savedPosition; + } else { + return { top: 0 }; + } + }, routes: [ { path: '/getting-started', @@ -67,7 +81,7 @@ window.load = function load(host: string) { { path: 'deploy', component: GettingStartedDeploy }, { path: 'payment', component: GettingStartedPayment }, { path: 'query', component: GettingStartedQuery }, - { path: 'credit', component: GettingStartedCredit }, + { path: 'queryPayment', component: GettingStartedQueryPayment }, { path: 'datastore', component: GettingStartedDatastore }, { path: 'clone', component: GettingStartedClone }, ], diff --git a/src/ui/src/pages/desktop/views/accounts/Overview.vue b/src/ui/src/pages/desktop/views/accounts/Overview.vue index 0c52051..4744b88 100644 --- a/src/ui/src/pages/desktop/views/accounts/Overview.vue +++ b/src/ui/src/pages/desktop/views/accounts/Overview.vue @@ -209,7 +209,7 @@ On Hold: {{ toArgons(account.heldBalance) }}> + >