summaryrefslogtreecommitdiff
path: root/packages/client/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-07-20 23:21:42 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-07-20 23:21:42 +0900
commit8261321dacc79f7fbecc47e9cd9a73c4fa0f73f5 (patch)
tree63afe3094d5bb97a3216a12d5a41417e8476bfaf /packages/client/src
parentAdd vi-VN language support (diff)
downloadsharkey-8261321dacc79f7fbecc47e9cd9a73c4fa0f73f5.tar.gz
sharkey-8261321dacc79f7fbecc47e9cd9a73c4fa0f73f5.tar.bz2
sharkey-8261321dacc79f7fbecc47e9cd9a73c4fa0f73f5.zip
fix(client): fix some routings
Diffstat (limited to 'packages/client/src')
-rw-r--r--packages/client/src/pages/settings/webhook.edit.vue6
-rw-r--r--packages/client/src/pages/settings/webhook.vue2
-rw-r--r--packages/client/src/router.ts16
3 files changed, 22 insertions, 2 deletions
diff --git a/packages/client/src/pages/settings/webhook.edit.vue b/packages/client/src/pages/settings/webhook.edit.vue
index 618250958b..e36e1d7540 100644
--- a/packages/client/src/pages/settings/webhook.edit.vue
+++ b/packages/client/src/pages/settings/webhook.edit.vue
@@ -43,8 +43,12 @@ import * as os from '@/os';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
+const props = defineProps<{
+ webhookId: string;
+}>();
+
const webhook = await os.api('i/webhooks/show', {
- webhookId: new URLSearchParams(window.location.search).get('id'),
+ webhookId: props.webhookId,
});
let name = $ref(webhook.name);
diff --git a/packages/client/src/pages/settings/webhook.vue b/packages/client/src/pages/settings/webhook.vue
index ef9b9b56f7..868d273ce4 100644
--- a/packages/client/src/pages/settings/webhook.vue
+++ b/packages/client/src/pages/settings/webhook.vue
@@ -9,7 +9,7 @@
<FormSection>
<MkPagination :pagination="pagination">
<template #default="{items}">
- <FormLink v-for="webhook in items" :key="webhook.id" :to="`/settings/webhook/edit?id=${webhook.id}`" class="_formBlock">
+ <FormLink v-for="webhook in items" :key="webhook.id" :to="`/settings/webhook/edit/${webhook.id}`" class="_formBlock">
<template #icon>
<i v-if="webhook.active === false" class="fas fa-circle-pause"></i>
<i v-else-if="webhook.latestStatus === null" class="far fa-circle"></i>
diff --git a/packages/client/src/router.ts b/packages/client/src/router.ts
index f3ca521832..573403c229 100644
--- a/packages/client/src/router.ts
+++ b/packages/client/src/router.ts
@@ -82,6 +82,14 @@ export const routes = [{
name: 'general',
component: page(() => import('./pages/settings/general.vue')),
}, {
+ path: '/theme/install',
+ name: 'theme',
+ component: page(() => import('./pages/settings/theme.install.vue')),
+ }, {
+ path: '/theme/manage',
+ name: 'theme',
+ component: page(() => import('./pages/settings/theme.manage.vue')),
+ }, {
path: '/theme',
name: 'theme',
component: page(() => import('./pages/settings/theme.vue')),
@@ -122,6 +130,14 @@ export const routes = [{
name: 'api',
component: page(() => import('./pages/settings/api.vue')),
}, {
+ path: '/webhook/edit/:webhookId',
+ name: 'webhook',
+ component: page(() => import('./pages/settings/webhook.edit.vue')),
+ }, {
+ path: '/webhook/new',
+ name: 'webhook',
+ component: page(() => import('./pages/settings/webhook.new.vue')),
+ }, {
path: '/webhook',
name: 'webhook',
component: page(() => import('./pages/settings/webhook.vue')),