fix(client): fix some routings
This commit is contained in:
parent
4761ff7444
commit
8261321dac
3 changed files with 22 additions and 2 deletions
|
@ -43,8 +43,12 @@ import * as os from '@/os';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
webhookId: string;
|
||||||
|
}>();
|
||||||
|
|
||||||
const webhook = await os.api('i/webhooks/show', {
|
const webhook = await os.api('i/webhooks/show', {
|
||||||
webhookId: new URLSearchParams(window.location.search).get('id'),
|
webhookId: props.webhookId,
|
||||||
});
|
});
|
||||||
|
|
||||||
let name = $ref(webhook.name);
|
let name = $ref(webhook.name);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<FormSection>
|
<FormSection>
|
||||||
<MkPagination :pagination="pagination">
|
<MkPagination :pagination="pagination">
|
||||||
<template #default="{items}">
|
<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>
|
<template #icon>
|
||||||
<i v-if="webhook.active === false" class="fas fa-circle-pause"></i>
|
<i v-if="webhook.active === false" class="fas fa-circle-pause"></i>
|
||||||
<i v-else-if="webhook.latestStatus === null" class="far fa-circle"></i>
|
<i v-else-if="webhook.latestStatus === null" class="far fa-circle"></i>
|
||||||
|
|
|
@ -81,6 +81,14 @@ export const routes = [{
|
||||||
path: '/general',
|
path: '/general',
|
||||||
name: 'general',
|
name: 'general',
|
||||||
component: page(() => import('./pages/settings/general.vue')),
|
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',
|
path: '/theme',
|
||||||
name: 'theme',
|
name: 'theme',
|
||||||
|
@ -121,6 +129,14 @@ export const routes = [{
|
||||||
path: '/api',
|
path: '/api',
|
||||||
name: 'api',
|
name: 'api',
|
||||||
component: page(() => import('./pages/settings/api.vue')),
|
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',
|
path: '/webhook',
|
||||||
name: 'webhook',
|
name: 'webhook',
|
||||||
|
|
Loading…
Reference in a new issue