refactor: installKey.install failure handling

This commit is contained in:
Zack Spear
2024-01-08 13:12:14 -06:00
parent 60bb8aa0fa
commit e071b994cf

View File

@@ -29,10 +29,14 @@ export const useInstallKeyStore = defineStore('installKey', () => {
});
const install = async (action: ExternalKeyActions) => {
console.log('[installKey.install]', action);
keyInstallStatus.value = 'installing';
keyAction.value = action;
if (!keyUrl.value) { return console.error('[install] no key to install'); }
if (!keyUrl.value) {
keyInstallStatus.value = 'failed';
return console.error('[install] no key to install');
}
try {
const installResponse = await WebguiInstallKey