Skip to content

Commit b59249e

Browse files
authored
Add Kappa symbol, add conditional year to unixToString time function
2 parents b28f2b2 + 377407c commit b59249e

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/modules/time.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export function unixToString(timestamp) {
22
let date = new Date(timestamp);
33
if (timestamp) {
4+
let year = date.getFullYear();
45
let month = date.getMonth() + 1;
56
let day = date.getDate();
67
let hours = date.getHours();
@@ -15,7 +16,7 @@ export function unixToString(timestamp) {
1516
if (hours == 0) {
1617
hours = 12;
1718
}
18-
return `${month}/${day} ${hours}:${minutes} ${period}`;
19+
return `${month}/${day}${(year != new Date().getFullYear()) ? `/${year}` : ''} ${hours}:${minutes} ${period}`;
1920
}
2021
}
2122

@@ -36,4 +37,4 @@ export function unixToTimeString(timestamp) {
3637
}
3738
return `${hours}:${minutes} ${period}`;
3839
}
39-
}
40+
}

src/modules/ui.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export function show(dialog, title, buttons, actions, blur, effects = true) {
256256
export function view(path) {
257257
if (!path) {
258258
const event = new Event("triggerclose");
259-
document.querySelector("dialog[open]").dispatchEvent(event);
259+
document.querySelector("dialog[open]")?.dispatchEvent(event);
260260
return;
261261
}
262262
const pages = path.split("/");
@@ -609,4 +609,4 @@ export function startLoader() {
609609
export function stopLoader() {
610610
const loader = document.getElementById("loader");
611611
if (loader) loader.classList.remove("active");
612-
}
612+
}

src/symbols/symbols.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@
3535
"beta": "β",
3636
"mu": "μ",
3737
"lambda": "λ",
38-
"gamma": "γ"
38+
"gamma": "γ",
39+
"kappa": "κ"
3940
}

0 commit comments

Comments
 (0)