Add proxy app and app link creation in appstore view
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<Dialog ref="applinkDialog"
|
||||
:title="$t('app.editApplinkDialog.title')"
|
||||
:title="mode === 'edit' ? $t('app.editApplinkDialog.title') : $t('app.addApplinkDialog.title')"
|
||||
:reject-label="$t('main.dialog.cancel')"
|
||||
:confirm-label="$t('main.dialog.save')"
|
||||
confirm-style="success"
|
||||
@@ -148,6 +148,7 @@ export default {
|
||||
this.id = applink ? applink.id : '';
|
||||
this.upstreamUri = applink ? applink.upstreamUri : '';
|
||||
this.label = applink ? applink.label : '';
|
||||
this.icon = applink ? {} : { data: '__original__' };
|
||||
this.iconUrl = applink ? applink.iconUrl : '';
|
||||
this.tags = applink ? applink.tags : [];
|
||||
this.accessRestrictionOption = applink && applink.accessRestriction ? 'groups' : 'any';
|
||||
@@ -181,7 +182,14 @@ export default {
|
||||
data.icon = this.icon.data.replace(/^data:image\/[a-z]+;base64,/, '');
|
||||
}
|
||||
|
||||
await applinksModel.update(this.id, data);
|
||||
try {
|
||||
if (this.mode === 'edit') await applinksModel.update(this.id, data);
|
||||
else await applinksModel.add(data);
|
||||
} catch (e) {
|
||||
console.error('Failed to edit or add applink', e);
|
||||
this.busy = false;
|
||||
return;
|
||||
}
|
||||
|
||||
this.busy = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user