Show name in webhooks header

This commit is contained in:
rijkvanzanten
2020-06-11 13:53:04 -04:00
parent 82ad2959ba
commit 04f46847cd
3 changed files with 12 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
<template>
<private-view :title="$t('editing_webhook')">
<private-view :title="title">
<template #title-outer:prepend>
<v-button class="header-icon" rounded icon exact :to="`/${currentProjectKey}/settings/webhooks/`">
<v-icon name="arrow_back" />
@@ -76,6 +76,7 @@ import RevisionsDrawerDetail from '@/views/private/components/revisions-drawer-d
import useItem from '@/composables/use-item';
import SaveOptions from '@/views/private/components/save-options';
import marked from 'marked';
import i18n from '@/lang';
type Values = {
[field: string]: any;
@@ -101,9 +102,14 @@ export default defineComponent({
);
const hasEdits = computed<boolean>(() => Object.keys(edits.value).length > 0);
const confirmDelete = ref(false);
const title = computed(() => {
if (loading.value) return i18n.t('loading');
if (isNew.value) return i18n.t('adding_webhook');
return item.value.name;
});
return {
item,
loading,
@@ -122,6 +128,7 @@ export default defineComponent({
isBatch,
currentProjectKey,
marked,
title,
};
async function saveAndQuit() {