mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-08-29 07:01:39 +00:00
FIX - stabilize VaultX wallet key actions
Keep copy and share labels contained inside the profile card and cover partial locale payloads with a regression test.
This commit is contained in:
@@ -70,6 +70,18 @@ describe('phone locale fallback', () => {
|
||||
expect(phone.t('Apps.messages.seekAudio')).toBe('Seek Audio')
|
||||
})
|
||||
|
||||
it('keeps VaultX wallet key actions translated with a partial server locale', () => {
|
||||
const phone = usePhoneStore()
|
||||
phone.open({ locales: { Apps: { crypto: { name: 'VaultX' } } } })
|
||||
|
||||
expect(phone.t('Apps.crypto.profile.walletKey')).toBe('Public crypto key')
|
||||
expect(phone.t('Apps.crypto.profile.walletKeyBody')).toBe(
|
||||
'Share this key to receive crypto. It cannot access your account.',
|
||||
)
|
||||
expect(phone.t('Apps.crypto.profile.copyKey')).toBe('Copy')
|
||||
expect(phone.t('Apps.crypto.profile.shareKey')).toBe('Share')
|
||||
})
|
||||
|
||||
it('uses the English Lua payload before the bundled emergency fallback', () => {
|
||||
const phone = usePhoneStore()
|
||||
phone.open({
|
||||
|
||||
@@ -1449,10 +1449,12 @@ onMounted(() => void crypto.load())
|
||||
<SkyButton variant="secondary" tonal @click="copyWalletKey">
|
||||
<CheckCircle2 v-if="walletKeyCopied" :size="16" />
|
||||
<Copy v-else :size="16" />
|
||||
{{ t(walletKeyCopied ? 'profile.copied' : 'profile.copyKey') }}
|
||||
<span>{{
|
||||
t(walletKeyCopied ? 'profile.copied' : 'profile.copyKey')
|
||||
}}</span>
|
||||
</SkyButton>
|
||||
<SkyButton @click="shareWalletKey">
|
||||
<Share2 :size="16" />{{ t('profile.shareKey') }}
|
||||
<Share2 :size="16" /><span>{{ t('profile.shareKey') }}</span>
|
||||
</SkyButton>
|
||||
</div>
|
||||
</SkyCard>
|
||||
@@ -3730,13 +3732,22 @@ onMounted(() => void crypto.load())
|
||||
gap: 7px;
|
||||
}
|
||||
.wallet-key-card__actions :deep(.sky-button) {
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
min-height: 42px;
|
||||
gap: 6px;
|
||||
padding: 0 10px;
|
||||
overflow: hidden;
|
||||
font-size: 11px;
|
||||
font-weight: 800;
|
||||
border-radius: 13px;
|
||||
}
|
||||
.wallet-key-card__actions :deep(.sky-button > span) {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.profile-stats--premium {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user