diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-11-02 14:30:17 -0400 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-11-07 20:30:55 -0500 |
commit | 3d78d5400d2ed6e9d8f5147f7212ec786f4f16bd (patch) | |
tree | c6ed739ac08a6cee160f4eef5fe1bb993a3c4a3a /ext/bg/settings.html | |
parent | 2ab871e7ee93ddc4a2f1ca41aad10e4b189b6c0f (diff) |
Add button and confirmation dialog for database purge
Diffstat (limited to 'ext/bg/settings.html')
-rw-r--r-- | ext/bg/settings.html | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/ext/bg/settings.html b/ext/bg/settings.html index 7ac196f2..fb39e5c3 100644 --- a/ext/bg/settings.html +++ b/ext/bg/settings.html @@ -417,10 +417,7 @@ </div> <p class="help-block"> - Yomichan can import and use a variety of dictionary formats. Unneeded dictionaries can be disabled, - or you can simply <a href="#" id="dict-purge-link">purge the database</a> to delete everything. - </p> - <p class="help-block"> + Yomichan can import and use a variety of dictionary formats. Unneeded dictionaries can be disabled. Deleting individual dictionaries is not currently feasible due to limitations of browser database technology. </p> @@ -449,10 +446,31 @@ <a href="https://foosoft.net/projects/yomichan" target="_blank" rel="noopener">download free dictionaries</a> for use with this extension and to learn about importing proprietary EPWING dictionaries. </p> - <button class="btn btn-primary" id="dict-file-button">Import Dictionary</button> + <div> + <button class="btn btn-primary" id="dict-file-button">Import Dictionary</button> + <button class="btn btn-danger" id="dict-purge-button">Purge Database</button> + </div> <div hidden><input type="file" id="dict-file"></div> </div> + <div class="modal fade" tabindex="-1" role="dialog" id="dict-purge-modal"> + <div class="modal-dialog modal-dialog-centered"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + <h4 class="modal-title">Confirm database purge</h4> + </div> + <div class="modal-body"> + Are you sure you want to delete all data in the database? + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> + <button type="button" class="btn btn-danger" id="dict-purge-confirm">Purge Database</button> + </div> + </div> + </div> + </div> + <template id="dict-template"><div class="dict-group well well-sm"> <h4><span class="text-muted glyphicon glyphicon-book"></span> <span class="dict-title"></span> <small class="dict-revision"></small></h4> <p class="text-warning" hidden>This dictionary is outdated and may not support new extension features; please import the latest version.</p> |