From 92f95469ae58655eefa4da16e5fd2af9d19e4b86 Mon Sep 17 00:00:00 2001 From: Appbird Date: Thu, 2 Sep 2021 21:38:27 +0900 Subject: [PATCH 1/6] =?UTF-8?q?ref=20#5=20=E5=AF=BE=E5=BF=9C=E3=81=99?= =?UTF-8?q?=E3=82=8BHTML=E8=A6=81=E7=B4=A0=E3=81=AB=E5=9B=BA=E6=9C=89?= =?UTF-8?q?=E3=81=AE=E3=83=AB=E3=83=BC=E3=83=AB=E5=90=8D=E3=81=A7=E3=81=82?= =?UTF-8?q?=E3=82=8BtypeName=E3=82=92id=E3=81=AB=E4=B8=8E=E3=81=88?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ts/client/view/parts/GameModeRuleView.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ts/client/view/parts/GameModeRuleView.ts b/src/ts/client/view/parts/GameModeRuleView.ts index a3cf5a9..9bfcfb8 100644 --- a/src/ts/client/view/parts/GameModeRuleView.ts +++ b/src/ts/client/view/parts/GameModeRuleView.ts @@ -46,7 +46,7 @@ export class GameModeRuleView { for (const cl of appliedClass) { const iconHTML = cl.iconCSS.map(cssClass => ``).join(""); this.ruleSegment.appendChild(elementWithoutEscaping` -
+
${iconHTML}
${cl.title}
From dea190ab8a54e385eb6d106196866b7b7c2fab2e Mon Sep 17 00:00:00 2001 From: Appbird Date: Thu, 2 Sep 2021 21:42:56 +0900 Subject: [PATCH 2/6] =?UTF-8?q?=E3=83=AB=E3=83=BC=E3=83=AB=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E3=82=92=E8=A1=A8=E3=81=99=E7=9B=AE=E6=AC=A1=E3=81=AB?= =?UTF-8?q?=E3=82=AF=E3=83=AA=E3=83=83=E3=82=AF=E5=8F=AF=E8=83=BD=E3=81=AA?= =?UTF-8?q?a=E8=A6=81=E7=B4=A0=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ts/client/view/parts/RuleIndexPart.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ts/client/view/parts/RuleIndexPart.ts b/src/ts/client/view/parts/RuleIndexPart.ts index 3214e9d..8ec7465 100644 --- a/src/ts/client/view/parts/RuleIndexPart.ts +++ b/src/ts/client/view/parts/RuleIndexPart.ts @@ -59,7 +59,7 @@ export class RuleIndexPart { } private generateRuleIndexHTML(ruleObj: RuleAttributeAndAppliedClassInfo, language: LanguageInApplication) { return `
-
${ruleObj.rule.title}${(ruleObj.rule.note || 0) !== 0 ? ` ${choiceString(contents.annotated, language)}` : ""}
${this.generateClassDescriptionInRuleIndex(ruleObj.appliedClass, language)}
+
${ruleObj.rule.title}${(ruleObj.rule.note || 0) !== 0 ? ` ${choiceString(contents.annotated, language)}` : ""}
${this.generateClassDescriptionInRuleIndex(ruleObj.appliedClass, language)}
`; } private generateClassDescriptionInRuleIndex(appliedClass: AppliedRuleClassResolved[], language: LanguageInApplication) { From 966de159f56fe2d329299fc5eb89d882ab2aa79e Mon Sep 17 00:00:00 2001 From: Appbird Date: Thu, 2 Sep 2021 21:45:08 +0900 Subject: [PATCH 3/6] =?UTF-8?q?=E8=A6=81=E7=B4=A0=E3=81=AEid=E3=82=92?= =?UTF-8?q?=E3=82=AB=E3=82=B9=E3=82=BF=E3=83=9E=E3=82=A4=E3=82=BA=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ts/client/view/parts/TitleCupsuled.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ts/client/view/parts/TitleCupsuled.ts b/src/ts/client/view/parts/TitleCupsuled.ts index b6b9c31..c4767f3 100644 --- a/src/ts/client/view/parts/TitleCupsuled.ts +++ b/src/ts/client/view/parts/TitleCupsuled.ts @@ -11,18 +11,20 @@ export class TitleCupsuled implements IView{ chara = "", subChara = "", hr = "u-thin", - iconCSS + iconCSS, + id = "" }:{ chara?:"u-biggerChara"|"u-smallerChara"|"", subChara?:"u-biggerChara"|"u-smallerChara"|"", hr?:"u-thin"|"u-bold" underline?:boolean, - iconCSS?:string + iconCSS?:string, + id?:string } = {}){ this.container.innerHTML = ""; const title = this.container.appendChild(elementWithoutEscaping`
-
${(iconCSS) ? ` ` : "" }${main}
+
${(iconCSS) ? ` ` : "" }${main}
`); if (sub !== undefined) title.appendChild(elementWithoutEscaping`
${sub}
`) From 36ebe7860e6228bc6adddc525139564d73da6e06 Mon Sep 17 00:00:00 2001 From: Appbird Date: Thu, 2 Sep 2021 21:46:39 +0900 Subject: [PATCH 4/6] =?UTF-8?q?id=E3=82=92=E4=BB=98=E3=81=91=E3=82=8B?= =?UTF-8?q?=E8=A6=81=E7=B4=A0=E3=82=92=E8=AA=A4=E3=81=A3=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=81=9F=E3=81=AE=E3=81=A7=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ts/client/view/parts/GameModeRuleView.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ts/client/view/parts/GameModeRuleView.ts b/src/ts/client/view/parts/GameModeRuleView.ts index 9bfcfb8..d1b0a5e 100644 --- a/src/ts/client/view/parts/GameModeRuleView.ts +++ b/src/ts/client/view/parts/GameModeRuleView.ts @@ -38,7 +38,7 @@ export class GameModeRuleView { setHeader({ title, description,ruleName, iconCSS }: { title: string; ruleName:string; description?: string; iconCSS: string; }) { this.headerSegment.innerHTML = ""; const header = new TitleCupsuled(appendElement(this.headerSegment, "div")); - header.refresh(title, ruleName, { iconCSS,chara:"u-smallerChara" }); + header.refresh(title, ruleName, { iconCSS,chara:"u-smallerChara",id:ruleName }); appendElement(this.headerSegment, "p", "u-smallerChara u-width90per").innerHTML = description || "" } setRule({ appliedClass }: { appliedClass: AppliedRuleClassResolved[]; }) { @@ -46,7 +46,7 @@ export class GameModeRuleView { for (const cl of appliedClass) { const iconHTML = cl.iconCSS.map(cssClass => ``).join(""); this.ruleSegment.appendChild(elementWithoutEscaping` -
+
${iconHTML}
${cl.title}
From 7d905a2ea925eea21b65c90269c8d95dfc25372f Mon Sep 17 00:00:00 2001 From: Appbird Date: Thu, 2 Sep 2021 21:48:42 +0900 Subject: [PATCH 5/6] =?UTF-8?q?id=E3=81=AE=E7=A9=BA=E7=99=BD=E6=96=87?= =?UTF-8?q?=E5=AD=97=E3=82=92=5F=E3=81=AB=E7=BD=AE=E3=81=8D=E6=8F=9B?= =?UTF-8?q?=E3=81=88=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ts/client/view/parts/GameModeRuleView.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ts/client/view/parts/GameModeRuleView.ts b/src/ts/client/view/parts/GameModeRuleView.ts index d1b0a5e..2d1f91c 100644 --- a/src/ts/client/view/parts/GameModeRuleView.ts +++ b/src/ts/client/view/parts/GameModeRuleView.ts @@ -38,7 +38,7 @@ export class GameModeRuleView { setHeader({ title, description,ruleName, iconCSS }: { title: string; ruleName:string; description?: string; iconCSS: string; }) { this.headerSegment.innerHTML = ""; const header = new TitleCupsuled(appendElement(this.headerSegment, "div")); - header.refresh(title, ruleName, { iconCSS,chara:"u-smallerChara",id:ruleName }); + header.refresh(title, ruleName, { iconCSS,chara:"u-smallerChara",id:ruleName.replace(/\s/g,"_") }); appendElement(this.headerSegment, "p", "u-smallerChara u-width90per").innerHTML = description || "" } setRule({ appliedClass }: { appliedClass: AppliedRuleClassResolved[]; }) { From 18064bb2368596a174c6eef09cbf1a747bcedc5b Mon Sep 17 00:00:00 2001 From: Appbird Date: Thu, 2 Sep 2021 21:58:26 +0900 Subject: [PATCH 6/6] =?UTF-8?q?a=E3=82=BF=E3=82=B0=E3=81=AEhref=E3=81=AE?= =?UTF-8?q?=E7=A9=BA=E7=99=BD=E6=96=87=E5=AD=97=E3=82=92=5F=E3=81=AB?= =?UTF-8?q?=E7=BD=AE=E3=81=8D=E6=8F=9B=E3=81=88=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 空白文字があると、一つのidが複数のidとして認識されてしまう。 --- src/ts/client/view/parts/RuleIndexPart.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ts/client/view/parts/RuleIndexPart.ts b/src/ts/client/view/parts/RuleIndexPart.ts index 8ec7465..84c5f69 100644 --- a/src/ts/client/view/parts/RuleIndexPart.ts +++ b/src/ts/client/view/parts/RuleIndexPart.ts @@ -59,7 +59,8 @@ export class RuleIndexPart { } private generateRuleIndexHTML(ruleObj: RuleAttributeAndAppliedClassInfo, language: LanguageInApplication) { return `
-
${ruleObj.rule.title}${(ruleObj.rule.note || 0) !== 0 ? ` ${choiceString(contents.annotated, language)}` : ""}
${this.generateClassDescriptionInRuleIndex(ruleObj.appliedClass, language)}
+
${ruleObj.rule.title} + ${(ruleObj.rule.note || 0) !== 0 ? ` ${choiceString(contents.annotated, language)}` : ""}
${this.generateClassDescriptionInRuleIndex(ruleObj.appliedClass, language)}
`; } private generateClassDescriptionInRuleIndex(appliedClass: AppliedRuleClassResolved[], language: LanguageInApplication) {