Skip to content

Commit

Permalink
Version 272:
Browse files Browse the repository at this point in the history
* The "Import All Settings" button in `UI Settings` > `Extra` now links to ui3/storageinfo.htm to facilite the import using a modern file upload interface that does not require the user to copy and paste a large string.
  • Loading branch information
bp2008 committed Jul 13, 2024
1 parent 252ff33 commit f739e21
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ui3.htm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
};
</script>
<script type="text/javascript">
var ui_version = "271";
var ui_version = "272";
var bi_version = "%%VERSION%%";
var appPath_raw = "%%VIRTDIR%%";
var local_bi_session = "%%SESSION%%";
Expand Down
2 changes: 2 additions & 0 deletions ui3/storageinfo.htm
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ <h2>Local Storage Import</h2>
</div>
<p><input type="button" value="Import" :disabled="!selectedImportFile" @click="importSelectedFile" /> {{selectedImportFileDescription}}</p>
<h2>Local Storage Erase</h2>
<p>This will "factory reset" UI3 in this web browser.</p>
<p><input type="button" value="Erase All Local Storage Data" @click="onEraseAllLocalStorage()" /></p>
</template>
<p>&nbsp;</p>
<p><a href="../ui3.htm">Go to UI3</a></p>
</div>
<script>
Expand Down
20 changes: 10 additions & 10 deletions ui3/ui3.js
Original file line number Diff line number Diff line change
Expand Up @@ -32531,17 +32531,17 @@ function UISettingsPanel()
var Add_ImportAllSettingsButton = function (cat, rowIdx)
{
var $row = $('<div id="importAllSettingsBtn" class="uiSettingsRow dialogOption_item dialogOption_item_info"></div>');
var $input = $('<a class="input" href="javascript:void(0)">Import</a>');
$input.on('click', function ()
{
SimpleDialog.InputText("Import All Settings", "Paste settings that were previously exported.<br>If import is successful, UI3 will be reloaded.", function (inputText)
{
if (self.ImportSettingsJson(inputText))
ReloadInterface();
});
});
var $input = $('<a class="input" href="ui3/storageinfo.htm">ui3/storageinfo.htm</a>');
//$input.on('click', function ()
//{
// SimpleDialog.InputText("Import All Settings", "Paste settings that were previously exported.<br>If import is successful, UI3 will be reloaded.", function (inputText)
// {
// if (self.ImportSettingsJson(inputText))
// ReloadInterface();
// });
//});
$row.append($input);
$row.append(GetDialogOptionLabel('Import All Settings'));
$row.append(GetDialogOptionLabel('Import All Settings<div class="settingDesc">(via <a href="ui3/storageinfo.htm">ui3/storageinfo.htm</a>)</div>'));
if (rowIdx++ % 2 == 1)
$row.addClass('everyOther');
cat.$section.append($row);
Expand Down

0 comments on commit f739e21

Please sign in to comment.