2023-07-27 14:31:52 +09:00
|
|
|
<!--
|
|
|
|
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>
|
|
|
|
|
2022-01-15 16:40:15 +09:00
|
|
|
<script lang="ts" setup>
|
2023-12-07 14:42:09 +09:00
|
|
|
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';
|
2023-10-16 15:06:00 +09:00
|
|
|
import { antennasCache } from '@/cache.js';
|
2022-06-20 17:38:49 +09:00
|
|
|
|
|
|
|
const router = useRouter();
|
2021-08-07 17:55:16 +09:00
|
|
|
|
2023-12-07 14:42:09 +09:00
|
|
|
const draft = ref({
|
2022-01-15 16:40:15 +09:00
|
|
|
name: '',
|
|
|
|
src: 'all',
|
|
|
|
userListId: null,
|
|
|
|
users: [],
|
|
|
|
keywords: [],
|
|
|
|
excludeKeywords: [],
|
|
|
|
withReplies: false,
|
|
|
|
caseSensitive: false,
|
2023-10-16 15:06:00 +09:00
|
|
|
localOnly: false,
|
2022-01-15 16:40:15 +09:00
|
|
|
withFile: false,
|
2022-06-20 17:38:49 +09:00
|
|
|
notify: false,
|
2022-01-15 16:40:15 +09:00
|
|
|
});
|
2021-08-07 17:55:16 +09:00
|
|
|
|
2022-01-15 16:40:15 +09:00
|
|
|
function onAntennaCreated() {
|
2023-07-10 15:55:10 +09:00
|
|
|
antennasCache.delete();
|
2022-01-15 16:40:15 +09:00
|
|
|
router.push('/my/antennas');
|
|
|
|
}
|
2021-08-07 17:55:16 +09:00
|
|
|
|
2022-06-20 17:38:49 +09:00
|
|
|
definePageMetadata({
|
|
|
|
title: i18n.ts.manageAntennas,
|
2022-12-19 19:01:30 +09:00
|
|
|
icon: 'ti ti-antenna',
|
2021-08-07 17:55:16 +09:00
|
|
|
});
|
|
|
|
</script>
|