mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 16:53:09 +02:00
merge: Ability to reset proxy account (!398)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/398
This commit is contained in:
commit
82ae499314
1 changed files with 16 additions and 1 deletions
|
@ -14,7 +14,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<template #value>{{ proxyAccount ? `@${proxyAccount.username}` : i18n.ts.none }}</template>
|
<template #value>{{ proxyAccount ? `@${proxyAccount.username}` : i18n.ts.none }}</template>
|
||||||
</MkKeyValue>
|
</MkKeyValue>
|
||||||
|
|
||||||
|
<div class="_gaps" style="flex-direction:row">
|
||||||
<MkButton primary @click="chooseProxyAccount">{{ i18n.ts.selectAccount }}</MkButton>
|
<MkButton primary @click="chooseProxyAccount">{{ i18n.ts.selectAccount }}</MkButton>
|
||||||
|
<MkButton :disabled="proxyAccount == null" danger @click="resetProxyAccount">Reset</MkButton>
|
||||||
|
</div>
|
||||||
</FormSuspense>
|
</FormSuspense>
|
||||||
</MkSpacer>
|
</MkSpacer>
|
||||||
</MkStickyContainer>
|
</MkStickyContainer>
|
||||||
|
@ -52,6 +55,18 @@ function chooseProxyAccount() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function resetProxyAccount() {
|
||||||
|
const { canceled } = await os.confirm({ type: 'warning', text: i18n.ts.areYouSure });
|
||||||
|
|
||||||
|
if (canceled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
proxyAccount.value = null;
|
||||||
|
proxyAccountId.value = null;
|
||||||
|
save();
|
||||||
|
}
|
||||||
|
|
||||||
function save() {
|
function save() {
|
||||||
os.apiWithDialog('admin/update-meta', {
|
os.apiWithDialog('admin/update-meta', {
|
||||||
proxyAccountId: proxyAccountId.value,
|
proxyAccountId: proxyAccountId.value,
|
||||||
|
|
Loading…
Reference in a new issue