diff --git a/src/Schuly.API/Extensions/AuthenticationExtensions.cs b/src/Schuly.API/Extensions/AuthenticationExtensions.cs index cfdd02b5..c0101cec 100644 --- a/src/Schuly.API/Extensions/AuthenticationExtensions.cs +++ b/src/Schuly.API/Extensions/AuthenticationExtensions.cs @@ -62,7 +62,7 @@ public static WebApplication MapSchulyAuthEndpoints(this WebApplication app) ? uri.Host.ToLowerInvariant() switch { "accounts.google.com" => "/sso-icons/google.png", - "login.microsoftonline.com" or "login.live.com" => "/sso-icons/microsoft.png", + "login.microsoftonline.com" or "login.live.com" => "/sso-icons/microsoft.svg", _ => null, } : null; diff --git a/src/Schuly.Frontend/public/i18n/de.json b/src/Schuly.Frontend/public/i18n/de.json index d165e306..819c19d8 100644 --- a/src/Schuly.Frontend/public/i18n/de.json +++ b/src/Schuly.Frontend/public/i18n/de.json @@ -276,7 +276,8 @@ "privacy": "Datenschutz", "terms": "Nutzungsbedingungen", "imprint": "Impressum", - "contact": "Kontakt" + "contact": "Kontakt", + "trademarks": "Microsoft 365, Microsoft Outlook, Microsoft Teams, Microsoft OneDrive und Microsoft OneNote sind Marken der Microsoft Corporation. Schulnetz ist eine Marke der Centerboard AG. Schuly ist ein unabhängiges Projekt und steht in keiner Verbindung zu Microsoft oder Centerboard." }, "confirm": { "checkEmail": "Schau in deine E-Mails, um deine Adresse zu bestätigen.", @@ -326,7 +327,8 @@ "codeHint": "Gib den 6-stelligen Code aus deiner Authentifizierungs-App ein.", "mismatch": "Das stimmt nicht. Prüf Benutzername und Passwort.", "recoveryFailed": "Dieser Wiederherstellungscode hat nicht funktioniert.", - "codeFailed": "Dieser Code hat nicht funktioniert. Warte auf den nächsten Code in deiner App und gib diesen ein." + "codeFailed": "Dieser Code hat nicht funktioniert. Warte auf den nächsten Code in deiner App und gib diesen ein.", + "signInWithMicrosoft": "Mit Microsoft anmelden" }, "password": "Passwort", "confirmEmail": "E-Mail bestätigen", @@ -637,7 +639,7 @@ "shared": "Hier erscheinen Dateien, die andere mit dir teilen.", "recent": "Hier erscheinen Dateien, die du zuletzt verwendet hast.", "team": "Hier erscheinen die Dateien dieses Teams.", - "drive": "Hier erscheinen Dateien und Ordner aus OneDrive." + "drive": "Hier erscheinen Dateien und Ordner aus Microsoft OneDrive." }, "column": { "name": "Name", @@ -746,7 +748,7 @@ "moveToFolder": "In Ordner verschieben", "attachments": "Anhänge", "noPreview": "Keine Vorschau verfügbar.", - "openOutlook": "In Outlook öffnen", + "openOutlook": "In Microsoft Outlook öffnen", "previewOnlyServer": "Dieser Server kann noch keine ganzen Nachrichten anzeigen. Es wird eine Vorschau gezeigt.", "previewOnlyFailed": "Die ganze Nachricht konnte nicht geladen werden. Es wird eine Vorschau gezeigt.", "unavailable": "Auf diesem Server noch nicht verfügbar.", @@ -941,13 +943,13 @@ "schoolAccounts": "Schulkonten", "schoolAccountsHint": "Welche Schulen und Klassen verbunden sind.", "mail": "Mail", - "mailHint": "Mails lesen. Schreiben sendet, beantwortet, leitet weiter, verschiebt, markiert und setzt auf gelesen.", + "mailHint": "Mails in Microsoft Outlook lesen. Schreiben sendet, beantwortet, leitet weiter, verschiebt, markiert und setzt auf gelesen.", "teams": "Teams", - "teamsHint": "Chats lesen. Schreiben sendet auch Chatnachrichten.", + "teamsHint": "Chats in Microsoft Teams lesen. Schreiben sendet auch Chatnachrichten.", "drive": "Drive", - "driveHint": "Deine OneDrive-Dateien durchsuchen.", + "driveHint": "Deine Dateien in Microsoft OneDrive durchsuchen.", "onenote": "OneNote", - "onenoteHint": "Deine OneNote-Notizbücher lesen und bearbeiten." + "onenoteHint": "Deine Notizbücher in Microsoft OneNote lesen und bearbeiten." }, "level": { "off": "Aus", @@ -1144,7 +1146,7 @@ "pageTitle": "Seitentitel", "readOnly": "Schreibgeschützt", "saving": "Wird gespeichert", - "openOneNote": "In OneNote öffnen", + "openOneNote": "In Microsoft OneNote öffnen", "download": "(herunterladen)", "box": "Feld {{number}}, schreibgeschützt", "inkBox": "Dieses Feld enthält Bilder oder Freihand und bleibt, wie es ist", @@ -1183,7 +1185,7 @@ "loadingSections": "Abschnitte werden geladen", "noSections": "Keine Abschnitte", "noNotebooks": "Keine Notizbücher", - "noNotebooksHint": "Hier erscheinen deine OneNote-Notizbücher.", + "noNotebooksHint": "Hier erscheinen deine Notizbücher aus Microsoft OneNote.", "teamNotebook": "Team-Notizbuch", "signInExpired": "Anmeldung abgelaufen.", "notebookMissing": "Notizbuch nicht gefunden.", diff --git a/src/Schuly.Frontend/public/i18n/en.json b/src/Schuly.Frontend/public/i18n/en.json index 3b93a80e..95d4378e 100644 --- a/src/Schuly.Frontend/public/i18n/en.json +++ b/src/Schuly.Frontend/public/i18n/en.json @@ -276,7 +276,8 @@ "privacy": "Privacy", "terms": "Terms", "imprint": "Imprint", - "contact": "Contact" + "contact": "Contact", + "trademarks": "Microsoft 365, Microsoft Outlook, Microsoft Teams, Microsoft OneDrive and Microsoft OneNote are trademarks of Microsoft Corporation. Schulnetz is a trademark of Centerboard AG. Schuly is an independent project and is not affiliated with Microsoft or Centerboard." }, "confirm": { "checkEmail": "Check your email to confirm your address.", @@ -326,7 +327,8 @@ "codeHint": "Enter the 6-digit code from your authenticator app.", "mismatch": "That didn't match. Check your username and password.", "recoveryFailed": "That recovery code didn't work.", - "codeFailed": "That code didn't work. Wait for the next code in your app and enter that one." + "codeFailed": "That code didn't work. Wait for the next code in your app and enter that one.", + "signInWithMicrosoft": "Sign in with Microsoft" }, "password": "Password", "confirmEmail": "Confirm your email", @@ -637,7 +639,7 @@ "shared": "Files others shared with you appear here.", "recent": "Files you used lately appear here.", "team": "Files of this team appear here.", - "drive": "Files and folders from OneDrive appear here." + "drive": "Files and folders from Microsoft OneDrive appear here." }, "column": { "name": "Name", @@ -746,7 +748,7 @@ "moveToFolder": "Move to folder", "attachments": "Attachments", "noPreview": "No preview available.", - "openOutlook": "Open in Outlook", + "openOutlook": "Open in Microsoft Outlook", "previewOnlyServer": "This server cannot show full messages yet. Showing a preview.", "previewOnlyFailed": "The full message could not be loaded. Showing a preview.", "unavailable": "Not available on this server yet.", @@ -941,13 +943,13 @@ "schoolAccounts": "School accounts", "schoolAccountsHint": "Which schools and classes are connected.", "mail": "Mail", - "mailHint": "Read mail. Write also sends, replies, forwards, moves, flags and marks as read.", + "mailHint": "Read mail in Microsoft Outlook. Write also sends, replies, forwards, moves, flags and marks as read.", "teams": "Teams", - "teamsHint": "Read chats. Write also sends chat messages.", + "teamsHint": "Read chats in Microsoft Teams. Write also sends chat messages.", "drive": "Drive", - "driveHint": "Browse your OneDrive files.", + "driveHint": "Browse your files in Microsoft OneDrive.", "onenote": "OneNote", - "onenoteHint": "Read and edit your OneNote notebooks." + "onenoteHint": "Read and edit your notebooks in Microsoft OneNote." }, "level": { "off": "Off", @@ -1144,7 +1146,7 @@ "pageTitle": "Page title", "readOnly": "Read only", "saving": "Saving", - "openOneNote": "Open in OneNote", + "openOneNote": "Open in Microsoft OneNote", "download": "(download)", "box": "Box {{number}}, read only", "inkBox": "This box holds pictures or ink and stays as it is", @@ -1183,7 +1185,7 @@ "loadingSections": "Loading sections", "noSections": "No sections", "noNotebooks": "No notebooks", - "noNotebooksHint": "Your OneNote notebooks appear here.", + "noNotebooksHint": "Your notebooks from Microsoft OneNote appear here.", "teamNotebook": "Team notebook", "signInExpired": "Sign-in expired.", "notebookMissing": "Notebook not found.", diff --git a/src/Schuly.Frontend/public/i18n/fr.json b/src/Schuly.Frontend/public/i18n/fr.json index 50e2a355..c4c7eeea 100644 --- a/src/Schuly.Frontend/public/i18n/fr.json +++ b/src/Schuly.Frontend/public/i18n/fr.json @@ -276,7 +276,8 @@ "privacy": "Confidentialité", "terms": "Conditions d'utilisation", "imprint": "Impressum", - "contact": "Contact" + "contact": "Contact", + "trademarks": "Microsoft 365, Microsoft Outlook, Microsoft Teams, Microsoft OneDrive et Microsoft OneNote sont des marques de Microsoft Corporation. Schulnetz est une marque de Centerboard AG. Schuly est un projet indépendant et n'a aucun lien avec Microsoft ou Centerboard." }, "confirm": { "checkEmail": "Consulte tes e-mails pour confirmer ton adresse.", @@ -326,7 +327,8 @@ "codeHint": "Saisis le code à 6 chiffres de ton app d'authentification.", "mismatch": "Cela ne correspond pas. Vérifie ton nom d'utilisateur et ton mot de passe.", "recoveryFailed": "Ce code de récupération n'a pas marché.", - "codeFailed": "Ce code n'a pas marché. Attends le prochain code dans ton app et saisis-le." + "codeFailed": "Ce code n'a pas marché. Attends le prochain code dans ton app et saisis-le.", + "signInWithMicrosoft": "Se connecter avec Microsoft" }, "password": "Mot de passe", "confirmEmail": "Confirme ton e-mail", @@ -637,7 +639,7 @@ "shared": "Les fichiers que d'autres partagent avec toi apparaissent ici.", "recent": "Les fichiers utilisés récemment apparaissent ici.", "team": "Les fichiers de cette équipe apparaissent ici.", - "drive": "Les fichiers et dossiers de OneDrive apparaissent ici." + "drive": "Les fichiers et dossiers de Microsoft OneDrive apparaissent ici." }, "column": { "name": "Nom", @@ -746,7 +748,7 @@ "moveToFolder": "Déplacer vers un dossier", "attachments": "Pièces jointes", "noPreview": "Aucun aperçu disponible.", - "openOutlook": "Ouvrir dans Outlook", + "openOutlook": "Ouvrir dans Microsoft Outlook", "previewOnlyServer": "Ce serveur ne peut pas encore afficher les messages complets. Voici un aperçu.", "previewOnlyFailed": "Le message complet n'a pas pu être chargé. Voici un aperçu.", "unavailable": "Pas encore disponible sur ce serveur.", @@ -941,13 +943,13 @@ "schoolAccounts": "Comptes scolaires", "schoolAccountsHint": "Quelles écoles et classes sont connectées.", "mail": "E-mail", - "mailHint": "Lire les e-mails. L'écriture envoie, répond, transfère, déplace, marque et indique comme lu.", + "mailHint": "Lire les e-mails dans Microsoft Outlook. L'écriture envoie, répond, transfère, déplace, marque et indique comme lu.", "teams": "Teams", - "teamsHint": "Lire les chats. L'écriture envoie aussi des messages.", + "teamsHint": "Lire les chats dans Microsoft Teams. L'écriture envoie aussi des messages.", "drive": "Drive", - "driveHint": "Parcourir tes fichiers OneDrive.", + "driveHint": "Parcourir tes fichiers dans Microsoft OneDrive.", "onenote": "OneNote", - "onenoteHint": "Lire et modifier tes blocs-notes OneNote." + "onenoteHint": "Lire et modifier tes blocs-notes dans Microsoft OneNote." }, "level": { "off": "Désactivé", @@ -1144,7 +1146,7 @@ "pageTitle": "Titre de la page", "readOnly": "Lecture seule", "saving": "Enregistrement", - "openOneNote": "Ouvrir dans OneNote", + "openOneNote": "Ouvrir dans Microsoft OneNote", "download": "(télécharger)", "box": "Zone {{number}}, lecture seule", "inkBox": "Cette zone contient des images ou de l'encre et reste telle quelle", @@ -1183,7 +1185,7 @@ "loadingSections": "Chargement des sections", "noSections": "Aucune section", "noNotebooks": "Aucun bloc-notes", - "noNotebooksHint": "Tes blocs-notes OneNote apparaissent ici.", + "noNotebooksHint": "Tes blocs-notes de Microsoft OneNote apparaissent ici.", "teamNotebook": "Bloc-notes d'équipe", "signInExpired": "Connexion expirée.", "notebookMissing": "Bloc-notes introuvable.", diff --git a/src/Schuly.Frontend/public/i18n/it.json b/src/Schuly.Frontend/public/i18n/it.json index 6fe0d373..dcce083a 100644 --- a/src/Schuly.Frontend/public/i18n/it.json +++ b/src/Schuly.Frontend/public/i18n/it.json @@ -276,7 +276,8 @@ "privacy": "Privacy", "terms": "Condizioni d'uso", "imprint": "Impressum", - "contact": "Contatto" + "contact": "Contatto", + "trademarks": "Microsoft 365, Microsoft Outlook, Microsoft Teams, Microsoft OneDrive e Microsoft OneNote sono marchi di Microsoft Corporation. Schulnetz è un marchio di Centerboard AG. Schuly è un progetto indipendente e non ha alcun legame con Microsoft o Centerboard." }, "confirm": { "checkEmail": "Controlla le tue e-mail per confermare l'indirizzo.", @@ -326,7 +327,8 @@ "codeHint": "Inserisci il codice di 6 cifre dell'app di autenticazione.", "mismatch": "Non corrisponde. Controlla nome utente e password.", "recoveryFailed": "Questo codice di recupero non ha funzionato.", - "codeFailed": "Questo codice non ha funzionato. Aspetta il prossimo codice nell'app e inseriscilo." + "codeFailed": "Questo codice non ha funzionato. Aspetta il prossimo codice nell'app e inseriscilo.", + "signInWithMicrosoft": "Accedi con Microsoft" }, "password": "Password", "confirmEmail": "Conferma la tua e-mail", @@ -637,7 +639,7 @@ "shared": "Qui compaiono i file che altri condividono con te.", "recent": "Qui compaiono i file usati di recente.", "team": "Qui compaiono i file di questo team.", - "drive": "Qui compaiono file e cartelle di OneDrive." + "drive": "Qui compaiono file e cartelle di Microsoft OneDrive." }, "column": { "name": "Nome", @@ -746,7 +748,7 @@ "moveToFolder": "Sposta nella cartella", "attachments": "Allegati", "noPreview": "Nessuna anteprima disponibile.", - "openOutlook": "Apri in Outlook", + "openOutlook": "Apri in Microsoft Outlook", "previewOnlyServer": "Questo server non può ancora mostrare i messaggi completi. Ecco un'anteprima.", "previewOnlyFailed": "Impossibile caricare il messaggio completo. Ecco un'anteprima.", "unavailable": "Non ancora disponibile su questo server.", @@ -941,13 +943,13 @@ "schoolAccounts": "Account scolastici", "schoolAccountsHint": "Quali scuole e classi sono collegate.", "mail": "E-mail", - "mailHint": "Leggere la posta. Scrivere invia, risponde, inoltra, sposta, contrassegna e segna come letto.", + "mailHint": "Leggere la posta in Microsoft Outlook. Scrivere invia, risponde, inoltra, sposta, contrassegna e segna come letto.", "teams": "Teams", - "teamsHint": "Leggere le chat. Scrivere invia anche messaggi.", + "teamsHint": "Leggere le chat in Microsoft Teams. Scrivere invia anche messaggi.", "drive": "Drive", - "driveHint": "Sfogliare i tuoi file OneDrive.", + "driveHint": "Sfogliare i tuoi file in Microsoft OneDrive.", "onenote": "OneNote", - "onenoteHint": "Leggere e modificare i tuoi blocchi appunti OneNote." + "onenoteHint": "Leggere e modificare i tuoi blocchi appunti in Microsoft OneNote." }, "level": { "off": "Disattivato", @@ -1144,7 +1146,7 @@ "pageTitle": "Titolo della pagina", "readOnly": "Sola lettura", "saving": "Salvataggio", - "openOneNote": "Apri in OneNote", + "openOneNote": "Apri in Microsoft OneNote", "download": "(scarica)", "box": "Riquadro {{number}}, sola lettura", "inkBox": "Questo riquadro contiene immagini o inchiostro e resta com'è", @@ -1183,7 +1185,7 @@ "loadingSections": "Caricamento delle sezioni", "noSections": "Nessuna sezione", "noNotebooks": "Nessun blocco appunti", - "noNotebooksHint": "Qui compaiono i tuoi blocchi appunti OneNote.", + "noNotebooksHint": "Qui compaiono i tuoi blocchi appunti di Microsoft OneNote.", "teamNotebook": "Blocco appunti del team", "signInExpired": "Accesso scaduto.", "notebookMissing": "Blocco appunti non trovato.", diff --git a/src/Schuly.Frontend/public/i18n/rm.json b/src/Schuly.Frontend/public/i18n/rm.json index 9d040867..abac2e51 100644 --- a/src/Schuly.Frontend/public/i18n/rm.json +++ b/src/Schuly.Frontend/public/i18n/rm.json @@ -276,7 +276,8 @@ "privacy": "Protecziun da datas", "terms": "Cundiziuns d'utilisaziun", "imprint": "Impressum", - "contact": "Contact" + "contact": "Contact", + "trademarks": "Microsoft 365, Microsoft Outlook, Microsoft Teams, Microsoft OneDrive e Microsoft OneNote èn marcas da la Microsoft Corporation. Schulnetz è ina marca da la Centerboard AG. Schuly è in project independent e n'ha nagina relaziun cun Microsoft u Centerboard." }, "confirm": { "checkEmail": "Guarda en tes e-mails per confermar tia adressa.", @@ -326,7 +327,8 @@ "codeHint": "Endatescha il code da 6 cifras da tia app d'autentificaziun.", "mismatch": "Quai na correspunda betg. Controllescha num d'utilisader e pled-clav.", "recoveryFailed": "Quest code da restabiliment n'ha betg funcziunà.", - "codeFailed": "Quest code n'ha betg funcziunà. Spetga sin il proxim code en tia app ed endatescha quel." + "codeFailed": "Quest code n'ha betg funcziunà. Spetga sin il proxim code en tia app ed endatescha quel.", + "signInWithMicrosoft": "S'annunziar cun Microsoft" }, "password": "Pled-clav", "confirmEmail": "Conferma tia adressa dad e-mail", @@ -637,7 +639,7 @@ "shared": "Qua cumparan datotecas che auters partan cun tai.", "recent": "Qua cumparan datotecas che ti has duvrà ultimamain.", "team": "Qua cumparan las datotecas da quest team.", - "drive": "Qua cumparan datotecas ed ordinaturs da OneDrive." + "drive": "Qua cumparan datotecas ed ordinaturs da Microsoft OneDrive." }, "column": { "name": "Num", @@ -746,7 +748,7 @@ "moveToFolder": "Spustar en in ordinatur", "attachments": "Agiuntas", "noPreview": "Nagina prevista disponibla.", - "openOutlook": "Avrir en Outlook", + "openOutlook": "Avrir en Microsoft Outlook", "previewOnlyServer": "Quest server na po anc betg mussar messadis entirs. Igl è ina prevista.", "previewOnlyFailed": "Betg pussaivel da chargiar l'entir messadi. Igl è ina prevista.", "unavailable": "Anc betg disponibel sin quest server.", @@ -941,13 +943,13 @@ "schoolAccounts": "Contos da scola", "schoolAccountsHint": "Tge scolas e classas èn colliadas.", "mail": "E-mail", - "mailHint": "Leger e-mails. Scriver trametta, respunda, transmetta, spusta, marca e marca sco legì.", + "mailHint": "Leger e-mails en Microsoft Outlook. Scriver trametta, respunda, transmetta, spusta, marca e marca sco legì.", "teams": "Teams", - "teamsHint": "Leger chats. Scriver trametta er messadis.", + "teamsHint": "Leger chats en Microsoft Teams. Scriver trametta er messadis.", "drive": "Drive", - "driveHint": "Navigar en tias datotecas OneDrive.", + "driveHint": "Navigar en tias datotecas en Microsoft OneDrive.", "onenote": "OneNote", - "onenoteHint": "Leger e modifitgar tes cudeschs da notizias OneNote." + "onenoteHint": "Leger e modifitgar tes cudeschs da notizias en Microsoft OneNote." }, "level": { "off": "Deactivà", @@ -1144,7 +1146,7 @@ "pageTitle": "Titel da la pagina", "readOnly": "Mo per leger", "saving": "Vegn memorisà", - "openOneNote": "Avrir en OneNote", + "openOneNote": "Avrir en Microsoft OneNote", "download": "(telechargiar)", "box": "Champ {{number}}, mo per leger", "inkBox": "Quest champ cuntegna maletgs u tinta e resta sco ch'el è", @@ -1183,7 +1185,7 @@ "loadingSections": "Secziuns vegnan chargiadas", "noSections": "Naginas secziuns", "noNotebooks": "Nagins cudeschs da notizias", - "noNotebooksHint": "Qua cumparan tes cudeschs da notizias OneNote.", + "noNotebooksHint": "Qua cumparan tes cudeschs da notizias da Microsoft OneNote.", "teamNotebook": "Cudesch da notizias dal team", "signInExpired": "Annunzia scadida.", "notebookMissing": "Cudesch da notizias betg chattà.", diff --git a/src/Schuly.Frontend/public/sso-icons/microsoft.png b/src/Schuly.Frontend/public/sso-icons/microsoft.png deleted file mode 100644 index 0e21faa5..00000000 Binary files a/src/Schuly.Frontend/public/sso-icons/microsoft.png and /dev/null differ diff --git a/src/Schuly.Frontend/public/sso-icons/microsoft.svg b/src/Schuly.Frontend/public/sso-icons/microsoft.svg new file mode 100644 index 00000000..1f739764 --- /dev/null +++ b/src/Schuly.Frontend/public/sso-icons/microsoft.svg @@ -0,0 +1 @@ +MS-SymbolLockup \ No newline at end of file diff --git a/src/Schuly.Frontend/src/app/pages/auth/auth-layout.ts b/src/Schuly.Frontend/src/app/pages/auth/auth-layout.ts index 2c337c7b..e5a644d7 100644 --- a/src/Schuly.Frontend/src/app/pages/auth/auth-layout.ts +++ b/src/Schuly.Frontend/src/app/pages/auth/auth-layout.ts @@ -53,7 +53,7 @@ import { ThemeStore } from '../../stores/theme.store'; +

{{ 'auth.layout.trademarks' | translate }}

`, }) diff --git a/src/Schuly.Frontend/src/app/pages/auth/login.ts b/src/Schuly.Frontend/src/app/pages/auth/login.ts index 512e32c4..767cc45c 100644 --- a/src/Schuly.Frontend/src/app/pages/auth/login.ts +++ b/src/Schuly.Frontend/src/app/pages/auth/login.ts @@ -24,6 +24,7 @@ import { rememberReturnUrl, takeReturnUrl } from '../../core/return-url'; import { AuthStore, authErrorMessage } from '../../stores/auth.store'; import { AuthLayout } from './auth-layout'; import { ConfirmEmail, confirmEmailHint } from './confirm-email'; +import { MicrosoftSignInButton, isMicrosoftProvider } from './microsoft-sign-in-button'; const CODE_LENGTH = 6; @@ -47,6 +48,7 @@ const CODE_LENGTH = 6; HlmSpinner, AuthLayout, ConfirmEmail, + MicrosoftSignInButton, TranslatePipe, ], providers: [provideIcons({ lucideEye, lucideEyeOff })], @@ -129,19 +131,23 @@ const CODE_LENGTH = 6;
@for (provider of providers(); track provider.key) { - + @if (isMicrosoft(provider)) { + + } @else { + + } }
} @@ -239,6 +245,7 @@ export class Login implements OnInit { protected readonly rememberDevice = signal(false); protected readonly error = signal(null); protected readonly providers = signal([]); + protected readonly isMicrosoft = isMicrosoftProvider; protected readonly redirecting = signal(false); private readonly credentialsModel = signal({ identifier: '', password: '' }); diff --git a/src/Schuly.Frontend/src/app/pages/auth/microsoft-sign-in-button.ts b/src/Schuly.Frontend/src/app/pages/auth/microsoft-sign-in-button.ts new file mode 100644 index 00000000..0447c290 --- /dev/null +++ b/src/Schuly.Frontend/src/app/pages/auth/microsoft-sign-in-button.ts @@ -0,0 +1,67 @@ +import { Component, input, output } from '@angular/core'; +import { TranslatePipe } from '@ngx-translate/core'; + +/** + * The "Sign in with Microsoft" button as Microsoft's branding guidelines specify it + * (learn.microsoft.com/entra/identity-platform/howto-add-branding-in-apps): the official logo SVG at 21 px, + * 41 px high, 12 px padding and 12 px between logo and text, Segoe UI 15 px weight 600, square corners. + * Light: #FFFFFF with a 1 px #8C8C8C border and #5E5E5E text. Dark: #2F2F2F with #FFFFFF text. + */ +@Component({ + selector: 'app-microsoft-sign-in-button', + imports: [TranslatePipe], + template: ` + + `, + styles: ` + :host { + display: flex; + justify-content: center; + } + .ms-sign-in { + display: inline-flex; + align-items: center; + gap: 12px; + height: 41px; + padding: 0 12px; + border: 1px solid #8c8c8c; + border-radius: 0; + background: #ffffff; + color: #5e5e5e; + font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; + font-size: 15px; + font-weight: 600; + line-height: 1; + cursor: pointer; + } + .ms-sign-in img { + display: block; + width: 21px; + height: 21px; + } + :host-context(.dark) .ms-sign-in { + border-color: #2f2f2f; + background: #2f2f2f; + color: #ffffff; + } + .ms-sign-in:focus-visible { + outline: 2px solid var(--ring); + outline-offset: 2px; + } + .ms-sign-in:disabled { + cursor: default; + opacity: 0.6; + } + `, +}) +export class MicrosoftSignInButton { + readonly disabled = input(false); + readonly pressed = output(); +} + +/** Microsoft providers get the branded button; the server maps their authority to this icon. */ +export const isMicrosoftProvider = (provider: { key: string; icon_url?: string | null }): boolean => + provider.icon_url === '/sso-icons/microsoft.svg' || provider.key.toLowerCase() === 'microsoft'; diff --git a/src/Schuly.Frontend/src/app/pages/settings.ts b/src/Schuly.Frontend/src/app/pages/settings.ts index 6328070e..d65c1cdf 100644 --- a/src/Schuly.Frontend/src/app/pages/settings.ts +++ b/src/Schuly.Frontend/src/app/pages/settings.ts @@ -133,6 +133,8 @@ import { UserStore } from '../stores/user.store'; + +

{{ 'auth.layout.trademarks' | translate }}

`, })