mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 16:25:51 +01:00
chore(prettier): fix all files
This commit is contained in:
@@ -24,22 +24,24 @@ const TPL = `
|
||||
|
||||
export default class ScriptExecutorWidget extends NoteContextAwareWidget {
|
||||
isEnabled() {
|
||||
return super.isEnabled()
|
||||
&& this.note
|
||||
&& (this.note.mime.startsWith('application/javascript') || this.isTriliumSqlite())
|
||||
&& (this.note.hasLabel('executeDescription') || this.note.hasLabel('executeButton'));
|
||||
return (
|
||||
super.isEnabled() &&
|
||||
this.note &&
|
||||
(this.note.mime.startsWith("application/javascript") || this.isTriliumSqlite()) &&
|
||||
(this.note.hasLabel("executeDescription") || this.note.hasLabel("executeButton"))
|
||||
);
|
||||
}
|
||||
|
||||
isTriliumSqlite() {
|
||||
return this.note.mime === 'text/x-sqlite;schema=trilium';
|
||||
return this.note.mime === "text/x-sqlite;schema=trilium";
|
||||
}
|
||||
|
||||
getTitle() {
|
||||
return {
|
||||
show: this.isEnabled(),
|
||||
activate: true,
|
||||
title: this.isTriliumSqlite() ? t('script_executor.query') : t('script_executor.script'),
|
||||
icon: 'bx bx-run'
|
||||
title: this.isTriliumSqlite() ? t("script_executor.query") : t("script_executor.script"),
|
||||
icon: "bx bx-run"
|
||||
};
|
||||
}
|
||||
|
||||
@@ -47,19 +49,18 @@ export default class ScriptExecutorWidget extends NoteContextAwareWidget {
|
||||
this.$widget = $(TPL);
|
||||
this.contentSized();
|
||||
|
||||
this.$executeButton = this.$widget.find('.execute-button');
|
||||
this.$executeDescription = this.$widget.find('.execute-description');
|
||||
this.$executeButton = this.$widget.find(".execute-button");
|
||||
this.$executeDescription = this.$widget.find(".execute-description");
|
||||
}
|
||||
|
||||
async refreshWithNote(note) {
|
||||
const executeTitle = note.getLabelValue('executeButton')
|
||||
|| (this.isTriliumSqlite() ? t('script_executor.execute_query') : t('script_executor.execute_script'));
|
||||
const executeTitle = note.getLabelValue("executeButton") || (this.isTriliumSqlite() ? t("script_executor.execute_query") : t("script_executor.execute_script"));
|
||||
|
||||
this.$executeButton.text(executeTitle);
|
||||
this.$executeButton.attr('title', executeTitle);
|
||||
this.$executeButton.attr("title", executeTitle);
|
||||
keyboardActionService.updateDisplayedShortcuts(this.$widget);
|
||||
|
||||
const executeDescription = note.getLabelValue('executeDescription');
|
||||
const executeDescription = note.getLabelValue("executeDescription");
|
||||
|
||||
if (executeDescription) {
|
||||
this.$executeDescription.show().html(executeDescription);
|
||||
|
||||
Reference in New Issue
Block a user