aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-12-12 13:39:04 +0100
committermetamuffin <metamuffin@disroot.org>2023-12-12 13:39:04 +0100
commite1b06208ca4b8355726ecd95915d136a337c578b (patch)
tree11e6ca5cb0b7a0ef9d62e6b238a6b27942d26c90
parentd103a619c8d94436fbf05c344d2eedb04e5c83f9 (diff)
downloadjellything-e1b06208ca4b8355726ecd95915d136a337c578b.tar
jellything-e1b06208ca4b8355726ecd95915d136a337c578b.tar.bz2
jellything-e1b06208ca4b8355726ecd95915d136a337c578b.tar.zst
clean up some icon stuffs
-rw-r--r--server/src/routes/ui/layout.rs8
-rw-r--r--server/src/routes/ui/node.rs2
-rw-r--r--web/script/backbutton.ts2
-rw-r--r--web/script/player/mod.ts6
-rw-r--r--web/script/player/profiles.ts1
-rw-r--r--web/style/layout.css6
-rw-r--r--web/style/nodepage.css3
7 files changed, 15 insertions, 13 deletions
diff --git a/server/src/routes/ui/layout.rs b/server/src/routes/ui/layout.rs
index ae81cb6..92da3f6 100644
--- a/server/src/routes/ui/layout.rs
+++ b/server/src/routes/ui/layout.rs
@@ -47,13 +47,13 @@ markup::define! {
@if let Some(session) = session {
span { "Logged in as " } span.username { @session.user.display_name } " "
@if session.user.admin {
- a[href=uri!(r_admin_dashboard()), id="admin", class="icon"] { "Administration" } " "
+ a[href=uri!(r_admin_dashboard()), id="admin"] { "Administration" } " "
}
- a[href=uri!(r_account_settings()), id="settings", class="icon"] { "Settings" } " "
- a[href=uri!(r_account_logout()), id="logout", class="icon"] { "Log out" }
+ a[href=uri!(r_account_settings()), id="settings"] { "Settings" } " "
+ a[href=uri!(r_account_logout()), id="logout"] { "Log out" }
} else {
a[href=uri!(r_account_register())] { "Register" } " "
- a[href=uri!(r_account_login()), id="login", class="icon"] { "Log in" }
+ a[href=uri!(r_account_login()), id="login"] { "Log in" }
}
}
}
diff --git a/server/src/routes/ui/node.rs b/server/src/routes/ui/node.rs
index eab50fc..cc31de2 100644
--- a/server/src/routes/ui/node.rs
+++ b/server/src/routes/ui/node.rs
@@ -91,7 +91,7 @@ markup::define! {
}
.cardhover.item {
@if !(matches!(node.kind, NodeKind::Collection | NodeKind::Channel)) {
- a.play[href=&uri!(r_player(id, PlayerConfig::default())), class="icon"] { "play_arrow" }
+ a.play.icon[href=&uri!(r_player(id, PlayerConfig::default()))] { "play_arrow" }
}
@Props { node }
}
diff --git a/web/script/backbutton.ts b/web/script/backbutton.ts
index 79bc7bb..3e62165 100644
--- a/web/script/backbutton.ts
+++ b/web/script/backbutton.ts
@@ -2,7 +2,7 @@ import { e } from "./jshelper/mod.ts";
globalThis.addEventListener("DOMContentLoaded", () => {
document.getElementsByTagName("nav").item(0)?.prepend(
- e("a", "Back", { id:"back", class:"icon", onclick() { history.back() } })
+ e("a", "Back", { id:"back", onclick() { history.back() } })
)
})
diff --git a/web/script/player/mod.ts b/web/script/player/mod.ts
index 4e4a4cc..ed6677b 100644
--- a/web/script/player/mod.ts
+++ b/web/script/player/mod.ts
@@ -46,7 +46,7 @@ function initialize_player(el: HTMLElement, node_id: string) {
const track_select = (kind: TrackKind) => {
let enabled = true
const button = e("button", MEDIA_KIND_ICONS[kind][+enabled], {
- class: "iicon",
+ class: "icon",
onclick: () => {
enabled = !enabled
button.textContent = MEDIA_KIND_ICONS[kind][+enabled]
@@ -67,7 +67,7 @@ function initialize_player(el: HTMLElement, node_id: string) {
const controls = e("div", { class: "jsp-controls" },
player.playing.map(playing =>
- e("button", { class: "iicon" }, playing ? "pause" : "play_arrow", { onclick: toggle_playing })
+ e("button", { class: "icon" }, playing ? "pause" : "play_arrow", { onclick: toggle_playing })
),
e("p", { class: "jsp-status" },
player.position.map(v => e("span", show.duration(v))), e("br"),
@@ -96,7 +96,7 @@ function initialize_player(el: HTMLElement, node_id: string) {
track_select("subtitles")
),
e("button", "fullscreen", {
- class: "iicon",
+ class: "icon",
onclick() {
if (document.fullscreenElement) document.exitFullscreen()
else document.documentElement.requestFullscreen()
diff --git a/web/script/player/profiles.ts b/web/script/player/profiles.ts
index ad965f8..27c8474 100644
--- a/web/script/player/profiles.ts
+++ b/web/script/player/profiles.ts
@@ -44,6 +44,7 @@ export class ProfileSelector {
const profs = this.profile_list_for_track(track)
const sup_remux = await this.remux_supported(track);
+ if (!sup_remux && !profs.length) return this.player.logger?.log("None of the available codecs are supported. The Media can't be played back.")
const min_prof = sup_remux ? -1 : 0
const co = profile.value?.order ?? min_prof
// TODO use actual bitrate as a fallback. the server should supply it.
diff --git a/web/style/layout.css b/web/style/layout.css
index ef151c4..9b0c64c 100644
--- a/web/style/layout.css
+++ b/web/style/layout.css
@@ -163,10 +163,8 @@ footer p {
content: "arrow_back";
}
-.cardhover.item .play,
-.page.node .title .play::before,
-.icon::before,
-.iicon {
+*::before,
+.icon {
font-family: "Material Icons";
line-height: 1;
font-size: 1.1em;
diff --git a/web/style/nodepage.css b/web/style/nodepage.css
index 72a9ef1..2d73ab7 100644
--- a/web/style/nodepage.css
+++ b/web/style/nodepage.css
@@ -67,3 +67,6 @@
.props p.federation {
background: rgba(68, 129, 49, 0.522);
}
+.props p.federation::before {
+ content: "linked_services";
+}