forked from FoundKeyGang/FoundKey
parent
c9e33f665e
commit
c3f9b2dcc3
3 changed files with 9 additions and 9 deletions
|
@ -509,7 +509,7 @@ export default Vue.extend({
|
||||||
|
|
||||||
saveBlockedHosts() {
|
saveBlockedHosts() {
|
||||||
this.$root.api('admin/update-meta', {
|
this.$root.api('admin/update-meta', {
|
||||||
blockedHosts: this.blockedHosts.split('\n')
|
blockedHosts: this.blockedHosts ? this.blockedHosts.split('\n') : []
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$root.dialog({
|
this.$root.dialog({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
|
|
@ -461,7 +461,7 @@ export default Vue.extend({
|
||||||
iconUrl: this.iconUrl,
|
iconUrl: this.iconUrl,
|
||||||
name: this.name,
|
name: this.name,
|
||||||
description: this.description,
|
description: this.description,
|
||||||
langs: this.languages.split(' '),
|
langs: this.languages ? this.languages.split(' ') : [],
|
||||||
cacheRemoteFiles: this.cacheRemoteFiles,
|
cacheRemoteFiles: this.cacheRemoteFiles,
|
||||||
localDriveCapacityMb: parseInt(this.localDriveCapacityMb, 10),
|
localDriveCapacityMb: parseInt(this.localDriveCapacityMb, 10),
|
||||||
remoteDriveCapacityMb: parseInt(this.remoteDriveCapacityMb, 10),
|
remoteDriveCapacityMb: parseInt(this.remoteDriveCapacityMb, 10),
|
||||||
|
@ -490,8 +490,8 @@ export default Vue.extend({
|
||||||
enableServiceWorker: this.enableServiceWorker,
|
enableServiceWorker: this.enableServiceWorker,
|
||||||
swPublicKey: this.swPublicKey,
|
swPublicKey: this.swPublicKey,
|
||||||
swPrivateKey: this.swPrivateKey,
|
swPrivateKey: this.swPrivateKey,
|
||||||
pinnedUsers: this.pinnedUsers.split('\n'),
|
pinnedUsers: this.pinnedUsers ? this.pinnedUsers.split('\n') : [],
|
||||||
hiddenTags: this.hiddenTags.split('\n'),
|
hiddenTags: this.hiddenTags ? this.hiddenTags.split('\n') : [],
|
||||||
useObjectStorage: this.useObjectStorage,
|
useObjectStorage: this.useObjectStorage,
|
||||||
objectStorageBaseUrl: this.objectStorageBaseUrl ? this.objectStorageBaseUrl : null,
|
objectStorageBaseUrl: this.objectStorageBaseUrl ? this.objectStorageBaseUrl : null,
|
||||||
objectStorageBucket: this.objectStorageBucket ? this.objectStorageBucket : null,
|
objectStorageBucket: this.objectStorageBucket ? this.objectStorageBucket : null,
|
||||||
|
|
|
@ -430,15 +430,15 @@ export default define(meta, async (ps, me) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Array.isArray(ps.pinnedUsers)) {
|
if (Array.isArray(ps.pinnedUsers)) {
|
||||||
set.pinnedUsers = ps.pinnedUsers;
|
set.pinnedUsers = ps.pinnedUsers.filter(Boolean);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Array.isArray(ps.hiddenTags)) {
|
if (Array.isArray(ps.hiddenTags)) {
|
||||||
set.hiddenTags = ps.hiddenTags;
|
set.hiddenTags = ps.hiddenTags.filter(Boolean);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Array.isArray(ps.blockedHosts)) {
|
if (Array.isArray(ps.blockedHosts)) {
|
||||||
set.blockedHosts = ps.blockedHosts;
|
set.blockedHosts = ps.blockedHosts.filter(Boolean);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ps.mascotImageUrl !== undefined) {
|
if (ps.mascotImageUrl !== undefined) {
|
||||||
|
@ -501,8 +501,8 @@ export default define(meta, async (ps, me) => {
|
||||||
set.maintainerEmail = ps.maintainerEmail;
|
set.maintainerEmail = ps.maintainerEmail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ps.langs !== undefined) {
|
if (Array.isArray(ps.langs)) {
|
||||||
set.langs = ps.langs;
|
set.langs = ps.langs.filter(Boolean);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ps.summalyProxy !== undefined) {
|
if (ps.summalyProxy !== undefined) {
|
||||||
|
|
Loading…
Reference in a new issue