From bb5e7fae2c991a169403e6cbee39283eb6419d06 Mon Sep 17 00:00:00 2001 From: "Leon.Schmidt" Date: Sun, 9 Aug 2026 02:24:52 +0200 Subject: [PATCH] ENH - expand iOS settings controls --- .../src/assets/img/app-icons/settings.svg | 31 +++ frontend/src/config/apps.ts | 2 +- frontend/src/stores/phone.ts | 25 +- frontend/src/views/apps/SettingsApp.vue | 234 +++++++++++++++++- sky_phone/config/locales/en.lua | 8 +- 5 files changed, 286 insertions(+), 14 deletions(-) create mode 100644 frontend/src/assets/img/app-icons/settings.svg diff --git a/frontend/src/assets/img/app-icons/settings.svg b/frontend/src/assets/img/app-icons/settings.svg new file mode 100644 index 0000000..f4a3d0e --- /dev/null +++ b/frontend/src/assets/img/app-icons/settings.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/config/apps.ts b/frontend/src/config/apps.ts index 476001f..e0b1474 100644 --- a/frontend/src/config/apps.ts +++ b/frontend/src/config/apps.ts @@ -39,7 +39,7 @@ import darkChatIcon from '@/assets/img/app-icons/darkchat.svg' import notesIcon from '@/assets/img/app-icons/notes.webp' import photosIcon from '@/assets/img/app-icons/gallery.webp' import phoneIcon from '@/assets/img/app-icons/phone.webp' -import settingsIcon from '@/assets/img/app-icons/settings.webp' +import settingsIcon from '@/assets/img/app-icons/settings.svg' import snakeIcon from '@/assets/img/app-icons/snake.webp' import memoryIcon from '@/assets/img/app-icons/memory.webp' import numberMergeIcon from '@/assets/img/app-icons/number-merge.webp' diff --git a/frontend/src/stores/phone.ts b/frontend/src/stores/phone.ts index 237e506..7d010c2 100644 --- a/frontend/src/stores/phone.ts +++ b/frontend/src/stores/phone.ts @@ -1455,6 +1455,17 @@ const defaultLocales: LocaleTree = { general: 'General Settings', security: 'Passcode & Security', appearance: 'Appearance', + connectivity: 'Connectivity', + connections: 'Connections', + wifi: 'Wi-Fi', + bluetooth: 'Bluetooth', + cellular: 'Cellular', + connectivityDescription: + 'Airplane Mode temporarily disables wireless connections. Wi-Fi, Bluetooth, and cellular settings are saved on this phone.', + focus: 'Focus', + focusMode: 'Focus', + focusDescription: + 'Focus silences non-critical notifications while keeping alarms and important alerts available.', allowNotifications: 'Allow Notifications', notificationSounds: 'Sounds', notificationDuration: 'Notification Duration', @@ -1469,6 +1480,8 @@ const defaultLocales: LocaleTree = { dark: 'Dark', phoneScale: 'Phone Scale', phoneFrame: 'Phone Frame', + screenBrightness: 'Screen Brightness', + rotationLock: 'Rotation Lock', about: 'About', deviceName: 'Device Name', deviceNameValue: 'Sky Phone', @@ -1535,6 +1548,11 @@ const defaultLocales: LocaleTree = { toggle: { airplaneMode: 'Toggle Airplane Mode', streamerMode: 'Toggle Streamer Mode', + focusMode: 'Toggle Focus', + wifiEnabled: 'Toggle Wi-Fi', + bluetoothEnabled: 'Toggle Bluetooth', + cellularEnabled: 'Toggle Cellular Data', + rotationLocked: 'Toggle Rotation Lock', notifications: 'Toggle notifications for {app}', notificationSounds: 'Toggle notification sounds for {app}', }, @@ -1840,10 +1858,9 @@ export const usePhoneStore = defineStore('phone', { async unlockWithPasscode( passcode: string, ): Promise> { - const response = await nuiCall( - 'security:unlock', - { passcode }, - ) + const response = await nuiCall('security:unlock', { + passcode, + }) if (response.success && response.data?.security) { this.security = response.data.security } diff --git a/frontend/src/views/apps/SettingsApp.vue b/frontend/src/views/apps/SettingsApp.vue index fd62c03..3c5dfb9 100644 --- a/frontend/src/views/apps/SettingsApp.vue +++ b/frontend/src/views/apps/SettingsApp.vue @@ -24,17 +24,22 @@ import { } from 'konsta/vue' import { BellRing, + Bluetooth, Check, EyeOff, KeyRound, Monitor, + Moon, Plane, RotateCcw, + RotateCw, Settings, + Signal, Smartphone, Sun, UserRound, Volume2, + Wifi, } from 'lucide-vue-next' import { computed, @@ -81,10 +86,18 @@ type SettingsView = | 'notifications' | 'notification-detail' | 'sounds' + | 'connectivity' + | 'focus' | 'general' | 'appearance' | 'wallpaper' -type RootToggleKey = 'airplaneMode' | 'streamerMode' +type RootToggleKey = + | 'airplaneMode' + | 'streamerMode' + | 'focusMode' + | 'wifiEnabled' + | 'bluetoothEnabled' + | 'cellularEnabled' type SubmenuView = Exclude type PasscodeFlow = | 'set-new' @@ -171,6 +184,18 @@ const serviceRows = [ }, ] const preferenceRows = [ + { + key: 'connectivity', + view: 'connectivity' as const, + icon: Wifi, + iconColor: '#007aff', + }, + { + key: 'focus', + view: 'focus' as const, + icon: Moon, + iconColor: '#5856d6', + }, { key: 'security', view: 'security' as const, @@ -197,6 +222,27 @@ const preferenceRows = [ }, ] +const connectivityRows = [ + { + key: 'wifi', + preferenceKey: 'wifiEnabled' as const, + icon: Wifi, + iconColor: '#007aff', + }, + { + key: 'bluetooth', + preferenceKey: 'bluetoothEnabled' as const, + icon: Bluetooth, + iconColor: '#007aff', + }, + { + key: 'cellular', + preferenceKey: 'cellularEnabled' as const, + icon: Signal, + iconColor: '#34c759', + }, +] + const normalizedQuery = computed(() => query.value.trim().toLowerCase()) const visibleToggleRows = computed(() => toggleRows.filter((row) => matchesSearch(row.key)), @@ -233,7 +279,10 @@ const passcodeTitle = computed(() => { if (passcodeFlow.value === 'set-confirm') { return phone.t('Apps.settings.passcode.confirmNew') } - if (passcodeFlow.value === 'change-current' || passcodeFlow.value === 'disable') { + if ( + passcodeFlow.value === 'change-current' || + passcodeFlow.value === 'disable' + ) { return phone.t('Apps.settings.passcode.enterCurrent') } if (passcodeFlow.value === 'change-confirm') { @@ -402,7 +451,8 @@ function updateNumberPreference( | 'notificationDurationSeconds' | 'notificationVolume' | 'phoneScale' - | 'ringtoneVolume', + | 'ringtoneVolume' + | 'screenBrightness', event: Event, ): void { phone.setPreference( @@ -700,10 +750,11 @@ onBeforeUnmount(() => { -