Skip to content

Commit

Permalink
fix: stronghold lock/unlock ui (#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
cvarley100 authored Mar 21, 2021
1 parent 6c8267d commit f37f798
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/shared/routes/dashboard/wallet/views/Security.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@
let lastBackupDate
let lastBackupDateFormatted
let color
let strongholdStatusMessage
function setup() {
const ap = get(activeProfile)
const lastStrongholdBackupTime = ap?.lastStrongholdBackupTime
lastBackupDate = lastStrongholdBackupTime ? new Date(lastStrongholdBackupTime) : null
lastBackupDateFormatted = diffDates(lastBackupDate, new Date())
color = getBackupWarningColor(lastBackupDate)
strongholdStatusMessage = get(isStrongholdLocked) ? 'locked' : 'unlocked'
}
function handleSecurityTileClick(popupType) {
Expand Down Expand Up @@ -77,9 +75,9 @@
<!-- Stronghold status -->
<SecurityTile
title={locale('views.dashboard.security.strongholdStatus.title')}
message={locale(`views.dashboard.security.strongholdStatus.${strongholdStatusMessage}`)}
message={locale(`views.dashboard.security.strongholdStatus.${$isStrongholdLocked ? 'locked' : 'unlocked'}`)}
color={$isStrongholdLocked ? 'blue' : 'yellow'}
icon="lock"
icon={$isStrongholdLocked ? 'lock' : 'unlock'}
onClick={() => ($isStrongholdLocked ? handleSecurityTileClick('password') : lockStronghold())} />
<!-- Stronghold backup -->
<SecurityTile
Expand Down

0 comments on commit f37f798

Please sign in to comment.