diff --git a/Cargo.lock b/Cargo.lock
index ccf0b51..dc19faf 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3282,7 +3282,7 @@ dependencies = [
[[package]]
name = "tetratto"
-version = "3.1.0"
+version = "4.0.0"
dependencies = [
"ammonia",
"async-stripe",
@@ -3313,7 +3313,7 @@ dependencies = [
[[package]]
name = "tetratto-core"
-version = "3.1.0"
+version = "4.0.0"
dependencies = [
"async-recursion",
"base16ct",
@@ -3337,7 +3337,7 @@ dependencies = [
[[package]]
name = "tetratto-l10n"
-version = "3.1.0"
+version = "4.0.0"
dependencies = [
"pathbufd",
"serde",
@@ -3346,7 +3346,7 @@ dependencies = [
[[package]]
name = "tetratto-shared"
-version = "3.1.0"
+version = "4.0.0"
dependencies = [
"ammonia",
"chrono",
diff --git a/crates/app/Cargo.toml b/crates/app/Cargo.toml
index 408b1b0..305e1d9 100644
--- a/crates/app/Cargo.toml
+++ b/crates/app/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tetratto"
-version = "3.1.0"
+version = "4.0.0"
edition = "2024"
[features]
diff --git a/crates/app/src/assets.rs b/crates/app/src/assets.rs
index 1fbf106..63f229d 100644
--- a/crates/app/src/assets.rs
+++ b/crates/app/src/assets.rs
@@ -87,6 +87,7 @@ pub const TIMELINES_FOLLOWING_QUESTIONS: &str =
include_str!("./public/html/timelines/following_questions.html");
pub const TIMELINES_ALL_QUESTIONS: &str =
include_str!("./public/html/timelines/all_questions.html");
+pub const TIMELINES_SEARCH: &str = include_str!("./public/html/timelines/search.html");
pub const MOD_AUDIT_LOG: &str = include_str!("./public/html/mod/audit_log.html");
pub const MOD_REPORTS: &str = include_str!("./public/html/mod/reports.html");
@@ -283,6 +284,7 @@ pub(crate) async fn write_assets(config: &Config) -> PathBufD {
write_template!(html_path->"timelines/popular_questions.html"(crate::assets::TIMELINES_POPULAR_QUESTIONS) --config=config);
write_template!(html_path->"timelines/following_questions.html"(crate::assets::TIMELINES_FOLLOWING_QUESTIONS) --config=config);
write_template!(html_path->"timelines/all_questions.html"(crate::assets::TIMELINES_ALL_QUESTIONS) --config=config);
+ write_template!(html_path->"timelines/search.html"(crate::assets::TIMELINES_SEARCH) --config=config);
write_template!(html_path->"mod/audit_log.html"(crate::assets::MOD_AUDIT_LOG) -d "mod" --config=config);
write_template!(html_path->"mod/reports.html"(crate::assets::MOD_REPORTS) --config=config);
diff --git a/crates/app/src/langs/en-US.toml b/crates/app/src/langs/en-US.toml
index 90d5004..d0b27e1 100644
--- a/crates/app/src/langs/en-US.toml
+++ b/crates/app/src/langs/en-US.toml
@@ -15,6 +15,7 @@ version = "1.0.0"
"general:link.reports" = "Reports"
"general:link.ip_bans" = "IP bans"
"general:link.stats" = "Stats"
+"general:link.search" = "Search"
"general:action.save" = "Save"
"general:action.delete" = "Delete"
"general:action.purge" = "Purge"
@@ -109,7 +110,6 @@ version = "1.0.0"
"communities:label.repost" = "Repost"
"communities:label.quote_post" = "Quote post"
"communities:label.expand_original" = "Expand original"
-"communities:label.search" = "Search"
"communities:label.search_results" = "Search results"
"communities:label.query" = "Query"
"communities:label.join_new" = "Join new"
diff --git a/crates/app/src/macros.rs b/crates/app/src/macros.rs
index edfb8de..2d92375 100644
--- a/crates/app/src/macros.rs
+++ b/crates/app/src/macros.rs
@@ -97,7 +97,7 @@ macro_rules! get_lang {
#[macro_export]
macro_rules! check_user_blocked_or_private {
- ($user:ident, $other_user:ident, $data:ident, $jar:ident) => {
+ ($user:expr, $other_user:ident, $data:ident, $jar:ident) => {
// check require_account
if $user.is_none() && $other_user.settings.require_account {
return Err(Html(
diff --git a/crates/app/src/public/css/style.css b/crates/app/src/public/css/style.css
index c4d67f6..b407bfe 100644
--- a/crates/app/src/public/css/style.css
+++ b/crates/app/src/public/css/style.css
@@ -755,6 +755,38 @@ select:focus {
border-bottom-right-radius: var(--radius);
}
+.pillmenu:not(.rows) .row {
+ display: contents;
+}
+
+.pillmenu.rows {
+ flex-direction: column;
+}
+
+.pillmenu.rows .row {
+ display: flex;
+}
+
+.pillmenu.rows a {
+ border-radius: 0;
+}
+
+.pillmenu.rows .row:first-of-type a:first-child {
+ border-top-left-radius: var(--radius);
+}
+
+.pillmenu.rows .row:first-of-type a:last-child {
+ border-top-right-radius: var(--radius);
+}
+
+.pillmenu.rows .row:last-of-type a:first-child {
+ border-bottom-left-radius: var(--radius);
+}
+
+.pillmenu.rows .row:last-of-type a:last-child {
+ border-bottom-right-radius: var(--radius);
+}
+
@media screen and (max-width: 900px) {
.pillmenu {
/* convert into a sidemenu */
@@ -762,9 +794,9 @@ select:focus {
}
.pillmenu a:first-child {
+ border-bottom-left-radius: 0;
border-top-left-radius: var(--radius);
border-top-right-radius: var(--radius);
- border-bottom-left-radius: 0;
}
.pillmenu a:last-child {
@@ -772,6 +804,17 @@ select:focus {
border-bottom-left-radius: var(--radius);
border-bottom-right-radius: var(--radius);
}
+
+ .pillmenu.rows .row {
+ display: contents;
+ }
+
+ .pillmenu.rows .row:first-of-type a:first-child,
+ .pillmenu.rows .row:first-of-type a:last-child,
+ .pillmenu.rows .row:last-of-type a:first-child,
+ .pillmenu.rows .row:last-of-type a:last-child {
+ border-radius: 0;
+ }
}
/* notification */
diff --git a/crates/app/src/public/html/auth/connection.html b/crates/app/src/public/html/auth/connection.html
index b796522..fafa8c9 100644
--- a/crates/app/src/public/html/auth/connection.html
+++ b/crates/app/src/public/html/auth/connection.html
@@ -72,4 +72,4 @@ config.connections.last_fm_key %}
}, 500);
}, 1000);
-{% endif %} {% endblock %}
+{%- endif %} {% endblock %}
diff --git a/crates/app/src/public/html/chats/app.html b/crates/app/src/public/html/chats/app.html
index 59db607..5f96774 100644
--- a/crates/app/src/public/html/chats/app.html
+++ b/crates/app/src/public/html/chats/app.html
@@ -7,15 +7,15 @@ hide_user_menu=true) }}
class="flex gap-2 items-center active"
onclick="toggle_sidebars(event)"
>
- {{ icon "panel-left" }} {% if community %}
+ {{ icon "panel-left" }} {% if community -%}
- {% if community.context.display_name %} {{
+ {% if community.context.display_name -%} {{
community.context.display_name }} {% else %} {{ community.title }}
- {% endif %}
+ {%- endif %}
{% else %}
{{ text "chats:label.my_chats" }}
- {% endif %}
+ {%- endif %}
@@ -27,36 +27,36 @@ hide_user_menu=true) }}
>
- {% for community in communities %} {% if community.id != 0 %}
+ {% for community in communities %} {% if community.id != 0 -%}
- {% endif %} {% endfor %}
+ {%- endif %} {% endfor %}
-{% endif %} {%- endmacro %} {% macro last_fm_playing(state, size="60px") -%} {%
+{%- endif %} {%- endmacro %} {% macro last_fm_playing(state, size="60px") -%} {%
if state and state.data %}
@@ -967,7 +968,7 @@ if state and state.data %}
>
- {% if state.data.duration_ms and state.data.duration_ms != "0" %}
+ {% if state.data.duration_ms and state.data.duration_ms != "0" -%}
- {% endif %}
+ {%- endif %}
-{% endif %} {%- endmacro %} {% macro connection_icon(key) -%}
+{%- endif %} {%- endmacro %} {% macro connection_icon(key) -%}
- {% if key == "Spotify" %}
+ {% if key == "Spotify" -%}
{{ icon "spotify" }}
{% elif key == "LastFm" %}
{{ icon "last_fm" }}
- {% endif %}
+ {%- endif %}
{%- endmacro %} {% macro connection_url(key, value) -%} {% if value[0].data.url
%} {{ value[0].data.url }} {% elif key == "LastFm" %} https://last.fm/user/{{
-value[0].data.name }} {% endif %} {%- endmacro %} {% macro
+value[0].data.name }} {%- endif %} {%- endmacro %} {% macro
message_actions(can_manage_message, owner, message, owner) -%}
-{% endif %} {%- endmacro %} {% macro user_plate(user, show_menu=false,
+{%- endif %} {%- endmacro %} {% macro user_plate(user, show_menu=false,
show_kick=false, secondary=false) -%}
- {% endif %}
+ {%- endif %}
{%- endmacro %} {% macro emoji_picker(element_id, render_dialog=false) -%}
-{% if render_dialog %}
+{% if render_dialog -%}