fix: change config.town_square to usize instead of String
This commit is contained in:
parent
a06dc88f84
commit
fd33c0c7d8
4 changed files with 6 additions and 6 deletions
|
@ -106,7 +106,7 @@ community %}
|
||||||
</div>
|
</div>
|
||||||
{%- endmacro %} {% macro post(post, owner, secondary=false, community=false,
|
{%- endmacro %} {% macro post(post, owner, secondary=false, community=false,
|
||||||
show_community=true, can_manage_post=false) -%} {% if community and
|
show_community=true, can_manage_post=false) -%} {% if community and
|
||||||
show_community %}
|
show_community and post.community != config.town_square %}
|
||||||
<div class="card-nest">
|
<div class="card-nest">
|
||||||
<div class="card small">
|
<div class="card small">
|
||||||
<a
|
<a
|
||||||
|
@ -255,7 +255,8 @@ show_community %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if community and show_community %}
|
{% if community and show_community and post.community != config.town_square
|
||||||
|
%}
|
||||||
</div>
|
</div>
|
||||||
{% endif %} {%- endmacro %} {% macro notification(notification) -%}
|
{% endif %} {%- endmacro %} {% macro notification(notification) -%}
|
||||||
<div class="w-full card-nest">
|
<div class="w-full card-nest">
|
||||||
|
|
|
@ -202,7 +202,6 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
{{ user.settings.theme_preference }}
|
|
||||||
<select
|
<select
|
||||||
onchange="set_setting_field('theme_preference', event.target.selectedOptions[0].value)"
|
onchange="set_setting_field('theme_preference', event.target.selectedOptions[0].value)"
|
||||||
>
|
>
|
||||||
|
|
|
@ -204,7 +204,7 @@ pub struct Config {
|
||||||
///
|
///
|
||||||
/// This community **must** have open write access.
|
/// This community **must** have open write access.
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub town_square: String,
|
pub town_square: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn default_name() -> String {
|
fn default_name() -> String {
|
||||||
|
@ -284,7 +284,7 @@ impl Default for Config {
|
||||||
banned_usernames: default_banned_usernames(),
|
banned_usernames: default_banned_usernames(),
|
||||||
policies: default_policies(),
|
policies: default_policies(),
|
||||||
turnstile: default_turnstile(),
|
turnstile: default_turnstile(),
|
||||||
town_square: String::new(),
|
town_square: 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ banned_usernames = [
|
||||||
"post",
|
"post",
|
||||||
"void",
|
"void",
|
||||||
]
|
]
|
||||||
town_square = "166340372315581657"
|
town_square = 166340372315581657
|
||||||
|
|
||||||
[security]
|
[security]
|
||||||
registration_enabled = true
|
registration_enabled = true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue