Skip to content

Commit

Permalink
add: "sparkler:desktop_tl_logo"
Browse files Browse the repository at this point in the history
  • Loading branch information
trisuaso committed Nov 20, 2024
1 parent 00fadfe commit 0184f13
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/authbeam/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,7 @@ impl Database {
"sparkler:anonymous_avatar",
"sparkler:pinned",
"sparkler:profile_theme",
"sparkler:desktop_tl_logo",
"sparkler:layout",
"sparkler:nav_layout",
"sparkler:custom_css",
Expand Down
1 change: 1 addition & 0 deletions crates/rainbeam/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
width="32px"
height="32px"
class="title-content"
id="title-img"
/>

<b class="title-content" style="display: none"
Expand Down
9 changes: 9 additions & 0 deletions crates/rainbeam/templates/components/theming.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@
<style id="sparkler_live:custom_css">{{ css|safe }}</style>
{% endif %}
{% endif %}

{% if let Some(img_url) = raw_metadata.kv.get("sparkler:desktop_tl_logo") %}
{% if !img_url.is_empty() %}
{% let img_url = img_url.replace("`", "") %}
<script>
document.getElementById("title-img").src = `/api/v0/util/ext/image?img={{ img_url }}`
</script>
{% endif %}
{% endif %}
</div>

<script type="text/plain" id="theme">
Expand Down
15 changes: 15 additions & 0 deletions crates/rainbeam/templates/settings/components/profile_options.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,21 @@ <h4 class="title">Images</h4>
</p>
</div>

<div class="flex flex-col gap-1">
<label for="sparkler:desktop_tl_logo">(desktop) Top-left Logo</label>

<input
type="url"
name="sparkler:desktop_tl_logo"
id="sparkler:desktop_tl_logo"
onchange="update_kv('sparkler:desktop_tl_logo', event.target.value)"
/>

<p class="fade">
The image located at the top left of Neospring on desktop.
</p>
</div>

<h4 class="title">Greetings</h4>
<div class="flex flex-col gap-1">
<label
Expand Down

0 comments on commit 0184f13

Please sign in to comment.