将地下城面板升级为dialog

This commit is contained in:
枫谷剑仙 2024-03-22 13:54:36 +08:00
parent 517379e1b1
commit bdf85e9dc1
11 changed files with 184 additions and 183 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

@ -74,17 +74,17 @@
} }
.row-mon-ability .m-hp-li::before, .row-mon-ability .m-hp-li::before,
.dialog-dungeon-enchance label[for="dungeon-hp"]::before #dialog-dungeon-enchance label[for="dungeon-hp"]::before
{ {
content: "HP:"; content: "HP:";
} }
.row-mon-ability .m-atk-li::before, .row-mon-ability .m-atk-li::before,
.dialog-dungeon-enchance label[for="dungeon-atk"]::before #dialog-dungeon-enchance label[for="dungeon-atk"]::before
{ {
content: "ATK:"; content: "ATK:";
} }
.row-mon-ability .m-rcv-li::before, .row-mon-ability .m-rcv-li::before,
.dialog-dungeon-enchance label[for="dungeon-rcv"]::before #dialog-dungeon-enchance label[for="dungeon-rcv"]::before
{ {
content: "RCV:"; content: "RCV:";
} }
@ -382,14 +382,14 @@ label[for="show-rich-text-tools"]::after{
.search-box .awoken-option::before{ .search-box .awoken-option::before{
content: "▼Awoken (AND)"; content: "▼Awoken (AND)";
} }
.search-box .rare-clear::before .search-box .rare-clear::before,
#dialog-dungeon-enchance .dialog-clear::before
{ {
content: "Reset"; content: "Reset";
} }
.search-box .awoken-clear::before, .search-box .awoken-clear::before,
.search-box .sawoken-clear::before, .search-box .sawoken-clear::before,
.special-div .special-clear::before, .special-div .special-clear::before
.dialog-dungeon-enchance .dialog-clear::before
{ {
content: "Clear"; content: "Clear";
} }
@ -686,48 +686,48 @@ label[for="qr-data-type-paddb"]::before
{ {
content: "Dungeon Enchanced"; content: "Dungeon Enchanced";
} }
.dialog-dungeon-enchance .dialog-title::before #dialog-dungeon-enchance .dialog-title::before
{ {
content: "Dungeon Enchancement Setting"; content: "Dungeon Enchancement Setting";
} }
.dialog-dungeon-enchance .dialog-confirm::before .dialog-confirm::before
{ {
content: "Confirm"; content: "Confirm";
} }
.dialog-dungeon-enchance .rare-list::before #dialog-dungeon-enchance .rare-list::before
{ {
content: "Rarity:"; content: "Rarity:";
} }
.dialog-dungeon-enchance .attr-list::before #dialog-dungeon-enchance .attr-list::before
{ {
content: "Attr.:"; content: "Attr.:";
} }
.dialog-dungeon-enchance .type-list::before #dialog-dungeon-enchance .type-list::before
{ {
content: "Types:"; content: "Types:";
} }
.dialog-dungeon-enchance .collab-list::before #dialog-dungeon-enchance .collab-list::before
{ {
content: "Collab ID:"; content: "Collab ID:";
} }
.dialog-dungeon-enchance .gacha-list::before #dialog-dungeon-enchance .gacha-list::before
{ {
content: "Egg Machine ID:"; content: "Egg Machine ID:";
} }
.dialog-dungeon-enchance .benefit-list::before #dialog-dungeon-enchance .benefit-list::before
{ {
content: "Yin-Yang Protection:"; content: "Yin-Yang Protection:";
} }
.dialog-dungeon-enchance .current-stage-list::before #dialog-dungeon-enchance .current-stage-list::before
{ {
content: "Current Stage:"; content: "Current Stage:";
} }
.dialog-dungeon-enchance .collab-list::after, #dialog-dungeon-enchance .collab-list::after,
.dialog-dungeon-enchance .gacha-list::after #dialog-dungeon-enchance .gacha-list::after
{ {
content: "(separate multiple IDs with \",\")"; content: "(separate multiple IDs with \",\")";
} }
.dialog-dungeon-enchance .stats-list::before #dialog-dungeon-enchance .stats-list::before
{ {
content: "Enhancement Rate:"; content: "Enhancement Rate:";
} }

View File

@ -73,17 +73,17 @@ label[for="languages"]::after{
} }
.row-mon-ability .m-hp-li::before, .row-mon-ability .m-hp-li::before,
.dialog-dungeon-enchance label[for="dungeon-hp"]::before #dialog-dungeon-enchance label[for="dungeon-hp"]::before
{ {
content: "HP:"; content: "HP:";
} }
.row-mon-ability .m-atk-li::before, .row-mon-ability .m-atk-li::before,
.dialog-dungeon-enchance label[for="dungeon-atk"]::before #dialog-dungeon-enchance label[for="dungeon-atk"]::before
{ {
content: "攻撃:"; content: "攻撃:";
} }
.row-mon-ability .m-rcv-li::before, .row-mon-ability .m-rcv-li::before,
.dialog-dungeon-enchance label[for="dungeon-rcv"]::before #dialog-dungeon-enchance label[for="dungeon-rcv"]::before
{ {
content: "回復:"; content: "回復:";
} }
@ -376,14 +376,14 @@ label[for="show-rich-text-tools"]::after{
.search-box .awoken-option::before{ .search-box .awoken-option::before{
content: "▼觉醒AND"; content: "▼觉醒AND";
} }
.search-box .rare-clear::before .search-box .rare-clear::before,
#dialog-dungeon-enchance .dialog-clear::before
{ {
content: "リセット"; content: "リセット";
} }
.search-box .awoken-clear::before, .search-box .awoken-clear::before,
.search-box .sawoken-clear::before, .search-box .sawoken-clear::before,
.special-div .special-clear::before, .special-div .special-clear::before
.dialog-dungeon-enchance .dialog-clear::before
{ {
content: "クリア"; content: "クリア";
} }
@ -644,48 +644,48 @@ label[for="qr-data-type-paddb"]::before
{ {
content: "ダンジョン強化"; content: "ダンジョン強化";
} }
.dialog-dungeon-enchance .dialog-title::before #dialog-dungeon-enchance .dialog-title::before
{ {
content: "ダンジョン強化倍率設定"; content: "ダンジョン強化倍率設定";
} }
.dialog-dungeon-enchance .dialog-confirm::before .dialog-confirm::before
{ {
content: "確認"; content: "確認";
} }
.dialog-dungeon-enchance .rare-list::before #dialog-dungeon-enchance .rare-list::before
{ {
content: "有効な希少性:"; content: "有効な希少性:";
} }
.dialog-dungeon-enchance .attr-list::before #dialog-dungeon-enchance .attr-list::before
{ {
content: "有効な属性:"; content: "有効な属性:";
} }
.dialog-dungeon-enchance .type-list::before #dialog-dungeon-enchance .type-list::before
{ {
content: "有効なタイプ:"; content: "有効なタイプ:";
} }
.dialog-dungeon-enchance .collab-list::before #dialog-dungeon-enchance .collab-list::before
{ {
content: "有効コラボID:"; content: "有効コラボID:";
} }
.dialog-dungeon-enchance .gacha-list::before #dialog-dungeon-enchance .gacha-list::before
{ {
content: "有効ガチャID:"; content: "有効ガチャID:";
} }
.dialog-dungeon-enchance .benefit-list::before #dialog-dungeon-enchance .benefit-list::before
{ {
content: "陰と陽の加護:"; content: "陰と陽の加護:";
} }
.dialog-dungeon-enchance .current-stage-list::before #dialog-dungeon-enchance .current-stage-list::before
{ {
content: "現在の層数:"; content: "現在の層数:";
} }
.dialog-dungeon-enchance .collab-list::after, #dialog-dungeon-enchance .collab-list::after,
.dialog-dungeon-enchance .gacha-list::after #dialog-dungeon-enchance .gacha-list::after
{ {
content: "(複数のIDは\",\"で区切ります)"; content: "(複数のIDは\",\"で区切ります)";
} }
.dialog-dungeon-enchance .stats-list::before #dialog-dungeon-enchance .stats-list::before
{ {
content: "強化倍率:"; content: "強化倍率:";
} }

View File

@ -73,17 +73,17 @@ label[for="languages"]::after{
} }
.row-mon-ability .m-hp-li::before, .row-mon-ability .m-hp-li::before,
.dialog-dungeon-enchance label[for="dungeon-hp"]::before #dialog-dungeon-enchance label[for="dungeon-hp"]::before
{ {
content: "HP:"; content: "HP:";
} }
.row-mon-ability .m-atk-li::before, .row-mon-ability .m-atk-li::before,
.dialog-dungeon-enchance label[for="dungeon-atk"]::before #dialog-dungeon-enchance label[for="dungeon-atk"]::before
{ {
content: "공격:"; content: "공격:";
} }
.row-mon-ability .m-rcv-li::before, .row-mon-ability .m-rcv-li::before,
.dialog-dungeon-enchance label[for="dungeon-rcv"]::before #dialog-dungeon-enchance label[for="dungeon-rcv"]::before
{ {
content: "회복:"; content: "회복:";
} }
@ -371,14 +371,14 @@ label[for="show-rich-text-tools"]::after{
.search-box .awoken-option::before{ .search-box .awoken-option::before{
content: "▼각성AND"; content: "▼각성AND";
} }
.search-box .rare-clear::before .search-box .rare-clear::before,
#dialog-dungeon-enchance .dialog-clear::before
{ {
content: "재설정"; content: "재설정";
} }
.search-box .awoken-clear::before, .search-box .awoken-clear::before,
.search-box .sawoken-clear::before, .search-box .sawoken-clear::before,
.special-div .special-clear::before, .special-div .special-clear::before
.dialog-dungeon-enchance .dialog-clear::before
{ {
content: "명확한"; content: "명확한";
} }
@ -624,48 +624,48 @@ label[for="qr-data-type-paddb"]::before
{ {
content: "던전 강화"; content: "던전 강화";
} }
.dialog-dungeon-enchance .dialog-title::before #dialog-dungeon-enchance .dialog-title::before
{ {
content: "지하성 강화 배율 설정"; content: "지하성 강화 배율 설정";
} }
.dialog-dungeon-enchance .dialog-confirm::before .dialog-confirm::before
{ {
content: "확인"; content: "확인";
} }
.dialog-dungeon-enchance .rare-list::before #dialog-dungeon-enchance .rare-list::before
{ {
content: "유효한 희귀도:"; content: "유효한 희귀도:";
} }
.dialog-dungeon-enchance .attr-list::before #dialog-dungeon-enchance .attr-list::before
{ {
content: "유효한 속성:"; content: "유효한 속성:";
} }
.dialog-dungeon-enchance .type-list::before #dialog-dungeon-enchance .type-list::before
{ {
content: "유효한 형식:"; content: "유효한 형식:";
} }
.dialog-dungeon-enchance .collab-list::before #dialog-dungeon-enchance .collab-list::before
{ {
content: "유효한 콜라보 ID:"; content: "유효한 콜라보 ID:";
} }
.dialog-dungeon-enchance .gacha-list::before #dialog-dungeon-enchance .gacha-list::before
{ {
content: "유효한 가챠 ID:"; content: "유효한 가챠 ID:";
} }
.dialog-dungeon-enchance .benefit-list::before #dialog-dungeon-enchance .benefit-list::before
{ {
content: "음과 양 보호:"; content: "음과 양 보호:";
} }
.dialog-dungeon-enchance .current-stage-list::before #dialog-dungeon-enchance .current-stage-list::before
{ {
content: "현재 단계:"; content: "현재 단계:";
} }
.dialog-dungeon-enchance .collab-list::after, #dialog-dungeon-enchance .collab-list::after,
.dialog-dungeon-enchance .gacha-list::after #dialog-dungeon-enchance .gacha-list::after
{ {
content: "(여러 ID를 \",\"로 구분)"; content: "(여러 ID를 \",\"로 구분)";
} }
.dialog-dungeon-enchance .stats-list::before #dialog-dungeon-enchance .stats-list::before
{ {
content: "배율을 강화:"; content: "배율을 강화:";
} }

View File

@ -79,17 +79,17 @@ label[for="languages"]::after{
} }
.row-mon-ability .m-hp-li::before, .row-mon-ability .m-hp-li::before,
.dialog-dungeon-enchance label[for="dungeon-hp"]::before #dialog-dungeon-enchance label[for="dungeon-hp"]::before
{ {
content: "HP:"; content: "HP:";
} }
.row-mon-ability .m-atk-li::before, .row-mon-ability .m-atk-li::before,
.dialog-dungeon-enchance label[for="dungeon-atk"]::before #dialog-dungeon-enchance label[for="dungeon-atk"]::before
{ {
content: "攻撃:"; content: "攻撃:";
} }
.row-mon-ability .m-rcv-li::before, .row-mon-ability .m-rcv-li::before,
.dialog-dungeon-enchance label[for="dungeon-rcv"]::before #dialog-dungeon-enchance label[for="dungeon-rcv"]::before
{ {
content: "回復:"; content: "回復:";
} }
@ -376,14 +376,14 @@ label[for="show-rich-text-tools"]::after{
.search-box .awoken-option::before{ .search-box .awoken-option::before{
content: "▼觉醒AND"; content: "▼觉醒AND";
} }
.search-box .rare-clear::before .search-box .rare-clear::before,
#dialog-dungeon-enchance .dialog-clear::before
{ {
content: "重置"; content: "重置";
} }
.search-box .awoken-clear::before, .search-box .awoken-clear::before,
.search-box .sawoken-clear::before, .search-box .sawoken-clear::before,
.special-div .special-clear::before, .special-div .special-clear::before
.dialog-dungeon-enchance .dialog-clear::before
{ {
content: "清除"; content: "清除";
} }
@ -643,48 +643,48 @@ label[for="qr-data-type-paddb"]::before
{ {
content: "地下城强化"; content: "地下城强化";
} }
.dialog-dungeon-enchance .dialog-title::before #dialog-dungeon-enchance .dialog-title::before
{ {
content: "地下城強化倍率設定"; content: "地下城強化倍率設定";
} }
.dialog-dungeon-enchance .dialog-confirm::before .dialog-confirm::before
{ {
content: "确认"; content: "确认";
} }
.dialog-dungeon-enchance .rare-list::before #dialog-dungeon-enchance .rare-list::before
{ {
content: "生效稀有度:"; content: "生效稀有度:";
} }
.dialog-dungeon-enchance .attr-list::before #dialog-dungeon-enchance .attr-list::before
{ {
content: "生效属性:"; content: "生效属性:";
} }
.dialog-dungeon-enchance .type-list::before #dialog-dungeon-enchance .type-list::before
{ {
content: "生效類型:"; content: "生效類型:";
} }
.dialog-dungeon-enchance .collab-list::before #dialog-dungeon-enchance .collab-list::before
{ {
content: "生效合作ID"; content: "生效合作ID";
} }
.dialog-dungeon-enchance .gacha-list::before #dialog-dungeon-enchance .gacha-list::before
{ {
content: "生效抽蛋ID"; content: "生效抽蛋ID";
} }
.dialog-dungeon-enchance .benefit-list::before #dialog-dungeon-enchance .benefit-list::before
{ {
content: "生效陰陽:"; content: "生效陰陽:";
} }
.dialog-dungeon-enchance .current-stage-list::before #dialog-dungeon-enchance .current-stage-list::before
{ {
content: "当前層数:"; content: "当前層数:";
} }
.dialog-dungeon-enchance .collab-list::after, #dialog-dungeon-enchance .collab-list::after,
.dialog-dungeon-enchance .gacha-list::after #dialog-dungeon-enchance .gacha-list::after
{ {
content: "(使用“,”分隔多个ID"; content: "(使用“,”分隔多个ID";
} }
.dialog-dungeon-enchance .stats-list::before #dialog-dungeon-enchance .stats-list::before
{ {
content: "強化倍率:"; content: "強化倍率:";
} }

View File

@ -79,17 +79,17 @@ label[for="languages"]::after{
} }
.row-mon-ability .m-hp-li::before, .row-mon-ability .m-hp-li::before,
.dialog-dungeon-enchance label[for="dungeon-hp"]::before #dialog-dungeon-enchance label[for="dungeon-hp"]::before
{ {
content: "HP:"; content: "HP:";
} }
.row-mon-ability .m-atk-li::before, .row-mon-ability .m-atk-li::before,
.dialog-dungeon-enchance label[for="dungeon-atk"]::before #dialog-dungeon-enchance label[for="dungeon-atk"]::before
{ {
content: "攻撃:"; content: "攻撃:";
} }
.row-mon-ability .m-rcv-li::before, .row-mon-ability .m-rcv-li::before,
.dialog-dungeon-enchance label[for="dungeon-rcv"]::before #dialog-dungeon-enchance label[for="dungeon-rcv"]::before
{ {
content: "回復:"; content: "回復:";
} }
@ -377,14 +377,14 @@ label[for="show-rich-text-tools"]::after{
.search-box .awoken-option::before{ .search-box .awoken-option::before{
content: "▼觉醒AND"; content: "▼觉醒AND";
} }
.search-box .rare-clear::before .search-box .rare-clear::before,
#dialog-dungeon-enchance .dialog-clear::before
{ {
content: "重置"; content: "重置";
} }
.search-box .awoken-clear::before, .search-box .awoken-clear::before,
.search-box .sawoken-clear::before, .search-box .sawoken-clear::before,
.special-div .special-clear::before, .special-div .special-clear::before
.dialog-dungeon-enchance .dialog-clear::before
{ {
content: "清除"; content: "清除";
} }
@ -636,48 +636,48 @@ label[for="qr-data-type-paddb"]::before
{ {
content: "地下城强化"; content: "地下城强化";
} }
.dialog-dungeon-enchance .dialog-title::before #dialog-dungeon-enchance .dialog-title::before
{ {
content: "地下城強化倍率設定"; content: "地下城強化倍率設定";
} }
.dialog-dungeon-enchance .dialog-confirm::before .dialog-confirm::before
{ {
content: "確認"; content: "確認";
} }
.dialog-dungeon-enchance .rare-list::before #dialog-dungeon-enchance .rare-list::before
{ {
content: "生效稀有度:"; content: "生效稀有度:";
} }
.dialog-dungeon-enchance .attr-list::before #dialog-dungeon-enchance .attr-list::before
{ {
content: "生效属性:"; content: "生效属性:";
} }
.dialog-dungeon-enchance .type-list::before #dialog-dungeon-enchance .type-list::before
{ {
content: "生效類型:"; content: "生效類型:";
} }
.dialog-dungeon-enchance .collab-list::before #dialog-dungeon-enchance .collab-list::before
{ {
content: "生效合作ID"; content: "生效合作ID";
} }
.dialog-dungeon-enchance .gacha-list::before #dialog-dungeon-enchance .gacha-list::before
{ {
content: "生效抽蛋ID"; content: "生效抽蛋ID";
} }
.dialog-dungeon-enchance .benefit-list::before #dialog-dungeon-enchance .benefit-list::before
{ {
content: "生效陰陽:"; content: "生效陰陽:";
} }
.dialog-dungeon-enchance .current-stage-list::before #dialog-dungeon-enchance .current-stage-list::before
{ {
content: "当前層数:"; content: "当前層数:";
} }
.dialog-dungeon-enchance .collab-list::after, #dialog-dungeon-enchance .collab-list::after,
.dialog-dungeon-enchance .gacha-list::after #dialog-dungeon-enchance .gacha-list::after
{ {
content: "(使用“,”分隔多個ID"; content: "(使用“,”分隔多個ID";
} }
.dialog-dungeon-enchance .stats-list::before #dialog-dungeon-enchance .stats-list::before
{ {
content: "強化倍率:"; content: "強化倍率:";
} }

106
script.js
View File

@ -4118,13 +4118,26 @@ function initialize() {
//添加徽章 //添加徽章
const badgeDialog = document.getElementById("badge-choose"); const badgeDialog = document.getElementById("badge-choose");
const badgeDialogConfirm = badgeDialog.querySelector(".dialog-confirm");
const teamBadgeUl = badgeDialog.querySelector(".team-badges"); const teamBadgeUl = badgeDialog.querySelector(".team-badges");
const changeBadgeDialogConfirmValue = function(e){
badgeDialogConfirm.value = this.value;
}
official_badge_sorting.forEach(bgId=>{ official_badge_sorting.forEach(bgId=>{
const li = document.createElement("li"); const li = document.createElement("li");
const button = li.appendChild(document.createElement("button")); const radio = li.appendChild(document.createElement("input"));
button.className = "badge"; radio.type="radio";
button.value = bgId; radio.className = "hide-radio";
button.setAttribute("data-badge-icon", bgId); radio.value = bgId;
radio.onchange = changeBadgeDialogConfirmValue;
radio.name = "choose-team-badge";
radio.id = `${radio.name}-${bgId}`;
const label = li.appendChild(document.createElement("label"));
label.className = "badge";
label.setAttribute("data-badge-icon", bgId);
label.setAttribute("for", radio.id);
teamBadgeUl.appendChild(li); teamBadgeUl.appendChild(li);
}); });
@ -4139,11 +4152,14 @@ function initialize() {
const team = formation.teams[teamIdx]; const team = formation.teams[teamIdx];
team[2] = parseInt(returnValue, 10); team[2] = parseInt(returnValue, 10);
refreshAll(formation); refreshAll(formation);
createNewUrl();
//badgeDialog.removeEventListener("close", returnFunc); //badgeDialog.removeEventListener("close", returnFunc);
}; };
teamBadge.onclick = function(){ teamBadge.onclick = function(){
_badgeThis = this; _badgeThis = this;
//_badgeThis.value const currentBadge = teamBadgeUl.querySelector(`#choose-team-badge-${_badgeThis.dataset.badgeIcon}`);
if (currentBadge) currentBadge.checked = true;
badgeDialog.addEventListener("close", returnFunc, {once: true}); badgeDialog.addEventListener("close", returnFunc, {once: true});
badgeDialog.showModal(); badgeDialog.showModal();
}; };
@ -4255,7 +4271,7 @@ function initialize() {
}); });
//设置地下城倍率 //设置地下城倍率
const dungeonEnchanceDialog = document.body.querySelector(".dialog-dungeon-enchance"); const dungeonEnchanceDialog = document.getElementById("dialog-dungeon-enchance");
const dialogContent = dungeonEnchanceDialog.querySelector(".dialog-content"); const dialogContent = dungeonEnchanceDialog.querySelector(".dialog-content");
const rareDoms = Array.from(dialogContent.querySelectorAll(".rare-list .rare-check")); const rareDoms = Array.from(dialogContent.querySelectorAll(".rare-list .rare-check"));
const attrDoms = Array.from(dialogContent.querySelectorAll(".attr-list .attr-check")); const attrDoms = Array.from(dialogContent.querySelectorAll(".attr-list .attr-check"));
@ -4263,22 +4279,17 @@ function initialize() {
const collabIdIpt = dialogContent.querySelector("#dungeon-collab-id"); const collabIdIpt = dialogContent.querySelector("#dungeon-collab-id");
const gachaIdIpt = dialogContent.querySelector("#dungeon-gacha-id"); const gachaIdIpt = dialogContent.querySelector("#dungeon-gacha-id");
const benefitDoms = Array.from(dialogContent.querySelectorAll(".benefit-list .benefit-check")); const benefitDoms = Array.from(dialogContent.querySelectorAll(".benefit-list .benefit-check"));
const benefit0 = benefitDoms.find(dom=>parseInt(dom.value, 10) == 0);
const currentStageIpt = dialogContent.querySelector("#current-stage"); const currentStageIpt = dialogContent.querySelector("#current-stage");
/*const benefitNot0 = benefitDoms.filter(dom=>dom != benefit0);
const notChecked = function(e){
console.log(this.checked,e);
}
benefitNot0.forEach(dom=>dom.onclick=notChecked);*/
//读取当前的地下城设定
dungeonEnchanceDialog.initialing = function(formation){ dungeonEnchanceDialog.initialing = function(formation){
const dge = formation.dungeonEnchance; const dge = formation.dungeonEnchance;
function runCheck(checkBox){ function runCheck(checkBox){
checkBox.checked = this.includes(parseInt(checkBox.value, 10)); checkBox.checked = this.includes(parseInt(checkBox.value, 10));
} }
rareDoms.forEach(runCheck,dge.rarities); rareDoms.forEach(runCheck, dge.rarities);
attrDoms.forEach(runCheck,dge.attrs); attrDoms.forEach(runCheck, dge.attrs);
typeDoms.forEach(runCheck,dge.types); typeDoms.forEach(runCheck, dge.types);
gachaIdIpt.value = dge.gachas.join(); gachaIdIpt.value = dge.gachas.join();
collabIdIpt.value = dge.collabs.join(); collabIdIpt.value = dge.collabs.join();
@ -4290,34 +4301,8 @@ function initialize() {
const benefit = dge.benefit || 0; const benefit = dge.benefit || 0;
benefitDoms.find(dom=>parseInt(dom.value, 10) == benefit).checked = true; benefitDoms.find(dom=>parseInt(dom.value, 10) == benefit).checked = true;
currentStageIpt.value = dge.stage || 1; currentStageIpt.value = dge.stage || 1;
this.classList.remove(className_displayNone);
} }
//初始化Dialog /* //直接通过 reset 浏览器默认功能重置了
dialogInitialing(dungeonEnchanceDialog);
const dungeonEnchanceDialogConfirm = dungeonEnchanceDialog.querySelector(".dialog-confirm");
dungeonEnchanceDialogConfirm.onclick = function(){
const rarities = returnCheckBoxsValues(rareDoms).map(Str2Int);
const attrs = returnCheckBoxsValues(attrDoms).map(Str2Int);
const types = returnCheckBoxsValues(typeDoms).map(Str2Int);
const benefit = Str2Int(returnRadiosValue(benefitDoms));
const dge = formation.dungeonEnchance;
dge.rarities = rarities;
dge.attrs = attrs;
dge.types = types;
dge.rate.hp = Number(dialogContent.querySelector("#dungeon-hp").value);
dge.rate.atk = Number(dialogContent.querySelector("#dungeon-atk").value);
dge.rate.rcv = Number(dialogContent.querySelector("#dungeon-rcv").value);
dge.collabs = collabIdIpt.value.split(',').map(str=>parseInt(str,10)).filter(Boolean);
dge.gachas = gachaIdIpt.value.split(',').map(str=>parseInt(str,10)).filter(Boolean);
dge.benefit = benefit;
dge.stage = parseInt(currentStageIpt.value, 10);
dungeonEnchanceDialog.close();
createNewUrl();
refreshAll(formation);
};
const dungeonEnchanceDialogClear = dungeonEnchanceDialog.querySelector(".dialog-clear"); const dungeonEnchanceDialogClear = dungeonEnchanceDialog.querySelector(".dialog-clear");
dungeonEnchanceDialogClear.onclick = function(){ dungeonEnchanceDialogClear.onclick = function(){
function unchecked(checkBox) { function unchecked(checkBox) {
@ -4333,10 +4318,30 @@ function initialize() {
dialogContent.querySelector("#dungeon-atk").value = 1; dialogContent.querySelector("#dungeon-atk").value = 1;
dialogContent.querySelector("#dungeon-rcv").value = 1; dialogContent.querySelector("#dungeon-rcv").value = 1;
currentStageIpt.value = 1; currentStageIpt.value = 1;
}; };*/
const dungeonEnchanceDialogOpen = controlBox.querySelector("#btn-set-dungeon-enchance"); const dungeonEnchanceDialogOpen = controlBox.querySelector("#btn-set-dungeon-enchance");
dungeonEnchanceDialogOpen.onclick = function(){ dungeonEnchanceDialogOpen.onclick = function(){
dungeonEnchanceDialog.show(formation); dungeonEnchanceDialog.initialing(formation);
dungeonEnchanceDialog.showModal();
};
dungeonEnchanceDialog.onclose = function(event) {
const returnValue = event.target.returnValue;
if (returnValue === "cancel") return;
const dge = formation.dungeonEnchance;
dge.rarities = returnCheckBoxsValues(rareDoms).map(Str2Int);
dge.attrs = returnCheckBoxsValues(attrDoms).map(Str2Int);
dge.types = returnCheckBoxsValues(typeDoms).map(Str2Int);
dge.rate.hp = returnCheckBoxsValues(typeDoms).map(Str2Int)(dialogContent.querySelector("#dungeon-hp").value);
dge.rate.atk = Number(dialogContent.querySelector("#dungeon-atk").value);
dge.rate.rcv = Number(dialogContent.querySelector("#dungeon-rcv").value);
dge.collabs = collabIdIpt.value.split(',').map(str=>parseInt(str,10)).filter(Boolean);
dge.gachas = gachaIdIpt.value.split(',').map(str=>parseInt(str,10)).filter(Boolean);
dge.benefit = Str2Int(returnRadiosValue(benefitDoms));
dge.stage = parseInt(currentStageIpt.value, 10);
refreshAll(formation);
createNewUrl();
}; };
//编辑框 //编辑框
@ -6543,18 +6548,7 @@ function refreshAll(formationData) {
const teamBox = teamBigBox.querySelector(".team-box"); const teamBox = teamBigBox.querySelector(".team-box");
const teamData = formationData.teams[teamNum]; const teamData = formationData.teams[teamNum];
const badgeBox = teamBigBox.querySelector(".team-badge"); const badgeBox = teamBigBox.querySelector(".team-badge");
if (badgeBox) { badgeBox.setAttribute("data-badge-icon", teamData[2] ?? 0);
const badge = badgeBox.querySelector(`#team-${teamNum+1}-badge-${teamData[2] || 0}`);
if (badge)
{
//为了解决火狐在代码片段里无法正确修改checked的问题所以事先把所有的都切换到false
const badges = Array.from(badgeBox.querySelectorAll(`.badge-radio`));
badges.forEach(badge=>badge.checked = false);
badge.checked = true;
}
}
const membersDom = teamBox.querySelector(".team-members"); const membersDom = teamBox.querySelector(".team-members");
const latentsDom = teamBox.querySelector(".team-latents"); const latentsDom = teamBox.querySelector(".team-latents");

View File

@ -1250,9 +1250,9 @@ const teamsCount = 1;
</div> </div>
<div class="dialog dialog-dungeon-enchance display-none"> <dialog id="dialog-dungeon-enchance" class="dialog">
<div class="dialog-title"></div> <div class="dialog-title"></div>
<div class="dialog-content"> <form method="dialog" class="dialog-content">
<ul class="rare-list"> <ul class="rare-list">
<li><input type="checkbox" class="rare-check" name="dungeon-rare" value="1" id="dungeon-rare-1" /><label class="rare-icon" data-rare-icon="1" for="dungeon-rare-1"></label></li> <li><input type="checkbox" class="rare-check" name="dungeon-rare" value="1" id="dungeon-rare-1" /><label class="rare-icon" data-rare-icon="1" for="dungeon-rare-1"></label></li>
<li><input type="checkbox" class="rare-check" name="dungeon-rare" value="2" id="dungeon-rare-2" /><label class="rare-icon" data-rare-icon="2" for="dungeon-rare-2"></label></li> <li><input type="checkbox" class="rare-check" name="dungeon-rare" value="2" id="dungeon-rare-2" /><label class="rare-icon" data-rare-icon="2" for="dungeon-rare-2"></label></li>
@ -1298,17 +1298,21 @@ const teamsCount = 1;
<li><label for="dungeon-rcv"></label><input id="dungeon-rcv" type="number" min=0 step=1 value=1 /></li> <li><label for="dungeon-rcv"></label><input id="dungeon-rcv" type="number" min=0 step=1 value=1 /></li>
</ul> </ul>
<ul class="benefit-list"><!--阴阳加护--> <ul class="benefit-list"><!--阴阳加护-->
<li><input type="radio" class="benefit-check" name="dungeon-benefit" value="0" id="dungeon-benefit-0" /><label class="awoken-icon" data-awoken-icon="0" for="dungeon-benefit-0"></label></li><!----> <li><input type="radio" class="benefit-check" name="dungeon-benefit" value="0" id="dungeon-benefit-0" checked /><label class="awoken-icon" data-awoken-icon="0" for="dungeon-benefit-0"></label></li><!---->
<li><input type="radio" class="benefit-check" name="dungeon-benefit" value="1" id="dungeon-benefit-1" /><label class="awoken-icon" data-awoken-icon="128" for="dungeon-benefit-1"></label></li><!----> <li><input type="radio" class="benefit-check" name="dungeon-benefit" value="1" id="dungeon-benefit-1" /><label class="awoken-icon" data-awoken-icon="128" for="dungeon-benefit-1"></label></li><!---->
<li><input type="radio" class="benefit-check" name="dungeon-benefit" value="2" id="dungeon-benefit-2" /><label class="awoken-icon" data-awoken-icon="129" for="dungeon-benefit-2"></label></li><!----> <li><input type="radio" class="benefit-check" name="dungeon-benefit" value="2" id="dungeon-benefit-2" /><label class="awoken-icon" data-awoken-icon="129" for="dungeon-benefit-2"></label></li><!---->
<li><input type="radio" class="benefit-check" name="dungeon-benefit" value="3" id="dungeon-benefit-3" /><label class="awoken-icon yinyang" data-awoken-icon="128" for="dungeon-benefit-3"></label></li><!--阴阳--> <li><input type="radio" class="benefit-check" name="dungeon-benefit" value="3" id="dungeon-benefit-3" /><label class="awoken-icon yinyang" data-awoken-icon="128" for="dungeon-benefit-3"></label></li><!--阴阳-->
</ul> </ul>
<ul class="current-stage-list"><!--当前层数--> <ul class="current-stage-list"><!--当前层数-->
<li><label for="current-stage"></label><input id="current-stage" type="number" min="1" step="1" /></li> <li><label for="current-stage"></label><input id="current-stage" type="number" min=1 step=1 /></li>
</ul> </ul>
</div> <div class="dialog-control">
<div class="dialog-control"><button class="dialog-clear brown-button"></button><button class="dialog-close brown-button"></button><button class="dialog-confirm brown-button"></button></div> <button class="dialog-clear brown-button" type="reset"></button>
</div> <button class="dialog-close brown-button" value="cancel"></button>
<button class="dialog-confirm brown-button" type="submit"></button>
</div>
</form>
</dialog>
<div id="player-data-frame" class="mask display-none"> <div id="player-data-frame" class="mask display-none">
<div class="player-box-title fa"><!--玩家数据子--></div> <div class="player-box-title fa"><!--玩家数据子--></div>
@ -1444,7 +1448,10 @@ const teamsCount = 1;
<form method="dialog"> <form method="dialog">
<ul class="team-badges"> <ul class="team-badges">
</ul> </ul>
<div class="dialog-control"><button class="dialog-close brown-button" value="cancel"></button></div> <div class="dialog-control">
<button class="dialog-close brown-button" value="cancel"></button>
<button class="dialog-confirm brown-button" type="submit" value="submit"></button>
</div>
</form> </form>
</dialog> </dialog>
</body> </body>

View File

@ -1407,16 +1407,12 @@
.badge{ .badge{
background-image: url(images/badge-bg.png); background-image: url(images/badge-bg.png);
width: 53px; width: 53px;
height: 41px; height: 42px;
text-align: center; text-align: center;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} border-radius: 7px;
button.badge {
border: none;
background-color: unset;
cursor: pointer;
} }
.badge::before{ .badge::before{
display: inline-block; display: inline-block;

View File

@ -55,6 +55,9 @@ body{
margin: 0; margin: 0;
background-color: white; background-color: white;
} }
.hide-radio {
display: none;
}
details>summary:hover { details>summary:hover {
background-color: #00000044; background-color: #00000044;
} }
@ -728,11 +731,12 @@ body:not(.show-member-ability) .team-ability, /*队员三维*/
body:not(.show-member-types) .team-member-types, /*武器觉醒、队员觉醒、队员类型*/ body:not(.show-member-types) .team-member-types, /*武器觉醒、队员觉醒、队员类型*/
body:not(.show-member-awoken) :where(.team-assist-awoken , .team-member-awoken), /*武器觉醒、队员觉醒、队员类型*/ body:not(.show-member-awoken) :where(.team-assist-awoken , .team-member-awoken), /*武器觉醒、队员觉醒、队员类型*/
body:not(.show-team-awoken-count) .team-awoken, /*队伍觉醒统计*/ body:not(.show-team-awoken-count) .team-awoken, /*队伍觉醒统计*/
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-rich-text-tools) #rich-text-tools /*队伍觉醒效果统计*/ body:not(.show-rich-text-tools) #rich-text-tools /*队伍觉醒效果统计*/
{ {
display: none; display: none !important;
} }
/*交换队长技的图标*/ /*交换队长技的图标*/
@ -787,20 +791,11 @@ body:not(.show-rich-text-tools) #rich-text-tools /*队伍觉醒效果统计*/
opacity: 0.5; opacity: 0.5;
} }
/*3P下隐藏队伍血量统计*/ /*3P下隐藏队伍血量统计*/
body:not(.show-team-total-info) .formation-box .team-total-info
{
display: none;
}
body:not(.show-team-total-info):not(.solo) .formation-box .team-bigbox body:not(.show-team-total-info):not(.solo) .formation-box .team-bigbox
{ {
margin-bottom: 5px; margin-bottom: 5px;
} }
body:not(.show-team-total-info):not(.solo) .formation-box .team-badge
{
position: absolute;
z-index: 10;
right: 0;
}
/*辅助和队伍的每一只框架*/ /*辅助和队伍的每一只框架*/
.member, .acquisitus-awoken-icon{ .member, .acquisitus-awoken-icon{
display: inline-block; display: inline-block;
@ -825,6 +820,17 @@ body:not(.show-team-total-info):not(.solo) .formation-box .team-badge
grid-gap: 15px; grid-gap: 15px;
margin: 10px; margin: 10px;
} }
button.badge {
border: none;
background-color: unset;
cursor: pointer;
}
label.badge {
cursor: pointer;
}
#badge-choose .team-badges .hide-radio:checked+ .badge{
box-shadow: 0 0 0 5px yellow;
}
/*队伍的背景色*/ /*队伍的背景色*/
.teams { .teams {
@ -1121,6 +1127,9 @@ body:not(.solo) .awoken-icon[data-awoken-icon="64"]::after
} }
/*队伍内属性、type的个数统计*/ /*队伍内属性、type的个数统计*/
.team-total-info-count {
margin-bottom: 3px;
}
.tIf-rarity, .tIf-rarity,
.tIf-attrs, .tIf-attrs,
.tIf-types .tIf-types
@ -4080,31 +4089,26 @@ body.external-link-support #external-support{
border-color: #7F00FF; border-color: #7F00FF;
} }
.dialog-dungeon-enchance #dialog-dungeon-enchance label {
{
margin-top: 100px;
margin-left: calc(50% - 270px);
}
.dialog-dungeon-enchance label {
cursor: pointer; cursor: pointer;
} }
.dialog-dungeon-enchance .dialog-content>ul>li #dialog-dungeon-enchance .dialog-content>ul>li
{ {
display: inline-block; display: inline-block;
} }
.dialog-dungeon-enchance .stats-list input #dialog-dungeon-enchance .stats-list input
{ {
width: 50px; width: 50px;
} }
.dialog-dungeon-enchance .dialog-content>* #dialog-dungeon-enchance .dialog-content>*
{ {
margin-top: 5px; margin-top: 5px;
} }
.dialog-dungeon-enchance .stats-list>li #dialog-dungeon-enchance .stats-list>li
{ {
margin-right: 5px; margin-right: 5px;
} }
.dialog-dungeon-enchance .dialog-control>button #dialog-dungeon-enchance .dialog-control>button
{ {
margin-right: 5px; margin-right: 5px;
} }