mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-06-05 02:24:11 +02:00
refactor
This commit is contained in:
@@ -37,27 +37,14 @@ const props = defineProps<{
|
||||
const antenna = ref<Misskey.entities.Antenna | null>(null);
|
||||
const tlEl = useTemplateRef('tlEl');
|
||||
|
||||
async function timetravel() {
|
||||
const { canceled, result: date } = await os.inputDate({
|
||||
title: i18n.ts.date,
|
||||
});
|
||||
if (canceled) return;
|
||||
|
||||
tlEl.value.timetravel(date);
|
||||
}
|
||||
|
||||
function settings() {
|
||||
router.push('/my/antennas/:antennaId', {
|
||||
params: {
|
||||
antennaId: props.antennaId,
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function focus() {
|
||||
tlEl.value.focus();
|
||||
}
|
||||
|
||||
watch(() => props.antennaId, async () => {
|
||||
antenna.value = await misskeyApi('antennas/show', {
|
||||
antennaId: props.antennaId,
|
||||
@@ -65,10 +52,6 @@ watch(() => props.antennaId, async () => {
|
||||
}, { immediate: true });
|
||||
|
||||
const headerActions = computed(() => antenna.value ? [{
|
||||
icon: 'ti ti-calendar-time',
|
||||
text: i18n.ts.jumpToSpecifiedDate,
|
||||
handler: timetravel,
|
||||
}, {
|
||||
icon: 'ti ti-settings',
|
||||
text: i18n.ts.settings,
|
||||
handler: settings,
|
||||
|
||||
Reference in New Issue
Block a user