improve home page

This commit is contained in:
Boof2015
2026-07-13 21:51:26 -04:00
parent e496df9bf5
commit 03904d5df3
8 changed files with 797 additions and 447 deletions
@@ -28,6 +28,7 @@ import { useThemeStore } from '@/stores/themeStore';
import type { LastFmStatus } from '@/types/lastFm';
import { Text } from '@/components/Text';
import { playHaptic } from '@/lib/haptics';
import type { HomeGreetingTextMode } from '@/home/homeGreeting';
export function lastFmScrobbleSubtitle(status: LastFmStatus | null): string {
const connected = status?.profiles.filter((p) => p.connected).length ?? 0;
@@ -59,6 +60,12 @@ const DARK_STYLE_SEGMENTS = [
{ key: 'amoled', label: 'AMOLED' },
];
const HOME_GREETING_SEGMENTS = [
{ key: 'messages', label: 'Messages' },
{ key: 'clock', label: 'Clock' },
{ key: 'off', label: 'Off' },
];
const ARTIST_GROUPING_OPTIONS: { mode: ArtistGroupingMode; title: string; description: string }[] = [
{
mode: 'astra',
@@ -101,6 +108,8 @@ export function AppearanceSettingsPanel() {
const accentApplies = !resolvedId.startsWith('materialYou');
const nowPlayingScopeStyle = useSettingsStore((s) => s.nowPlayingScopeStyle);
const setNowPlayingScopeStyle = useSettingsStore((s) => s.setNowPlayingScopeStyle);
const homeGreetingTextMode = useSettingsStore((s) => s.homeGreetingTextMode);
const setHomeGreetingTextMode = useSettingsStore((s) => s.setHomeGreetingTextMode);
return (
<>
@@ -156,6 +165,21 @@ export function AppearanceSettingsPanel() {
</View>
) : null}
<SettingsSectionLabel spaced>HOME</SettingsSectionLabel>
<SettingsCard>
<Text variant="body" style={styles.settingTitle}>
Greeting
</Text>
<Text variant="caption" color={colors.textSecondary} style={styles.settingNote}>
Show rotating Astra messages, a clock, or only the search action on Home.
</Text>
<SegmentedControl
segments={HOME_GREETING_SEGMENTS}
value={homeGreetingTextMode}
onChange={(key) => void setHomeGreetingTextMode(key as HomeGreetingTextMode)}
/>
</SettingsCard>
<SettingsSectionLabel spaced>NOW PLAYING SCOPES</SettingsSectionLabel>
<ScopeStyleCards
value={nowPlayingScopeStyle}