diff --git a/settings.yaml b/settings.yaml index b11607c..eb637ee 100644 --- a/settings.yaml +++ b/settings.yaml @@ -3,13 +3,20 @@ guilds: - id: 814700630958276649 channel: 819038172927098910 hidden: true + invite: 6VcStPqaP8 # Feel free to join ;) # English-Japanese Language Exchange - id: 189571157446492161 channel: 352299136307036160 recommended: true + invite: japanese # 日本語と英語 - JP & EN - id: 116379774825267202 channel: 346809059376234497 + invite: 2Tf75M9 # Yudai La Piñata - id: 582147335476346880 - channel: 839852933377425488 \ No newline at end of file + channel: 839852933377425488 + invite: 5e5je2PXeq + # Nohongo 無本語 + - id: 893457600719515719 + channel: 905589521264042004 \ No newline at end of file diff --git a/src/models/settings.rs b/src/models/settings.rs index 3eb42c9..a34ea9a 100644 --- a/src/models/settings.rs +++ b/src/models/settings.rs @@ -39,6 +39,7 @@ pub struct Guild { #[serde(default)] pub recommended: bool, pub channel: u64, + pub invite: Option, // None case means guild is not yet loaded #[serde(default)] pub icon: Option>, diff --git a/styles/sass/style.scss b/styles/sass/style.scss index 10608e2..0048a83 100644 --- a/styles/sass/style.scss +++ b/styles/sass/style.scss @@ -125,6 +125,10 @@ a { .servers { display: flex; gap: 0.5em; + & > :not(.recommended) { + // To match the missing recommended label + padding-bottom: 1em; + } & > * { display: flex; flex-direction: column; @@ -145,6 +149,15 @@ a { flex-grow: 1; align-items: center; } + a { + background: seagreen; + color: white; + font-weight: bold; + border: none; + outline: none; + padding: 0.25em 0.5em 0.25em 0.5em; + border-radius: 2px; + } } .recommended { border-color: mediumseagreen; diff --git a/templates/modal.html.tera b/templates/modal.html.tera index 2a66e78..29aeaa5 100644 --- a/templates/modal.html.tera +++ b/templates/modal.html.tera @@ -4,10 +4,11 @@

Join a participating server

{% for guild in settings.guilds %} - {% if guild.hidden %}{% continue %}{% endif %} + {% if guild.hidden or not guild.invite %}{% continue %}{% endif %} Server icon
{{ guild.name }}
+ Join {% if guild.recommended %}
Recommended