mirror of https://github.com/keeweb/keeweb
handlebars
parent
5b3fe89304
commit
fa7c6d6913
@ -0,0 +1,30 @@
|
||||
'use strict';
|
||||
|
||||
var Handlebars = require('hbs');
|
||||
|
||||
Handlebars.registerHelper('cmp', function(lvalue, rvalue, op, options) {
|
||||
var cond;
|
||||
switch (op) {
|
||||
case '<':
|
||||
cond = lvalue < rvalue;
|
||||
break;
|
||||
case '>':
|
||||
cond = lvalue > rvalue;
|
||||
break;
|
||||
case '>=':
|
||||
cond = lvalue >= rvalue;
|
||||
break;
|
||||
case '<=':
|
||||
cond = lvalue <= rvalue;
|
||||
break;
|
||||
case '===':
|
||||
case '==':
|
||||
cond = lvalue === rvalue;
|
||||
break;
|
||||
case '!==':
|
||||
case '!=':
|
||||
cond = lvalue !== rvalue;
|
||||
break;
|
||||
}
|
||||
return cond ? options.fn(this) : options.inverse(this);
|
||||
});
|
@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var Handlebars = require('hbs');
|
||||
|
||||
Handlebars.registerHelper('ifemptyoreq', function(lvalue, rvalue, options) {
|
||||
return !lvalue || lvalue === rvalue ? options.fn(this) : options.inverse(this);
|
||||
});
|
@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var Handlebars = require('hbs');
|
||||
|
||||
Handlebars.registerHelper('ifeq', function(lvalue, rvalue, options) {
|
||||
return lvalue === rvalue ? options.fn(this) : options.inverse(this);
|
||||
});
|
@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var Handlebars = require('hbs');
|
||||
|
||||
Handlebars.registerHelper('ifneq', function(lvalue, rvalue, options) {
|
||||
return lvalue !== rvalue ? options.fn(this) : options.inverse(this);
|
||||
});
|
@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
require('./cmp');
|
||||
require('./ifeq');
|
||||
require('./ifneq');
|
||||
require('./ifemptyoreq');
|
@ -0,0 +1,9 @@
|
||||
<div class="details__field
|
||||
{{~#if editable}} details__field--editable{{/if~}}
|
||||
{{~#if multiline}} details__field--multiline{{/if~}}
|
||||
{{~#if canEditTitle}} details__field--can-edit-title{{/if~}}
|
||||
">
|
||||
<div class="details__field-label">{{title}}</div>
|
||||
<div class="details__field-value">
|
||||
</div>
|
||||
</div>
|
@ -1,8 +0,0 @@
|
||||
<div class="details__field <%= editable ? 'details__field--editable' : ''
|
||||
%> <%= multiline ? 'details__field--multiline' : ''
|
||||
%> <%= canEditTitle ? 'details__field--can-edit-title' : ''
|
||||
%>">
|
||||
<div class="details__field-label"><%- title %></div>
|
||||
<div class="details__field-value">
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,8 @@
|
||||
<div class="dropdown">
|
||||
{{#each options as |option|}}
|
||||
<div class="dropdown__item {{#if option.active}}dropdown__item--active{{/if}}" data-value="{{option.value}}">
|
||||
<i class="fa fa-{{option.icon}} dropdown__item-icon"></i>
|
||||
<span class="dropdown__item-text">{{option.text}}</span>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
@ -1,8 +0,0 @@
|
||||
<div class="dropdown">
|
||||
<% options.forEach(function(option) { %>
|
||||
<div class="dropdown__item <%= option.active ? 'dropdown__item--active' : '' %>" data-value="<%- option.value %>">
|
||||
<i class="fa fa-<%= option.icon %> dropdown__item-icon"></i>
|
||||
<span class="dropdown__item-text"><%= option.text %></span>
|
||||
</div>
|
||||
<% }); %>
|
||||
</div>
|
@ -0,0 +1,26 @@
|
||||
<div class="footer">
|
||||
{{#each files.models as |file|}}
|
||||
<div class="footer__db footer__db-item {{#unless file.attributes.open}}footer__db--dimmed{{/unless}}" data-file-id="{{file.cid}}">
|
||||
<i class="fa fa-{{#if file.attributes.open}}unlock{{else}}lock{{/if}}"></i> {{file.attributes.name}}
|
||||
{{#if file.attributes.syncing~}}
|
||||
<i class="fa fa-refresh fa-spin footer__db-sign"></i>
|
||||
{{~else if file.attributes.syncError~}}
|
||||
<i class="fa {{#if file.attributes.modified}}fa-circle{{else}}fa-circle-thin{{/if}} footer__db-sign footer__db-sign--error"
|
||||
title="Sync error: {{file.attributes.syncError}}"></i>
|
||||
{{~else if file.attributes.modified~}}
|
||||
<i class="fa fa-circle footer__db-sign"></i>
|
||||
{{~/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
<div class="footer__db footer__db--dimmed footer__db--expanded footer__db-open"><i class="fa fa-plus"></i> Open / New</div>
|
||||
<div class="footer__btn footer__btn-help"><i class="fa fa-question"></i></div>
|
||||
<div class="footer__btn footer__btn-settings">
|
||||
{{#if updateAvailable}}
|
||||
<i class="fa fa-bell footer__update-icon"></i>
|
||||
{{else}}
|
||||
<i class="fa fa-cog"></i>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="footer__btn footer__btn-generate"><i class="fa fa-bolt"></i></div>
|
||||
<div class="footer__btn footer__btn-lock"><i class="fa fa-lock"></i></div>
|
||||
</div>
|
@ -1,22 +0,0 @@
|
||||
<div class="footer">
|
||||
<% files.forEach(function(file) { %>
|
||||
<div class="footer__db footer__db-item <%= file.get('open') ? '' : 'footer__db--dimmed' %>" data-file-id="<%= file.cid %>">
|
||||
<i class="fa fa-<%= file.get('open') ? 'unlock' : 'lock' %>"></i> <%- file.get('name') %>
|
||||
<% if (file.get('syncing')) { %><i class="fa fa-refresh fa-spin footer__db-sign"></i><% }
|
||||
else if (file.get('syncError')) { %><i class="fa <%= file.get('modified') ? 'fa-circle' : 'fa-circle-thin' %> footer__db-sign footer__db-sign--error"
|
||||
title="Sync error: <%- file.get('syncError') %>"></i><% }
|
||||
else if (file.get('modified')) { %><i class="fa fa-circle footer__db-sign"></i><% } %>
|
||||
</div>
|
||||
<% }); %>
|
||||
<div class="footer__db footer__db--dimmed footer__db--expanded footer__db-open"><i class="fa fa-plus"></i> Open / New</div>
|
||||
<div class="footer__btn footer__btn-help"><i class="fa fa-question"></i></div>
|
||||
<div class="footer__btn footer__btn-settings">
|
||||
<% if (updateAvailable) { %>
|
||||
<i class="fa fa-bell footer__update-icon"></i>
|
||||
<% } else { %>
|
||||
<i class="fa fa-cog"></i>
|
||||
<% } %>
|
||||
</div>
|
||||
<div class="footer__btn footer__btn-generate"><i class="fa fa-bolt"></i></div>
|
||||
<div class="footer__btn footer__btn-lock"><i class="fa fa-lock"></i></div>
|
||||
</div>
|
@ -0,0 +1,22 @@
|
||||
<div class="gen">
|
||||
<div>Length: <span class="gen__length-range-val">{{opt.length}}</span></div>
|
||||
<input type="range" class="gen__length-range" value="13" min="0" max="25" />
|
||||
<div>
|
||||
<div class="gen__check"><input type="checkbox" id="gen__check-upper"
|
||||
data-id="upper" {{#if opt.upper}}checked{{/if}}><label for="gen__check-upper">ABC</label></div>
|
||||
<div class="gen__check"><input type="checkbox" id="gen__check-lower"
|
||||
data-id="lower" {{#if opt.lower}}checked{{/if}}><label for="gen__check-lower">abc</label></div>
|
||||
<div class="gen__check"><input type="checkbox" id="gen__check-digits"
|
||||
data-id="digits" {{#if opt.digits}}checked{{/if}}><label for="gen__check-digits">123</label></div>
|
||||
<div class="gen__check"><input type="checkbox" id="gen__check-special"
|
||||
data-id="special" {{#if opt.special}}checked{{/if}}><label for="gen__check-special">!@#</label></div>
|
||||
<div class="gen__check"><input type="checkbox" id="gen__check-brackets"
|
||||
data-id="brackets" {{#if opt.brackets}}checked{{/if}}><label for="gen__check-brackets">({<</label></div>
|
||||
<div class="gen__check"><input type="checkbox" id="gen__check-high"
|
||||
data-id="high" {{#if opt.high}}checked{{/if}}><label for="gen__check-high">äæ±</label></div>
|
||||
<div class="gen__check"><input type="checkbox" id="gen__check-ambiguous"
|
||||
data-id="ambiguous" {{#if opt.ambiguous}}checked{{/if}}><label for="gen__check-ambiguous">0Oo</label></div>
|
||||
</div>
|
||||
<div class="gen__result">password</div>
|
||||
<div class="gen__btn-wrap"><button class="gen__btn-ok">{{btnTitle}}</button></div>
|
||||
</div>
|
@ -1,22 +0,0 @@
|
||||
<div class="gen">
|
||||
<div>Length: <span class="gen__length-range-val"><%= opt.length %></span></div>
|
||||
<input type="range" class="gen__length-range" value="13" min="0" max="25" />
|
||||
<div>
|
||||
<div class="gen__check"><input type="checkbox" id="gen__check-upper"
|
||||
data-id="upper" <%= opt.upper ? 'checked' : '' %>><label for="gen__check-upper">ABC</label></div>
|
||||
<div class="gen__check"><input type="checkbox" id="gen__check-lower"
|
||||
data-id="lower" <%= opt.lower ? 'checked' : '' %>><label for="gen__check-lower">abc</label></div>
|
||||
<div class="gen__check"><input type="checkbox" id="gen__check-digits"
|
||||
data-id="digits" <%= opt.digits ? 'checked' : '' %>><label for="gen__check-digits">123</label></div>
|
||||
<div class="gen__check"><input type="checkbox" id="gen__check-special"
|
||||
data-id="special" <%= opt.special ? 'checked' : '' %>><label for="gen__check-special">!@#</label></div>
|
||||
<div class="gen__check"><input type="checkbox" id="gen__check-brackets"
|
||||
data-id="brackets" <%= opt.brackets ? 'checked' : '' %>><label for="gen__check-brackets">({<</label></div>
|
||||
<div class="gen__check"><input type="checkbox" id="gen__check-high"
|
||||
data-id="high" <%= opt.high ? 'checked' : '' %>><label for="gen__check-high">äæ±</label></div>
|
||||
<div class="gen__check"><input type="checkbox" id="gen__check-ambiguous"
|
||||
data-id="ambiguous" <%= opt.ambiguous ? 'checked' : '' %>><label for="gen__check-ambiguous">0Oo</label></div>
|
||||
</div>
|
||||
<div class="gen__result">password</div>
|
||||
<div class="gen__btn-wrap"><button class="gen__btn-ok"><%= btnTitle %></button></div>
|
||||
</div>
|
@ -1,26 +1,26 @@
|
||||
<div class="icon-select">
|
||||
<div class="icon-select__items">
|
||||
<% icons.forEach(function(icon, ix) { %>
|
||||
<i class="fa fa-<%= icon %> icon-select__icon <%= ix === sel ? 'icon-select__icon--active' : '' %>" data-val="<%= ix %>"></i>
|
||||
<% }); %>
|
||||
{{#each icons as |icon ix|}}
|
||||
<i class="fa fa-{{icon}} icon-select__icon {{#ifeq ix sel}}icon-select__icon--active{{/ifeq}}" data-val="{{ix}}"></i>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="icon-select__items icon-select__items--custom">
|
||||
<input type="file" class="icon-select__file-input hide-by-pos" accept="image/*" />
|
||||
<% if (canDownloadFavicon) { %>
|
||||
{{#if canDownloadFavicon}}
|
||||
<span class="icon-select__icon icon-select__icon-btn icon-select__icon-download"
|
||||
data-val="special" data-special="download" title="Download and use website favicon">
|
||||
<i class="fa fa-cloud-download"></i>
|
||||
</span>
|
||||
<% } %>
|
||||
{{/if}}
|
||||
<span class="icon-select__icon icon-select__icon-btn icon-select__icon-select"
|
||||
data-val="special" data-special="select" title="Select custom icon">
|
||||
<i class="fa fa-ellipsis-h"></i>
|
||||
</span>
|
||||
<% Object.keys(customIcons).forEach(function(ci) { %>
|
||||
<span class="icon-select__icon icon-select__icon-btn icon-select__icon-custom <%= ci === sel ? 'icon-select__icon--active' : '' %>"
|
||||
data-val="<%- ci %>">
|
||||
<img src="<%= customIcons[ci] %>" />
|
||||
{{#each customIcons as |icon ci|}}
|
||||
<span class="icon-select__icon icon-select__icon-btn icon-select__icon-custom {{#ifeq ci sel}}icon-select__icon--active{{/ifeq}}"
|
||||
data-val="{{ci}}">
|
||||
<img src="{{{icon}}}" />
|
||||
</span>
|
||||
<% }); %>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,8 @@
|
||||
<div class="list__item {{#if active}}list__item--active{{/if}} {{#if expired}}list__item--expired{{/if}}" id="{{id}}" draggable="true">
|
||||
{{#if customIcon~}}
|
||||
<img src="{{{customIcon}}}" class="list__item-icon list__item-icon--custom {{#if color}}{{color}}{{/if}}" />
|
||||
{{~else~}}
|
||||
<i class="fa fa-{{icon}} {{#if color}}{{color}}-color{{/if}} list__item-icon"></i>
|
||||
{{~/if}}
|
||||
<span class="list__item-title">{{#if title}}{{title}}{{else}}(no title){{/if}}</span><span class="list__item-descr thin">{{description}}</span>
|
||||
</div>
|
@ -1,5 +0,0 @@
|
||||
<div class="list__item <%= active ? 'list__item--active' : '' %> <%= expired ? 'list__item--expired' : '' %>" id="<%= id %>" draggable="true">
|
||||
<% if (customIcon) { %><img src="<%= customIcon %>" class="list__item-icon list__item-icon--custom <%= color || '' %>" /><% }
|
||||
else { %><i class="fa fa-<%= icon %> <%= color ? color+'-color' : '' %> list__item-icon"></i><% } %>
|
||||
<span class="list__item-title"><%- title || '(no title)' %></span><span class="list__item-descr thin"><%- description %></span>
|
||||
</div>
|
@ -0,0 +1,14 @@
|
||||
<tr class="list__item list__item--table {{#if active}}list__item--active{{/if}} {{#if expired}}list__item--expired{{/if}}" id="{{id}}" draggable="true">
|
||||
<td>
|
||||
{{~#if customIcon~}}
|
||||
<img src="{{{customIcon}}}" class="list__item-icon list__item-icon--custom {{#if color}}{{color}}{{/if}}" />
|
||||
{{~else~}}
|
||||
<i class="fa fa-{{icon}} {{#if color}}{{color}}-color{{/if}} list__item-icon"></i>
|
||||
{{~/if~}}
|
||||
</td>
|
||||
<td>{{#if title}}{{title}}{{else}}(no title){{/if}}</td>
|
||||
<td>{{user}}</td>
|
||||
<td>{{url}}</td>
|
||||
<td>{{tags}}</td>
|
||||
<td>{{notes}}</td>
|
||||
</tr>
|
@ -1,9 +0,0 @@
|
||||
<tr class="list__item list__item--table <%= active ? 'list__item--active' : '' %> <%= expired ? 'list__item--expired' : '' %>" id="<%= id %>" draggable="true">
|
||||
<td><% if (customIcon) { %><img src="<%= customIcon %>" class="list__item-icon list__item-icon--custom <%= color || '' %>" /><% }
|
||||
else { %><i class="fa fa-<%= icon %> <%= color ? color+'-color' : '' %> list__item-icon"></i><% } %></td>
|
||||
<td><%- title || '(no title)' %></td>
|
||||
<td><%- user %></td>
|
||||
<td><%- url %></td>
|
||||
<td><%- tags %></td>
|
||||
<td><%- notes %></td>
|
||||
</tr>
|
@ -0,0 +1,25 @@
|
||||
<div class="menu__item
|
||||
{{~#if active}} menu__item--active{{/if~}}
|
||||
{{~#if disabled}} menu__item--disabled{{/if~}}
|
||||
{{~#if options.length}} menu__item--with-options {{/if~}}
|
||||
{{~#if cls}} {{cls}}{{/if~}}
|
||||
">
|
||||
<div class="menu__item-body" {{#if drag}}draggable="true"{{/if}}>
|
||||
{{#if customIcon~}}
|
||||
<img src="{{{customIcon}}}" class="menu__item-icon menu__item-icon--image" />
|
||||
{{~else~}}
|
||||
<i class="menu__item-icon fa {{#if icon}}fa-{{icon}}{{else}}menu__item-icon--no-icon{{/if}}"></i>
|
||||
{{~/if}}
|
||||
<span class="menu__item-title">{{#if title}}{{title}}{{else}}(no title){{/if}}</span>
|
||||
{{#if options}}
|
||||
<div class="menu__item-options">
|
||||
{{#each options.models as |opt|}}
|
||||
<div class="menu__item-option {{#if opt.attributes.cls}}{{opt.attributes.cls}}{{/if}}"
|
||||
data-value="{{opt.attributes.value}}">{{opt.attributes.title}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if editable}}<i class="menu__item-edit fa fa-cog"></i>{{/if}}
|
||||
{{#ifeq filterKey 'trash'}}<i class="menu__item-empty-trash fa fa-minus-circle" title="Empty Trash"></i>{{/ifeq}}
|
||||
</div>
|
||||
</div>
|
@ -1,25 +0,0 @@
|
||||
<div class="menu__item <%=
|
||||
active ? 'menu__item--active' : '' %> <%=
|
||||
disabled ? 'menu__item--disabled' : '' %> <%=
|
||||
options && options.length ? 'menu__item--with-options' : '' %> <%=
|
||||
cls ? cls : '' %>">
|
||||
<div class="menu__item-body" <%= drag ? 'draggable="true"' : '' %>>
|
||||
<% if (customIcon) { %><img src="<%= customIcon %>" class="menu__item-icon menu__item-icon--image" /><% }
|
||||
else { %><i class="menu__item-icon fa <%= icon ? 'fa-' + icon : 'menu__item-icon--no-icon' %>"></i><% }
|
||||
%><span class="menu__item-title"><%- title || '(no title)' %></span>
|
||||
<% if (options) { %>
|
||||
<div class="menu__item-options">
|
||||
<% options.forEach(function(option) { %>
|
||||
<div class="menu__item-option <%= option.get('cls') ? option.get('cls') : '' %>"
|
||||
data-value="<%- option.get('value') %>"><%- option.get('title') %></div>
|
||||
<% }); %>
|
||||
</div>
|
||||
<% } %>
|
||||
<% if (typeof editable !== 'undefined') { %>
|
||||
<i class="menu__item-edit fa fa-cog"></i>
|
||||
<% } %>
|
||||
<% if (filterKey === 'trash') { %>
|
||||
<i class="menu__item-empty-trash fa fa-minus-circle" title="Empty Trash"></i>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,9 @@
|
||||
<div class="menu__section
|
||||
{{~#if scrollable}} menu__section--scrollable{{/if~}}
|
||||
{{~#if grow}} menu__section--grow{{/if~}}
|
||||
{{~#if drag}} menu__section--drag{{/if~}}
|
||||
">
|
||||
{{~#if scrollable}}
|
||||
<div class="scroller"></div><div class="scroller__bar-wrapper"><div class="scroller__bar"></div></div>
|
||||
{{/if}}
|
||||
</div>
|
@ -1,8 +0,0 @@
|
||||
<div class="menu__section <%=
|
||||
scrollable ? 'menu__section--scrollable' : '' %> <%=
|
||||
grow ? 'menu__section--grow' : '' %> <%=
|
||||
drag ? 'menu__section--drag' : '' %>">
|
||||
<% if (scrollable) { %>
|
||||
<div class="scroller"></div><div class="scroller__bar-wrapper"><div class="scroller__bar"></div></div>
|
||||
<% } %>
|
||||
</div>
|
@ -0,0 +1,18 @@
|
||||
<div class="modal modal--hidden">
|
||||
<div class="modal__content">
|
||||
<i class="modal__icon fa fa-{{icon}}"></i>
|
||||
<div class="modal__header">{{{header}}}</div>
|
||||
<div class="modal__body">
|
||||
{{{body}}}
|
||||
{{#if checkbox}}
|
||||
<div class="modal__check-wrap"><input type="checkbox" id="modal__check" /><label for="modal__check">{{checkbox}}</label></div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="modal__buttons">
|
||||
{{#each buttons as |btn|}}
|
||||
<button class="{{#unless btn.result}}btn-error{{/unless}} {{#if btn.error}}btn-error{{/if}}"
|
||||
data-result="{{btn.result}}">{{btn.title}}</button>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,17 +0,0 @@
|
||||
<div class="modal modal--hidden">
|
||||
<div class="modal__content">
|
||||
<i class="modal__icon fa fa-<%= icon %>"></i>
|
||||
<div class="modal__header"><%= header %></div>
|
||||
<div class="modal__body">
|
||||
<%= body %>
|
||||
<% if (typeof checkbox !== 'undefined') { %>
|
||||
<div class="modal__check-wrap"><input type="checkbox" id="modal__check" /><label for="modal__check"><%- checkbox %></label></div>
|
||||
<% } %>
|
||||
</div>
|
||||
<div class="modal__buttons">
|
||||
<% buttons.forEach(function(btn) { %>
|
||||
<button class="<%= btn.result && !btn.error ? '' : 'btn-error' %>" data-result="<%= btn.result %>"><%= btn.title %></button>
|
||||
<% }); %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,109 +1,109 @@
|
||||
<div>
|
||||
<h1><i class="fa fa-cog"></i> General Settings</h1>
|
||||
|
||||
<% if (updateReady && !canAutoUpdate) { %>
|
||||
{{#if updateWaitingReload}}
|
||||
<h2 class="action-color">Update</h2>
|
||||
<div>New app version was released and downloaded. <a href="<%= releaseNotesLink %>" target="_blank">View release notes</a></div>
|
||||
<div>New app version was released and downloaded. <a href="{{releaseNotesLink}}" target="_blank">View release notes</a></div>
|
||||
<div class="settings__general-update-buttons">
|
||||
<button class="settings__general-restart-btn">Reload to update</button>
|
||||
</div>
|
||||
<% } else if (updateManual) { %>
|
||||
{{else if updateManual}}
|
||||
<h2 class="action-color">Update</h2>
|
||||
<div>New version has been released. It will check for updates and install them automatically
|
||||
but auto-upgrading from your version is impossible.</div>
|
||||
<div class="settings__general-update-buttons">
|
||||
<button class="settings__general-download-update-btn">Download update</button>
|
||||
</div>
|
||||
<% } %>
|
||||
<% if (canAutoUpdate && !updateManual) { %>
|
||||
{{/if}}
|
||||
{{#if showUpdateBlock}}
|
||||
<h2>Update</h2>
|
||||
<div>
|
||||
<select class="settings__general-auto-update settings__select input-base">
|
||||
<option value="install" <%= autoUpdate === 'install' ? 'selected' : '' %>>Download and install automatically</option>
|
||||
<option value="check" <%= autoUpdate === 'check' ? 'selected' : '' %>>Check but don't install</option>
|
||||
<option value="" <%= autoUpdate ? '' : 'selected' %>>Never check for updates</option>
|
||||
<option value="install" {{#ifeq autoUpdate 'install'}}selected{{/ifeq}}>Download and install automatically</option>
|
||||
<option value="check" {{#ifeq autoUpdate 'check'}}selected{{/ifeq}}>Check but don't install</option>
|
||||
<option value="" {{#unless autoUpdate}}selected{{/unless}}>Never check for updates</option>
|
||||
</select>
|
||||
<div><%- updateInfo %></div>
|
||||
<a href="<%= releaseNotesLink %>" target="_blank">View release notes</a>
|
||||
<div>{{updateInfo}}</div>
|
||||
<a href="{{releaseNotesLink}}" target="_blank">View release notes</a>
|
||||
</div>
|
||||
<div class="settings__general-update-buttons">
|
||||
<% if (updateInProgress) { %>
|
||||
{{#if updateInProgress}}
|
||||
<button class="settings__general-update-btn btn-silent" disabled>Checking for updates</button>
|
||||
<% } else { %>
|
||||
{{else}}
|
||||
<button class="settings__general-update-btn btn-silent">Check for updates</button>
|
||||
<% } %>
|
||||
<% if (updateReady) { %><button class="settings__general-restart-btn">Restart to update</button><% } %>
|
||||
<% if (updateFound) { %><button class="settings__general-update-found-btn">Download update and restart</button><% } %>
|
||||
{{/if}}
|
||||
{{#if updateReady}}<button class="settings__general-restart-btn">Restart to update</button>{{/if}}
|
||||
{{#if updateFound}}<button class="settings__general-update-found-btn">Download update and restart</button>{{/if}}
|
||||
</div>
|
||||
<% } %>
|
||||
{{/if}}
|
||||
|
||||
<h2>Appearance</h2>
|
||||
<div>
|
||||
<label for="settings__general-theme">Theme:</label>
|
||||
<select class="settings__general-theme settings__select input-base" id="settings__general-theme">
|
||||
<% _.forEach(themes, function(name, key) { %>
|
||||
<option value="<%= key %>" <%= key === activeTheme ? 'selected' : '' %>><%- name %></option>
|
||||
<% }); %>
|
||||
{{#each themes as |name key|}}
|
||||
<option value="{{key}}" {{#ifeq key activeTheme}}selected{{/ifeq}}>{{name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" class="settings__input input-base settings__general-expand" id="settings__general-expand" <%- expandGroups ? 'checked' : '' %> />
|
||||
<input type="checkbox" class="settings__input input-base settings__general-expand" id="settings__general-expand" {{#if expandGroups}}checked{{/if}} />
|
||||
<label for="settings__general-expand">Show entries from all subgroups</label>
|
||||
</div>
|
||||
<% if (canSetTableView) { %>
|
||||
{{#if canSetTableView}}
|
||||
<div>
|
||||
<input type="checkbox" class="settings__input input-base settings__general-table-view" id="settings__general-table-view" <%- tableView ? 'checked' : '' %> />
|
||||
<input type="checkbox" class="settings__input input-base settings__general-table-view" id="settings__general-table-view" {{#if tableView}}checked{{/if}} />
|
||||
<label for="settings__general-table-view">Entries list table view</label>
|
||||
</div>
|
||||
<% } %>
|
||||
{{/if}}
|
||||
<div>
|
||||
<input type="checkbox" class="settings__input input-base settings__general-colorful-icons" id="settings__general-colorful-icons" <%- colorfulIcons ? 'checked' : '' %> />
|
||||
<input type="checkbox" class="settings__input input-base settings__general-colorful-icons" id="settings__general-colorful-icons" {{#if colorfulIcons}}checked{{/if}} />
|
||||
<label for="settings__general-colorful-icons">Colorful custom icons in list</label>
|
||||
</div>
|
||||
|
||||
<h2>Function</h2>
|
||||
<div>
|
||||
<input type="checkbox" class="settings__input input-base settings__general-auto-save" id="settings__general-auto-save"
|
||||
<%- autoSave ? 'checked' : '' %> />
|
||||
{{#if autoSave}}checked{{/if}} />
|
||||
<label for="settings__general-auto-save">Automatically save and sync</label>
|
||||
</div>
|
||||
<div>
|
||||
<label for="settings__general-idle-minutes">Auto-lock if the app is inactive:</label>
|
||||
<select class="settings__general-idle-minutes settings__select input-base" id="settings__general-idle-minutes">
|
||||
<option value="0" <%= idleMinutes <= 0 ? 'selected' : '' %>>Don't auto-lock</option>
|
||||
<option value="5" <%= idleMinutes === 5 ? 'selected' : '' %>>In 5 minutes</option>
|
||||
<option value="10" <%= idleMinutes === 10 ? 'selected' : '' %>>In 10 minutes</option>
|
||||
<option value="15" <%= idleMinutes === 15 ? 'selected' : '' %>>In 15 minutes</option>
|
||||
<option value="60" <%= idleMinutes === 60 ? 'selected' : '' %>>In an hour</option>
|
||||
<option value="0" {{#cmp idleMinutes 0 '<='}}selected{{/cmp}}>Don't auto-lock</option>
|
||||
<option value="5" {{#ifeq idleMinutes 5}}selected{{/ifeq}}>In 5 minutes</option>
|
||||
<option value="10" {{#ifeq idleMinutes 10}}selected{{/ifeq}}>In 10 minutes</option>
|
||||
<option value="15" {{#ifeq idleMinutes 15}}selected{{/ifeq}}>In 15 minutes</option>
|
||||
<option value="60" {{#ifeq idleMinutes 60}}selected{{/ifeq}}>In an hour</option>
|
||||
</select>
|
||||
</div>
|
||||
<% if (canClearClipboard) { %>
|
||||
{{#if canClearClipboard}}
|
||||
<div>
|
||||
<label for="settings__general-clipboard">Clear clipboard after copy:</label>
|
||||
<select class="settings__general-clipboard settings__select input-base" id="settings__general-clipboard">
|
||||
<option value="0" <%= clipboardSeconds ? '' : 'selected' %>>Don't clear</option>
|
||||
<option value="5" <%= clipboardSeconds === 5 ? 'selected' : '' %>>In 5 seconds</option>
|
||||
<option value="10" <%= clipboardSeconds === 10 ? 'selected' : '' %>>In 10 seconds</option>
|
||||
<option value="15" <%= clipboardSeconds === 15 ? 'selected' : '' %>>In 15 seconds</option>
|
||||
<option value="60" <%= clipboardSeconds === 60 ? 'selected' : '' %>>In a minute</option>
|
||||
<option value="0" {{#unless clipboardSeconds}}selected{{/unless}}>Don't clear</option>
|
||||
<option value="5" {{#ifeq clipboardSeconds 5}}selected{{/ifeq}}>In 5 seconds</option>
|
||||
<option value="10" {{#ifeq clipboardSeconds 10}}selected{{/ifeq}}>In 10 seconds</option>
|
||||
<option value="15" {{#ifeq clipboardSeconds 15}}selected{{/ifeq}}>In 15 seconds</option>
|
||||
<option value="60" {{#ifeq clipboardSeconds 60}}selected{{/ifeq}}>In a minute</option>
|
||||
</select>
|
||||
</div>
|
||||
<% } %>
|
||||
<% if (canMinimize) { %>
|
||||
{{/if}}
|
||||
{{#if canMinimize}}
|
||||
<div>
|
||||
<input type="checkbox" class="settings__input input-base settings__general-minimize" id="settings__general-minimize"
|
||||
<%- minimizeOnClose ? 'checked' : '' %> />
|
||||
{{#if minimizeOnClose}}checked{{/if}} />
|
||||
<label for="settings__general-minimize">Minimize app instead of close</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" class="settings__input input-base settings__general-lock-on-minimize" id="settings__general-lock-on-minimize"
|
||||
<%- lockOnMinimize ? 'checked' : '' %> />
|
||||
{{#if lockOnMinimize}}checked{{/if}} />
|
||||
<label for="settings__general-lock-on-minimize">Auto-lock on minimize</label>
|
||||
</div>
|
||||
<% } %>
|
||||
{{/if}}
|
||||
|
||||
<% if (devTools) { %>
|
||||
{{#if devTools}}
|
||||
<h2>Advanced</h2>
|
||||
<a class="settings__general-dev-tools-link">Show dev tools</a>
|
||||
<% } %>
|
||||
{{/if}}
|
||||
</div>
|
@ -0,0 +1,16 @@
|
||||
<div>
|
||||
<h1><i class="fa fa-keyboard-o"></i> Shortcuts</h1>
|
||||
<div><span class="shortcut">{{{cmd}}}A</span> or <span class="shortcut">{{{alt}}}A</span> show all items</div>
|
||||
<div><span class="shortcut">{{{alt}}}C</span> show items with colors</div>
|
||||
<div><span class="shortcut">{{{alt}}}D</span> go to trash</div>
|
||||
<div><span class="shortcut">{{{cmd}}}F</span> search, or just start typing</div>
|
||||
<div><span class="shortcut">esc</span> clear search</div>
|
||||
<div><span class="shortcut">⏎</span> go to entry</div>
|
||||
<div><span class="shortcut">{{{cmd}}}C</span> copy password or selected field</div>
|
||||
<div><span class="shortcut">↑</span> go to previous item</div>
|
||||
<div><span class="shortcut">↓</span> go to next item</div>
|
||||
<div><span class="shortcut">{{{alt}}}N</span> create entry</div>
|
||||
<div><span class="shortcut">{{{cmd}}}O</span> open / new</div>
|
||||
<div><span class="shortcut">{{{cmd}}}S</span> save</div>
|
||||
<div><span class="shortcut">{{{cmd}}}G</span> generate</div>
|
||||
</div>
|
@ -1,16 +0,0 @@
|
||||
<div>
|
||||
<h1><i class="fa fa-keyboard-o"></i> Shortcuts</h1>
|
||||
<div><span class="shortcut"><%= cmd %>A</span> or <span class="shortcut"><%= alt %>A</span> show all items</div>
|
||||
<div><span class="shortcut"><%= alt %>C</span> show items with colors</div>
|
||||
<div><span class="shortcut"><%= alt %>D</span> go to trash</div>
|
||||
<div><span class="shortcut"><%= cmd %>F</span> search, or just start typing</div>
|
||||
<div><span class="shortcut">esc</span> clear search</div>
|
||||
<div><span class="shortcut">⏎</span> go to entry</div>
|
||||