Skip to content

Commit 32039b9

Browse files
authored
Move settings into the app shell (#893)
1 parent 45f3dfe commit 32039b9

9 files changed

Lines changed: 396 additions & 343 deletions

File tree

‎desktop/src/app/AppShell.tsx‎

Lines changed: 173 additions & 175 deletions
Large diffs are not rendered by default.

‎desktop/src/features/profile/ui/ProfilePopover.tsx‎

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export function ProfilePopover({
7272
const [presenceMenuOpen, setPresenceMenuOpen] = React.useState(false);
7373
const presenceHoverTimer = React.useRef<number | null>(null);
7474
const hasUserStatus = Boolean(userStatusText || userStatusEmoji);
75-
const preferencesShortcutLabel = isMacPlatform() ? "⌘," : "Ctrl+,";
75+
const settingsShortcutLabel = isMacPlatform() ? "⌘," : "Ctrl+,";
7676

7777
function clearPresenceHoverTimer() {
7878
if (presenceHoverTimer.current !== null) {
@@ -249,36 +249,22 @@ export function ProfilePopover({
249249

250250
<hr className="my-1 h-px border-0 bg-border" />
251251

252-
{/* ── Profile / preferences ──────────────────────────── */}
253-
<button
254-
className={MENU_ITEM_CLASS}
255-
data-testid="profile-popover-profile"
256-
onClick={() => {
257-
closePopover();
258-
window.requestAnimationFrame(() => {
259-
onOpenSettings("profile");
260-
});
261-
}}
262-
role="menuitem"
263-
type="button"
264-
>
265-
<span className="flex-1">Profile</span>
266-
</button>
252+
{/* ── Settings ───────────────────────────────────────── */}
267253
<button
268254
className={MENU_ITEM_CLASS}
269255
data-testid="profile-popover-settings"
270256
onClick={() => {
271257
closePopover();
272258
window.requestAnimationFrame(() => {
273-
onOpenSettings("appearance");
259+
onOpenSettings();
274260
});
275261
}}
276262
role="menuitem"
277263
type="button"
278264
>
279-
<span className="flex-1">Preferences</span>
265+
<span className="flex-1">Settings</span>
280266
<kbd className="text-xs text-muted-foreground">
281-
{preferencesShortcutLabel}
267+
{settingsShortcutLabel}
282268
</kbd>
283269
</button>
284270

‎desktop/src/features/settings/ui/ProfileSettingsCard.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ export function ProfileSettingsCard({
139139
return (
140140
<section className="min-w-0" data-testid="settings-profile">
141141
<div className="space-y-6">
142+
<h2 className="text-2xl font-semibold tracking-tight">Profile</h2>
143+
142144
{profileQuery.error instanceof Error ? (
143145
<p className="rounded-xl border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive">
144146
{profileQuery.error.message}

‎desktop/src/features/settings/ui/SettingsScreen.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ type SettingsScreenProps = {
77
currentPubkey?: string;
88
fallbackDisplayName?: string;
99
isUpdatingDesktopNotifications: boolean;
10-
mode: "profile" | "preferences";
1110
notificationErrorMessage: string | null;
1211
notificationPermission: DesktopNotificationPermissionState;
1312
notificationSettings: NotificationSettings;
@@ -25,7 +24,6 @@ export function SettingsScreen({
2524
currentPubkey,
2625
fallbackDisplayName,
2726
isUpdatingDesktopNotifications,
28-
mode,
2927
notificationErrorMessage,
3028
notificationPermission,
3129
notificationSettings,
@@ -43,7 +41,6 @@ export function SettingsScreen({
4341
currentPubkey={currentPubkey}
4442
fallbackDisplayName={fallbackDisplayName}
4543
isUpdatingDesktopNotifications={isUpdatingDesktopNotifications}
46-
mode={mode}
4744
notificationErrorMessage={notificationErrorMessage}
4845
notificationPermission={notificationPermission}
4946
notificationSettings={notificationSettings}

0 commit comments

Comments
 (0)