mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 13:34:30 +01:00
Apply suggestions from code review
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
a89756a76c
commit
57f220e64c
@ -69,7 +69,7 @@ function removeOwnedLabelByName(note: FNote, labelName: string) {
|
|||||||
* @returns `true` if an attribute was identified and removed, `false` otherwise.
|
* @returns `true` if an attribute was identified and removed, `false` otherwise.
|
||||||
*/
|
*/
|
||||||
function removeOwnedRelationByName(note: FNote, relationName: string) {
|
function removeOwnedRelationByName(note: FNote, relationName: string) {
|
||||||
const label = note.getOwnedRelation(relationName);
|
const relation = note.getOwnedRelation(relationName);
|
||||||
if (label) {
|
if (label) {
|
||||||
removeAttributeById(note.noteId, label.attributeId);
|
removeAttributeById(note.noteId, label.attributeId);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import type { EntityChange } from "../server_types.js";
|
|||||||
interface NoteRow {
|
interface NoteRow {
|
||||||
blobId: string;
|
blobId: string;
|
||||||
dateCreated: string;
|
dateCreated: string;
|
||||||
dateMOdified: string;
|
dateModified: string;
|
||||||
isDeleted?: boolean;
|
isDeleted?: boolean;
|
||||||
isProtected?: boolean;
|
isProtected?: boolean;
|
||||||
mime: string;
|
mime: string;
|
||||||
|
|||||||
@ -268,7 +268,7 @@ export function TitleEditor({ currentValue, placeholder, save, dismiss, mode, is
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const onBlur = (newValue) => {
|
const onBlur = (newValue: string) => {
|
||||||
if (!shouldDismiss.current && newValue.trim() && (newValue !== currentValue || isNewItem)) {
|
if (!shouldDismiss.current && newValue.trim() && (newValue !== currentValue || isNewItem)) {
|
||||||
save(newValue);
|
save(newValue);
|
||||||
dismissOnNextRefreshRef.current = true;
|
dismissOnNextRefreshRef.current = true;
|
||||||
@ -311,6 +311,6 @@ export function TitleEditor({ currentValue, placeholder, save, dismiss, mode, is
|
|||||||
dismiss();
|
dismiss();
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user