CLN - remove redundant phone controls

This commit is contained in:
Leon.Schmidt
2026-08-09 15:30:30 +02:00
parent 6467ea8f34
commit 550982f847
6 changed files with 22 additions and 98 deletions
+18 -44
View File
@@ -6,11 +6,9 @@ import {
Calculator,
Camera,
Flashlight,
LockKeyhole,
Moon,
Plane,
Play,
RotateCw,
Signal,
SkipBack,
SkipForward,
@@ -40,7 +38,6 @@ type ConnectivityPreference =
| 'bluetoothEnabled'
| 'cellularEnabled'
| 'focusMode'
| 'rotationLocked'
| 'wifiEnabled'
const phone = usePhoneStore()
@@ -62,14 +59,6 @@ const inactiveGlassColors = {
bgIos: 'bg-[rgba(72,72,74,0.58)]',
shadowIos: 'shadow-ios-dark-glass',
}
const rotationColors = computed(() =>
phone.preferences.settings.rotationLocked
? {
bgIos: 'bg-white',
shadowIos: 'shadow-ios-light-glass',
}
: inactiveGlassColors,
)
const focusColors = computed(() =>
phone.preferences.settings.focusMode
? {
@@ -355,29 +344,9 @@ onBeforeUnmount(() => {
</div>
<div class="control-center__middle-grid">
<div class="control-center__round-control">
<k-glass
component="button"
type="button"
class="control-center__round-button"
:class="{
'control-center__round-button--light':
phone.preferences.settings.rotationLocked,
}"
:colors="rotationColors"
:aria-label="phone.t('ControlCenter.rotationLock')"
:aria-pressed="phone.preferences.settings.rotationLocked"
@click="togglePreference('rotationLocked')"
>
<RotateCw aria-hidden="true" />
<LockKeyhole
class="control-center__rotation-lock"
aria-hidden="true"
/>
</k-glass>
</div>
<div class="control-center__round-control">
<div
class="control-center__round-control control-center__round-control--wide"
>
<k-glass
component="button"
type="button"
@@ -401,7 +370,7 @@ onBeforeUnmount(() => {
</div>
<k-glass
class="control-center__slider"
class="control-center__slider control-center__slider--brightness"
:colors="inactiveGlassColors"
:highlight="false"
:style="brightnessStyle"
@@ -431,7 +400,7 @@ onBeforeUnmount(() => {
</k-glass>
<k-glass
class="control-center__slider"
class="control-center__slider control-center__slider--volume"
:colors="inactiveGlassColors"
:highlight="false"
:style="volumeStyle"
@@ -727,6 +696,10 @@ onBeforeUnmount(() => {
justify-content: center;
}
.control-center__round-control--wide {
grid-column: 1 / span 2;
}
.control-center__round-control > span,
.control-center__quick-action > span {
width: 100%;
@@ -791,13 +764,6 @@ onBeforeUnmount(() => {
stroke-width: 2;
}
.control-center__round-button .control-center__rotation-lock {
position: absolute;
width: 13px;
height: 13px;
stroke-width: 2.5;
}
.control-center__slider {
position: relative;
grid-row: 1 / span 2;
@@ -808,6 +774,14 @@ onBeforeUnmount(() => {
touch-action: none;
}
.control-center__slider--brightness {
grid-column: 3;
}
.control-center__slider--volume {
grid-column: 4;
}
.control-center__slider-level {
position: absolute;
z-index: 0;
@@ -862,7 +836,7 @@ onBeforeUnmount(() => {
color: #bf5af2 !important;
}
.control-center__slider:nth-child(3) .control-center__slider-icon {
.control-center__slider--brightness .control-center__slider-icon {
color: #ffd60a;
}
+1 -4
View File
@@ -1926,7 +1926,7 @@ const defaultLocales: LocaleTree = {
bluetooth: 'Bluetooth',
cellular: 'Cellular',
connectivityDescription:
'Airplane Mode temporarily disables wireless connections. Wi-Fi, Bluetooth, and cellular settings are saved on this phone.',
'Wi-Fi, Bluetooth, and cellular settings are saved on this phone.',
focus: 'Focus',
focusMode: 'Focus',
focusDescription:
@@ -1953,7 +1953,6 @@ const defaultLocales: LocaleTree = {
phoneScale: 'Phone Scale',
phoneFrame: 'Phone Frame',
screenBrightness: 'Screen Brightness',
rotationLock: 'Rotation Lock',
about: 'About',
deviceName: 'Device Name',
deviceNameValue: 'Sky Phone',
@@ -2024,7 +2023,6 @@ const defaultLocales: LocaleTree = {
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}',
},
@@ -2081,7 +2079,6 @@ const defaultLocales: LocaleTree = {
play: 'Play',
previous: 'Previous track',
quickActions: 'Quick actions',
rotationLock: 'Rotation Lock',
timer: 'Timer',
unmuteRingtone: 'Unmute ringtone and notifications',
volume: 'Volume',
-3
View File
@@ -25,7 +25,6 @@ describe('preferences', () => {
clock: { enabled: false, sounds: false },
},
phoneScale: 110,
rotationLocked: true,
screenBrightness: 64,
wallpaper: 'ember',
wifiEnabled: false,
@@ -53,7 +52,6 @@ describe('preferences', () => {
sounds: true,
})
expect(value.settings.phoneScale).toBe(110)
expect(value.settings.rotationLocked).toBe(true)
expect(value.settings.screenBrightness).toBe(64)
expect(value.settings.wallpaper).toBe('ember')
expect(value.settings.wifiEnabled).toBe(false)
@@ -97,7 +95,6 @@ describe('preferences', () => {
cellularEnabled: true,
focusMode: false,
graphicsMode: 'performance',
rotationLocked: false,
screenBrightness: 100,
wifiEnabled: true,
})
-6
View File
@@ -54,7 +54,6 @@ export type PhonePreferencesV1 = {
phoneScale: number
ringtone: RingtoneId
ringtoneVolume: number
rotationLocked: boolean
screenBrightness: number
streamerMode: boolean
wallpaper: WallpaperId
@@ -114,7 +113,6 @@ export const DEFAULT_PHONE_PREFERENCES: PhonePreferencesV1 = {
phoneScale: 100,
ringtone: 'skyline',
ringtoneVolume: 80,
rotationLocked: false,
screenBrightness: 100,
streamerMode: false,
wallpaper: 'midnight',
@@ -244,10 +242,6 @@ export function parsePhonePreferences(raw: string | null): PhonePreferencesV1 {
0,
100,
),
rotationLocked: readBoolean(
settings.rotationLocked,
defaults.rotationLocked,
),
screenBrightness: readNumber(
settings.screenBrightness,
defaults.screenBrightness,
-37
View File
@@ -32,7 +32,6 @@ import {
Moon,
Plane,
RotateCcw,
RotateCw,
Settings,
Signal,
Smartphone,
@@ -1210,23 +1209,6 @@ onBeforeUnmount(() => {
</template>
<template v-else-if="activeView === 'connectivity'">
<k-list strong inset>
<k-list-item :title="phone.t('Apps.settings.airplaneMode')">
<template #media>
<span class="settings-row-icon bg-[#ff9500]">
<Plane :size="17" :stroke-width="2.25" />
</span>
</template>
<template #after>
<k-toggle
:checked="phone.preferences.settings.airplaneMode"
:aria-label="phone.t('Apps.settings.toggle.airplaneMode')"
@change="toggleRootSetting('airplaneMode')"
/>
</template>
</k-list-item>
</k-list>
<k-block-title>{{
phone.t('Apps.settings.connections')
}}</k-block-title>
@@ -1437,25 +1419,6 @@ onBeforeUnmount(() => {
</div>
</template>
</k-list-item>
<k-list-item :title="phone.t('Apps.settings.rotationLock')">
<template #media>
<span class="settings-row-icon bg-[#ff9500]">
<RotateCw :size="17" :stroke-width="2.25" />
</span>
</template>
<template #after>
<k-toggle
:checked="phone.preferences.settings.rotationLocked"
:aria-label="phone.t('Apps.settings.toggle.rotationLocked')"
@change="
phone.setPreference(
'rotationLocked',
!phone.preferences.settings.rotationLocked,
)
"
/>
</template>
</k-list-item>
</k-list>
<k-block-title>
+3 -4
View File
@@ -40,7 +40,7 @@ Locales["en"] = {
camera = "Camera", cellular = "Cellular Data", close = "Close Control Center", flashlight = "Flashlight",
focus = "Focus", label = "Control Center", media = "Media", muteRingtone = "Mute ringtone and notifications", next = "Next track", notPlaying = "Not Playing",
open = "Open Control Center", play = "Play", previous = "Previous track", quickActions = "Quick actions",
rotationLock = "Rotation Lock", timer = "Timer", unmuteRingtone = "Unmute ringtone and notifications", volume = "Volume", wifi = "Wi-Fi",
timer = "Timer", unmuteRingtone = "Unmute ringtone and notifications", volume = "Volume", wifi = "Wi-Fi",
},
Notifications = { now = "now" },
LockScreen = {
@@ -737,7 +737,7 @@ Locales["en"] = {
accountPurchasesValue = "Available", notifications = "Notifications", sounds = "Sounds & Haptics",
general = "General Settings", security = "Passcode & Security", appearance = "Appearance", allowNotifications = "Allow Notifications",
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.",
connectivityDescription = "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.",
notificationSounds = "Sounds", notificationDuration = "Notification Duration", seconds = "{seconds} seconds",
ringtoneVolume = "Ringtone Volume", notificationVolume = "Notification Volume",
@@ -746,7 +746,7 @@ Locales["en"] = {
ultimateMode = "Ultimate Mode", ultimateModeDescription = "Full blur and glass effects for compatible FiveM clients",
appearanceMode = "Appearance Mode",
automatic = "Automatic", light = "Light", dark = "Dark", phoneScale = "Phone Scale", phoneFrame = "Phone Frame",
screenBrightness = "Screen Brightness", rotationLock = "Rotation Lock",
screenBrightness = "Screen Brightness",
about = "About", deviceName = "Device Name", deviceNameValue = "Sky Phone", softwareVersion = "Software Version",
language = "Language", languageValue = "English", localStorage = "Local Storage", localStorageValue = "On Device",
back = "Settings", wallpaperPicker = "Built-in Wallpapers", deviceInformation = "Device Information",
@@ -774,7 +774,6 @@ Locales["en"] = {
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}",
},
frames = {