Sharkey/packages/frontend/src/pages/my-antennas/edit.vue
Kagami Sascha Rosylight 63df2c851e
refactor: remove all unused imports (#9951)
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
2023-02-16 23:09:41 +09:00

42 lines
852 B
Vue

<template>
<div class="">
<XAntenna v-if="antenna" :antenna="antenna" @updated="onAntennaUpdated"/>
</div>
</template>
<script lang="ts" setup>
import XAntenna from './editor.vue';
import * as os from '@/os';
import { i18n } from '@/i18n';
import { useRouter } from '@/router';
import { definePageMetadata } from '@/scripts/page-metadata';
const router = useRouter();
let antenna: any = $ref(null);
const props = defineProps<{
antennaId: string
}>();
function onAntennaUpdated() {
router.push('/my/antennas');
}
os.api('antennas/show', { antennaId: props.antennaId }).then((antennaResponse) => {
antenna = antennaResponse;
});
const headerActions = $computed(() => []);
const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.manageAntennas,
icon: 'ti ti-antenna',
});
</script>
<style lang="scss" scoped>
</style>