1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-18 00:28:16 +09:00
hotomoe/packages/frontend/src/pages/my-antennas/create.vue

46 lines
902 B
Vue
Raw Normal View History

<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-License-Identifier: AGPL-3.0-only
-->
2021-08-07 17:55:16 +09:00
<template>
2023-05-19 20:52:15 +09:00
<div>
2021-08-07 17:55:16 +09:00
<XAntenna :antenna="draft" @created="onAntennaCreated"/>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
2021-08-07 17:55:16 +09:00
import XAntenna from './editor.vue';
2023-09-19 16:37:43 +09:00
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { useRouter } from '@/router.js';
import { antennasCache } from '@/cache.js';
const router = useRouter();
2021-08-07 17:55:16 +09:00
const draft = ref({
name: '',
src: 'all',
userListId: null,
users: [],
keywords: [],
excludeKeywords: [],
withReplies: false,
caseSensitive: false,
localOnly: false,
withFile: false,
notify: false,
});
2021-08-07 17:55:16 +09:00
function onAntennaCreated() {
antennasCache.delete();
router.push('/my/antennas');
}
2021-08-07 17:55:16 +09:00
definePageMetadata({
title: i18n.ts.manageAntennas,
icon: 'ti ti-antenna',
2021-08-07 17:55:16 +09:00
});
</script>