jormungandr-bite/packages/client/src/pages/my-antennas/edit.vue

44 lines
897 B
Vue
Raw Normal View History

2021-08-07 02:55:16 -06:00
<template>
<div class="">
<XAntenna v-if="antenna" :antenna="antenna" @updated="onAntennaUpdated"/>
</div>
</template>
<script lang="ts" setup>
import { inject, watch } from 'vue';
2021-08-07 02:55:16 -06:00
import XAntenna from './editor.vue';
2021-11-11 10:02:25 -07:00
import * as os from '@/os';
import { i18n } from '@/i18n';
import { useRouter } from '@/router';
import { definePageMetadata } from '@/scripts/page-metadata';
2021-08-07 02:55:16 -06:00
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,
2022-11-06 19:30:26 -07:00
icon: 'ph-flying-saucer-bold',
2021-08-07 02:55:16 -06:00
});
</script>
<style lang="scss" scoped>
</style>