mirror of
https://github.com/zadam/trilium.git
synced 2025-10-28 08:46:43 +01:00
refactor(share_settings): use this.$shareRootCheck instead of creating new local $button variable
This commit is contained in:
@@ -112,8 +112,7 @@ export default class ShareSettingsOptions extends OptionsWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkShareRoot() {
|
async checkShareRoot() {
|
||||||
const $button = this.$widget.find(".check-share-root");
|
this.$shareRootCheck.prop("disabled", true);
|
||||||
$button.prop("disabled", true);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const shareRootNotes = await searchService.searchForNotes("#shareRoot");
|
const shareRootNotes = await searchService.searchForNotes("#shareRoot");
|
||||||
@@ -131,7 +130,7 @@ export default class ShareSettingsOptions extends OptionsWidget {
|
|||||||
.text(shareRootNotes.length > 0 ? t("share.share_root_not_shared", { noteTitle: shareRootNotes[0].title }) : t("share.share_root_not_found"));
|
.text(shareRootNotes.length > 0 ? t("share.share_root_not_shared", { noteTitle: shareRootNotes[0].title }) : t("share.share_root_not_found"));
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
$button.prop("disabled", false);
|
this.$shareRootCheck.prop("disabled", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user