From 33f2001621e44aa45c3da07139e36ba1377c09f6 Mon Sep 17 00:00:00 2001 From: PoTTii Date: Fri, 19 Feb 2021 01:42:54 +0100 Subject: [PATCH 1/2] WidescreenMode: Add setting to allow bigger navigation buttons --- src/module/WidescreenMode.js | 14 ++++++++++++-- src/style/widescreenMode.less | 7 +++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/module/WidescreenMode.js b/src/module/WidescreenMode.js index 7fbc371..b819764 100644 --- a/src/module/WidescreenMode.js +++ b/src/module/WidescreenMode.js @@ -17,6 +17,7 @@ export default class WidescreenMode { this.displayBenisbar = Settings.get('WidescreenMode.settings.display_benisbar'); this.scrollMultiplicator = parseInt(Settings.get('WidescreenMode.settings.scroll_speed')) || 1; this.displayBenisUntilTop = Settings.get("WidescreenMode.settings.display_benis_until_top"); + this.biggerStreamNavIcons = Settings.get("WidescreenMode.settings.bigger_stream_nav_icons"); } @@ -69,7 +70,6 @@ export default class WidescreenMode { this.modifyLogo(); } - checkScoreDisplay() { if (this.displayBenis) { p.shouldShowScore = () => { @@ -84,7 +84,7 @@ export default class WidescreenMode { { id: 'display_benis_until_top', title: 'Benis bis beliebt anzeigen', - description: 'Zeigt an, wie viel Benis ungefähr bis beliebt fehlt. (Nur mit Benisbar möglich)' + description: 'Zeigt an, wie viel Benis ungefähr bis beliebt fehlt. (Nur mit Benisleiste möglich)' }, { id: 'display_benis', @@ -106,6 +106,11 @@ export default class WidescreenMode { title: 'Benisleiste anzeigen', description: 'Zeigt die Benisverteilung als Leiste an.' }, + { + id: 'bigger_stream_nav_icons', + title: 'Post-Navigationslinks vergrößern', + description: 'Vergrößert die Links um zum nächsten/vorherigen Post zu kommen.' + }, { id: 'scroll_speed', title: 'Scrollgeschwindigkeit', @@ -205,6 +210,11 @@ export default class WidescreenMode { _this.addItemListener(this.$image, itemData); document.body.classList.add('fixed'); + + if(_this.biggerStreamNavIcons) { + document.getElementsByClassName('stream-prev-icon')[0].classList.add('stream-prev-icon-xl'); + document.getElementsByClassName('stream-next-icon')[0].classList.add('stream-next-icon-xl'); + } }, remove: function () { this.parent(); diff --git a/src/style/widescreenMode.less b/src/style/widescreenMode.less index d287a83..8aed845 100644 --- a/src/style/widescreenMode.less +++ b/src/style/widescreenMode.less @@ -347,6 +347,13 @@ body[class] { align-items: center; justify-content: center; + .stream-prev-icon-xl, + .stream-next-icon-xl { + width: 8px; + min-height: 32px; + height: calc(100vh - 400px); + } + span:before { opacity: .2; font-size: 70px; From 4db588c2caaf03f93b3c50d631c9638e964322c4 Mon Sep 17 00:00:00 2001 From: PoTTii Date: Fri, 19 Feb 2021 02:08:44 +0100 Subject: [PATCH 2/2] WideScreenMode: Comments can now be on the right side --- src/module/WidescreenMode.js | 10 ++++++++++ src/style/widescreenMode.less | 17 +++++++++++++++++ src/template/streamItemComments.html | 4 ++-- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/module/WidescreenMode.js b/src/module/WidescreenMode.js index b819764..14bb605 100644 --- a/src/module/WidescreenMode.js +++ b/src/module/WidescreenMode.js @@ -18,6 +18,7 @@ export default class WidescreenMode { this.scrollMultiplicator = parseInt(Settings.get('WidescreenMode.settings.scroll_speed')) || 1; this.displayBenisUntilTop = Settings.get("WidescreenMode.settings.display_benis_until_top"); this.biggerStreamNavIcons = Settings.get("WidescreenMode.settings.bigger_stream_nav_icons"); + this.commentsLeft = Settings.get("WidescreenMode.settings.comments_left"); } @@ -117,6 +118,11 @@ export default class WidescreenMode { description: 'Definiere, wie schnell im Zoom gescrollt werden soll.', type: 'number' }, + { + id: 'comments_left', + title: 'Kommentare auf der linken Seite', + description: 'Wenn deaktiviert werden Kommentare auf der rechten Seite des Bildschirms angezeigt.', + }, ]; } @@ -215,6 +221,10 @@ export default class WidescreenMode { document.getElementsByClassName('stream-prev-icon')[0].classList.add('stream-prev-icon-xl'); document.getElementsByClassName('stream-next-icon')[0].classList.add('stream-next-icon-xl'); } + + if(!_this.commentsLeft) { + document.getElementsByClassName('item-container-content')[0].classList.add('right'); + } }, remove: function () { this.parent(); diff --git a/src/style/widescreenMode.less b/src/style/widescreenMode.less index 8aed845..98ffb90 100644 --- a/src/style/widescreenMode.less +++ b/src/style/widescreenMode.less @@ -197,6 +197,23 @@ body[class] { .item-container-content { display: flex; + + &.right { + flex-direction: row-reverse; + + .comments-switch { + transform: rotate(180deg); + } + + .video-controls { + padding-left: 30px; + } + + .stream-prev { + margin-left: 30px; + } + } + height: 100%; width: 100%; diff --git a/src/template/streamItemComments.html b/src/template/streamItemComments.html index 5a3f275..067ff38 100644 --- a/src/template/streamItemComments.html +++ b/src/template/streamItemComments.html @@ -1,7 +1,7 @@
c {"Kommentar".inflect(commentCount)}
-
-
+
+