Add button to reset the cloudron id if appstore token is invalid
This commit is contained in:
@@ -42,6 +42,17 @@ async function refresh() {
|
||||
status.value = result.status;
|
||||
}
|
||||
|
||||
async function onResetCloudron() {
|
||||
busy.value = true;
|
||||
|
||||
const [error] = await appstoreModel.resetCloudronId();
|
||||
if (error) return console.error(error);
|
||||
|
||||
await refresh();
|
||||
|
||||
busy.value = false;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
const [error, result] = await dashboardModel.config();
|
||||
if (error) return console.error(error);
|
||||
@@ -89,16 +100,23 @@ onMounted(async () => {
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<SettingsItem>
|
||||
<div style="display: flex; align-items: center;">
|
||||
{{ $t('settings.appstoreAccount.description') }}
|
||||
</div>
|
||||
<div style="display: flex; align-items: center;">
|
||||
<Button :href="`${consoleServerOrigin}/#/claim/${cloudronId}`" target="_blank">{{ $t('settings.appstoreAccount.setupAction') }}</Button>
|
||||
</div>
|
||||
</SettingsItem>
|
||||
</div>
|
||||
<SettingsItem v-else-if="cloudronId">
|
||||
<div style="display: flex; align-items: center;">
|
||||
{{ $t('settings.appstoreAccount.description') }}
|
||||
</div>
|
||||
<div style="display: flex; align-items: center;">
|
||||
<Button :href="`${consoleServerOrigin}/#/claim/${cloudronId}`" target="_blank">{{ $t('settings.appstoreAccount.setupAction') }}</Button>
|
||||
</div>
|
||||
</SettingsItem>
|
||||
|
||||
<SettingsItem v-else>
|
||||
<div style="display: flex; align-items: center;">
|
||||
Unknown Cloudron ID or invalid cloudron.io token.
|
||||
</div>
|
||||
<div style="display: flex; align-items: center;">
|
||||
<Button @click="onResetCloudron">Reset Registration</Button>
|
||||
</div>
|
||||
</SettingsItem>
|
||||
</div>
|
||||
<div v-else>
|
||||
<Spinner class="pankow-spinner-large"/>
|
||||
|
||||
Reference in New Issue
Block a user