2021-08-07 10:55:16 +02:00
|
|
|
<template>
|
2023-04-08 02:01:42 +02:00
|
|
|
<div class="">
|
|
|
|
<XAntenna
|
|
|
|
v-if="antenna"
|
|
|
|
:antenna="antenna"
|
|
|
|
@updated="onAntennaUpdated"
|
|
|
|
/>
|
|
|
|
</div>
|
2021-08-07 10:55:16 +02:00
|
|
|
</template>
|
|
|
|
|
2022-05-25 09:37:15 +02:00
|
|
|
<script lang="ts" setup>
|
2023-04-08 02:01:42 +02:00
|
|
|
import { inject, watch } from "vue";
|
|
|
|
import XAntenna from "./editor.vue";
|
|
|
|
import * as os from "@/os";
|
|
|
|
import { i18n } from "@/i18n";
|
|
|
|
import { useRouter } from "@/router";
|
|
|
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
2021-08-07 10:55:16 +02:00
|
|
|
|
2022-06-20 10:38:49 +02:00
|
|
|
const router = useRouter();
|
2022-05-25 09:37:15 +02:00
|
|
|
|
|
|
|
let antenna: any = $ref(null);
|
|
|
|
|
|
|
|
const props = defineProps<{
|
2023-04-08 02:01:42 +02:00
|
|
|
antennaId: string;
|
2022-05-25 09:37:15 +02:00
|
|
|
}>();
|
|
|
|
|
|
|
|
function onAntennaUpdated() {
|
2023-04-08 02:01:42 +02:00
|
|
|
router.push("/my/antennas");
|
2022-05-25 09:37:15 +02:00
|
|
|
}
|
|
|
|
|
2023-04-08 02:01:42 +02:00
|
|
|
os.api("antennas/show", { antennaId: props.antennaId }).then(
|
|
|
|
(antennaResponse) => {
|
|
|
|
antenna = antennaResponse;
|
|
|
|
}
|
|
|
|
);
|
2022-05-25 09:37:15 +02:00
|
|
|
|
2022-06-20 10:38:49 +02:00
|
|
|
const headerActions = $computed(() => []);
|
|
|
|
|
|
|
|
const headerTabs = $computed(() => []);
|
|
|
|
|
|
|
|
definePageMetadata({
|
|
|
|
title: i18n.ts.manageAntennas,
|
2023-04-08 02:01:42 +02:00
|
|
|
icon: "ph-flying-saucer ph-bold ph-lg",
|
2021-08-07 10:55:16 +02:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2023-04-08 02:01:42 +02:00
|
|
|
<style lang="scss" scoped></style>
|