aboutsummaryrefslogtreecommitdiff
path: root/ext/welcome.html
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-04-30 18:01:16 -0400
committerGitHub <noreply@github.com>2021-04-30 18:01:16 -0400
commit076e2012259cb7c446ee6cca8e574861f3f163db (patch)
treefaa9088083c654cbb57f4fa91bff76ec3d14d5e2 /ext/welcome.html
parentd77d8e44e01e8a4d533b75d286c777f9f7f986bc (diff)
Improve dictionary options (#1640)
* Update dictionary options layout * Update extras * Improve display when no dictionaries are installed * Implement "All" toggle * Move modal * Update welcome page * Remove resizer button * Fix ordering * Fix extra closing tag
Diffstat (limited to 'ext/welcome.html')
-rw-r--r--ext/welcome.html95
1 files changed, 73 insertions, 22 deletions
diff --git a/ext/welcome.html b/ext/welcome.html
index 5876ad4c..fc7c203f 100644
--- a/ext/welcome.html
+++ b/ext/welcome.html
@@ -201,7 +201,15 @@
<!-- Dictionary modals -->
<div id="dictionaries-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
- <div class="modal-header"><div class="modal-title">Dictionaries</div></div>
+ <div class="modal-header">
+ <div class="modal-title">Dictionaries</div>
+ <div class="modal-header-button-container">
+ <div class="modal-header-button-group">
+ <button class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
+ <button class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
+ </div>
+ </div>
+ </div>
<div class="modal-body">
<div class="settings-item">
<div class="settings-item-inner">
@@ -231,22 +239,18 @@
</div>
</div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- More dictionary settings are available on the <a href="/settings.html" rel="noopener">Settings</a> page
- </div>
- </div>
- </div></div>
-
<div class="warning-text margin-above no-dictionaries-installed-warning" hidden>
No dictionaries have been installed yet.
Visit the <a href="https://foosoft.net/projects/yomichan/#dictionaries" target="_blank" rel="noopener noreferrer">Yomichan homepage</a>
for a list free dictionaries or click the <em>Import</em> button below to select a dictionary file to import.
</div>
<div id="dictionary-error" class="danger-text margin-above" hidden></div>
- <div id="dictionary-list" class="dictionary-list"></div>
- <div id="dictionary-list-extra" class="dictionary-list"></div>
+ <div id="dictionary-list" class="dictionary-list" data-count="0">
+ <label class="dictionary-item-top toggle dictionary-item-enabled-toggle-container"><input type="checkbox" id="all-dictionaries-enabled"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
+ <div class="dictionary-item-top dictionary-item-title-container">All</div>
+ <div class="dictionary-item-top">Priority</div>
+ <div class="dictionary-item-top dictionary-item-button-height"></div>
+ </div>
<div hidden><input type="file" id="dictionary-import-file-input" accept=".zip,application/zip" multiple></div>
</div>
@@ -290,23 +294,70 @@
</div>
</div></div>
-
-<!-- Dictionary templates -->
-<template id="dictionary-template"><div class="settings-item dictionary-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label dictionary-info">
- <label class="toggle"><input type="checkbox" class="dictionary-enabled"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- <span class="dictionary-info-label"><strong class="dictionary-title"></strong> <span class="light dictionary-version"></span></span>
+<div id="dictionary-details-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
+ <div class="modal-header">
+ <div class="modal-title"><strong class="dictionary-title"></strong> <span class="light dictionary-version"></span></div>
+ </div>
+ <div class="modal-body">
+ <div class="settings-item dictionary-outdated-notification" hidden><div class="settings-item-children danger-text">
+ This dictionary is outdated and may not support new extension features.
+ Re-import the dictionary to enable support for the latest features.
+ </div></div>
+ <div class="settings-item">
+ <div class="settings-item-inner">
+ <div class="settings-item-left">
+ <div class="settings-item-label">
+ Prefix wildcard searches supported
+ <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
+ </div>
+ </div>
+ <div class="settings-item-right">
+ <label class="toggle"><input type="checkbox" class="dictionary-prefix-wildcard-searches-supported" disabled readonly><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
+ </div>
+ </div>
+ <div class="settings-item-children more" hidden>
+ <p class="warning-text">
+ Changing this value requires the dictionary to be re-imported.
+ </p>
+ <p><a class="more-toggle" data-parent-distance="3">Hide&hellip;</a></p>
</div>
</div>
- <div class="settings-item-right">
- <button class="icon-button dictionary-menu-button" data-menu="dictionary-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
- </div>
+ <div class="settings-item"><div class="settings-item-children">
+ <div class="dictionary-details-table"></div>
+ <div class="dictionary-counts"></div>
+ </div></div>
</div>
+ <div class="modal-footer">
+ <button data-modal-action="hide">Close</button>
+ </div>
+</div></div>
+
+
+<!-- Dictionary templates -->
+<template id="dictionary-template">
+ <label class="toggle dictionary-item-enabled-toggle-container"><input type="checkbox" class="dictionary-enabled"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
+ <div class="dictionary-item-title-container">
+ <span>
+ <strong class="dictionary-title"></strong> <span class="light dictionary-version"></span>
+ </span>
+ <button class="dictionary-outdated-button" hidden>
+ <div class="badge warning-badge"><span class="icon" data-icon="exclamation-point-short"></span></div>
+ </button>
+ <button class="dictionary-integrity-button" hidden>
+ <div class="badge info-badge badge-small-icon"><span class="icon" data-icon="checkmark"></span></div>
+ </button>
+ </div>
+ <input type="number" step="1" class="short-height dictionary-priority">
+ <button class="icon-button dictionary-menu-button" data-menu="dictionary-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
+</template>
+
+<template id="dictionary-details-entry-template"><div class="dictionary-details-entry">
+ <span class="dictionary-details-entry-label"></span>
+ <span class="dictionary-details-entry-info"></span>
</div></template>
<template id="dictionary-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"><div class="popup-menu-body">
+ <button class="popup-menu-item" data-menu-action="showDetails">Details&hellip;</button>
<button class="popup-menu-item" data-menu-action="delete">Delete</button>
</div></div></div></template>