mirror of
https://github.com/Boof2015/astra-mobile.git
synced 2026-08-19 04:06:43 +02:00
improve home page
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user