Sharkey/packages/client/src/pages/my-antennas/edit.vue

42 lines
820 B
Vue
Raw Normal View History

2021-08-07 11:55:16 +03:00
<template>
<div class="">
<XAntenna v-if="antenna" :antenna="antenna" @updated="onAntennaUpdated"/>
</div>
</template>
<script lang="ts" setup>
import { watch } from 'vue';
2021-08-07 11:55:16 +03:00
import XAntenna from './editor.vue';
2021-11-11 19:02:25 +02:00
import * as symbols from '@/symbols';
import * as os from '@/os';
import { MisskeyNavigator } from '@/scripts/navigate';
import { i18n } from '@/i18n';
2021-08-07 11:55:16 +03:00
const nav = new MisskeyNavigator();
let antenna: any = $ref(null);
const props = defineProps<{
antennaId: string
}>();
function onAntennaUpdated() {
nav.push('/my/antennas');
}
os.api('antennas/show', { antennaId: props.antennaId }).then((antennaResponse) => {
antenna = antennaResponse;
});
defineExpose({
[symbols.PAGE_INFO]: {
title: i18n.ts.manageAntennas,
icon: 'fas fa-satellite',
2021-08-07 11:55:16 +03:00
}
});
</script>
<style lang="scss" scoped>
</style>