Skip to content

Modular logistics and supply chain operating system (LSOS)

fix(oauth): provider logos at the left, Fleetbase borders, gray-900 in dark

Ronald A. Richardsonba9d6cc3f849
diff --git a/console/app/styles/console.css b/console/app/styles/console.css
index 2e9cb599..cd20ceda 100644
--- a/console/app/styles/console.css
+++ b/console/app/styles/console.css
@@ -246,79 +246,68 @@ body[data-theme='dark'] .console-dashboard-title h1 {
/*
- * Sign-in provider buttons, branded as each provider's guidelines ask, on Fleetbase's
- * own button shape, size and shadow (the .btn-wrapper is left alone).
+ * Sign-in provider buttons: each provider's logo and light-mode colours on Fleetbase's
+ * own button shape, size, shadow and icon position.
*
- * Google developers.google.com/identity/branding-guidelines
- * light #FFFFFF / stroke #747775 / text #1F1F1F
- * dark #131314 / stroke #8E918F / text #E3E3E3
- * The full-colour "G" must sit on white, so on dark it gets a white disc.
- * Microsoft learn.microsoft.com/entra/identity-platform/howto-add-branding-in-apps
- * light #FFFFFF / stroke #8C8C8C / text #5E5E5E; dark #2F2F2F / text #FFFFFF
- * Apple Human Interface Guidelines: black on light backgrounds, white on dark.
- * GitHub The mark is only ever black or white: same treatment as Apple.
+ * Light Google and Microsoft: white with Fleetbase's usual button border, the
+ * full-colour logo (Google forbids a single-colour "G"; Microsoft forbids
+ * altering its logo). Apple: black (Apple HIG). GitHub: #24292F — its mark
+ * is only ever shown in black or white.
+ * Dark Every provider on Fleetbase's gray-900, so the page reads as one set of
+ * buttons. Apple and GitHub marks turn white with the text; the Google "G"
+ * keeps a white disc, since Google requires it on white.
*
* Only these providers are listed, so one added later keeps the default button.
- * `body` in each selector outranks ember-ui's `body[data-theme='dark'] .btn.btn-default`.
+ * `body` in each selector outranks ember-ui's `body[data-theme='dark'] .btn.btn-default`
+ * rules, hover included.
*/
-.oauth-provider-google {
- --oauth-bg: #ffffff;
- --oauth-bg-hover: #f8f9fa;
- --oauth-border: #747775;
- --oauth-text: #1f1f1f;
-}
+.oauth-provider-google,
.oauth-provider-microsoft {
--oauth-bg: #ffffff;
- --oauth-bg-hover: #f3f3f3;
- --oauth-border: #8c8c8c;
- --oauth-text: #5e5e5e;
+ --oauth-bg-hover: #f3f4f6; /* gray-100 */
+ --oauth-border: #d1d5db; /* gray-300, Fleetbase's default button border */
+ --oauth-border-hover: #9ca3af; /* gray-400 */
+ --oauth-text: #1f2937; /* gray-800 */
}
-.oauth-provider-apple,
-.oauth-provider-github {
+.oauth-provider-apple {
--oauth-bg: #000000;
- --oauth-bg-hover: #1f1f1f;
+ --oauth-bg-hover: #262626;
--oauth-border: #000000;
+ --oauth-border-hover: #262626;
--oauth-text: #ffffff;
}
.oauth-provider-github {
--oauth-bg: #24292f;
- --oauth-bg-hover: #32383f;
+ --oauth-bg-hover: #3a4149;
--oauth-border: #24292f;
-}
-body[data-theme='dark'] .oauth-provider-google {
- --oauth-bg: #131314;
- --oauth-bg-hover: #1f1f20;
- --oauth-border: #8e918f;
- --oauth-text: #e3e3e3;
-}
-body[data-theme='dark'] .oauth-provider-microsoft {
- --oauth-bg: #2f2f2f;
- --oauth-bg-hover: #3a3a3a;
- --oauth-border: #2f2f2f;
+ --oauth-border-hover: #3a4149;
--oauth-text: #ffffff;
}
-body[data-theme='dark'] .oauth-provider-apple,
-body[data-theme='dark'] .oauth-provider-github {
- --oauth-bg: #ffffff;
- --oauth-bg-hover: #f2f2f2;
- --oauth-border: #ffffff;
- --oauth-text: #000000;
+body[data-theme='dark'] :is(.oauth-provider-google, .oauth-provider-microsoft, .oauth-provider-apple, .oauth-provider-github) {
+ --oauth-bg: #111827; /* gray-900 */
+ --oauth-bg-hover: #1f2937; /* gray-800 */
+ --oauth-border: #374151; /* gray-700 */
+ --oauth-border-hover: #4b5563; /* gray-600 */
+ --oauth-text: #f3f4f6; /* gray-100 */
}
body :is(.oauth-provider-google, .oauth-provider-microsoft, .oauth-provider-apple, .oauth-provider-github) > button.btn.btn-default {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- gap: 0.625rem;
background-color: var(--oauth-bg);
border: 1px solid var(--oauth-border);
color: var(--oauth-text);
+ transition:
+ background-color 150ms ease,
+ border-color 150ms ease;
}
-body :is(.oauth-provider-google, .oauth-provider-microsoft, .oauth-provider-apple, .oauth-provider-github) > button.btn.btn-default:hover:not(:disabled),
-body :is(.oauth-provider-google, .oauth-provider-microsoft, .oauth-provider-apple, .oauth-provider-github) > button.btn.btn-default:focus {
+body :is(.oauth-provider-google, .oauth-provider-microsoft, .oauth-provider-apple, .oauth-provider-github) > button.btn.btn-default:hover:not(:disabled) {
background-color: var(--oauth-bg-hover);
- border-color: var(--oauth-border);
+ border-color: var(--oauth-border-hover);
+ color: var(--oauth-text);
+}
+
+body :is(.oauth-provider-google, .oauth-provider-microsoft, .oauth-provider-apple, .oauth-provider-github) > button.btn.btn-default:focus {
+ border-color: var(--oauth-border-hover);
color: var(--oauth-text);
}
@@ -326,13 +315,12 @@ body :is(.oauth-provider-google, .oauth-provider-microsoft, .oauth-provider-appl
display: inline-flex;
align-items: center;
justify-content: center;
- flex-shrink: 0;
line-height: 1;
}
-.oauth-provider-logo svg.svg-inline--fa {
- width: 18px;
- height: 18px;
+.oauth-provider-logo svg {
+ width: 16px;
+ height: 16px;
}
body[data-theme='dark'] .oauth-provider-google .oauth-provider-logo-google {
@@ -340,3 +328,8 @@ body[data-theme='dark'] .oauth-provider-google .oauth-provider-logo-google {
border-radius: 9999px;
padding: 2px;
}
+
+body[data-theme='dark'] .oauth-provider-google .oauth-provider-logo-google svg {
+ width: 14px;
+ height: 14px;
+}
diff --git a/console/app/templates/auth/login.hbs b/console/app/templates/auth/login.hbs
index ce422be3..dc272781 100644
--- a/console/app/templates/auth/login.hbs
+++ b/console/app/templates/auth/login.hbs
@@ -110,7 +110,10 @@
@onClick={{fn this.continueWithProvider provider}}
data-test-oauth-provider={{provider.id}}
>
- <Auth::OauthProviderLogo @provider={{provider.id}} @icon={{provider.icon}} />
+ {{!-- In Fleetbase's icon slot, so the logo sits at the far left like other buttons. --}}
+ <span class="btn-icon-wrapper">
+ <Auth::OauthProviderLogo @provider={{provider.id}} @icon={{provider.icon}} />
+ </span>
<span>{{t "auth.login.oauth.continue-with" provider=provider.label}}</span>
</Button>
{{/each}}