chore(prettier): fix all files

This commit is contained in:
Elian Doran
2025-01-09 18:07:02 +02:00
parent 19ee861699
commit 4cbb529fd4
571 changed files with 23226 additions and 23940 deletions

View File

@@ -34,22 +34,20 @@ const TPL = `
}
</style>
${t('sql_table_schemas.tables')}:
${t("sql_table_schemas.tables")}:
<span class="sql-table-schemas"></span>
</div>`;
export default class SqlTableSchemasWidget extends NoteContextAwareWidget {
isEnabled() {
return this.note
&& this.note.mime === 'text/x-sqlite;schema=trilium'
&& super.isEnabled();
return this.note && this.note.mime === "text/x-sqlite;schema=trilium" && super.isEnabled();
}
doRender() {
this.$widget = $(TPL);
this.contentSized();
this.$sqlConsoleTableSchemas = this.$widget.find('.sql-table-schemas');
this.$sqlConsoleTableSchemas = this.$widget.find(".sql-table-schemas");
}
async refreshWithNote(note) {
@@ -59,7 +57,7 @@ export default class SqlTableSchemasWidget extends NoteContextAwareWidget {
this.tableSchemasShown = true;
const tableSchema = await server.get('sql/schema');
const tableSchema = await server.get("sql/schema");
for (const table of tableSchema) {
const $tableLink = $('<button class="btn">').text(table.name);
@@ -67,19 +65,15 @@ export default class SqlTableSchemasWidget extends NoteContextAwareWidget {
const $table = $('<table class="table-schema">');
for (const column of table.columns) {
$table.append(
$("<tr>")
.append($("<td>").text(column.name))
.append($("<td>").text(column.type))
);
$table.append($("<tr>").append($("<td>").text(column.name)).append($("<td>").text(column.type)));
}
this.$sqlConsoleTableSchemas.append($tableLink).append(" ");
$tableLink.tooltip({
html: true,
placement: 'bottom',
boundary: 'window',
placement: "bottom",
boundary: "window",
title: $table[0].outerHTML,
sanitize: false
});