Skip to content

Commit 6946d9d

Browse files
committed
fix: narrow signing mode config values
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent bb1bd98 commit 6946d9d

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/views/Settings/SigningMode.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ defineOptions({
113113
name: 'SigningMode',
114114
})
115115
116+
type SigningModeState = 'sync' | 'async'
117+
type WorkerTypeState = 'local' | 'external'
118+
116119
const asyncEnabled = ref(false)
117120
const externalWorkerEnabled = ref(false)
118121
const parallelWorkersCount = ref('4')
@@ -131,10 +134,10 @@ function showSavedIndicator() {
131134
132135
function loadConfig() {
133136
try {
134-
const mode = loadState('libresign', 'signing_mode', 'sync')
137+
const mode = loadState('libresign', 'signing_mode', 'sync') as SigningModeState
135138
asyncEnabled.value = mode === 'async'
136139
137-
const workerType = loadState('libresign', 'worker_type', 'local')
140+
const workerType = loadState('libresign', 'worker_type', 'local') as WorkerTypeState
138141
externalWorkerEnabled.value = workerType === 'external'
139142
140143
const parallelWorkers = loadState('libresign', 'parallel_workers', '4')

0 commit comments

Comments
 (0)