aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2026-07-02 18:49:53 -0700
committerPinapelz <yukais@pinapelz.com>2026-07-02 18:49:53 -0700
commitece9cf2749ac592299a34a2cf0f24672eedbd19e (patch)
tree811ab6991283973a3d1f2dcae127137b1c06893c /res
parentfe306f7eab9395ebb220b105aee4a36fa2f7f895 (diff)
initial synctube++ fork
Signed-off-by: Pinapelz <yukais@pinapelz.com>
Diffstat (limited to 'res')
-rw-r--r--res/client.js74
-rw-r--r--res/css/des.css2
-rw-r--r--res/index.html10
3 files changed, 79 insertions, 7 deletions
diff --git a/res/client.js b/res/client.js
index faf13b4..4d19790 100644
--- a/res/client.js
+++ b/res/client.js
@@ -1535,6 +1535,78 @@ client_Main.prototype = {
,initListeners: function() {
var _gthis = this;
client_Buttons.init(this);
+ var openBtn = window.document.getElementById("openChatBtn");
+ var openBtnFadeTimer = null;
+ if(openBtn == null) {
+ openBtn = window.document.createElement("button");
+ openBtn.id = "openChatBtn";
+ openBtn.innerText = "Expand";
+ openBtn.setAttribute("style","position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 10000; display: none; padding: .5rem; background: rgba(0,0,0,0.4); color: var(--foreground); border: none; border-radius: .25rem 0 0 .25rem; transition: opacity 200ms; opacity: 1;");
+ window.document.body.appendChild(openBtn);
+ }
+ var toggleChatBtn = window.document.querySelector("#togglechat");
+ openBtn.onclick = function(e) {
+ toggleChatBtn.click();
+ };
+ openBtn.onmouseenter = function(e) {
+ openBtn.style.opacity = "1";
+ if(openBtnFadeTimer != null) {
+ openBtnFadeTimer.stop();
+ }
+ };
+ openBtn.onmouseleave = function(e) {
+ if(openBtnFadeTimer != null) {
+ openBtnFadeTimer.stop();
+ }
+ openBtnFadeTimer = haxe_Timer.delay(function() {
+ openBtn.style.opacity = "0.25";
+ },2000);
+ return openBtnFadeTimer;
+ };
+ window.document.querySelector("#togglechat").onclick = function(e) {
+ var chat = window.document.querySelector("#chat");
+ var bodyEl = window.document.querySelector("body");
+ var sizes = bodyEl.style.gridTemplateColumns;
+ if(sizes == null || sizes == "") {
+ sizes = "1fr 4px 300px";
+ }
+ var parts = sizes.split(" ");
+ var chatIndex = _gthis.settings.isSwapped ? 0 : parts.length - 1;
+ if(chat.style.display == "none") {
+ chat.style.display = "";
+ var prev = bodyEl.getAttribute("data-prev-grid");
+ if(prev != null) {
+ bodyEl.style.gridTemplateColumns = prev;
+ bodyEl.removeAttribute("data-prev-grid");
+ } else {
+ parts[chatIndex] = "" + _gthis.settings.chatSize + "px";
+ if(parts.length > 1) {
+ parts[1] = "4px";
+ }
+ bodyEl.style.gridTemplateColumns = parts.join(" ");
+ }
+ openBtn.style.display = "none";
+ if(openBtnFadeTimer != null) {
+ openBtnFadeTimer.stop();
+ }
+ } else {
+ bodyEl.setAttribute("data-prev-grid",bodyEl.style.gridTemplateColumns);
+ parts[chatIndex] = "0px";
+ if(parts.length > 1) {
+ parts[1] = "0px";
+ }
+ bodyEl.style.gridTemplateColumns = parts.join(" ");
+ chat.style.display = "none";
+ openBtn.style.display = "";
+ openBtn.style.opacity = "1";
+ if(openBtnFadeTimer != null) {
+ openBtnFadeTimer.stop();
+ }
+ openBtnFadeTimer = haxe_Timer.delay(function() {
+ openBtn.style.opacity = "0.25";
+ },2000);
+ }
+ };
var leaderBtn = window.document.querySelector("#leader_btn");
leaderBtn.onclick = $bind(this,this.toggleLeader);
leaderBtn.oncontextmenu = function(e) {
@@ -1764,7 +1836,7 @@ client_Main.prototype = {
var data = JSON.parse(e.data);
if(this.config != null && this.config.isVerbose) {
var t = data.type;
- haxe_Log.trace("Event: " + data.type,{ fileName : "src/client/Main.hx", lineNumber : 489, className : "client.Main", methodName : "onMessage", customParams : [Reflect.field(data,t.charAt(0).toLowerCase() + HxOverrides.substr(t,1,null))]});
+ haxe_Log.trace("Event: " + data.type,{ fileName : "src/client/Main.hx", lineNumber : 544, className : "client.Main", methodName : "onMessage", customParams : [Reflect.field(data,t.charAt(0).toLowerCase() + HxOverrides.substr(t,1,null))]});
}
client_JsApi.fireEvents(data);
switch(data.type) {
diff --git a/res/css/des.css b/res/css/des.css
index 4da2005..99a2c58 100644
--- a/res/css/des.css
+++ b/res/css/des.css
@@ -1,7 +1,5 @@
@charset "utf-8";
-/* CSS Document */
-
:root {
--cl-black: hsl(140, 1%, 6%);
--cl-gray-0: hsl(140, 2%, 8%);
diff --git a/res/index.html b/res/index.html
index 29f0b1b..76fa65c 100644
--- a/res/index.html
+++ b/res/index.html
@@ -148,7 +148,7 @@
</section>
<!-- Footer -->
<footer id="footer">
- <p>Powered by <a href="https://github.com/RblSb/SyncTube" target="_blank" rel="noreferrer noopener">SyncTube</a>
+ <p>Powered by <a href="https://github.com/pinapelz/SyncTube-plus-plus" target="_blank" rel="noreferrer noopener">SyncTube++</a>
</p>
</footer>
</main>
@@ -165,9 +165,11 @@
<span id="usercount">${connection}...</span>
<ion-icon id="pause-indicator-portrait" name="play" style="display: none;"></ion-icon>
</button>
- <span>
- <button id="leader_btn" class="unselectable" title="${leaderDesc}">${leader}</button>
- <!-- Settings button -->
+ <span>
+ <button id="togglechat" title="Collapse Chat">
+ <ion-icon name="chevron-forward-circle-outline"></ion-icon>
+ </button>
+ <button id="leader_btn" class="unselectable" title="${leaderDesc}">${leader}</button>
<button id="showoptions" class="collapsed" data-toggle="collapse" data-target="#optionsList"
aria-expanded="false">
<ion-icon name="settings-sharp"></ion-icon>
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage