Merge branch 'develop' into merge/2024-02-03
# Conflicts: # locales/index.d.ts # packages/backend/src/server/api/EndpointsModule.ts # packages/backend/src/server/api/endpoints.ts # packages/misskey-js/src/autogen/endpoint.ts # sharkey-locales/en-US.yml
This commit is contained in:
commit
363111f5de
8 changed files with 132 additions and 0 deletions
|
|
@ -138,6 +138,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template #label>Private key<span v-if="serviceWorkerForm.modifiedStates.swPrivateKey" class="_modified">{{ i18n.ts.modified }}</span></template>
|
||||
<template #prefix><i class="ti ti-key"></i></template>
|
||||
</MkInput>
|
||||
|
||||
<MkButton primary @click="genKeys">{{ i18n.ts.genKeys }}</MkButton>
|
||||
</template>
|
||||
</div>
|
||||
</MkFolder>
|
||||
|
|
@ -434,6 +436,18 @@ function chooseProxyAccount() {
|
|||
});
|
||||
}
|
||||
|
||||
async function genKeys() {
|
||||
if (serviceWorkerForm.savedState.swPrivateKey) {
|
||||
const result = await os.confirm({ type: 'warning', title: i18n.ts._genKeysDialog.title, text: i18n.ts._genKeysDialog.text });
|
||||
if (result.canceled) return;
|
||||
}
|
||||
|
||||
const keys = await os.apiWithDialog('admin/gen-vapid-keys', {});
|
||||
|
||||
serviceWorkerForm.state.swPublicKey = keys.public;
|
||||
serviceWorkerForm.state.swPrivateKey = keys.private;
|
||||
}
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(() => ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue