mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-19 17:05:35 +02:00
refactor
This commit is contained in:
@@ -194,7 +194,7 @@ const sensitiveMediaDetectionForm = useForm({
|
|||||||
state.sensitiveMediaDetectionSensitivity === 2 ? 'medium' :
|
state.sensitiveMediaDetectionSensitivity === 2 ? 'medium' :
|
||||||
state.sensitiveMediaDetectionSensitivity === 3 ? 'high' :
|
state.sensitiveMediaDetectionSensitivity === 3 ? 'high' :
|
||||||
state.sensitiveMediaDetectionSensitivity === 4 ? 'veryHigh' :
|
state.sensitiveMediaDetectionSensitivity === 4 ? 'veryHigh' :
|
||||||
0,
|
null as never,
|
||||||
setSensitiveFlagAutomatically: state.setSensitiveFlagAutomatically,
|
setSensitiveFlagAutomatically: state.setSensitiveFlagAutomatically,
|
||||||
enableSensitiveMediaDetectionForVideos: state.enableSensitiveMediaDetectionForVideos,
|
enableSensitiveMediaDetectionForVideos: state.enableSensitiveMediaDetectionForVideos,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -138,9 +138,10 @@ async function addPinnedNote() {
|
|||||||
const { canceled, result: value } = await os.inputText({
|
const { canceled, result: value } = await os.inputText({
|
||||||
title: i18n.ts.noteIdOrUrl,
|
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', {
|
const note = await os.apiWithDialog('notes/show', {
|
||||||
noteId: value.includes('/') ? value.split('/').pop() : value,
|
noteId: fromUrl ?? value,
|
||||||
});
|
});
|
||||||
pinnedNotes.value = [{
|
pinnedNotes.value = [{
|
||||||
id: note.id,
|
id: note.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user