frontend: unify owner models for apps and volumes

This commit is contained in:
Johannes Zellner
2023-11-21 14:51:24 +01:00
parent 771bfd0244
commit 573eaee287
2 changed files with 6 additions and 34 deletions
+4 -29
View File
@@ -204,6 +204,9 @@ export default {
}, {
uid: 33,
label: 'www-data'
}, {
uid: 808,
label: 'yellowtent'
}, {
uid: 1000,
label: 'cloudron'
@@ -515,20 +518,6 @@ export default {
return;
}
this.ownersModel = [{
uid: 0,
label: 'root'
}, {
uid: 33,
label: 'www-data'
}, {
uid: 1000,
label: 'cloudron'
}, {
uid: 1001,
label: 'git'
}];
this.appLink = `https://${result.body.fqdn}`;
this.title = `${result.body.label || result.body.fqdn} (${result.body.manifest.title})`;
} else if (type === 'volume') {
@@ -545,20 +534,6 @@ export default {
return;
}
this.ownersModel = [{
uid: 0,
label: 'root'
}, {
uid: 33,
label: 'www-data'
}, {
uid: 808,
label: 'yellowtent'
}, {
uid: 1001,
label: 'git'
}];
this.title = result.body.name;
} else {
this.fatalError = `Unsupported type ${type}`;
@@ -578,7 +553,7 @@ export default {
this.resourceType = type;
this.resourceId = resourceId;
this.directoryModel = createDirectoryModel(this.apiOrigin, this.accessToken, type === 'volume' ? `volumes/${resourceId}` : `apps/${resourceId}`);
this.directoryModel = createDirectoryModel(this.apiOrigin, this.accessToken, type === 'volume' ? `volumes/${resourceId}` : `apps/${resourceId}`, this.ownersModel);
this.loadCwd();
this.$watch(() => this.$route.params, (toParams, previousParams) => {