new import dialog

This commit is contained in:
zadam
2019-02-10 14:33:13 +01:00
parent 1e1d78999e
commit 45ddfef30a
8 changed files with 79 additions and 26 deletions

View File

@@ -99,8 +99,6 @@
<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; flex-wrap: wrap;">
<input name="search-text" id="search-text" placeholder="Search text, labels" style="flex-grow: 100; margin-left: 5px; margin-right: 5px; flex-basis: 5em; min-width: 0;" autocomplete="off">
@@ -215,6 +213,7 @@
<% include dialogs/branch_prefix.ejs %>
<% include dialogs/event_log.ejs %>
<% include dialogs/export.ejs %>
<% include dialogs/import.ejs %>
<% include dialogs/jump_to_note.ejs %>
<% include dialogs/markdown_import.ejs %>
<% include dialogs/note_revisions.ejs %>

View File

@@ -59,7 +59,7 @@
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary btn-sm">Export</button>
<button class="btn btn-primary">Export</button>
</div>
</form>
</div>

View File

@@ -0,0 +1,37 @@
<div id="import-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Import into note</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<form id="import-form">
<div class="modal-body">
<div class="form-group">
<label for="import-file-upload-input"><strong>Choose import file</strong></label>
<input type="file" id="import-file-upload-input" class="form-control-file" />
<p>File will be imported as child note(s) into <strong class="note-title"></strong>. Import file must be of supported type and have correct extension - one of <code>.html</code>, <code>.md</code>, <code>.tar</code>, <code>.enex</code>.</p>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<input id="safe-import" value="1" type="checkbox" checked> <strong>Safe import</strong>
</label>
<br/>
Trilium <code>.tar</code> export files can contain executable scripts which may contain harmful behavior. Safe import will deactivate automatic execution of all imported scripts. Uncheck "Safe import" only if the imported tar archive is supposed to contain executable scripts and you completely trust the contents of the import file.
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary">Import</button>
</div>
</form>
</div>
</div>
</div>