Sharkey/packages/frontend/src/pages/my-antennas/create.vue

39 lines
732 B
Vue
Raw Normal View History

2021-08-07 11:55:16 +03:00
<template>
2023-05-19 14:52:15 +03:00
<div>
2021-08-07 11:55:16 +03:00
<XAntenna :antenna="draft" @created="onAntennaCreated"/>
</div>
</template>
<script lang="ts" setup>
2021-08-07 11:55:16 +03:00
import XAntenna from './editor.vue';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
import { useRouter } from '@/router';
import { antennasCache } from '@/cache';
const router = useRouter();
2021-08-07 11:55:16 +03:00
let draft = $ref({
name: '',
src: 'all',
userListId: null,
users: [],
keywords: [],
excludeKeywords: [],
withReplies: false,
caseSensitive: false,
withFile: false,
notify: false,
});
2021-08-07 11:55:16 +03:00
function onAntennaCreated() {
antennasCache.delete();
router.push('/my/antennas');
}
2021-08-07 11:55:16 +03:00
definePageMetadata({
title: i18n.ts.manageAntennas,
icon: 'ti ti-antenna',
2021-08-07 11:55:16 +03:00
});
</script>