Skip to content

Commit cf9de6b

Browse files
committedOct 26, 2022
hot fix
1 parent 76daf86 commit cf9de6b

File tree

4 files changed

+43
-27
lines changed

4 files changed

+43
-27
lines changed
 

‎static/index.css

+7-5
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@
106106

107107
[data-theme="dark"] {
108108
/* body */
109-
--wallpaper: url("resources/wallpapers/darkWall.png");
110109
--body: #111;
111110
--body-color: #ffffff;
112111
--userselect-background: #ffffff0a;
@@ -206,7 +205,6 @@
206205

207206
[data-theme="night"] {
208207
/* body */
209-
--wallpaper: url("resources/wallpapers/nightWall.png");
210208
--body: #0e0a40;
211209
--body-color: #fff7a5;
212210
--userselect-background: #ffffff0a;
@@ -306,7 +304,6 @@
306304

307305
[data-theme="fracital"] {
308306
/* body */
309-
--wallpaper: url("resources/wallpapers/fracitalWall.png");
310307
--body: #1C1C1C;
311308
--body-color: #FF75F9;
312309
--userselect-background: #ffffff0a;
@@ -428,7 +425,7 @@
428425

429426
html {
430427
background: black;
431-
scrollbar-color: var(--color) var(--body);
428+
scrollbar-color: var(--body-color) var(--body);
432429
scrollbar-width: thin;
433430
cursor: var(--cursorNormal) !important;
434431
}
@@ -442,7 +439,7 @@ html {
442439
}
443440

444441
::-webkit-scrollbar-thumb {
445-
background-color: var(--color);
442+
background-color: var(--body-color);
446443
border-radius: 6px;
447444
}
448445

@@ -1084,6 +1081,11 @@ li {
10841081
box-shadow: 0 0 11px 2px rgba(0, 0, 0, 0.36);
10851082
}
10861083

1084+
.name.noHoverApps:hover {
1085+
background-color: var(--apps-background) !important;
1086+
cursor: var(--cursorNormal) !important;
1087+
}
1088+
10871089
.appOptions.h {
10881090
opacity: 0;
10891091
z-index: -1;

‎static/index.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function isUrl(val = '') {
44
};
55

66
function share() {
7-
navigator.clipboard.writeText("https://terbium.ga");
7+
navigator.clipboard.writeText(window.location.href);
88
}
99

1010
function bd() {
@@ -52,8 +52,8 @@ window.addEventListener("mousedown", (e) => {
5252
ctxm.style.top = e.pageY + "px";
5353
ctxm.style.left = e.pageX + "px";
5454
menu.innerHTML = `
55-
<a class="ctxbt" id="share" onclick="share(); document.getElementById("ctx").remove();">Share</a>
56-
<a class="ctxbt" onclick="bd(); document.getElementById("ctx").remove();">Background</a>
55+
<a class="ctxbt" id="share">Share</a>
56+
<a class="ctxbt" id="backgroundB" onclick="bd(); document.getElementById("ctx").remove();">Background</a>
5757
<a class="ctxbt" onclick='windows("./settings.html", "../resources/terbium.svg", "Terbium Settings", false, true, false, "settings"); document.getElementById("ctx").remove();'>Settings</a>
5858
`;
5959
window.addEventListener("mousedown", (e) => {
@@ -62,6 +62,14 @@ window.addEventListener("mousedown", (e) => {
6262
}
6363
});
6464
document.body.appendChild(ctxm);
65+
document.querySelector("#share").onclick = () => {
66+
share();
67+
document.getElementById("ctx").remove();
68+
}
69+
document.querySelector("#backgroundB").onclick = () => {
70+
bd();
71+
document.getElementById("ctx").remove();
72+
}
6573
}
6674
}
6775
})

‎static/js/theme.js

+3-14
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
11
let themeMAIN = window.parent.document.querySelector("html");
22
switch(localStorage.getItem("theme")) {
33
case "dark":
4-
document.documentElement.setAttribute('data-theme', 'dark');
5-
themeMAIN.setAttribute("data-theme", "dark");
6-
break
7-
case "light":
8-
document.documentElement.setAttribute('data-theme', 'light');
9-
themeMAIN.setAttribute("data-theme", "light");
4+
document.documentElement.setAttribute("data-theme", "dark");
105
break
116
case "night":
12-
document.documentElement.setAttribute('data-theme', 'night');
13-
themeMAIN.setAttribute("data-theme", "night");
14-
break
15-
case "fracital":
16-
document.documentElement.setAttribute('data-theme', 'fracital');
17-
themeMAIN.setAttribute("data-theme", "fracital");
7+
document.documentElement.setAttribute("data-theme", "night");
188
break
199
case "fracital":
20-
document.documentElement.setAttribute('data-theme', 'custom');
21-
themeMAIN.setAttribute("data-theme", "custom");
10+
document.documentElement.setAttribute("data-theme", "fracital");
2211
break
2312
}

‎static/js/windows.js

+22-5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ let params;
4747
function windows(link, icn, title, browser = Boolean, os = Boolean, fullscreen = Boolean, appName, textAppText) {
4848
document.querySelector(".shell").appendChild(appShell);
4949
appShell.appendChild(appsShellName);
50+
if(appsShellName.classList.contains("noHoverApps")) {
51+
appsShellName.classList.remove("noHoverApps")
52+
}
5053
appsShellName.innerText = title;
5154
const appID = document.querySelector(".name").getAttribute("data-id");
5255
let chromeJS = document.createElement("script");
@@ -72,7 +75,11 @@ function windows(link, icn, title, browser = Boolean, os = Boolean, fullscreen =
7275
newwin.setAttribute("data-appName", appName);
7376

7477
appsShellName.onclick = (e) => {
75-
appOptions.classList.toggle("h");
78+
if(appsShellName.innerHTML == "") {
79+
return
80+
} else {
81+
appOptions.classList.toggle("h");
82+
}
7683
appOptions.querySelector(".closeApp").onclick = (e) => {
7784
appsShellName.innerHTML = "";
7885
appOptions.classList.toggle("h");
@@ -910,6 +917,9 @@ function windows(link, icn, title, browser = Boolean, os = Boolean, fullscreen =
910917
appsShellName.innerText = "";
911918
appsShellName.setAttribute("data-id", "");
912919
newdock.remove();
920+
if(document.querySelectorAll(".win").length === 0) {
921+
appsShellName.classList.add("noHoverApps");
922+
}
913923
});
914924
newwin.querySelector('.maxi').onclick = () => {
915925
var winFocus = document.querySelectorAll(".winFocus");
@@ -1090,21 +1100,23 @@ function windows(link, icn, title, browser = Boolean, os = Boolean, fullscreen =
10901100
let winID;
10911101
if(!e.target.classList.contains(".winconts") && e.target != document.body) {
10921102
winID = e.target.parentElement.parentElement.id;
1093-
} else {
1094-
winID = e.target.parenElement.id;
1103+
} if(e.target.classList.contains("winconts")) {
1104+
winID = e.target.parentElement.id;
10951105
}
1106+
winEl = document.getElementById(winID);
10961107
if(e.target.closest(".winconts") && !e.target.closest(".controls") && !e.target.closest(".searchbar") && !e.target.closest(".m") && !e.target.closest(".icon")) {
10971108
if(document.getElementById("ctx")) {
10981109
document.getElementById("ctx").remove();
10991110
}
11001111
ctxm.style.top = e.pageY + "px";
11011112
ctxm.style.left = e.pageX + "px";
11021113
menu.innerHTML = `
1114+
<a class="ctxbt" id="ctxNewWindow">New Window</a>
11031115
<a class="ctxbt" id="ctxCloseWin">Close</a>
11041116
<a class="ctxbt" id="ctxMaxWin">Maximize</a>
11051117
<a class="ctxbt" id="ctxMinWin">Minimize</a>
11061118
<a class="ctxbt" id="ctxReload">Reload</a>
1107-
`;
1119+
`;
11081120
window.addEventListener("mousedown", (e) => {
11091121
if (e.button == 0 && !e.target.closest(".ctx")) {
11101122
ctxm.remove();
@@ -1128,10 +1140,15 @@ function windows(link, icn, title, browser = Boolean, os = Boolean, fullscreen =
11281140
});
11291141
const ctxReload = document.querySelector("#ctxReload");
11301142
ctxReload.addEventListener("click", () => {
1131-
const frame = newwin.querySelector("iframe");
1143+
const frame = winEl.querySelector("iframe");
11321144
frame.src = frame.src;
11331145
ctxm.remove();
11341146
});
1147+
const ctxNewWindow = document.querySelector("#ctxNewWindow");
1148+
ctxNewWindow.addEventListener("click", () => {
1149+
window.windows(link, icn, title, browser, os, fullscreen, appName, textAppText);
1150+
ctxm.remove();
1151+
});
11351152
}
11361153
// if(e.target.closest(".appItem")) {
11371154
// if(document.getElementById("ctx")) {

0 commit comments

Comments
 (0)
Please sign in to comment.