Correctly highlight options on mobile

This commit is contained in:
jude 2023-09-17 18:33:01 +01:00
parent ec63c942d6
commit 6f1ef206df
4 changed files with 32 additions and 8 deletions

View File

@ -124,6 +124,7 @@ pub struct ReminderCreate {
attachment: Option<Vec<u8>>,
attachment_name: Option<String>,
avatar: Option<String>,
#[serde(with = "string")]
channel: u64,
content: String,
embed_author: String,
@ -565,7 +566,9 @@ pub async fn create_reminder(
tts,
username,
`utc_time`
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
) VALUES (?, ?, ?, ?,
(SELECT id FROM guilds WHERE guild = ?), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?)",
new_uid,
attachment_data,
reminder.attachment_name,

View File

@ -15,6 +15,18 @@ div.reminderContent.is-collapsed .column.settings {
display: none;
}
div.reminderContent.is-collapsed .button-row {
display: none;
}
div.reminderContent.is-collapsed .button-row-edit {
display: none;
}
div.reminderContent.is-collapsed .reminder-topbar {
padding-bottom: 0;
}
div.reminderContent.is-collapsed .invert-collapses {
display: inline-flex;
}

View File

@ -454,17 +454,25 @@ document.addEventListener("guildSwitched", async (e) => {
.querySelectorAll(".patreon-only")
.forEach((el) => el.classList.add("is-locked"));
let $li = document.querySelector(`li[data-guild="${e.detail.guild_id}"]`);
let $li = document.querySelectorAll(`li[data-guild="${e.detail.guild_id}"]`);
if ($li === null) {
if ($li.length === 0) {
switch_pane("user-error");
return;
}
switch_pane(e.detail.pane);
reset_guild_pane();
$li.querySelector("li > a").classList.add("is-active");
$li.querySelectorAll(`*[data-pane="${e.detail.pane}"]`).forEach((el) => {
document
.querySelectorAll(`li[data-guild="${e.detail.guild_id}"] > a`)
.forEach((el) => {
el.classList.add("is-active");
});
document
.querySelectorAll(
`li[data-guild="${e.detail.guild_id}"] *[data-pane="${e.detail.pane}"]`
)
.forEach((el) => {
el.classList.add("is-active");
});

View File

@ -40,7 +40,7 @@
<div class="navbar-brand">
<a class="navbar-item" href="/">
<figure class="image">
<img src="/static/img/logo_nobg.webp" alt="Reminder Bot Logo">
<img width="28px" height="28px" src="/static/img/logo_nobg.webp" alt="Reminder Bot Logo">
</figure>
</a>
@ -234,6 +234,7 @@
<a href="/">
<div class="brand">
<img src="/static/img/logo_nobg.webp" alt="Reminder bot logo"
width="52px" height="52px"
class="dashboard-brand">
</div>
</a>