clear-wallet/src/router/index.ts

92 lines
2.1 KiB
TypeScript
Raw Normal View History

2022-08-25 22:39:02 +00:00
import { createRouter, createWebHistory } from '@ionic/vue-router';
import { RouteRecordRaw } from 'vue-router';
2022-10-07 17:07:59 +00:00
import AppTabs from '@/views/AppTabs.vue'
2022-08-25 22:39:02 +00:00
const routes: Array<RouteRecordRaw> = [
{
2022-10-07 17:07:59 +00:00
path: '/',
redirect: '/tabs/home',
2022-08-25 22:39:02 +00:00
},
{
2022-10-07 17:07:59 +00:00
path: '/sign-msg/:rid/:param',
component: () => import('@/views/SignMessage.vue'),
},
{
path: '/sign-tx/:rid/:param',
component: () => import('@/views/SignTx.vue'),
},
{
path: '/switch-network/:rid/:param',
component: () => import('@/views/SwitchNetwork.vue'),
},
2022-10-10 23:01:14 +00:00
{
path: '/contract-error/:rid/:param/:contract',
component: () => import('@/views/ContractError.vue'),
},
2022-10-13 20:48:07 +00:00
{
2022-10-15 20:20:33 +00:00
path: '/wallet-error/:rid/:param',
2022-10-13 20:48:07 +00:00
component: () => import('@/views/WalletError.vue'),
},
{
path: '/request-network/:rid/:param',
component: () => import('@/views/RequestNetwork.vue'),
},
2022-10-07 17:07:59 +00:00
{
path: '/tabs/',
component: AppTabs,
children: [
{
path: '',
redirect: 'home',
},
{
path: 'home',
component: () => import('@/views/HomeTab.vue'),
},
{
path: 'networks',
component: () => import('@/views/NetworksTab.vue'),
},
{
path: 'settings',
component: () => import('@/views/SettingsTab.vue'),
},
{
path: 'assets',
component: () => import('@/views/AssetsTab.vue'),
},
{
path: 'accounts',
component: () => import('@/views/AccountsTab.vue'),
},
{
path: 'history',
component: () => import('@/views/HistoryTab.vue'),
},
{
path: 'add-account',
component: () => import('@/views/AddAccount.vue'),
},
2022-10-13 20:48:07 +00:00
{
path: 'add-account/edit/:address',
component: () => import('@/views/AddAccount.vue'),
},
2022-10-07 17:07:59 +00:00
{
path: 'add-network',
component: () => import('@/views/AddNetwork.vue'),
},
2022-10-10 00:52:23 +00:00
{
path: 'add-network/edit/:chainId',
component: () => import('@/views/AddNetwork.vue'),
},
2022-10-07 17:07:59 +00:00
],
},
2022-08-25 22:39:02 +00:00
]
const router = createRouter({
2022-10-07 17:07:59 +00:00
history: createWebHistory(import.meta.env.BASE_URL),
2022-08-25 22:39:02 +00:00
routes
})
export default router