diff --git a/frontend/src/components/SessionDetail/SessionInfo.tsx b/frontend/src/components/SessionDetail/SessionInfo.tsx index e170e9487..c5856587a 100644 --- a/frontend/src/components/SessionDetail/SessionInfo.tsx +++ b/frontend/src/components/SessionDetail/SessionInfo.tsx @@ -3,10 +3,11 @@ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial // Please see LICENSE files in the repository root for full details. +import IconAdmin from "@vector-im/compound-design-tokens/assets/web/icons/admin"; import IconChat from "@vector-im/compound-design-tokens/assets/web/icons/chat"; import IconComputer from "@vector-im/compound-design-tokens/assets/web/icons/computer"; -import IconErrorSolid from "@vector-im/compound-design-tokens/assets/web/icons/error-solid"; import IconInfo from "@vector-im/compound-design-tokens/assets/web/icons/info"; +import IconRoom from "@vector-im/compound-design-tokens/assets/web/icons/room"; import IconSend from "@vector-im/compound-design-tokens/assets/web/icons/send"; import IconUserProfile from "@vector-im/compound-design-tokens/assets/web/icons/user-profile"; import { @@ -68,7 +69,7 @@ export const ScopeSendMessages: React.FC = () => { const ScopeSynapseAdmin: React.FC = () => { const { t } = useTranslation(); return ( - + {t("mas.scope.synapse_admin")} ); @@ -77,7 +78,7 @@ const ScopeSynapseAdmin: React.FC = () => { const ScopeMasAdmin: React.FC = () => { const { t } = useTranslation(); return ( - + {t("mas.scope.mas_admin")} ); diff --git a/frontend/src/templates.css b/frontend/src/templates.css index 9d332a4ed..4b45363d1 100644 --- a/frontend/src/templates.css +++ b/frontend/src/templates.css @@ -117,6 +117,17 @@ width: var(--cpd-space-6x); color: var(--cpd-color-icon-quaternary); } + + &.dangerous { + border: 1px solid var(--cpd-color-border-critical-subtle); + background-color: var(--cpd-color-bg-critical-subtle); + font: var(--cpd-font-body-md-medium); + color: var(--cpd-color-text-critical-primary); + + & > svg { + color: var(--cpd-color-icon-critical-primary); + } + } } } } diff --git a/templates/components/scope.html b/templates/components/scope.html index fbe68d70e..96b5119cb 100644 --- a/templates/components/scope.html +++ b/templates/components/scope.html @@ -18,9 +18,9 @@ Please see LICENSE files in the repository root for full details.
  • {{ icon.chat() }}

    {{ _("mas.scope.view_messages") }}

  • {{ icon.send() }}

    {{ _("mas.scope.send_messages") }}

  • {% elif scope == "urn:synapse:admin:*" %} -
  • {{ icon.error_solid() }}

    {{ _("mas.scope.synapse_admin") }}

  • +
  • {{ icon.room() }}

    {{ _("mas.scope.synapse_admin") }}

  • {% elif scope == "urn:mas:admin" %} -
  • {{ icon.error_solid() }}

    {{ _("mas.scope.mas_admin") }}

  • +
  • {{ icon.admin() }}

    {{ _("mas.scope.mas_admin") }}

  • {% elif scope is startingwith("urn:matrix:client:device:") or scope is startingwith("urn:matrix:org.matrix.msc2967.client:device:") %} {# We hide this scope #} {% else %} diff --git a/translations/en.json b/translations/en.json index 8e800b0e1..5881171fb 100644 --- a/translations/en.json +++ b/translations/en.json @@ -666,7 +666,7 @@ }, "mas_admin": "Administer any user on the matrix-authentication-service", "@mas_admin": { - "context": "components/scope.html:23:42-66", + "context": "components/scope.html:23:54-78", "description": "Displayed when the 'urn:mas:admin' scope is requested" }, "send_messages": "Send new messages on your behalf", @@ -675,7 +675,7 @@ }, "synapse_admin": "Administer the Synapse homeserver", "@synapse_admin": { - "context": "components/scope.html:21:42-70", + "context": "components/scope.html:21:53-81", "description": "Displayed when the 'urn:synapse:admin:*' scope is requested" }, "view_messages": "View your existing messages and data",