diff --git a/packages/client/src/pages/admin/index.vue b/packages/client/src/pages/admin/index.vue
index a628ce87a..b7160de11 100644
--- a/packages/client/src/pages/admin/index.vue
+++ b/packages/client/src/pages/admin/index.vue
@@ -171,11 +171,6 @@ export default defineComponent({
text: i18n.locale.security,
to: '/admin/security',
active: page.value === 'security',
- }, {
- icon: 'fas fa-bolt',
- text: 'ServiceWorker',
- to: '/admin/service-worker',
- active: page.value === 'service-worker',
}, {
icon: 'fas fa-globe',
text: i18n.locale.relays,
@@ -228,7 +223,6 @@ export default defineComponent({
case 'email-settings': return defineAsyncComponent(() => import('./email-settings.vue'));
case 'object-storage': return defineAsyncComponent(() => import('./object-storage.vue'));
case 'security': return defineAsyncComponent(() => import('./security.vue'));
- case 'service-worker': return defineAsyncComponent(() => import('./service-worker.vue'));
case 'relays': return defineAsyncComponent(() => import('./relays.vue'));
case 'integrations': return defineAsyncComponent(() => import('./integrations.vue'));
case 'instance-block': return defineAsyncComponent(() => import('./instance-block.vue'));
diff --git a/packages/client/src/pages/admin/other-settings.vue b/packages/client/src/pages/admin/other-settings.vue
index eb47a3fa1..d21d0c599 100644
--- a/packages/client/src/pages/admin/other-settings.vue
+++ b/packages/client/src/pages/admin/other-settings.vue
@@ -1,21 +1,7 @@
-
-
-
- Summaly Proxy URL
-
-
-
-
-
- DeepL Auth Key
-
-
- Pro account
-
-
+ none
@@ -53,9 +39,6 @@ export default defineComponent({
handler: this.save,
}],
},
- summalyProxy: '',
- deeplAuthKey: '',
- deeplIsPro: false,
}
},
@@ -66,15 +49,9 @@ export default defineComponent({
methods: {
async init() {
const meta = await os.api('meta', { detail: true });
- this.summalyProxy = meta.summalyProxy;
- this.deeplAuthKey = meta.deeplAuthKey;
- this.deeplIsPro = meta.deeplIsPro;
},
save() {
os.apiWithDialog('admin/update-meta', {
- summalyProxy: this.summalyProxy,
- deeplAuthKey: this.deeplAuthKey,
- deeplIsPro: this.deeplIsPro,
}).then(() => {
fetchInstance();
});
diff --git a/packages/client/src/pages/admin/security.vue b/packages/client/src/pages/admin/security.vue
index d6ca9e0cb..276c514f1 100644
--- a/packages/client/src/pages/admin/security.vue
+++ b/packages/client/src/pages/admin/security.vue
@@ -11,6 +11,19 @@
+
+
+ Summaly Proxy
+
+
+
+
+ Summaly Proxy URL
+
+
+ {{ $ts.save }}
+
+
@@ -23,6 +36,8 @@ import FormSwitch from '@/components/form/switch.vue';
import FormInfo from '@/components/ui/info.vue';
import FormSuspense from '@/components/form/suspense.vue';
import FormSection from '@/components/form/section.vue';
+import FormInput from '@/components/form/input.vue';
+import FormButton from '@/components/ui/button.vue';
import XBotProtection from './bot-protection.vue';
import * as os from '@/os';
import * as symbols from '@/symbols';
@@ -35,6 +50,8 @@ export default defineComponent({
FormInfo,
FormSection,
FormSuspense,
+ FormButton,
+ FormInput,
XBotProtection,
},
@@ -47,6 +64,7 @@ export default defineComponent({
icon: 'fas fa-lock',
bg: 'var(--bg)',
},
+ summalyProxy: '',
enableHcaptcha: false,
enableRecaptcha: false,
}
@@ -59,9 +77,18 @@ export default defineComponent({
methods: {
async init() {
const meta = await os.api('meta', { detail: true });
+ this.summalyProxy = meta.summalyProxy;
this.enableHcaptcha = meta.enableHcaptcha;
this.enableRecaptcha = meta.enableRecaptcha;
},
+
+ save() {
+ os.apiWithDialog('admin/update-meta', {
+ summalyProxy: this.summalyProxy,
+ }).then(() => {
+ fetchInstance();
+ });
+ }
}
});
diff --git a/packages/client/src/pages/admin/service-worker.vue b/packages/client/src/pages/admin/service-worker.vue
deleted file mode 100644
index eb4c2bb9a..000000000
--- a/packages/client/src/pages/admin/service-worker.vue
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
- {{ $ts.enableServiceworker }}
- {{ $ts.serviceworkerInfo }}
-
-
-
-
-
- Public key
-
-
-
-
- Private key
-
-
-
- {{ $ts.save }}
-
-
-
-
-
diff --git a/packages/client/src/pages/admin/settings.vue b/packages/client/src/pages/admin/settings.vue
index e20ce40c7..802d7463e 100644
--- a/packages/client/src/pages/admin/settings.vue
+++ b/packages/client/src/pages/admin/settings.vue
@@ -94,6 +94,39 @@
+
+
+ ServiceWorker
+
+
+ {{ $ts.enableServiceworker }}
+ {{ $ts.serviceworkerInfo }}
+
+
+
+
+
+ Public key
+
+
+
+
+ Private key
+
+
+
+
+
+ DeepL Translation
+
+
+
+ DeepL Auth Key
+
+
+ Pro account
+
+
@@ -156,6 +189,11 @@ export default defineComponent({
remoteDriveCapacityMb: 0,
enableRegistration: false,
emailRequiredForSignup: false,
+ enableServiceWorker: false,
+ swPublicKey: null,
+ swPrivateKey: null,
+ deeplAuthKey: '',
+ deeplIsPro: false,
}
},
@@ -184,6 +222,11 @@ export default defineComponent({
this.remoteDriveCapacityMb = meta.driveCapacityPerRemoteUserMb;
this.enableRegistration = !meta.disableRegistration;
this.emailRequiredForSignup = meta.emailRequiredForSignup;
+ this.enableServiceWorker = meta.enableServiceWorker;
+ this.swPublicKey = meta.swPublickey;
+ this.swPrivateKey = meta.swPrivateKey;
+ this.deeplAuthKey = meta.deeplAuthKey;
+ this.deeplIsPro = meta.deeplIsPro;
},
save() {
@@ -206,6 +249,11 @@ export default defineComponent({
remoteDriveCapacityMb: parseInt(this.remoteDriveCapacityMb, 10),
disableRegistration: !this.enableRegistration,
emailRequiredForSignup: this.emailRequiredForSignup,
+ enableServiceWorker: this.enableServiceWorker,
+ swPublicKey: this.swPublicKey,
+ swPrivateKey: this.swPrivateKey,
+ deeplAuthKey: this.deeplAuthKey,
+ deeplIsPro: this.deeplIsPro,
}).then(() => {
fetchInstance();
});
diff --git a/packages/client/src/pages/gallery/edit.vue b/packages/client/src/pages/gallery/edit.vue
index d317da038..e3fa1a0fc 100644
--- a/packages/client/src/pages/gallery/edit.vue
+++ b/packages/client/src/pages/gallery/edit.vue
@@ -10,7 +10,7 @@
-