From ff112e95ac8bd6ed6eef190e297412c7944454e5 Mon Sep 17 00:00:00 2001 From: CCCC-L Date: Thu, 3 Aug 2023 12:16:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E9=99=90=E6=AC=A1=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 3 +++ js/class/Engine.js | 29 +++++++++++++++++++++++------ scss/mixin/_black.scss | 4 ++++ scss/mixin/_button.scss | 4 ++++ scss/typepad.css | 5 ++++- 5 files changed, 38 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index f50b3b4..1ddd5e7 100755 --- a/index.html +++ b/index.html @@ -423,6 +423,9 @@

玫枫跟打器
(+
-
+
+
+
diff --git a/js/class/Engine.js b/js/class/Engine.js index 68df494..4b3d09c 100755 --- a/js/class/Engine.js +++ b/js/class/Engine.js @@ -174,7 +174,7 @@ define( this.config.isBigCharacter ? enterBigCharacterMode() : leaveBigCharacterMode(); // Repeat Monitor - $('#repeatCountTotal').innerText = this.config.repeatCountTotal + $('#repeatCountTotal').innerText = this.config.repeatCountTotal == Number.MAX_VALUE ? '∞' : this.config.repeatCountTotal $('#repeatCountCurrent').innerText = this.config.repeatCountCurrent this.currentOriginWords = this.config.article.split(''); @@ -511,22 +511,39 @@ define( // 重复次数 + repeatCountAdd(){ - this.config.repeatCountTotal++; - $('#repeatCountTotal').innerText = this.config.repeatCountTotal; - this.config.save() + if (this.config.repeatCountTotal != Number.MAX_VALUE) { + this.config.repeatCountTotal++; + $('#repeatCountTotal').innerText = this.config.repeatCountTotal; + this.config.save() + } else { + console.log('cannot be greater than infinity') + let btn = $('#repeatMonitor') + Utility.shakeDom(btn) + } } // 重复次数 - repeatCountMinus(){ - if (this.config.repeatCountTotal > 1){ + if (this.config.repeatCountTotal > 1 && this.config.repeatCountTotal != Number.MAX_VALUE){ this.config.repeatCountTotal--; $('#repeatCountTotal').innerText = this.config.repeatCountTotal; this.config.save() } else { - console.log('can not lower than 1') + console.log('can not lower than 1 or infinite') let btn = $('#repeatMonitor') Utility.shakeDom(btn) } } + // 不限重复次数 + repeatCountInfinity() { + if (this.config.repeatCountTotal != Number.MAX_VALUE) { + this.config.repeatCountTotal = Number.MAX_VALUE + $('#repeatCountTotal').innerText = '∞'; + } else { + this.config.repeatCountTotal = 1 + $('#repeatCountTotal').innerText = this.config.repeatCountTotal; + } + this.config.save() + } // 切换全局内容乱序模式 shuffleCurrentArticle() { diff --git a/scss/mixin/_black.scss b/scss/mixin/_black.scss index e6f4f48..2f7bbfa 100755 --- a/scss/mixin/_black.scss +++ b/scss/mixin/_black.scss @@ -169,6 +169,10 @@ body.black { > *{ border-right: none; border-bottom: 1px solid $black-color-border; + display: flex; + align-items: center; + justify-content: center; + height: 100%; &:last-child{ border-bottom: none; } diff --git a/scss/mixin/_button.scss b/scss/mixin/_button.scss index 03afdad..94687d7 100755 --- a/scss/mixin/_button.scss +++ b/scss/mixin/_button.scss @@ -171,6 +171,10 @@ input[type=checkbox]:checked + label.checker { flex-flow: column nowrap; justify-content: center; align-items: center; + display: flex; + align-items: center; + justify-content: center; + height: 100%; > *{ @extend .btn; padding: 2px; diff --git a/scss/typepad.css b/scss/typepad.css index 934a375..59a1eb2 100755 --- a/scss/typepad.css +++ b/scss/typepad.css @@ -720,8 +720,11 @@ input[type=checkbox]:checked + label.checker { text-align: center; background-color: #fff; border-bottom: 1px solid #dddddd; - height: 50%; width: 20px; + display: flex; + align-items: center; + justify-content: center; + height: 100%; } .btn-group .btn-vertical > *:last-child { border-bottom: none;