Browse Source

富文本选择器改为点击文本框才出现

pull/5/head
枫谷剑仙 1 year ago
parent
commit
44a219cda9
6 changed files with 37 additions and 13 deletions
  1. +2
    -2
      multi.html
  2. +18
    -0
      script.js
  3. +5
    -5
      service-worker.js
  4. +2
    -2
      solo.html
  5. +8
    -2
      style.css
  6. +2
    -2
      triple.html

+ 2
- 2
multi.html View File

@@ -111,7 +111,6 @@ const teamsCount = 2;
<input type="checkbox" class="switch-ipt" id="show-team-awoken-effect"><label for="show-team-awoken-effect"></label> <input type="checkbox" class="switch-ipt" id="show-team-awoken-effect"><label for="show-team-awoken-effect"></label>
<input type="checkbox" class="switch-ipt" id="show-meter"><label for="show-meter"></label> <input type="checkbox" class="switch-ipt" id="show-meter"><label for="show-meter"></label>
<input type="checkbox" class="switch-ipt" id="show-team-awoken-count"><label for="show-team-awoken-count"></label> <input type="checkbox" class="switch-ipt" id="show-team-awoken-count"><label for="show-team-awoken-count"></label>
<input type="checkbox" class="switch-ipt" id="show-rich-text-tools"><label for="show-rich-text-tools"></label>
</details> </details>
<div class="status"></div> <div class="status"></div>
<div class="formation-control"> <div class="formation-control">
@@ -847,7 +846,7 @@ const teamsCount = 2;
<div class="dialog-content"></div> <div class="dialog-content"></div>
</dialog> </dialog>
</div> </div>
<div id="rich-text-tools">
<div id="rich-text-tools" class="display-none">
<button id="set-font-color" title="Set Font Color"></button><input id="color-chooser" type="color" title="Choose Font Color" /> <button id="set-font-color" title="Set Font Color"></button><input id="color-chooser" type="color" title="Choose Font Color" />
<button id="insert-card-avatar" title="Insert Card Avatar"></button> <button id="insert-card-avatar" title="Insert Card Avatar"></button>
<button id="insert-awoken-icon" title="Insert Awoken Icon"></button> <button id="insert-awoken-icon" title="Insert Awoken Icon"></button>
@@ -855,6 +854,7 @@ const teamsCount = 2;
<button id="insert-type-icon" title="Insert Type Icon"></button> <button id="insert-type-icon" title="Insert Type Icon"></button>
<button id="insert-orb-icon" title="Insert Orb Icon"></button> <button id="insert-orb-icon" title="Insert Orb Icon"></button>
<input type="checkbox" class="switch-ipt" id="siwtch-code-mode"><label for="siwtch-code-mode" title="Code Mode"></label> <input type="checkbox" class="switch-ipt" id="siwtch-code-mode"><label for="siwtch-code-mode" title="Code Mode"></label>
<button id="hide-rich-text-tools" title="Close"></button>
</div> </div>
<div class="edit-box display-none"> <div class="edit-box display-none">
<div class="edit-box-title"><!--修改怪物--></div> <div class="edit-box-title"><!--修改怪物--></div>


+ 18
- 0
script.js View File

@@ -3331,6 +3331,10 @@ function initialize() {
const insertLatentIcon = document.getElementById("insert-latent-icon"); const insertLatentIcon = document.getElementById("insert-latent-icon");
const insertTypeIcon = document.getElementById("insert-type-icon"); const insertTypeIcon = document.getElementById("insert-type-icon");
const insertOrbIcon = document.getElementById("insert-orb-icon"); const insertOrbIcon = document.getElementById("insert-orb-icon");
const hideRichTextTools = document.getElementById("hide-rich-text-tools");
hideRichTextTools.onclick = function (event) {
richTextTools.classList.add(className_displayNone);
}
const insertAwokenIconList = insertAwokenIcon.list = document.createElement("ul"); const insertAwokenIconList = insertAwokenIcon.list = document.createElement("ul");
insertAwokenIconList.className = "awoken-ul " + className_displayNone; insertAwokenIconList.className = "awoken-ul " + className_displayNone;
@@ -3670,6 +3674,20 @@ function initialize() {
txtDetailDisplay.append(descriptionToHTML(this.value)); txtDetailDisplay.append(descriptionToHTML(this.value));
createNewUrl(); createNewUrl();
}; };
function showRichtextTool(event) {
richTextTools.classList.remove(className_displayNone);
}
[
txtTitleDisplay,
txtDetailDisplay,
txtTitle,
txtDetail
].forEach(target=>{
target.addEventListener("focus",showRichtextTool);
});
//设置为可以拖放已经编辑好的队伍 //设置为可以拖放已经编辑好的队伍
function richTextDropHandler(event) { function richTextDropHandler(event) {
let formStr = event.dataTransfer.getData('from'); let formStr = event.dataTransfer.getData('from');


+ 5
- 5
service-worker.js View File

@@ -32319,7 +32319,7 @@ const cachesMap = new Map([
], ],
[ [
"multi.html", "multi.html",
"bf2bb9fa246355450df3301b613c2919"
"f41d25b7659aaf5e948e2697a8fa0847"
], ],
[ [
"script-custom_elements.js", "script-custom_elements.js",
@@ -32339,11 +32339,11 @@ const cachesMap = new Map([
], ],
[ [
"script.js", "script.js",
"e91ff282aced60ee53886c10e5b45c08"
"1d660f2a6771b53b3cc706010cd3d60f"
], ],
[ [
"solo.html", "solo.html",
"6b624264a58a0e472b20a16665a52451"
"c82e8fca2d732ae124fc00fc77bd828f"
], ],
[ [
"style-fix-html2canvas.css", "style-fix-html2canvas.css",
@@ -32355,7 +32355,7 @@ const cachesMap = new Map([
], ],
[ [
"style.css", "style.css",
"0c32a8e9ae733bc2b4f0c301d48a3056"
"d6b4a67ec6b2833ad462d704ec4f9ac3"
], ],
[ [
"temp.js", "temp.js",
@@ -32363,7 +32363,7 @@ const cachesMap = new Map([
], ],
[ [
"triple.html", "triple.html",
"6a62db5f8f57d9eb025f1557c8873689"
"218dcf2818fc6d69f37c574a4cc750e2"
], ],
[ [
"languages/en.css", "languages/en.css",


+ 2
- 2
solo.html View File

@@ -91,7 +91,6 @@ const teamsCount = 1;
<input type="checkbox" class="switch-ipt" id="show-team-awoken-effect"><label for="show-team-awoken-effect"></label> <input type="checkbox" class="switch-ipt" id="show-team-awoken-effect"><label for="show-team-awoken-effect"></label>
<input type="checkbox" class="switch-ipt" id="show-meter"><label for="show-meter"></label> <input type="checkbox" class="switch-ipt" id="show-meter"><label for="show-meter"></label>
<input type="checkbox" class="switch-ipt" id="show-team-awoken-count"><label for="show-team-awoken-count"></label> <input type="checkbox" class="switch-ipt" id="show-team-awoken-count"><label for="show-team-awoken-count"></label>
<input type="checkbox" class="switch-ipt" id="show-rich-text-tools"><label for="show-rich-text-tools"></label>
</details> </details>
<div class="status"></div> <div class="status"></div>
<div class="formation-control"> <div class="formation-control">
@@ -585,7 +584,7 @@ const teamsCount = 1;
<div class="dialog-content"></div> <div class="dialog-content"></div>
</dialog> </dialog>
</div> </div>
<div id="rich-text-tools">
<div id="rich-text-tools" class="display-none">
<button id="set-font-color" title="Set Font Color"></button><input id="color-chooser" type="color" title="Choose Font Color" /> <button id="set-font-color" title="Set Font Color"></button><input id="color-chooser" type="color" title="Choose Font Color" />
<button id="insert-card-avatar" title="Insert Card Avatar"></button> <button id="insert-card-avatar" title="Insert Card Avatar"></button>
<button id="insert-awoken-icon" title="Insert Awoken Icon"></button> <button id="insert-awoken-icon" title="Insert Awoken Icon"></button>
@@ -593,6 +592,7 @@ const teamsCount = 1;
<button id="insert-type-icon" title="Insert Type Icon"></button> <button id="insert-type-icon" title="Insert Type Icon"></button>
<button id="insert-orb-icon" title="Insert Orb Icon"></button> <button id="insert-orb-icon" title="Insert Orb Icon"></button>
<input type="checkbox" class="switch-ipt" id="siwtch-code-mode"><label for="siwtch-code-mode" title="Code Mode"></label> <input type="checkbox" class="switch-ipt" id="siwtch-code-mode"><label for="siwtch-code-mode" title="Code Mode"></label>
<button id="hide-rich-text-tools" title="Close"></button>
</div> </div>
<div class="edit-box display-none"> <div class="edit-box display-none">
<div class="edit-box-title"><!--修改怪物--></div> <div class="edit-box-title"><!--修改怪物--></div>


+ 8
- 2
style.css View File

@@ -270,6 +270,13 @@ label[for="siwtch-code-mode"]::after {
grid-template-columns: repeat(auto-fill, 36px); grid-template-columns: repeat(auto-fill, 36px);
grid-auto-rows: 36px; grid-auto-rows: 36px;
} }
#hide-rich-text-tools {
float: right;
}
#hide-rich-text-tools::before {
content: "\f00d";
font-size: 1.7em;
}


.rich-text icon{ .rich-text icon{
vertical-align: middle; vertical-align: middle;
@@ -874,8 +881,7 @@ body:not(.show-team-total-info) :where(.tIf-total-hp, .tIf-effect),
body:not(.show-team-attrtype-count) .team-total-info-count, /*稀有度、属性与类型计数*/ body:not(.show-team-attrtype-count) .team-total-info-count, /*稀有度、属性与类型计数*/
body:not(.show-team-awoken-effect) .team-awoken-effect, /*队伍觉醒效果统计*/ body:not(.show-team-awoken-effect) .team-awoken-effect, /*队伍觉醒效果统计*/
body:not(.show-meter) meter, /*显示计量条*/ body:not(.show-meter) meter, /*显示计量条*/
body.show-meter meter+span,
body:not(.show-rich-text-tools) #rich-text-tools /*富文本框选择器*/
body.show-meter meter+span /*勾选显示计量条则隐藏文字*/
{ {
display: none !important; display: none !important;
} }


+ 2
- 2
triple.html View File

@@ -97,7 +97,6 @@ const teamsCount = 3;
<input type="checkbox" class="switch-ipt" id="show-team-awoken-effect"><label for="show-team-awoken-effect"></label> <input type="checkbox" class="switch-ipt" id="show-team-awoken-effect"><label for="show-team-awoken-effect"></label>
<input type="checkbox" class="switch-ipt" id="show-meter"><label for="show-meter"></label> <input type="checkbox" class="switch-ipt" id="show-meter"><label for="show-meter"></label>
<input type="checkbox" class="switch-ipt" id="show-team-awoken-count"><label for="show-team-awoken-count"></label> <input type="checkbox" class="switch-ipt" id="show-team-awoken-count"><label for="show-team-awoken-count"></label>
<input type="checkbox" class="switch-ipt" id="show-rich-text-tools"><label for="show-rich-text-tools"></label>
</details> </details>
<div class="status"></div> <div class="status"></div>
<div class="formation-control"> <div class="formation-control">
@@ -1526,7 +1525,7 @@ const teamsCount = 3;
<div class="dialog-content"></div> <div class="dialog-content"></div>
</dialog> </dialog>
</div> </div>
<div id="rich-text-tools">
<div id="rich-text-tools" class="display-none">
<button id="set-font-color" title="Set Font Color"></button><input id="color-chooser" type="color" title="Choose Font Color" /> <button id="set-font-color" title="Set Font Color"></button><input id="color-chooser" type="color" title="Choose Font Color" />
<button id="insert-card-avatar" title="Insert Card Avatar"></button> <button id="insert-card-avatar" title="Insert Card Avatar"></button>
<button id="insert-awoken-icon" title="Insert Awoken Icon"></button> <button id="insert-awoken-icon" title="Insert Awoken Icon"></button>
@@ -1534,6 +1533,7 @@ const teamsCount = 3;
<button id="insert-type-icon" title="Insert Type Icon"></button> <button id="insert-type-icon" title="Insert Type Icon"></button>
<button id="insert-orb-icon" title="Insert Orb Icon"></button> <button id="insert-orb-icon" title="Insert Orb Icon"></button>
<input type="checkbox" class="switch-ipt" id="siwtch-code-mode"><label for="siwtch-code-mode" title="Code Mode"></label> <input type="checkbox" class="switch-ipt" id="siwtch-code-mode"><label for="siwtch-code-mode" title="Code Mode"></label>
<button id="hide-rich-text-tools" title="Close"></button>
</div> </div>
<div class="edit-box display-none"> <div class="edit-box display-none">
<div class="edit-box-title"><!--修改怪物--></div> <div class="edit-box-title"><!--修改怪物--></div>


Loading…
Cancel
Save