mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 04:45:47 +01:00
mobile detection
This commit is contained in:
255
src/views/desktop.ejs
Normal file
255
src/views/desktop.ejs
Normal file
@@ -0,0 +1,255 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="theme-<%= theme %>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Trilium Notes</title>
|
||||
</head>
|
||||
<body class="desktop">
|
||||
<div id="container" style="display: none; grid-template-columns: minmax(<%= leftPaneMinWidth %>px, <%= leftPaneWidthPercent %>fr) <%= rightPaneWidthPercent %>fr">
|
||||
<div id="header" class="hide-toggle">
|
||||
<div id="history-navigation" style="display: none;">
|
||||
<a id="history-back-button" title="Go to previous note." class="icon-action jam jam-arrow-square-left"></a>
|
||||
|
||||
|
||||
|
||||
<a id="history-forward-button" title="Go to next note." class="icon-action jam jam-arrow-square-right"></a>
|
||||
</div>
|
||||
|
||||
<div style="flex-grow: 100; display: flex;">
|
||||
<button class="btn btn-sm" id="jump-to-note-dialog-button" title="CTRL+J">
|
||||
<span class="jam jam-direction"></span>
|
||||
Jump to note
|
||||
</button>
|
||||
|
||||
<button class="btn btn-sm" id="recent-changes-button">
|
||||
<span class="jam jam-history"></span>
|
||||
|
||||
Recent changes
|
||||
</button>
|
||||
|
||||
<button class="btn btn-sm" id="enter-protected-session-button" title="Enter protected session to be able to find and view protected notes">
|
||||
<span class="jam jam-door"></span>
|
||||
|
||||
Enter protected session
|
||||
</button>
|
||||
|
||||
<button class="btn btn-sm" id="leave-protected-session-button" title="Leave protected session so that protected notes are not accessible any more." style="display: none;">
|
||||
<span class="jam jam-log-out"></span>
|
||||
|
||||
Leave protected session
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="plugin-buttons">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button class="btn btn-sm" id="sync-now-button" title="Trigger sync">
|
||||
<span class="jam jam-refresh"></span>
|
||||
Sync (<span id="outstanding-syncs-count">0</span>)
|
||||
</button>
|
||||
|
||||
<button class="btn btn-sm" id="options-button">
|
||||
<span class="jam jam-settings-alt"></span> Options</button>
|
||||
|
||||
<form action="logout" id="logout-button" method="POST" style="display: inline;">
|
||||
<button type="submit" class="btn btn-sm">
|
||||
<span class="jam jam-log-out"></span>
|
||||
Logout
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="left-pane" class="hide-toggle">
|
||||
<div id="global-buttons">
|
||||
<a id="create-top-level-note-button" title="Create new top level note" class="icon-action jam jam-plus-circle"></a>
|
||||
|
||||
<a id="collapse-tree-button" title="Collapse note tree. Shortcut ALT+C" class="icon-action jam jam-layers"></a>
|
||||
|
||||
<a id="scroll-to-current-note-button" title="Scroll to current note. Shortcut CTRL+." class="icon-action jam jam-download"></a>
|
||||
|
||||
<a id="toggle-search-button" title="Search in notes. Shortcut CTRL+S" class="icon-action jam jam-search"></a>
|
||||
</div>
|
||||
|
||||
<input type="file" id="import-upload" style="display: none" />
|
||||
|
||||
<div id="search-box">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<input name="search-text" placeholder="Search text, labels" style="flex-grow: 100; margin-left: 5px; margin-right: 5px;" autocomplete="off">
|
||||
<button id="do-search-button" class="btn btn-sm icon-button jam jam-search" title="Search (enter)"></button>
|
||||
|
||||
|
||||
|
||||
<button id="save-search-button" class="btn btn-sm icon-button jam jam-save" title="Save search"></button>
|
||||
|
||||
|
||||
|
||||
<button id="close-search-button" class="btn btn-sm icon-button jam jam-close" title="Close search"></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="search-results">
|
||||
<strong>Search results:</strong>
|
||||
|
||||
<ul id="search-results-inner"></ul>
|
||||
</div>
|
||||
|
||||
<div id="tree"></div>
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-sm" id="context-menu-container"></div>
|
||||
</div>
|
||||
|
||||
<div id="title-container">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<div class="dropdown hide-toggle">
|
||||
<button id="note-path-list-button" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-sm dropdown-toggle">
|
||||
<span id="note-path-count">1 path</span>
|
||||
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul id="note-path-list" class="dropdown-menu" aria-labelledby="note-path-list-button">
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<input autocomplete="off" value="" id="note-title" tabindex="1">
|
||||
|
||||
<div class="hide-toggle" style="display: flex; align-items: center;">
|
||||
<span id="note-id-display" title="Note ID"></span>
|
||||
|
||||
<button class="btn btn-sm icon-button jam jam-play"
|
||||
style="display: none; margin-right: 10px;"
|
||||
title="Render"
|
||||
id="render-button"></button>
|
||||
|
||||
<button class="btn btn-sm icon-button jam jam-play"
|
||||
style="display: none; margin-right: 10px;"
|
||||
title="Execute (Ctrl+Enter)"
|
||||
id="execute-script-button"></button>
|
||||
|
||||
<div class="btn-group btn-group-xs">
|
||||
<button type="button"
|
||||
class="btn btn-sm icon-button jam jam-shield-check"
|
||||
id="protect-button"
|
||||
title="Protected note can be viewed and edited only after entering password">
|
||||
</button>
|
||||
|
||||
<button type="button"
|
||||
class="btn btn-sm icon-button jam jam-shield-close"
|
||||
id="unprotect-button"
|
||||
title="Not protected note can be viewed without entering password">
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="note-type-wrapper" style="display: flex;">
|
||||
<div class="dropdown" id="note-type">
|
||||
<button data-bind="disable: isDisabled()" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-sm dropdown-toggle">
|
||||
Type: <span data-bind="text: typeString()"></span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<div id="note-type-dropdown" class="dropdown-menu dropdown-menu-right">
|
||||
<a class="dropdown-item" data-bind="click: selectText, css: { selected: type() == 'text' }"><span class="check">✓</span> <strong>Text</strong></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" data-bind="click: selectRelationMap, css: { selected: type() == 'relation-map' && mime() == '' }"><span class="check">✓</span> <strong>Relation Map</strong></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" data-bind="click: selectRender, css: { selected: type() == 'render' && mime() == '' }"><span class="check">✓</span> <strong>Render HTML note</strong></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" data-bind="click: selectCode, css: { selected: type() == 'code' && mime() == '' }"><span class="check">✓</span> <strong>Code</strong></a>
|
||||
<!-- ko foreach: codeMimeTypes -->
|
||||
<a class="dropdown-item" data-bind="click: $parent.selectCodeMime, css: { selected: $parent.type() == 'code' && $parent.mime() == mime }"><span class="check">✓</span> <span data-bind="text: title"></span></a>
|
||||
<!-- /ko -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dropdown" id="note-actions">
|
||||
<button type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-sm dropdown-toggle">
|
||||
Note actions
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a class="dropdown-item" id="show-note-revisions-button" data-bind="css: { disabled: type() == 'file' || type() == 'image' }">Revisions</a>
|
||||
<a class="dropdown-item show-attributes-button"><kbd>Alt+A</kbd> Attributes</a>
|
||||
<a class="dropdown-item" id="show-source-button" data-bind="css: { disabled: type() != 'text' && type() != 'code' && type() != 'relation-map' && type() != 'search' }">Note source</a>
|
||||
<a class="dropdown-item" id="upload-file-button">Upload file</a>
|
||||
<a class="dropdown-item" id="export-note-button" data-bind="css: { disabled: type() != 'text' }">Export note</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% include details/detail.ejs %>
|
||||
|
||||
<% include dialogs/add_link.ejs %>
|
||||
<% include dialogs/attributes.ejs %>
|
||||
<% include dialogs/branch_prefix.ejs %>
|
||||
<% include dialogs/event_log.ejs %>
|
||||
<% include dialogs/export.ejs %>
|
||||
<% include dialogs/jump_to_note.ejs %>
|
||||
<% include dialogs/markdown_import.ejs %>
|
||||
<% include dialogs/note_revisions.ejs %>
|
||||
<% include dialogs/note_source.ejs %>
|
||||
<% include dialogs/options.ejs %>
|
||||
<% include dialogs/protected_session_password.ejs %>
|
||||
<% include dialogs/recent_changes.ejs %>
|
||||
<% include dialogs/sql_console.ejs %>
|
||||
<% include dialogs/info.ejs %>
|
||||
<% include dialogs/prompt.ejs %>
|
||||
<% include dialogs/confirm.ejs %>
|
||||
</div>
|
||||
|
||||
<webview class="electron-in-page-search-window" nodeintegration disablewebsecurity src="libraries/electron-in-page-search/search-window.html"></webview>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.baseApiUrl = 'api/';
|
||||
window.device = "desktop";
|
||||
window.glob = {
|
||||
activeDialog: null,
|
||||
sourceId: '<%= sourceId %>',
|
||||
maxSyncIdAtLoad: <%= maxSyncIdAtLoad %>,
|
||||
instanceName: '<%= instanceName %>'
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- Required for correct loading of scripts in Electron -->
|
||||
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
|
||||
|
||||
<script src="libraries/jquery.min.js"></script>
|
||||
|
||||
<link href="libraries/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<script src="libraries/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
<script src="libraries/bootstrap-notify.min.js"></script>
|
||||
|
||||
<!-- Include Fancytree skin and library -->
|
||||
<link href="libraries/fancytree/skin-win8/ui.fancytree.css" rel="stylesheet">
|
||||
<script src="libraries/fancytree/jquery.fancytree-all-deps.min.js"></script>
|
||||
|
||||
<script src="libraries/jquery.hotkeys.js"></script>
|
||||
<script src="libraries/jquery.fancytree.hotkeys.js"></script>
|
||||
|
||||
<script src="libraries/knockout.min.js"></script>
|
||||
|
||||
<script src="libraries/autocomplete.jquery.min.js"></script>
|
||||
|
||||
<link href="stylesheets/style.css" rel="stylesheet">
|
||||
<link href="stylesheets/desktop.css" rel="stylesheet">
|
||||
|
||||
<script src="javascripts/services/bootstrap.js" crossorigin type="module"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="libraries/jam/css/jam.min.css">
|
||||
|
||||
<script type="text/javascript">
|
||||
// we hide container initally because otherwise it is rendered first without CSS and then flickers into
|
||||
// final form which is pretty ugly.
|
||||
$("#container").show();
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
<%= appCss %>
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user