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" enterListName: "Enter a name for the list"
privacy: "Privacy" privacy: "Privacy"
makeFollowManuallyApprove: "Follow requests require approval" makeFollowManuallyApprove: "Follow requests require approval"
botFollowRequiresApproval: "Follow requests from accounts marked as bots require approval"
defaultNoteVisibility: "Default visibility" defaultNoteVisibility: "Default visibility"
follow: "Follow" follow: "Follow"
followRequest: "Send follow request" followRequest: "Send follow request"

View file

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