This commit is contained in:
syuilo 2025-09-01 10:19:14 +09:00
parent bdec4bf87a
commit 08ecf7ca79
2 changed files with 4 additions and 3 deletions

View File

@ -194,7 +194,7 @@ const sensitiveMediaDetectionForm = useForm({
state.sensitiveMediaDetectionSensitivity === 2 ? 'medium' :
state.sensitiveMediaDetectionSensitivity === 3 ? 'high' :
state.sensitiveMediaDetectionSensitivity === 4 ? 'veryHigh' :
0,
null as never,
setSensitiveFlagAutomatically: state.setSensitiveFlagAutomatically,
enableSensitiveMediaDetectionForVideos: state.enableSensitiveMediaDetectionForVideos,
});

View File

@ -138,9 +138,10 @@ async function addPinnedNote() {
const { canceled, result: value } = await os.inputText({
title: i18n.ts.noteIdOrUrl,
});
if (canceled) return;
if (canceled || value == null) return;
const fromUrl = value.includes('/') ? value.split('/').pop() : null;
const note = await os.apiWithDialog('notes/show', {
noteId: value.includes('/') ? value.split('/').pop() : value,
noteId: fromUrl ?? value,
});
pinnedNotes.value = [{
id: note.id,