mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 08:15:52 +01:00
refactored access to options on frontend
This commit is contained in:
@@ -1,25 +1,10 @@
|
||||
import BasicWidget from "./basic_widget.js";
|
||||
import treeService from "../services/tree.js";
|
||||
import searchService from "../services/search_notes.js";
|
||||
import treeCache from "../services/tree_cache.js";
|
||||
import toastService from "../services/toast.js";
|
||||
import appContext from "../services/app_context.js";
|
||||
import noteCreateService from "../services/note_create.js";
|
||||
|
||||
const helpText = `
|
||||
<strong>Search tips</strong> - also see <button class="btn btn-sm" type="button" data-help-page="Search">complete help on search</button>
|
||||
<p>
|
||||
<ul>
|
||||
<li>Just enter any text for full text search</li>
|
||||
<li><code>@abc</code> - returns notes with label abc</li>
|
||||
<li><code>@year=2019</code> - matches notes with label <code>year</code> having value <code>2019</code></li>
|
||||
<li><code>@rock @pop</code> - matches notes which have both <code>rock</code> and <code>pop</code> labels</li>
|
||||
<li><code>@rock or @pop</code> - only one of the labels must be present</li>
|
||||
<li><code>@year<=2000</code> - numerical comparison (also >, >=, <).</li>
|
||||
<li><code>@dateCreated>=MONTH-1</code> - notes created in the last month</li>
|
||||
<li><code>=handler</code> - will execute script defined in <code>handler</code> relation to get results</li>
|
||||
</ul>
|
||||
</p>`;
|
||||
|
||||
const TPL = `
|
||||
<div class="search-box">
|
||||
<style>
|
||||
@@ -145,7 +130,7 @@ export default class SearchBoxWidget extends BasicWidget {
|
||||
this.$searchBox.tooltip({
|
||||
trigger: 'focus',
|
||||
html: true,
|
||||
title: helpText,
|
||||
title: searchService.getHelpText(),
|
||||
placement: 'right',
|
||||
delay: {
|
||||
show: 500, // necessary because sliding out may cause wrong position
|
||||
|
||||
Reference in New Issue
Block a user