d256adf9dd60
fix: Polish Sync controls and Pro lock wordmark (v2.14.17)
- time
- 2026-08-11 22:46 UTC · 2 months ago
- machine
- koh2
- agent
- gpt-5.6-sol
- session
- sync layout and pro wordmark
- parent
- 81aac3191e84
↓ peach-android-d256adf9.tar.gzatlas at this save
files changed5 files
VERSION+1 −1app/src/main/java/com/peachpasswords/ui/components/PeachMark.kt+22 −6app/src/main/java/com/peachpasswords/ui/lock/LockScreen.kt+1 −0app/src/main/java/com/peachpasswords/ui/lock/LockViewModel.kt+6 −1app/src/main/java/com/peachpasswords/ui/settings/SettingsCardBodies.kt+9 −6app/src/main/java/com/peachpasswords/ui/components/PeachMark.kt+22 −6
@@ -15,6 +15,7 @@1515 import androidx.compose.ui.graphics.vector.PathParser1616 import androidx.compose.ui.unit.Dp1717 import androidx.compose.ui.unit.dp18+import androidx.compose.ui.unit.sp1819 1920 /**2021 * The Peach brand mark — a peach fruit with a single leaf. Exact port of the@@ -59,16 +60,31 @@5960 * the mark entirely.6061 */6162 @Composable62-fun PeachWordmark(modifier: Modifier = Modifier) {63+fun PeachWordmark(modifier: Modifier = Modifier, isPro: Boolean = false) {6364 androidx.compose.foundation.layout.Row(6465 modifier = modifier,6566 verticalAlignment = androidx.compose.ui.Alignment.CenterVertically,6667 ) {6768 PeachMark(modifier = Modifier.padding(end = com.peachpasswords.ui.theme.PeachSpacing.xs))68- androidx.compose.material3.Text(69- text = "peach",70- color = com.peachpasswords.ui.theme.LocalPeachAccent.current,71- style = com.peachpasswords.ui.theme.PeachType.wordmark,72- )69+ if (isPro) {70+ androidx.compose.foundation.layout.Column {71+ androidx.compose.material3.Text(72+ text = "peach",73+ color = com.peachpasswords.ui.theme.peachColors.T0,74+ style = com.peachpasswords.ui.theme.PeachType.wordmark.copy(lineHeight = 13.sp),75+ )76+ androidx.compose.material3.Text(77+ text = "pro",78+ color = com.peachpasswords.ui.theme.LocalPeachAccent.current,79+ style = com.peachpasswords.ui.theme.PeachType.wordmark.copy(fontSize = 10.sp, lineHeight = 9.sp),80+ )81+ }82+ } else {83+ androidx.compose.material3.Text(84+ text = "peach",85+ color = com.peachpasswords.ui.theme.LocalPeachAccent.current,86+ style = com.peachpasswords.ui.theme.PeachType.wordmark,87+ )88+ }7389 }7490 }app/src/main/java/com/peachpasswords/ui/lock/LockScreen.kt+1 −0
@@ -182,6 +182,7 @@182182 183183 PeachWordmark(184184 modifier = Modifier.align(Alignment.TopStart).systemBarsPadding().padding(start = 20.dp, top = 8.dp),185+ isPro = state.isPro,185186 )186187 187188 Column(app/src/main/java/com/peachpasswords/ui/lock/LockViewModel.kt+6 −1
@@ -5,6 +5,7 @@55 import androidx.fragment.app.FragmentActivity66 import androidx.lifecycle.ViewModel77 import androidx.lifecycle.viewModelScope8+import com.peachpasswords.license.LicenseRepository89 import com.peachpasswords.sync.ForegroundSyncCoordinator910 import com.peachpasswords.sync.SyncFreshStartResetter1011 import com.peachpasswords.ui.PeachNav@@ -33,6 +34,7 @@3334 3435 data class LockUiState(3536 val hasVault: Boolean = false,37+ val isPro: Boolean = false,3638 val loading: Boolean = false,3739 val error: String? = null,3840 val unlocked: Boolean = false,@@ -84,6 +86,7 @@8486 @HiltViewModel8587 class LockViewModel @Inject constructor(8688 private val vault: VaultRepository,89+ license: LicenseRepository,8790 private val duress: DuressConfigStore,8891 private val lockTimer: VaultLockTimer,8992 private val lastViewed: LastViewedEntryStore,@@ -91,7 +94,9 @@9194 private val syncFreshStart: SyncFreshStartResetter,9295 @ApplicationContext private val appContext: Context,9396 ) : ViewModel() {94- private val _state = MutableStateFlow(LockUiState(hasVault = vault.hasVault()))97+ private val _state = MutableStateFlow(98+ LockUiState(hasVault = vault.hasVault(), isPro = license.isProActive()),99+ )95100 val state: StateFlow<LockUiState> = _state.asStateFlow()96101 97102 /** Resolve where a just-unlocked session should land (last-viewed entry → first → list). */app/src/main/java/com/peachpasswords/ui/settings/SettingsCardBodies.kt+9 −6
@@ -189,8 +189,8 @@189189 }190190 191191 @Composable192-private fun ValueText(text: String, fg: Color) {193- Text(text, color = fg.copy(alpha = 0.7f), fontFamily = PeachType.Mono, fontSize = 11.sp)192+private fun ValueText(text: String, fg: Color, modifier: Modifier = Modifier) {193+ Text(text, color = fg.copy(alpha = 0.7f), fontFamily = PeachType.Mono, fontSize = 11.sp, modifier = modifier)194194 }195195 196196 @Composable@@ -202,7 +202,7 @@202202 .clickable(onClick = onClick)203203 .padding(horizontal = 12.dp, vertical = 6.dp),204204 ) {205- Text(label, color = fg, fontFamily = PeachType.Mono, fontSize = 11.sp)205+ Text(label, color = fg, fontFamily = PeachType.Mono, fontSize = 11.sp, maxLines = 1)206206 }207207 }208208 @@ -931,8 +931,10 @@931931 renamingDeviceId = d.deviceId932932 }933933 }934- Spacer(Modifier.width(PeachSpacing.xs))935- SubtleButton("remove", fg) { confirmUnpair = d.deviceId }934+ if (renamingDeviceId != d.deviceId) {935+ Spacer(Modifier.width(PeachSpacing.xs))936+ SubtleButton("remove", fg) { confirmUnpair = d.deviceId }937+ }936938 }937939 }938940 // HOLE 4: revocation stops this device receiving future changes. It@@ -1042,7 +1044,8 @@10421044 }10431045 val warn = relayUrlStatus?.startsWith("Use") == true ||10441046 (relayUrlStatus == null && needsRelayUrl)1045- ValueText(message, if (warn) peachColors.Breach else fg)1047+ ValueText(message, if (warn) peachColors.Breach else fg, Modifier.weight(1f))1048+ Spacer(Modifier.width(PeachSpacing.xs))10461049 SubtleButton("save", fg) {10471050 relayUrlStatus = if (syncVm.setRelayUrl(relayUrlDraft)) {10481051 relayUrlDraft = privateRelayDraftOf(syncVm.privateRelayUrl.value)