From aa96ada2875ef12202eba8fe65e1a426e33a8339 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 10 Aug 2023 13:45:32 +0200 Subject: [PATCH] fix(bots): Minor adjustments to the bots admin setting Signed-off-by: Joas Schilling --- src/components/AdminSettings/BotsSettings.vue | 36 ++++++++++++------- src/views/AdminSettings.vue | 2 +- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/components/AdminSettings/BotsSettings.vue b/src/components/AdminSettings/BotsSettings.vue index 1f13178076f..3cd7926eaa7 100644 --- a/src/components/AdminSettings/BotsSettings.vue +++ b/src/components/AdminSettings/BotsSettings.vue @@ -24,9 +24,8 @@

{{ t('spreed', 'Bots settings') }}

-

- {{ botsSettingsDescription }} -

+ +

  • @@ -85,6 +84,13 @@
+ + + {{ t('spreed', 'Find more bots') }} ↗ +
@@ -120,9 +126,15 @@ export default { computed: { botsSettingsDescription() { - return this.bots.length - ? t('spreed', 'The following bots can be enabled. Reach out to your administration to get more bots installed on this server.') - : t('spreed', 'No bots are installed on this server. Reach out to your administration to get bots installed on this server.') + let description = t('spreed', 'The following bots are installed on this server. In the documentation you can find details how to {linkstart1}build your own bot{linkend} or a {linkstart2}list of bots{linkend} to enable on your server.') + if (!this.bots.length) { + description = t('spreed', 'No bots are installed on this server. In the documentation you can find details how to {linkstart1}build your own bot{linkend} or a {linkstart2}list of bots{linkend} to enable on your server.') + } + + return description + .replace('{linkstart1}', '') + .replace('{linkstart2}', '') + .replaceAll('{linkend}', ' ↗') }, botsExtended() { @@ -150,12 +162,12 @@ export default { getStateIcon(state) { switch (state) { case BOT.STATE.NO_SETUP: - return { state_icon_component: Lock, state_icon_label: t('spreed', 'Locked for moderators'), state_icon_color: 'var(--color-placeholder-dark)' } + return { state_icon_component: Lock, state_icon_label: t('spreed', 'Locked for moderators'), state_icon_color: 'var(--color-warning)' } case BOT.STATE.ENABLED: return { state_icon_component: Check, state_icon_label: t('spreed', 'Enabled'), state_icon_color: 'var(--color-success)' } case BOT.STATE.DISABLED: default: - return { state_icon_component: Cancel, state_icon_label: t('spreed', 'Disabled'), state_icon_color: 'var(--color-placeholder-dark)' } + return { state_icon_component: Cancel, state_icon_label: t('spreed', 'Disabled'), state_icon_color: 'var(--color-error)' } } }, }, @@ -163,10 +175,6 @@ export default { diff --git a/src/views/AdminSettings.vue b/src/views/AdminSettings.vue index 6991d79f0bc..199fc0b6824 100644 --- a/src/views/AdminSettings.vue +++ b/src/views/AdminSettings.vue @@ -25,8 +25,8 @@ - +