|
|
|
|
@ -31,17 +31,25 @@ const FONT_FAMILIES = [
|
|
|
|
|
const TPL = `
|
|
|
|
|
<p><strong>Settings on this options tab are saved automatically after each change.</strong></p>
|
|
|
|
|
|
|
|
|
|
<form>
|
|
|
|
|
<style>
|
|
|
|
|
.options-section .row {
|
|
|
|
|
/* rows otherwise overflow horizontally and force a scrollbar */
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
margin-right: auto;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<div class="options-section">
|
|
|
|
|
<div class="form-group row">
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<label for="zoom-factor-select">Zoom factor (desktop build only)</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<input type="number" class="form-control" id="zoom-factor-select" min="0.3" max="2.0" step="0.1"/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<label for="native-title-bar-select">Native title bar (requires app restart)</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select class="form-control" id="native-title-bar-select">
|
|
|
|
|
<option value="show">enabled</option>
|
|
|
|
|
<option value="hide">disabled</option>
|
|
|
|
|
@ -50,9 +58,11 @@ const TPL = `
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<p>Zooming can be controlled with CTRL+- and CTRL+= shortcuts as well.</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="options-section">
|
|
|
|
|
<h4>Theme</h4>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="form-group row">
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<label for="theme-select">Theme</label>
|
|
|
|
|
@ -64,104 +74,106 @@ const TPL = `
|
|
|
|
|
<input type="checkbox" class="form-control" id="override-theme-fonts">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="options-section">
|
|
|
|
|
|
|
|
|
|
<div id="overriden-font-settings">
|
|
|
|
|
<h4>Fonts</h4>
|
|
|
|
|
|
|
|
|
|
<h5>Main font</h5>
|
|
|
|
|
|
|
|
|
|
<div class="form-group row">
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<label for="main-font-family">Font family</label>
|
|
|
|
|
<select class="form-control" id="main-font-family"></select>
|
|
|
|
|
<div id="overriden-font-settings" class="options-section">
|
|
|
|
|
<h4>Fonts</h4>
|
|
|
|
|
|
|
|
|
|
<h5>Main font</h5>
|
|
|
|
|
|
|
|
|
|
<div class="form-group row">
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<label for="main-font-family">Font family</label>
|
|
|
|
|
<select class="form-control" id="main-font-family"></select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<label for="main-font-size">Size</label>
|
|
|
|
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
<input type="number" class="form-control" id="main-font-size" min="50" max="200" step="10"/>
|
|
|
|
|
<div class="input-group-append">
|
|
|
|
|
<span class="input-group-text">%</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<label for="main-font-size">Size</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h5>Note tree font</h5>
|
|
|
|
|
|
|
|
|
|
<div class="form-group row">
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<label for="tree-font-family">Font family</label>
|
|
|
|
|
<select class="form-control" id="tree-font-family"></select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
<input type="number" class="form-control" id="main-font-size" min="50" max="200" step="10"/>
|
|
|
|
|
<div class="input-group-append">
|
|
|
|
|
<span class="input-group-text">%</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<label for="tree-font-size">Size</label>
|
|
|
|
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
<input type="number" class="form-control" id="tree-font-size" min="50" max="200" step="10"/>
|
|
|
|
|
<div class="input-group-append">
|
|
|
|
|
<span class="input-group-text">%</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h5>Note tree font</h5>
|
|
|
|
|
<h5>Note detail font</h5>
|
|
|
|
|
|
|
|
|
|
<div class="form-group row">
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<label for="tree-font-family">Font family</label>
|
|
|
|
|
<select class="form-control" id="tree-font-family"></select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group row">
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<label for="detail-font-family">Font family</label>
|
|
|
|
|
<select class="form-control" id="detail-font-family"></select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<label for="tree-font-size">Size</label>
|
|
|
|
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
<input type="number" class="form-control" id="tree-font-size" min="50" max="200" step="10"/>
|
|
|
|
|
<div class="input-group-append">
|
|
|
|
|
<span class="input-group-text">%</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<label for="detail-font-size">Size</label>
|
|
|
|
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
<input type="number" class="form-control" id="detail-font-size" min="50" max="200" step="10"/>
|
|
|
|
|
<div class="input-group-append">
|
|
|
|
|
<span class="input-group-text">%</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h5>Note detail font</h5>
|
|
|
|
|
|
|
|
|
|
<div class="form-group row">
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<label for="detail-font-family">Font family</label>
|
|
|
|
|
<select class="form-control" id="detail-font-family"></select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<label for="detail-font-size">Size</label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
<input type="number" class="form-control" id="detail-font-size" min="50" max="200" step="10"/>
|
|
|
|
|
<div class="input-group-append">
|
|
|
|
|
<span class="input-group-text">%</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<h5>Monospace (code) font</h5>
|
|
|
|
|
|
|
|
|
|
<div class="form-group row">
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<label for="monospace-font-family">Font family</label>
|
|
|
|
|
<select class="form-control" id="monospace-font-family"></select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h5>Monospace (code) font</h5>
|
|
|
|
|
|
|
|
|
|
<div class="form-group row">
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<label for="monospace-font-family">Font family</label>
|
|
|
|
|
<select class="form-control" id="monospace-font-family"></select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<label for="monospace-font-size">Size</label>
|
|
|
|
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
<input type="number" class="form-control" id="monospace-font-size" min="50" max="200" step="10"/>
|
|
|
|
|
<div class="input-group-append">
|
|
|
|
|
<span class="input-group-text">%</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<label for="monospace-font-size">Size</label>
|
|
|
|
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
<input type="number" class="form-control" id="monospace-font-size" min="50" max="200" step="10"/>
|
|
|
|
|
<div class="input-group-append">
|
|
|
|
|
<span class="input-group-text">%</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<p>Note that tree and detail font sizing is relative to the main font size setting.</p>
|
|
|
|
|
|
|
|
|
|
<p>Not all listed fonts may be available on your system.</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
To apply font changes, click on
|
|
|
|
|
<button class="btn btn-micro reload-frontend-button">reload frontend</button>
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p>Note that tree and detail font sizing is relative to the main font size setting.</p>
|
|
|
|
|
|
|
|
|
|
<p>Not all listed fonts may be available on your system.</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
To apply font changes, click on
|
|
|
|
|
<button class="btn btn-micro reload-frontend-button">reload frontend</button>
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<div class="options-section">
|
|
|
|
|
<h4>Content width</h4>
|
|
|
|
|
|
|
|
|
|
<p>Trilium by default limits max content width to improve readability for maximized screens on wide screens.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="form-group row">
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<label for="max-content-width">Max content width in pixels</label>
|
|
|
|
|
@ -173,11 +185,12 @@ const TPL = `
|
|
|
|
|
To content width changes, click on
|
|
|
|
|
<button class="btn btn-micro reload-frontend-button">reload frontend</button>
|
|
|
|
|
</p>
|
|
|
|
|
</form>`;
|
|
|
|
|
</div>
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export default class AppearanceOptions extends OptionsTab {
|
|
|
|
|
get tabTitle() { return "Appearance" }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lazyRender() {
|
|
|
|
|
this.$widget = $(TPL);
|
|
|
|
|
|
|
|
|
|
|