diff --git a/src/components/common/issuer-icon.tsx b/src/components/common/issuer-icon.tsx index a981051..6ade139 100644 --- a/src/components/common/issuer-icon.tsx +++ b/src/components/common/issuer-icon.tsx @@ -1,4 +1,4 @@ -import { faGithub, faGoogle } from '@fortawesome/free-brands-svg-icons'; +import { faDiscord, faGithub, faGoogle } from '@fortawesome/free-brands-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import React from 'react'; import { Issuer } from '../../lib/api/api.model'; @@ -9,5 +9,6 @@ export function IssuerIcon({ issuer }: { issuer: Issuer }) { [Issuer.GITHUB]: (), [Issuer.GOOGLE]: (), [Issuer.COGNITO]: (), + [Issuer.DISCORD]: (), }[issuer]; } diff --git a/src/components/login/login.tsx b/src/components/login/login.tsx index c54c904..c2377ae 100644 --- a/src/components/login/login.tsx +++ b/src/components/login/login.tsx @@ -12,9 +12,10 @@ export default function Login() { const [previousIssuer] = usePreviousIssuer(); const [alert, loginSelection] = useMemo(() => { const buttonByIssuer = { - [Issuer.GITHUB]: (), + [Issuer.GITHUB]: (), [Issuer.GOOGLE]: (), [Issuer.COGNITO]: (), + [Issuer.DISCORD]: (), }; if (previousIssuer === null) { @@ -31,6 +32,7 @@ export default function Login() { {buttonByIssuer[Issuer.GITHUB]} {buttonByIssuer[Issuer.GOOGLE]} {buttonByIssuer[Issuer.COGNITO]} + {buttonByIssuer[Issuer.DISCORD]} ), ]; @@ -52,6 +54,7 @@ export default function Login() { {previousIssuer !== Issuer.GITHUB && buttonByIssuer[Issuer.GITHUB]} {previousIssuer !== Issuer.GOOGLE && buttonByIssuer[Issuer.GOOGLE]} {previousIssuer !== Issuer.COGNITO && buttonByIssuer[Issuer.COGNITO]} + {previousIssuer !== Issuer.DISCORD && buttonByIssuer[Issuer.DISCORD]} diff --git a/src/lib/api/api.model.ts b/src/lib/api/api.model.ts index 2cfbdbc..7e65730 100644 --- a/src/lib/api/api.model.ts +++ b/src/lib/api/api.model.ts @@ -24,6 +24,7 @@ export enum Issuer { GITHUB = 'github', GOOGLE = 'google', COGNITO = 'cognito', + DISCORD = 'discord', } export interface AuthInfo { diff --git a/src/lib/i18n/i18n_de.tsx b/src/lib/i18n/i18n_de.tsx index 115dc2d..b2ceb3b 100644 --- a/src/lib/i18n/i18n_de.tsx +++ b/src/lib/i18n/i18n_de.tsx @@ -13,6 +13,7 @@ const COMMON = { [Issuer.GITHUB]: 'GitHub', [Issuer.GOOGLE]: 'Google', [Issuer.COGNITO]: 'E-Mail & Passwort', + [Issuer.DISCORD]: 'Discord', })[issuer] ?? 'unbekannt', copyrightGw2: [ 'Diese Seite steht in keiner Verbindung zu ArenaNet, Guild Wars 2 oder einem ihrer Partner. Alle Urheberrechte sind den jeweiligen Eigentümern vorbehalten.', diff --git a/src/lib/i18n/i18n_en.tsx b/src/lib/i18n/i18n_en.tsx index 3df2bad..4964259 100644 --- a/src/lib/i18n/i18n_en.tsx +++ b/src/lib/i18n/i18n_en.tsx @@ -13,6 +13,7 @@ const COMMON = { [Issuer.GITHUB]: 'GitHub', [Issuer.GOOGLE]: 'Google', [Issuer.COGNITO]: 'E-Mail & Password', + [Issuer.DISCORD]: 'Discord', })[issuer] ?? 'unknown', copyrightGw2: [ 'This site is not affiliated with ArenaNet, Guild Wars 2, or any of their partners. All copyrights reserved to their respective owners.', diff --git a/src/pages/account/settings.tsx b/src/pages/account/settings.tsx index c4fcc81..4681734 100644 --- a/src/pages/account/settings.tsx +++ b/src/pages/account/settings.tsx @@ -11,13 +11,14 @@ import { SpaceBetween, StatusIndicator, } from '@cloudscape-design/components'; -import { faGithub, faGoogle } from '@fortawesome/free-brands-svg-icons'; +import { faDiscord, faGithub, faGoogle } from '@fortawesome/free-brands-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import React, { useEffect, useState } from 'react'; import { CustomTable } from '../../components/common/custom-table'; import { DeleteModal, DeleteModalProps } from '../../components/common/delete-modal'; import { Gw2AuthLogo } from '../../components/common/gw2auth-logo'; import { Hidden } from '../../components/common/hidden'; +import { IssuerIcon } from '../../components/common/issuer-icon'; import { catchNotify, useAppControls } from '../../components/util/context/app-controls'; import { useAuthInfo, useMustAuthInfo } from '../../components/util/context/auth-info'; import { useHttpClient } from '../../components/util/context/http-client'; @@ -343,6 +344,7 @@ function IssuerLabel({ issuer }: { issuer: Issuer }) { [Issuer.GITHUB]: , [Issuer.GOOGLE]: , [Issuer.COGNITO]: } />, + [Issuer.DISCORD]: , })[issuer] ?? ; return ( @@ -355,9 +357,10 @@ function AddLoginProviderModalContent() { return ( - - - + + + + ); } diff --git a/src/pages/privacy-policy.tsx b/src/pages/privacy-policy.tsx index 611ae47..1f0ddb1 100644 --- a/src/pages/privacy-policy.tsx +++ b/src/pages/privacy-policy.tsx @@ -158,7 +158,7 @@ export function PrivacyPolicy() { We use different login providers to offer our users a variety of options to create and login to their accounts. The privacy policies of our login providers can be viewed at: - + https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement @@ -170,6 +170,10 @@ export function PrivacyPolicy() { This login provider is managed by AWS (Amazon Web Services) solely for us. The privacy policy of AWS can be viewed at https://aws.amazon.com/privacy + + + https://discord.com/privacy +