mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
refactor(dev): use es6-string-html for templates
This commit is contained in:
parent
3f2945018c
commit
815078168f
@ -3,7 +3,7 @@ import type FNote from "../entities/fnote.js";
|
|||||||
import { t } from "../services/i18n.js";
|
import { t } from "../services/i18n.js";
|
||||||
import NoteContextAwareWidget from "./note_context_aware_widget.js";
|
import NoteContextAwareWidget from "./note_context_aware_widget.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="api-log-widget">
|
<div class="api-log-widget">
|
||||||
<style>
|
<style>
|
||||||
.api-log-widget {
|
.api-log-widget {
|
||||||
|
@ -10,7 +10,7 @@ import toastService from "../services/toast.js";
|
|||||||
import type FAttachment from "../entities/fattachment.js";
|
import type FAttachment from "../entities/fattachment.js";
|
||||||
import type { EventData } from "../components/app_context.js";
|
import type { EventData } from "../components/app_context.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="attachment-detail-widget">
|
<div class="attachment-detail-widget">
|
||||||
<style>
|
<style>
|
||||||
.attachment-detail-widget {
|
.attachment-detail-widget {
|
||||||
|
@ -12,7 +12,7 @@ import shortcutService from "../../services/shortcuts.js";
|
|||||||
import appContext from "../../components/app_context.js";
|
import appContext from "../../components/app_context.js";
|
||||||
import type { Attribute } from "../../services/attribute_parser.js";
|
import type { Attribute } from "../../services/attribute_parser.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="attr-detail tn-tool-dialog">
|
<div class="attr-detail tn-tool-dialog">
|
||||||
<style>
|
<style>
|
||||||
.attr-detail {
|
.attr-detail {
|
||||||
|
@ -24,7 +24,7 @@ const HELP_TEXT = `
|
|||||||
|
|
||||||
<p>${t("attribute_editor.help_text_body3")}</p>`;
|
<p>${t("attribute_editor.help_text_body3")}</p>`;
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div style="position: relative; padding-top: 10px; padding-bottom: 10px">
|
<div style="position: relative; padding-top: 10px; padding-bottom: 10px">
|
||||||
<style>
|
<style>
|
||||||
.attribute-list-editor {
|
.attribute-list-editor {
|
||||||
|
@ -2,7 +2,7 @@ import { t } from "../../services/i18n.js";
|
|||||||
import SpacedUpdate from "../../services/spaced_update.js";
|
import SpacedUpdate from "../../services/spaced_update.js";
|
||||||
import AbstractBulkAction from "./abstract_bulk_action.js";
|
import AbstractBulkAction from "./abstract_bulk_action.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
${t("execute_script.execute_script")}
|
${t("execute_script.execute_script")}
|
||||||
|
@ -2,7 +2,7 @@ import { t } from "../../../services/i18n.js";
|
|||||||
import SpacedUpdate from "../../../services/spaced_update.js";
|
import SpacedUpdate from "../../../services/spaced_update.js";
|
||||||
import AbstractBulkAction from "../abstract_bulk_action.js";
|
import AbstractBulkAction from "../abstract_bulk_action.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div style="display: flex; align-items: center">
|
<div style="display: flex; align-items: center">
|
||||||
|
@ -2,7 +2,7 @@ import { t } from "../../../services/i18n.js";
|
|||||||
import SpacedUpdate from "../../../services/spaced_update.js";
|
import SpacedUpdate from "../../../services/spaced_update.js";
|
||||||
import AbstractBulkAction from "../abstract_bulk_action.js";
|
import AbstractBulkAction from "../abstract_bulk_action.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
${t("delete_label.delete_label")}
|
${t("delete_label.delete_label")}
|
||||||
|
@ -2,7 +2,7 @@ import { t } from "../../../services/i18n.js";
|
|||||||
import SpacedUpdate from "../../../services/spaced_update.js";
|
import SpacedUpdate from "../../../services/spaced_update.js";
|
||||||
import AbstractBulkAction from "../abstract_bulk_action.js";
|
import AbstractBulkAction from "../abstract_bulk_action.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div style="display: flex; align-items: center">
|
<div style="display: flex; align-items: center">
|
||||||
|
@ -2,7 +2,7 @@ import { t } from "../../../services/i18n.js";
|
|||||||
import SpacedUpdate from "../../../services/spaced_update.js";
|
import SpacedUpdate from "../../../services/spaced_update.js";
|
||||||
import AbstractBulkAction from "../abstract_bulk_action.js";
|
import AbstractBulkAction from "../abstract_bulk_action.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div style="display: flex; align-items: center">
|
<div style="display: flex; align-items: center">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { t } from "../../../services/i18n.js";
|
import { t } from "../../../services/i18n.js";
|
||||||
import AbstractBulkAction from "../abstract_bulk_action.js";
|
import AbstractBulkAction from "../abstract_bulk_action.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<span class="bx bx-trash"></span>
|
<span class="bx bx-trash"></span>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { t } from "../../../services/i18n.js";
|
import { t } from "../../../services/i18n.js";
|
||||||
import AbstractBulkAction from "../abstract_bulk_action.js";
|
import AbstractBulkAction from "../abstract_bulk_action.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<span class="bx bx-trash"></span>
|
<span class="bx bx-trash"></span>
|
||||||
|
@ -3,7 +3,7 @@ import SpacedUpdate from "../../../services/spaced_update.js";
|
|||||||
import AbstractBulkAction from "../abstract_bulk_action.js";
|
import AbstractBulkAction from "../abstract_bulk_action.js";
|
||||||
import noteAutocompleteService from "../../../services/note_autocomplete.js";
|
import noteAutocompleteService from "../../../services/note_autocomplete.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div style="display: flex; align-items: center">
|
<div style="display: flex; align-items: center">
|
||||||
|
@ -2,7 +2,7 @@ import SpacedUpdate from "../../../services/spaced_update.js";
|
|||||||
import AbstractBulkAction from "../abstract_bulk_action.js";
|
import AbstractBulkAction from "../abstract_bulk_action.js";
|
||||||
import { t } from "../../../services/i18n.js";
|
import { t } from "../../../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div style="display: flex; align-items: center">
|
<div style="display: flex; align-items: center">
|
||||||
|
@ -3,7 +3,7 @@ import AbstractBulkAction from "../abstract_bulk_action.js";
|
|||||||
import noteAutocompleteService from "../../../services/note_autocomplete.js";
|
import noteAutocompleteService from "../../../services/note_autocomplete.js";
|
||||||
import { t } from "../../../services/i18n.js";
|
import { t } from "../../../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div style="display: flex; align-items: center">
|
<div style="display: flex; align-items: center">
|
||||||
|
@ -2,7 +2,7 @@ import SpacedUpdate from "../../../services/spaced_update.js";
|
|||||||
import AbstractBulkAction from "../abstract_bulk_action.js";
|
import AbstractBulkAction from "../abstract_bulk_action.js";
|
||||||
import { t } from "../../../services/i18n.js";
|
import { t } from "../../../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
${t("delete_relation.delete_relation")}
|
${t("delete_relation.delete_relation")}
|
||||||
|
@ -2,7 +2,7 @@ import SpacedUpdate from "../../../services/spaced_update.js";
|
|||||||
import AbstractBulkAction from "../abstract_bulk_action.js";
|
import AbstractBulkAction from "../abstract_bulk_action.js";
|
||||||
import { t } from "../../../services/i18n.js";
|
import { t } from "../../../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div style="display: flex; align-items: center">
|
<div style="display: flex; align-items: center">
|
||||||
|
@ -3,7 +3,7 @@ import AbstractBulkAction from "../abstract_bulk_action.js";
|
|||||||
import noteAutocompleteService from "../../../services/note_autocomplete.js";
|
import noteAutocompleteService from "../../../services/note_autocomplete.js";
|
||||||
import { t } from "../../../services/i18n.js";
|
import { t } from "../../../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div style="display: flex; align-items: center">
|
<div style="display: flex; align-items: center">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Tooltip } from "bootstrap";
|
import { Tooltip } from "bootstrap";
|
||||||
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
||||||
|
|
||||||
const TPL = `<button class="button-widget bx"
|
const TPL = /*html*/`<button class="button-widget bx"
|
||||||
data-bs-toggle="tooltip"
|
data-bs-toggle="tooltip"
|
||||||
title=""></button>`;
|
title=""></button>`;
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ import type attachmentsApiRoute from "../../../../routes/api/attachments.js";
|
|||||||
import type FAttachment from "../../entities/fattachment.js";
|
import type FAttachment from "../../entities/fattachment.js";
|
||||||
import type AttachmentDetailWidget from "../attachment_detail.js";
|
import type AttachmentDetailWidget from "../attachment_detail.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="dropdown attachment-actions">
|
<div class="dropdown attachment-actions">
|
||||||
<style>
|
<style>
|
||||||
.attachment-actions {
|
.attachment-actions {
|
||||||
|
@ -5,7 +5,7 @@ import UpdateAvailableWidget from "./update_available.js";
|
|||||||
import options from "../../services/options.js";
|
import options from "../../services/options.js";
|
||||||
import { Tooltip, Dropdown } from "bootstrap";
|
import { Tooltip, Dropdown } from "bootstrap";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="dropdown global-menu">
|
<div class="dropdown global-menu">
|
||||||
<style>
|
<style>
|
||||||
.global-menu {
|
.global-menu {
|
||||||
|
@ -15,7 +15,7 @@ interface ConvertToAttachmentResponse {
|
|||||||
attachment: FAttachmentRow;
|
attachment: FAttachmentRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="dropdown note-actions">
|
<div class="dropdown note-actions">
|
||||||
<style>
|
<style>
|
||||||
.note-actions {
|
.note-actions {
|
||||||
|
@ -2,7 +2,7 @@ import BasicWidget from "../basic_widget.js";
|
|||||||
import { Tooltip, Dropdown } from "bootstrap";
|
import { Tooltip, Dropdown } from "bootstrap";
|
||||||
type PopoverPlacement = Tooltip.PopoverPlacement;
|
type PopoverPlacement = Tooltip.PopoverPlacement;
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="dropdown right-dropdown-widget dropend">
|
<div class="dropdown right-dropdown-widget dropend">
|
||||||
<button type="button" data-bs-toggle="dropdown"
|
<button type="button" data-bs-toggle="dropdown"
|
||||||
aria-haspopup="true" aria-expanded="false"
|
aria-haspopup="true" aria-expanded="false"
|
||||||
|
@ -2,7 +2,7 @@ import { t } from "../../services/i18n.js";
|
|||||||
import BasicWidget from "../basic_widget.js";
|
import BasicWidget from "../basic_widget.js";
|
||||||
import utils from "../../services/utils.js";
|
import utils from "../../services/utils.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div style="display: none;">
|
<div style="display: none;">
|
||||||
<style>
|
<style>
|
||||||
.global-menu-button-update-available-button {
|
.global-menu-button-update-available-button {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import BasicWidget from "./basic_widget.js";
|
import BasicWidget from "./basic_widget.js";
|
||||||
import { t } from "../services/i18n.js";
|
import { t } from "../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `\
|
const TPL = /*html*/`\
|
||||||
<div class="close-zen-container">
|
<div class="close-zen-container">
|
||||||
<button class="button-widget bx icon-action bxs-yin-yang"
|
<button class="button-widget bx icon-action bxs-yin-yang"
|
||||||
data-trigger-command="toggleZenMode"
|
data-trigger-command="toggleZenMode"
|
||||||
|
@ -7,7 +7,7 @@ import type { NoteType } from "../../entities/fnote.js";
|
|||||||
import type { EventData, EventNames } from "../../components/app_context.js";
|
import type { EventData, EventNames } from "../../components/app_context.js";
|
||||||
import type NoteActionsWidget from "../buttons/note_actions.js";
|
import type NoteActionsWidget from "../buttons/note_actions.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="ribbon-container">
|
<div class="ribbon-container">
|
||||||
<style>
|
<style>
|
||||||
.ribbon-container {
|
.ribbon-container {
|
||||||
|
@ -14,7 +14,7 @@ interface AppInfo {
|
|||||||
dataDirectory: string;
|
dataDirectory: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="about-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
<div class="about-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -7,7 +7,7 @@ import type { Suggestion } from "../../services/note_autocomplete.js";
|
|||||||
import type { default as TextTypeWidget } from "../type_widgets/editable_text.js";
|
import type { default as TextTypeWidget } from "../type_widgets/editable_text.js";
|
||||||
import type { EventData } from "../../components/app_context.js";
|
import type { EventData } from "../../components/app_context.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="add-link-dialog modal mx-auto" tabindex="-1" role="dialog">
|
<div class="add-link-dialog modal mx-auto" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-lg" style="max-width: 1000px" role="document">
|
<div class="modal-dialog modal-lg" style="max-width: 1000px" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -8,7 +8,7 @@ import appContext from "../../components/app_context.js";
|
|||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
import { Modal } from "bootstrap";
|
import { Modal } from "bootstrap";
|
||||||
|
|
||||||
const TPL = `<div class="branch-prefix-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
const TPL = /*html*/`<div class="branch-prefix-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<form class="branch-prefix-form">
|
<form class="branch-prefix-form">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -8,7 +8,7 @@ import { t } from "../../services/i18n.js";
|
|||||||
import type { EventData } from "../../components/app_context.js";
|
import type { EventData } from "../../components/app_context.js";
|
||||||
|
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="bulk-actions-dialog modal mx-auto" tabindex="-1" role="dialog">
|
<div class="bulk-actions-dialog modal mx-auto" tabindex="-1" role="dialog">
|
||||||
<style>
|
<style>
|
||||||
.bulk-actions-dialog .modal-body h4:not(:first-child) {
|
.bulk-actions-dialog .modal-body h4:not(:first-child) {
|
||||||
|
@ -10,7 +10,7 @@ import { t } from "../../services/i18n.js";
|
|||||||
import type { EventData } from "../../components/app_context.js";
|
import type { EventData } from "../../components/app_context.js";
|
||||||
|
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="clone-to-dialog modal mx-auto" tabindex="-1" role="dialog">
|
<div class="clone-to-dialog modal mx-auto" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-lg" style="max-width: 1000px" role="document">
|
<div class="modal-dialog modal-lg" style="max-width: 1000px" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -4,7 +4,7 @@ import { Modal } from "bootstrap";
|
|||||||
|
|
||||||
const DELETE_NOTE_BUTTON_CLASS = "confirm-dialog-delete-note";
|
const DELETE_NOTE_BUTTON_CLASS = "confirm-dialog-delete-note";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="confirm-dialog modal mx-auto" tabindex="-1" role="dialog" style="z-index: 2000;">
|
<div class="confirm-dialog modal mx-auto" tabindex="-1" role="dialog" style="z-index: 2000;">
|
||||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -24,7 +24,7 @@ interface ShowDeleteNotesDialogOpts {
|
|||||||
forceDeleteAllClones: boolean;
|
forceDeleteAllClones: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="delete-notes-dialog modal mx-auto" tabindex="-1" role="dialog">
|
<div class="delete-notes-dialog modal mx-auto" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-dialog-scrollable modal-xl" role="document">
|
<div class="modal-dialog modal-dialog-scrollable modal-xl" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -9,7 +9,7 @@ import { t } from "../../services/i18n.js";
|
|||||||
import type { EventData } from "../../components/app_context.js";
|
import type { EventData } from "../../components/app_context.js";
|
||||||
import { Modal } from "bootstrap";
|
import { Modal } from "bootstrap";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="export-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
<div class="export-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
||||||
<style>
|
<style>
|
||||||
.export-dialog .export-form .form-check {
|
.export-dialog .export-form .form-check {
|
||||||
|
@ -2,7 +2,7 @@ import utils from "../../services/utils.js";
|
|||||||
import BasicWidget from "../basic_widget.js";
|
import BasicWidget from "../basic_widget.js";
|
||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="help-dialog modal use-tn-links" tabindex="-1" role="dialog">
|
<div class="help-dialog modal use-tn-links" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog" role="document" style="min-width: 90%;">
|
<div class="modal-dialog" role="document" style="min-width: 90%;">
|
||||||
<div class="modal-content" style="height: auto;">
|
<div class="modal-content" style="height: auto;">
|
||||||
|
@ -7,7 +7,7 @@ import { t } from "../../services/i18n.js";
|
|||||||
import { Modal, Tooltip } from "bootstrap";
|
import { Modal, Tooltip } from "bootstrap";
|
||||||
import type { EventData } from "../../components/app_context.js";
|
import type { EventData } from "../../components/app_context.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="import-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
<div class="import-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -8,7 +8,7 @@ import { Modal } from "bootstrap";
|
|||||||
import type { EventData } from "../../components/app_context.js";
|
import type { EventData } from "../../components/app_context.js";
|
||||||
import type EditableTextTypeWidget from "../type_widgets/editable_text.js";
|
import type EditableTextTypeWidget from "../type_widgets/editable_text.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="include-note-dialog modal mx-auto" tabindex="-1" role="dialog">
|
<div class="include-note-dialog modal mx-auto" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -5,7 +5,7 @@ import BasicWidget from "../basic_widget.js";
|
|||||||
import { Modal } from "bootstrap";
|
import { Modal } from "bootstrap";
|
||||||
import type { ConfirmDialogCallback } from "./confirm.js";
|
import type { ConfirmDialogCallback } from "./confirm.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="info-dialog modal mx-auto" tabindex="-1" role="dialog" style="z-index: 2000;">
|
<div class="info-dialog modal mx-auto" tabindex="-1" role="dialog" style="z-index: 2000;">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -6,7 +6,7 @@ import BasicWidget from "../basic_widget.js";
|
|||||||
import shortcutService from "../../services/shortcuts.js";
|
import shortcutService from "../../services/shortcuts.js";
|
||||||
import { Modal } from "bootstrap";
|
import { Modal } from "bootstrap";
|
||||||
|
|
||||||
const TPL = `<div class="jump-to-note-dialog modal mx-auto" tabindex="-1" role="dialog">
|
const TPL = /*html*/`<div class="jump-to-note-dialog modal mx-auto" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
@ -7,7 +7,7 @@ import shortcutService from "../../services/shortcuts.js";
|
|||||||
import server from "../../services/server.js";
|
import server from "../../services/server.js";
|
||||||
import { Modal } from "bootstrap";
|
import { Modal } from "bootstrap";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="markdown-import-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
<div class="markdown-import-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -8,7 +8,7 @@ import BasicWidget from "../basic_widget.js";
|
|||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
import type { EventData } from "../../components/app_context.js";
|
import type { EventData } from "../../components/app_context.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="move-to-dialog modal mx-auto" tabindex="-1" role="dialog">
|
<div class="move-to-dialog modal mx-auto" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-lg" style="max-width: 1000px" role="document">
|
<div class="modal-dialog modal-lg" style="max-width: 1000px" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -5,7 +5,7 @@ import noteTypesService from "../../services/note_types.js";
|
|||||||
import BasicWidget from "../basic_widget.js";
|
import BasicWidget from "../basic_widget.js";
|
||||||
import { Dropdown, Modal } from "bootstrap";
|
import { Dropdown, Modal } from "bootstrap";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="note-type-chooser-dialog modal mx-auto" tabindex="-1" role="dialog">
|
<div class="note-type-chooser-dialog modal mx-auto" tabindex="-1" role="dialog">
|
||||||
<style>
|
<style>
|
||||||
.note-type-chooser-dialog {
|
.note-type-chooser-dialog {
|
||||||
|
@ -3,7 +3,7 @@ import utils from "../../services/utils.js";
|
|||||||
import BasicWidget from "../basic_widget.js";
|
import BasicWidget from "../basic_widget.js";
|
||||||
import { Modal } from "bootstrap";
|
import { Modal } from "bootstrap";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="password-not-set-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
<div class="password-not-set-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-md" role="document">
|
<div class="modal-dialog modal-md" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -3,7 +3,7 @@ import utils from "../../services/utils.js";
|
|||||||
import BasicWidget from "../basic_widget.js";
|
import BasicWidget from "../basic_widget.js";
|
||||||
import { Modal } from "bootstrap";
|
import { Modal } from "bootstrap";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="prompt-dialog modal mx-auto" tabindex="-1" role="dialog" style="z-index: 2000;">
|
<div class="prompt-dialog modal mx-auto" tabindex="-1" role="dialog" style="z-index: 2000;">
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -4,7 +4,7 @@ import utils from "../../services/utils.js";
|
|||||||
import BasicWidget from "../basic_widget.js";
|
import BasicWidget from "../basic_widget.js";
|
||||||
import { Modal } from "bootstrap";
|
import { Modal } from "bootstrap";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="protected-session-password-dialog modal mx-auto" data-backdrop="false" tabindex="-1" role="dialog">
|
<div class="protected-session-password-dialog modal mx-auto" data-backdrop="false" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-md" role="document">
|
<div class="modal-dialog modal-md" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -12,7 +12,7 @@ import utils from "../../services/utils.js";
|
|||||||
import ws from "../../services/ws.js";
|
import ws from "../../services/ws.js";
|
||||||
import { Modal } from "bootstrap";
|
import { Modal } from "bootstrap";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="recent-changes-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
<div class="recent-changes-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-lg modal-dialog-scrollable" role="document">
|
<div class="modal-dialog modal-lg modal-dialog-scrollable" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -13,7 +13,7 @@ import type FNote from "../../entities/fnote.js";
|
|||||||
import type { NoteType } from "../../entities/fnote.js";
|
import type { NoteType } from "../../entities/fnote.js";
|
||||||
import { Dropdown, Modal } from "bootstrap";
|
import { Dropdown, Modal } from "bootstrap";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="revisions-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
<div class="revisions-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
||||||
<style>
|
<style>
|
||||||
.revisions-dialog .revision-content-wrapper {
|
.revisions-dialog .revision-content-wrapper {
|
||||||
|
@ -4,7 +4,7 @@ import server from "../../services/server.js";
|
|||||||
import utils from "../../services/utils.js";
|
import utils from "../../services/utils.js";
|
||||||
import BasicWidget from "../basic_widget.js";
|
import BasicWidget from "../basic_widget.js";
|
||||||
|
|
||||||
const TPL = `<div class="sort-child-notes-dialog modal mx-auto" tabindex="-1" role="dialog">
|
const TPL = /*html*/`<div class="sort-child-notes-dialog modal mx-auto" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-lg" style="max-width: 500px" role="document">
|
<div class="modal-dialog modal-lg" style="max-width: 500px" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
@ -7,7 +7,7 @@ import BasicWidget from "../basic_widget.js";
|
|||||||
import { Modal, Tooltip } from "bootstrap";
|
import { Modal, Tooltip } from "bootstrap";
|
||||||
import type { EventData } from "../../components/app_context.js";
|
import type { EventData } from "../../components/app_context.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="upload-attachments-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
<div class="upload-attachments-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -7,7 +7,7 @@ import { Dropdown } from "bootstrap";
|
|||||||
|
|
||||||
type Editability = "auto" | "readOnly" | "autoReadOnlyDisabled";
|
type Editability = "auto" | "readOnly" | "autoReadOnlyDisabled";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="dropdown editability-select-widget">
|
<div class="dropdown editability-select-widget">
|
||||||
<style>
|
<style>
|
||||||
.editability-dropdown {
|
.editability-dropdown {
|
||||||
|
@ -22,7 +22,7 @@ export interface FindResult {
|
|||||||
// tabIndex=-1 on the checkbox labels is necessary, so when clicking on the label,
|
// tabIndex=-1 on the checkbox labels is necessary, so when clicking on the label,
|
||||||
// the focusout handler is called with relatedTarget equal to the label instead
|
// the focusout handler is called with relatedTarget equal to the label instead
|
||||||
// of undefined. It's -1 instead of > 0, so they don't tabstop
|
// of undefined. It's -1 instead of > 0, so they don't tabstop
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class='find-replace-widget' style="contain: none; border-top: 1px solid var(--main-border-color);">
|
<div class='find-replace-widget' style="contain: none; border-top: 1px solid var(--main-border-color);">
|
||||||
<style>
|
<style>
|
||||||
.find-widget-box, .replace-widget-box {
|
.find-widget-box, .replace-widget-box {
|
||||||
|
@ -8,7 +8,7 @@ import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
|||||||
import keyboardActionService from "../../services/keyboard_actions.js";
|
import keyboardActionService from "../../services/keyboard_actions.js";
|
||||||
import type FNote from "../../entities/fnote.js";
|
import type FNote from "../../entities/fnote.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="code-buttons-widget">
|
<div class="code-buttons-widget">
|
||||||
<style>
|
<style>
|
||||||
.code-buttons-widget {
|
.code-buttons-widget {
|
||||||
|
@ -3,7 +3,7 @@ import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
|||||||
import utils from "../../services/utils.js";
|
import utils from "../../services/utils.js";
|
||||||
import imageService from "../../services/image.js";
|
import imageService from "../../services/image.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="copy-image-reference-button"
|
class="copy-image-reference-button"
|
||||||
title="${t("copy_image_reference_button.button_title")}">
|
title="${t("copy_image_reference_button.button_title")}">
|
||||||
|
@ -11,7 +11,7 @@ import type BasicWidget from "../basic_widget.js";
|
|||||||
* properly handle rounded corners, as defined by the --border-radius CSS variable.
|
* properly handle rounded corners, as defined by the --border-radius CSS variable.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="floating-buttons no-print">
|
<div class="floating-buttons no-print">
|
||||||
<style>
|
<style>
|
||||||
.floating-buttons {
|
.floating-buttons {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
||||||
|
|
||||||
const TPL = `\
|
const TPL = /*html*/`\
|
||||||
<div class="geo-map-buttons">
|
<div class="geo-map-buttons">
|
||||||
<style>
|
<style>
|
||||||
.geo-map-buttons {
|
.geo-map-buttons {
|
||||||
|
@ -6,7 +6,7 @@ import type { ViewScope } from "../../services/link.js";
|
|||||||
import type { ViewTypeOptions } from "../../services/note_list_renderer.js";
|
import type { ViewTypeOptions } from "../../services/note_list_renderer.js";
|
||||||
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<button class="open-contextual-help-button" title="${t("help-button.title")}">
|
<button class="open-contextual-help-button" title="${t("help-button.title")}">
|
||||||
<span class="bx bx-help-circle"></span>
|
<span class="bx bx-help-circle"></span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="close-floating-buttons">
|
<div class="close-floating-buttons">
|
||||||
<style>
|
<style>
|
||||||
.close-floating-buttons {
|
.close-floating-buttons {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="export-svg-button"
|
class="export-svg-button"
|
||||||
title="${t("png_export_button.button_title")}">
|
title="${t("png_export_button.button_title")}">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="relation-map-buttons">
|
<div class="relation-map-buttons">
|
||||||
<style>
|
<style>
|
||||||
.relation-map-buttons {
|
.relation-map-buttons {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="export-svg-button"
|
class="export-svg-button"
|
||||||
title="${t("svg_export_button.button_title")}">
|
title="${t("svg_export_button.button_title")}">
|
||||||
|
@ -3,7 +3,7 @@ import { t } from "../../services/i18n.js";
|
|||||||
import options from "../../services/options.js";
|
import options from "../../services/options.js";
|
||||||
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="switch-layout-button">
|
class="switch-layout-button">
|
||||||
<span class="bx"></span>
|
<span class="bx"></span>
|
||||||
|
@ -9,7 +9,7 @@ import server from "../../services/server.js";
|
|||||||
import froca from "../../services/froca.js";
|
import froca from "../../services/froca.js";
|
||||||
import type FNote from "../../entities/fnote.js";
|
import type FNote from "../../entities/fnote.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="backlinks-widget has-overflow">
|
<div class="backlinks-widget has-overflow">
|
||||||
<style>
|
<style>
|
||||||
.backlinks-widget {
|
.backlinks-widget {
|
||||||
|
@ -3,7 +3,7 @@ import L from "leaflet";
|
|||||||
import "leaflet/dist/leaflet.css";
|
import "leaflet/dist/leaflet.css";
|
||||||
import NoteContextAwareWidget from "./note_context_aware_widget.js";
|
import NoteContextAwareWidget from "./note_context_aware_widget.js";
|
||||||
|
|
||||||
const TPL = `\
|
const TPL = /*html*/`\
|
||||||
<div class="geo-map-widget">
|
<div class="geo-map-widget">
|
||||||
<style>
|
<style>
|
||||||
.note-detail-geo-map,
|
.note-detail-geo-map,
|
||||||
|
@ -14,7 +14,7 @@ import appContext, { type EventData } from "../components/app_context.js";
|
|||||||
import libraryLoader from "../services/library_loader.js";
|
import libraryLoader from "../services/library_loader.js";
|
||||||
import type FNote from "../entities/fnote.js";
|
import type FNote from "../entities/fnote.js";
|
||||||
|
|
||||||
const TPL = `<div class="highlights-list-widget">
|
const TPL = /*html*/`<div class="highlights-list-widget">
|
||||||
<style>
|
<style>
|
||||||
.highlights-list-widget {
|
.highlights-list-widget {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
@ -6,7 +6,7 @@ import branchService from "../../services/branches.js";
|
|||||||
import treeService from "../../services/tree.js";
|
import treeService from "../../services/tree.js";
|
||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `<button type="button" class="action-button bx"></button>`;
|
const TPL = /*html*/`<button type="button" class="action-button bx"></button>`;
|
||||||
|
|
||||||
class MobileDetailMenuWidget extends BasicWidget {
|
class MobileDetailMenuWidget extends BasicWidget {
|
||||||
private isHorizontalLayout: boolean;
|
private isHorizontalLayout: boolean;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import BasicWidget from "../basic_widget.js";
|
import BasicWidget from "../basic_widget.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<button type="button" class="action-button bx bx-sidebar"></button>`;
|
<button type="button" class="action-button bx bx-sidebar"></button>`;
|
||||||
|
|
||||||
class ToggleSidebarButtonWidget extends BasicWidget {
|
class ToggleSidebarButtonWidget extends BasicWidget {
|
||||||
|
@ -37,7 +37,7 @@ import type { NoteType } from "../entities/fnote.js";
|
|||||||
import type TypeWidget from "./type_widgets/type_widget.js";
|
import type TypeWidget from "./type_widgets/type_widget.js";
|
||||||
import { MermaidTypeWidget } from "./type_widgets/mermaid.js";
|
import { MermaidTypeWidget } from "./type_widgets/mermaid.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="note-detail">
|
<div class="note-detail">
|
||||||
<style>
|
<style>
|
||||||
.note-detail {
|
.note-detail {
|
||||||
|
@ -7,7 +7,7 @@ import type { EventData } from "../components/app_context.js";
|
|||||||
import type { Icon } from "./icon_list.js";
|
import type { Icon } from "./icon_list.js";
|
||||||
import { Dropdown } from "bootstrap";
|
import { Dropdown } from "bootstrap";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="note-icon-widget dropdown">
|
<div class="note-icon-widget dropdown">
|
||||||
<style>
|
<style>
|
||||||
.note-icon-widget {
|
.note-icon-widget {
|
||||||
|
@ -9,7 +9,7 @@ import type { Locale } from "../../../services/i18n.js";
|
|||||||
import options from "../services/options.js";
|
import options from "../services/options.js";
|
||||||
import appContext from "../components/app_context.js";
|
import appContext from "../components/app_context.js";
|
||||||
|
|
||||||
const TPL = `\
|
const TPL = /*html*/`\
|
||||||
<div class="dropdown note-language-widget">
|
<div class="dropdown note-language-widget">
|
||||||
<button type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-sm dropdown-toggle select-button note-language-button">
|
<button type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-sm dropdown-toggle select-button note-language-button">
|
||||||
<span class="note-language-desc"></span>
|
<span class="note-language-desc"></span>
|
||||||
|
@ -4,7 +4,7 @@ import type FNote from "../entities/fnote.js";
|
|||||||
import type { EventData } from "../components/app_context.js";
|
import type { EventData } from "../components/app_context.js";
|
||||||
import type ViewMode from "./view_widgets/view_mode.js";
|
import type ViewMode from "./view_widgets/view_mode.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="note-list-widget">
|
<div class="note-list-widget">
|
||||||
<style>
|
<style>
|
||||||
.note-list-widget {
|
.note-list-widget {
|
||||||
|
@ -12,7 +12,7 @@ import type FNote from "../entities/fnote.js";
|
|||||||
|
|
||||||
const esc = utils.escapeHtml;
|
const esc = utils.escapeHtml;
|
||||||
|
|
||||||
const TPL = `<div class="note-map-widget">
|
const TPL = /*html*/`<div class="note-map-widget">
|
||||||
<style>
|
<style>
|
||||||
.note-detail-note-map {
|
.note-detail-note-map {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -9,7 +9,7 @@ import shortcutService from "../services/shortcuts.js";
|
|||||||
import utils from "../services/utils.js";
|
import utils from "../services/utils.js";
|
||||||
import type FNote from "../entities/fnote.js";
|
import type FNote from "../entities/fnote.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="note-title-widget">
|
<div class="note-title-widget">
|
||||||
<style>
|
<style>
|
||||||
.note-title-widget {
|
.note-title-widget {
|
||||||
|
@ -26,7 +26,7 @@ import type { NoteType } from "../entities/fnote.js";
|
|||||||
import type { AttributeRow, BranchRow } from "../services/load_results.js";
|
import type { AttributeRow, BranchRow } from "../services/load_results.js";
|
||||||
import type { SetNoteOpts } from "../components/note_context.js";
|
import type { SetNoteOpts } from "../components/note_context.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="tree-wrapper">
|
<div class="tree-wrapper">
|
||||||
<style>
|
<style>
|
||||||
.tree-wrapper {
|
.tree-wrapper {
|
||||||
|
@ -54,7 +54,7 @@ const NOTE_TYPES: NoteTypeMapping[] = [
|
|||||||
|
|
||||||
const NOT_SELECTABLE_NOTE_TYPES = NOTE_TYPES.filter((nt) => !nt.selectable).map((nt) => nt.type);
|
const NOT_SELECTABLE_NOTE_TYPES = NOTE_TYPES.filter((nt) => !nt.selectable).map((nt) => nt.type);
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="dropdown note-type-widget">
|
<div class="dropdown note-type-widget">
|
||||||
<style>
|
<style>
|
||||||
.note-type-dropdown {
|
.note-type-dropdown {
|
||||||
|
@ -8,7 +8,7 @@ import shortcutService from "../services/shortcuts.js";
|
|||||||
import { t } from "../services/i18n.js";
|
import { t } from "../services/i18n.js";
|
||||||
import { Dropdown, Tooltip } from "bootstrap";
|
import { Dropdown, Tooltip } from "bootstrap";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="quick-search input-group input-group-sm">
|
<div class="quick-search input-group input-group-sm">
|
||||||
<style>
|
<style>
|
||||||
.quick-search {
|
.quick-search {
|
||||||
|
@ -9,7 +9,7 @@ import TemplateSwitchWidget from "../template_switch.js";
|
|||||||
import type FNote from "../../entities/fnote.js";
|
import type FNote from "../../entities/fnote.js";
|
||||||
import NoteLanguageWidget from "../note_language.js";
|
import NoteLanguageWidget from "../note_language.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="basic-properties-widget">
|
<div class="basic-properties-widget">
|
||||||
<style>
|
<style>
|
||||||
.basic-properties-widget {
|
.basic-properties-widget {
|
||||||
|
@ -4,7 +4,7 @@ import { t } from "../../services/i18n.js";
|
|||||||
import type FNote from "../../entities/fnote.js";
|
import type FNote from "../../entities/fnote.js";
|
||||||
import type { EventData } from "../../components/app_context.js";
|
import type { EventData } from "../../components/app_context.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="book-properties-widget">
|
<div class="book-properties-widget">
|
||||||
<style>
|
<style>
|
||||||
.book-properties-widget {
|
.book-properties-widget {
|
||||||
|
@ -3,7 +3,7 @@ import options from "../../services/options.js";
|
|||||||
import utils from "../../services/utils.js";
|
import utils from "../../services/utils.js";
|
||||||
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
||||||
|
|
||||||
const TPL = `\
|
const TPL = /*html*/`\
|
||||||
<div class="classic-toolbar-widget"></div>
|
<div class="classic-toolbar-widget"></div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -6,7 +6,7 @@ import options from "../../services/options.js";
|
|||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
import type FNote from "../../entities/fnote.js";
|
import type FNote from "../../entities/fnote.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="edited-notes-widget">
|
<div class="edited-notes-widget">
|
||||||
<style>
|
<style>
|
||||||
.edited-notes-widget {
|
.edited-notes-widget {
|
||||||
|
@ -7,7 +7,7 @@ import protectedSessionHolder from "../../services/protected_session_holder.js";
|
|||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
import type FNote from "../../entities/fnote.js";
|
import type FNote from "../../entities/fnote.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="file-properties-widget">
|
<div class="file-properties-widget">
|
||||||
<style>
|
<style>
|
||||||
.file-table {
|
.file-table {
|
||||||
|
@ -6,7 +6,7 @@ import utils from "../../services/utils.js";
|
|||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
import type FNote from "../../entities/fnote.js";
|
import type FNote from "../../entities/fnote.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="image-properties">
|
<div class="image-properties">
|
||||||
<div style="display: flex; justify-content: space-evenly; margin: 10px;">
|
<div style="display: flex; justify-content: space-evenly; margin: 10px;">
|
||||||
<span>
|
<span>
|
||||||
|
@ -6,7 +6,7 @@ import { t } from "../../services/i18n.js";
|
|||||||
import type FNote from "../../entities/fnote.js";
|
import type FNote from "../../entities/fnote.js";
|
||||||
import type { EventData } from "../../components/app_context.js";
|
import type { EventData } from "../../components/app_context.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="inherited-attributes-widget">
|
<div class="inherited-attributes-widget">
|
||||||
<style>
|
<style>
|
||||||
.inherited-attributes-widget {
|
.inherited-attributes-widget {
|
||||||
|
@ -6,7 +6,7 @@ import utils from "../../services/utils.js";
|
|||||||
import type { EventData } from "../../components/app_context.js";
|
import type { EventData } from "../../components/app_context.js";
|
||||||
import type FNote from "../../entities/fnote.js";
|
import type FNote from "../../entities/fnote.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="note-info-widget">
|
<div class="note-info-widget">
|
||||||
<style>
|
<style>
|
||||||
.note-info-widget {
|
.note-info-widget {
|
||||||
|
@ -2,7 +2,7 @@ import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
|||||||
import NoteMapWidget from "../note_map.js";
|
import NoteMapWidget from "../note_map.js";
|
||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="note-map-ribbon-widget">
|
<div class="note-map-ribbon-widget">
|
||||||
<style>
|
<style>
|
||||||
.note-map-ribbon-widget {
|
.note-map-ribbon-widget {
|
||||||
|
@ -6,7 +6,7 @@ import type FNote from "../../entities/fnote.js";
|
|||||||
import type { NotePathRecord } from "../../entities/fnote.js";
|
import type { NotePathRecord } from "../../entities/fnote.js";
|
||||||
import type { EventData } from "../../components/app_context.js";
|
import type { EventData } from "../../components/app_context.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="note-paths-widget">
|
<div class="note-paths-widget">
|
||||||
<style>
|
<style>
|
||||||
.note-paths-widget {
|
.note-paths-widget {
|
||||||
|
@ -2,7 +2,7 @@ import type FNote from "../../entities/fnote.js";
|
|||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="note-properties-widget">
|
<div class="note-properties-widget">
|
||||||
<style>
|
<style>
|
||||||
.note-properties-widget {
|
.note-properties-widget {
|
||||||
|
@ -5,7 +5,7 @@ import AttributeEditorWidget from "../attribute_widgets/attribute_editor.js";
|
|||||||
import type { CommandListenerData } from "../../components/app_context.js";
|
import type { CommandListenerData } from "../../components/app_context.js";
|
||||||
import type FAttribute from "../../entities/fattribute.js";
|
import type FAttribute from "../../entities/fattribute.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="attribute-list">
|
<div class="attribute-list">
|
||||||
<style>
|
<style>
|
||||||
.attribute-list {
|
.attribute-list {
|
||||||
|
@ -12,7 +12,7 @@ import type { Attribute } from "../../services/attribute_parser.js";
|
|||||||
import type FAttribute from "../../entities/fattribute.js";
|
import type FAttribute from "../../entities/fattribute.js";
|
||||||
import type { EventData } from "../../components/app_context.js";
|
import type { EventData } from "../../components/app_context.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="promoted-attributes-widget">
|
<div class="promoted-attributes-widget">
|
||||||
<style>
|
<style>
|
||||||
body.mobile .promoted-attributes-widget {
|
body.mobile .promoted-attributes-widget {
|
||||||
|
@ -3,7 +3,7 @@ import keyboardActionService from "../../services/keyboard_actions.js";
|
|||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
import type FNote from "../../entities/fnote.js";
|
import type FNote from "../../entities/fnote.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="script-runner-widget">
|
<div class="script-runner-widget">
|
||||||
<style>
|
<style>
|
||||||
.script-runner-widget {
|
.script-runner-widget {
|
||||||
|
@ -20,7 +20,7 @@ import { Dropdown } from "bootstrap";
|
|||||||
import type FNote from "../../entities/fnote.js";
|
import type FNote from "../../entities/fnote.js";
|
||||||
import type { AttributeType } from "../../entities/fattribute.js";
|
import type { AttributeType } from "../../entities/fattribute.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="search-definition-widget">
|
<div class="search-definition-widget">
|
||||||
<style>
|
<style>
|
||||||
.search-setting-table {
|
.search-setting-table {
|
||||||
|
@ -6,7 +6,7 @@ import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
|||||||
import type FNote from "../../entities/fnote.js";
|
import type FNote from "../../entities/fnote.js";
|
||||||
import type { EventData } from "../../components/app_context.js";
|
import type { EventData } from "../../components/app_context.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="similar-notes-widget">
|
<div class="similar-notes-widget">
|
||||||
<style>
|
<style>
|
||||||
.similar-notes-wrapper {
|
.similar-notes-wrapper {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import NoteContextAwareWidget from "./note_context_aware_widget.js";
|
import NoteContextAwareWidget from "./note_context_aware_widget.js";
|
||||||
|
|
||||||
const TPL = `<div class="scroll-padding-widget"></div>`;
|
const TPL = /*html*/`<div class="scroll-padding-widget"></div>`;
|
||||||
|
|
||||||
export default class ScrollPaddingWidget extends NoteContextAwareWidget {
|
export default class ScrollPaddingWidget extends NoteContextAwareWidget {
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import AbstractSearchOption from "./abstract_search_option.js";
|
|||||||
import noteAutocompleteService from "../../services/note_autocomplete.js";
|
import noteAutocompleteService from "../../services/note_autocomplete.js";
|
||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div style="display: flex; align-items: center;">
|
<div style="display: flex; align-items: center;">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import AbstractSearchOption from "./abstract_search_option.js";
|
import AbstractSearchOption from "./abstract_search_option.js";
|
||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr data-search-option-conf="debug">
|
<tr data-search-option-conf="debug">
|
||||||
<td colSpan="2">
|
<td colSpan="2">
|
||||||
<span class="bx bx-bug"></span>
|
<span class="bx bx-bug"></span>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import AbstractSearchOption from "./abstract_search_option.js";
|
import AbstractSearchOption from "./abstract_search_option.js";
|
||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr data-search-option-conf="fastSearch">
|
<tr data-search-option-conf="fastSearch">
|
||||||
<td colSpan="2">
|
<td colSpan="2">
|
||||||
<span class="bx bx-run"></span>
|
<span class="bx bx-run"></span>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import AbstractSearchOption from "./abstract_search_option.js";
|
import AbstractSearchOption from "./abstract_search_option.js";
|
||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr data-search-option-conf="includeArchivedNotes">
|
<tr data-search-option-conf="includeArchivedNotes">
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<span class="bx bx-archive"></span>
|
<span class="bx bx-archive"></span>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import AbstractSearchOption from "./abstract_search_option.js";
|
import AbstractSearchOption from "./abstract_search_option.js";
|
||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr data-search-option-conf="limit">
|
<tr data-search-option-conf="limit">
|
||||||
<td class="title-column">
|
<td class="title-column">
|
||||||
<span class="bx bx-stop"></span>
|
<span class="bx bx-stop"></span>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import AbstractSearchOption from "./abstract_search_option.js";
|
import AbstractSearchOption from "./abstract_search_option.js";
|
||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr data-search-option-conf="orderBy">
|
<tr data-search-option-conf="orderBy">
|
||||||
<td class="title-column">
|
<td class="title-column">
|
||||||
<span class="bx bx-arrow-from-top"></span>
|
<span class="bx bx-arrow-from-top"></span>
|
||||||
|
@ -2,7 +2,7 @@ import AbstractSearchOption from "./abstract_search_option.js";
|
|||||||
import noteAutocompleteService from "../../services/note_autocomplete.js";
|
import noteAutocompleteService from "../../services/note_autocomplete.js";
|
||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr>
|
<tr>
|
||||||
<td class="title-column">
|
<td class="title-column">
|
||||||
${t("search_script.title")}
|
${t("search_script.title")}
|
||||||
|
@ -6,7 +6,7 @@ import appContext, { type EventData } from "../../components/app_context.js";
|
|||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
import { Tooltip } from "bootstrap";
|
import { Tooltip } from "bootstrap";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<tr>
|
<tr>
|
||||||
<td class="title-column">${t("search_string.title_column")}</td>
|
<td class="title-column">${t("search_string.title_column")}</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -4,7 +4,7 @@ import NoteListRenderer from "../services/note_list_renderer.js";
|
|||||||
import type FNote from "../entities/fnote.js";
|
import type FNote from "../entities/fnote.js";
|
||||||
import type { EventData } from "../components/app_context.js";
|
import type { EventData } from "../components/app_context.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = /*html*/`
|
||||||
<div class="search-result-widget">
|
<div class="search-result-widget">
|
||||||
<style>
|
<style>
|
||||||
.search-result-widget {
|
.search-result-widget {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user