mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-09 19:53:08 +02:00
Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop
This commit is contained in:
commit
c46b45a467
1 changed files with 7 additions and 11 deletions
|
@ -37,20 +37,16 @@ const emit = defineEmits<{
|
||||||
let id: any = $ref(props.modelValue.note);
|
let id: any = $ref(props.modelValue.note);
|
||||||
let note: any = $ref(null);
|
let note: any = $ref(null);
|
||||||
|
|
||||||
watch(id, async () => {
|
watch($$(id), async () => {
|
||||||
if (id && (id.startsWith('http://') || id.startsWith('https://'))) {
|
if (id && (id.startsWith('http://') || id.startsWith('https://'))) {
|
||||||
emit('update:modelValue', {
|
id = (id.endsWith('/') ? id.slice(0, -1) : id).split('/').pop();
|
||||||
...props.modelValue,
|
|
||||||
note: (id.endsWith('/') ? id.slice(0, -1) : id).split('/').pop(),
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
emit('update:modelValue', {
|
|
||||||
...props.modelValue,
|
|
||||||
note: id,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
note = await os.api('notes/show', { noteId: props.modelValue.note });
|
emit('update:modelValue', {
|
||||||
|
...props.modelValue,
|
||||||
|
note: id,
|
||||||
|
});
|
||||||
|
note = await os.api('notes/show', { noteId: id });
|
||||||
}, {
|
}, {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue