mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 05:57:32 -07:00
parent
d50e509722
commit
be36d0ea56
3 changed files with 9 additions and 9 deletions
|
@ -509,7 +509,7 @@ export default Vue.extend({
|
|||
|
||||
saveBlockedHosts() {
|
||||
this.$root.api('admin/update-meta', {
|
||||
blockedHosts: this.blockedHosts.split('\n')
|
||||
blockedHosts: this.blockedHosts ? this.blockedHosts.split('\n') : []
|
||||
}).then(() => {
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
|
|
|
@ -461,7 +461,7 @@ export default Vue.extend({
|
|||
iconUrl: this.iconUrl,
|
||||
name: this.name,
|
||||
description: this.description,
|
||||
langs: this.languages.split(' '),
|
||||
langs: this.languages ? this.languages.split(' ') : [],
|
||||
cacheRemoteFiles: this.cacheRemoteFiles,
|
||||
localDriveCapacityMb: parseInt(this.localDriveCapacityMb, 10),
|
||||
remoteDriveCapacityMb: parseInt(this.remoteDriveCapacityMb, 10),
|
||||
|
@ -490,8 +490,8 @@ export default Vue.extend({
|
|||
enableServiceWorker: this.enableServiceWorker,
|
||||
swPublicKey: this.swPublicKey,
|
||||
swPrivateKey: this.swPrivateKey,
|
||||
pinnedUsers: this.pinnedUsers.split('\n'),
|
||||
hiddenTags: this.hiddenTags.split('\n'),
|
||||
pinnedUsers: this.pinnedUsers ? this.pinnedUsers.split('\n') : [],
|
||||
hiddenTags: this.hiddenTags ? this.hiddenTags.split('\n') : [],
|
||||
useObjectStorage: this.useObjectStorage,
|
||||
objectStorageBaseUrl: this.objectStorageBaseUrl ? this.objectStorageBaseUrl : null,
|
||||
objectStorageBucket: this.objectStorageBucket ? this.objectStorageBucket : null,
|
||||
|
|
|
@ -430,15 +430,15 @@ export default define(meta, async (ps, me) => {
|
|||
}
|
||||
|
||||
if (Array.isArray(ps.pinnedUsers)) {
|
||||
set.pinnedUsers = ps.pinnedUsers;
|
||||
set.pinnedUsers = ps.pinnedUsers.filter(Boolean);
|
||||
}
|
||||
|
||||
if (Array.isArray(ps.hiddenTags)) {
|
||||
set.hiddenTags = ps.hiddenTags;
|
||||
set.hiddenTags = ps.hiddenTags.filter(Boolean);
|
||||
}
|
||||
|
||||
if (Array.isArray(ps.blockedHosts)) {
|
||||
set.blockedHosts = ps.blockedHosts;
|
||||
set.blockedHosts = ps.blockedHosts.filter(Boolean);
|
||||
}
|
||||
|
||||
if (ps.mascotImageUrl !== undefined) {
|
||||
|
@ -501,8 +501,8 @@ export default define(meta, async (ps, me) => {
|
|||
set.maintainerEmail = ps.maintainerEmail;
|
||||
}
|
||||
|
||||
if (ps.langs !== undefined) {
|
||||
set.langs = ps.langs;
|
||||
if (Array.isArray(ps.langs)) {
|
||||
set.langs = ps.langs.filter(Boolean);
|
||||
}
|
||||
|
||||
if (ps.summalyProxy !== undefined) {
|
||||
|
|
Loading…
Reference in a new issue