2023-07-27 08:31:52 +03:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
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>
|
|
|
|
|
2022-01-15 09:40:15 +02:00
|
|
|
<script lang="ts" setup>
|
2021-08-07 11:55:16 +03:00
|
|
|
import XAntenna from './editor.vue';
|
2022-01-15 09:40:15 +02:00
|
|
|
import { i18n } from '@/i18n';
|
2022-06-20 11:38:49 +03:00
|
|
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
|
|
|
import { useRouter } from '@/router';
|
2023-07-10 09:55:10 +03:00
|
|
|
import { antennasCache } from '@/cache';
|
2022-06-20 11:38:49 +03:00
|
|
|
|
|
|
|
const router = useRouter();
|
2021-08-07 11:55:16 +03:00
|
|
|
|
2022-01-15 09:40:15 +02:00
|
|
|
let draft = $ref({
|
|
|
|
name: '',
|
|
|
|
src: 'all',
|
|
|
|
userListId: null,
|
|
|
|
users: [],
|
|
|
|
keywords: [],
|
|
|
|
excludeKeywords: [],
|
|
|
|
withReplies: false,
|
|
|
|
caseSensitive: false,
|
|
|
|
withFile: false,
|
2022-06-20 11:38:49 +03:00
|
|
|
notify: false,
|
2022-01-15 09:40:15 +02:00
|
|
|
});
|
2021-08-07 11:55:16 +03:00
|
|
|
|
2022-01-15 09:40:15 +02:00
|
|
|
function onAntennaCreated() {
|
2023-07-10 09:55:10 +03:00
|
|
|
antennasCache.delete();
|
2022-01-15 09:40:15 +02:00
|
|
|
router.push('/my/antennas');
|
|
|
|
}
|
2021-08-07 11:55:16 +03:00
|
|
|
|
2022-06-20 11:38:49 +03:00
|
|
|
definePageMetadata({
|
|
|
|
title: i18n.ts.manageAntennas,
|
2022-12-19 12:01:30 +02:00
|
|
|
icon: 'ti ti-antenna',
|
2021-08-07 11:55:16 +03:00
|
|
|
});
|
|
|
|
</script>
|