0
0

fix(client): fix some routings

This commit is contained in:
syuilo 2022-07-20 23:21:42 +09:00
parent 4761ff7444
commit 8261321dac
3 changed files with 22 additions and 2 deletions

View File

@ -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);

View File

@ -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>

View File

@ -81,6 +81,14 @@ export const routes = [{
path: '/general',
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',
@ -121,6 +129,14 @@ export const routes = [{
path: '/api',
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',