fix(app): show the official badge and a visible account menu (#3265)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-08 03:03:05 +02:00
1 parent ee1c861eb2
commit 4b88d64b2d
3 files changed
+39 -10

No files matched your search

@@ -231,16 +231,17 @@
justify-content: center;
box-sizing: border-box;
padding: 0;
border: 0;
border: 0.0625rem solid color-mix(in srgb, var(--account-profile-name-color) 45%, transparent);
border-radius: 50%;
background: color-mix(in srgb, var(--account-profile-name-color) 14%, transparent);
color: color-mix(in srgb, var(--account-profile-name-color) 78%, transparent);
background: var(--background-tertiary);
color: var(--text-primary);
box-shadow: 0 0.125rem 0.5rem rgb(0 0 0 / 0.28);
cursor: pointer;
outline: none;
pointer-events: auto;
transition:
background-color 40ms ease,
color 40ms ease;
border-color 40ms ease;
}
.moreButton:disabled {
@@ -250,8 +251,8 @@
:global(:where(html.window-focused, html.unfocused-fully-interactive):not(.window-focus-activation-guard))
.moreButton:not(:disabled):hover {
background: color-mix(in srgb, var(--account-profile-name-color) 26%, transparent);
color: var(--account-profile-name-color);
border-color: color-mix(in srgb, var(--account-profile-name-color) 70%, transparent);
background: color-mix(in srgb, var(--text-primary) 14%, var(--background-tertiary));
}
.nameText {
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import {resolveInstanceLabel} from '@app/features/auth/flow/instance_selector/InstanceDirectoryStorage';
import {isOfficialInstanceHost} from '@fluxer/instance_bootstrap/src/OfficialInstance';
import {describe, expect, test} from 'vitest';
describe('resolveInstanceLabel', () => {
@@ -23,3 +24,18 @@ describe('resolveInstanceLabel', () => {
expect(resolveInstanceLabel(null, 'fluxer.app')).toBe('Fluxer');
});
});
describe('isOfficialInstanceHost', () => {
test('an official API endpoint with a path is official', () => {
expect(isOfficialInstanceHost('https://web.canary.fluxer.app/api')).toBe(true);
expect(isOfficialInstanceHost('https://canary.fluxer.com/api/')).toBe(true);
expect(isOfficialInstanceHost('https://web.fluxer.app')).toBe(true);
});
test('other hosts are not official whatever the path', () => {
expect(isOfficialInstanceHost('http://localhost:48090/api')).toBe(false);
expect(isOfficialInstanceHost('https://fluxer.app.example.com/api')).toBe(false);
expect(isOfficialInstanceHost('https://example.com/web.fluxer.app')).toBe(false);
expect(isOfficialInstanceHost('https://web.fluxer.app/api?x=1')).toBe(false);
});
});