Skip to content

TagSpaces is an offline, open source, document manager with tagging support

Show EULA prominently

kristiyandde2f9bce924ae
diff --git a/data/electron/electron.api.js b/data/electron/electron.api.js
index 26a00f7c3..d24e58485 100644
--- a/data/electron/electron.api.js
+++ b/data/electron/electron.api.js
@@ -157,7 +157,14 @@ define(function(require, exports, module) {
click: function() {
TSCORE.UI.showAboutDialog();
}
- }
+ },
+ {
+ label: $.i18n.t("ns.common:license"),
+ //accelerator: "bind key",
+ click: function() {
+ TSCORE.UI.showLicenseDialog();
+ }
+ },
]
},
];
diff --git a/data/index.html b/data/index.html
index d6bd1d82d..79553ffd9 100644
--- a/data/index.html
+++ b/data/index.html
@@ -363,6 +363,24 @@
</div>
</div>
+<div class="modal fullScreenMobile" id="aboutLicenseModal" tabindex="-1" role="dialog" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></button>
+ <h4 class="modal-title" data-i18n="ns.common:license"></h4>
+ </div>
+ <div class="modal-body">
+ <iframe id="aboutIframe" sandbox="allow-same-origin allow-scripts" nwdisable style="width: 100%; height: 100%; min-height: 350px; border: 0;" src="LICENSE.txt"></iframe>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true"><i class="fa fa-check fa-lg"></i>
+ </button>
+ </div>
+ </div>
+ </div>
+</div>
+
<div id="dialogFileCreate" class="modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
diff --git a/data/js/core.ui.js b/data/js/core.ui.js
index 7d733e4c3..a0fe83c34 100644
--- a/data/js/core.ui.js
+++ b/data/js/core.ui.js
@@ -776,6 +776,16 @@ define(function(require, exports, module) {
});
}
+ function showLicenseDialog() {
+ $('#aboutLicenseModal').modal({
+ backdrop: 'static',
+ show: true
+ });
+ $('#aboutLicenseModal').draggable({
+ handle: ".modal-header"
+ });
+ }
+
function disableTopToolbar() {
$('#perspectiveSwitcherButton').prop('disabled', true);
$('#searchBox').prop('disabled', true);
@@ -953,6 +963,7 @@ define(function(require, exports, module) {
exports.showTagEditDialog = showTagEditDialog;
exports.showOptionsDialog = showOptionsDialog;
exports.showAboutDialog = showAboutDialog;
+ exports.showLicenseDialog = showLicenseDialog;
exports.showLocationsPanel = showLocationsPanel;
exports.showTagsPanel = showTagsPanel;
exports.showContactUsPanel = showContactUsPanel;
diff --git a/data/locales/en_US/ns.common.json b/data/locales/en_US/ns.common.json
index 7c0aed8f3..9cfa44583 100644
--- a/data/locales/en_US/ns.common.json
+++ b/data/locales/en_US/ns.common.json
@@ -170,6 +170,7 @@
"selectAll": "Select All",
"view": "View",
"help": "Help",
+ "license": "License",
"settings": "Settings",
"confirmApplicationClose": "There is unsaved file. Do you really want to quit the application?",
"waitDialogDiectoryIndexing": "TagSpaces is indexing the current directory with subdirectories.",