client: re-add flag to require approval for bot follows

This flag was already implemented in the server but not accessible
in the native client for some reason.

Changelog: Added
This commit is contained in:
Johann150 2023-02-18 11:31:01 +01:00
parent 2525b59bb6
commit 0db3f1f8ed
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
2 changed files with 8 additions and 2 deletions

View file

@ -88,6 +88,7 @@ youShouldUpgradeClient: "To view this page, please refresh to update your client
enterListName: "Enter a name for the list"
privacy: "Privacy"
makeFollowManuallyApprove: "Follow requests require approval"
botFollowRequiresApproval: "Follow requests from accounts marked as bots require approval"
defaultNoteVisibility: "Default visibility"
follow: "Follow"
followRequest: "Send follow request"

View file

@ -1,7 +1,10 @@
<template>
<div class="_formRoot">
<FormSwitch v-model="isLocked" class="_formBlock" @update:model-value="save()">{{ i18n.ts.makeFollowManuallyApprove }}<template #caption>{{ i18n.ts.lockedAccountInfo }}</template></FormSwitch>
<FormSwitch v-if="isLocked" v-model="autoAcceptFollowed" class="_formBlock" @update:model-value="save()">{{ i18n.ts.autoAcceptFollowed }}</FormSwitch>
<FormSection>
<FormSwitch v-model="isLocked" class="_formBlock" @update:model-value="save()">{{ i18n.ts.makeFollowManuallyApprove }}<template #caption>{{ i18n.ts.lockedAccountInfo }}</template></FormSwitch>
<FormSwitch v-if="isLocked" v-model="autoAcceptFollowed" class="_formBlock" @update:model-value="save()">{{ i18n.ts.autoAcceptFollowed }}</FormSwitch>
<FormSwitch v-if="!isLocked" v-model="carefulBot" class="_formBlock" @update:model-value="save()">{{ i18n.ts.botFollowRequiresApproval }}</FormSwitch>
</FormSection>
<FormSwitch v-model="publicReactions" class="_formBlock" @update:model-value="save()">
{{ i18n.ts.makeReactionsPublic }}
@ -68,6 +71,7 @@ import { definePageMetadata } from '@/scripts/page-metadata';
let isLocked = $ref($i.isLocked);
let autoAcceptFollowed = $ref($i.autoAcceptFollowed);
let carefulBot = $ref($i.carefulBot);
let noCrawle = $ref($i.noCrawle);
let isExplorable = $ref($i.isExplorable);
let hideOnlineStatus = $ref($i.hideOnlineStatus);
@ -83,6 +87,7 @@ function save(): void {
os.api('i/update', {
isLocked: !!isLocked,
autoAcceptFollowed: !!autoAcceptFollowed,
carefulBot: !!carefulBot,
noCrawle: !!noCrawle,
isExplorable: !!isExplorable,
hideOnlineStatus: !!hideOnlineStatus,