Disable full-text search for visitors

This commit is contained in:
Jeder 2023-08-25 12:09:41 +02:00
parent dca344be07
commit 3cabaf92f8
3 changed files with 22 additions and 2 deletions

View File

@ -1133,6 +1133,8 @@ removeRecipient: "Remove recipient"
removeMember: "Remove member" removeMember: "Remove member"
verifiedLink: "Verified link" verifiedLink: "Verified link"
openInMainColumn: "Open in main column" openInMainColumn: "Open in main column"
searchNotLoggedIn_1: "You have to be authenticated in order to use full text search."
searchNotLoggedIn_2: "However, you can search using hashtags, and search users."
_sensitiveMediaDetection: _sensitiveMediaDetection:
description: "Reduces the effort of server moderation through automatically recognizing description: "Reduces the effort of server moderation through automatically recognizing

View File

@ -15,7 +15,7 @@ import { sqlLikeEscape } from "@/misc/sql-like-escape.js";
export const meta = { export const meta = {
tags: ["notes"], tags: ["notes"],
requireCredential: false, requireCredential: true,
requireCredentialPrivateMode: true, requireCredentialPrivateMode: true,
res: { res: {

View File

@ -25,7 +25,24 @@
@slide-change="onSlideChange" @slide-change="onSlideChange"
> >
<swiper-slide> <swiper-slide>
<XNotes ref="notes" :pagination="notesPagination" /> <template v-if="$i">
<XNotes ref="notes" :pagination="notesPagination" />
</template>
<template v-else>
<transition :name="$store.state.animation ? 'zoom' : ''" appear>
<div class="_fullinfo" ref="notes">
<img
src="/static-assets/badges/info.png"
class="_ghost"
alt="Info"
/>
<div>
{{ i18n.ts.searchNotLoggedIn_1 }}<br>
{{ i18n.ts.searchNotLoggedIn_2 }}
</div>
</div>
</transition>
</template>
</swiper-slide> </swiper-slide>
<swiper-slide> <swiper-slide>
<XUserList <XUserList
@ -49,6 +66,7 @@ import { i18n } from "@/i18n";
import { definePageMetadata } from "@/scripts/page-metadata"; import { definePageMetadata } from "@/scripts/page-metadata";
import { defaultStore } from "@/store"; import { defaultStore } from "@/store";
import { deviceKind } from "@/scripts/device-kind"; import { deviceKind } from "@/scripts/device-kind";
import { $i } from "@/account";
import "swiper/scss"; import "swiper/scss";
import "swiper/scss/virtual"; import "swiper/scss/virtual";