Merge branches 'develop' and 'develop' of codeberg.org:calckey/calckey into develop
This commit is contained in:
commit
e615ff5ebd
@ -226,6 +226,8 @@ _mfm:
|
|||||||
play: Posar en marxa MFM
|
play: Posar en marxa MFM
|
||||||
warn: MFM pot contenir animacions cridaneres o que es mouen ràpidament
|
warn: MFM pot contenir animacions cridaneres o que es mouen ràpidament
|
||||||
alwaysPlay: Reprodueix automàticament tots els MFM animats
|
alwaysPlay: Reprodueix automàticament tots els MFM animats
|
||||||
|
fade: Esvair
|
||||||
|
fadeDescription: Esvaeix el contingut cap a dintre i cap en fora.
|
||||||
_theme:
|
_theme:
|
||||||
keys:
|
keys:
|
||||||
mention: "Menció"
|
mention: "Menció"
|
||||||
@ -712,6 +714,9 @@ _notification:
|
|||||||
pollEnded: Es resultat de la enquesta ja està disponible
|
pollEnded: Es resultat de la enquesta ja està disponible
|
||||||
emptyPushNotificationMessage: Les notificacions push s'han actualitzat
|
emptyPushNotificationMessage: Les notificacions push s'han actualitzat
|
||||||
youWereInvitedToGroup: "{userName} t'ha convidat a un grup"
|
youWereInvitedToGroup: "{userName} t'ha convidat a un grup"
|
||||||
|
reacted: Ha reaccionat a la teva publicació
|
||||||
|
renoted: Ha impulsat la teva publicació
|
||||||
|
voted: Ha votat a la teva enquesta
|
||||||
_deck:
|
_deck:
|
||||||
_columns:
|
_columns:
|
||||||
notifications: "Notificacions"
|
notifications: "Notificacions"
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1962,6 +1962,9 @@ _notification:
|
|||||||
youWereInvitedToGroup: "{userName} invited you to a group"
|
youWereInvitedToGroup: "{userName} invited you to a group"
|
||||||
pollEnded: "Poll results have become available"
|
pollEnded: "Poll results have become available"
|
||||||
emptyPushNotificationMessage: "Push notifications have been updated"
|
emptyPushNotificationMessage: "Push notifications have been updated"
|
||||||
|
reacted: "reacted to your post"
|
||||||
|
renoted: "boosted your post"
|
||||||
|
voted: "voted on your poll"
|
||||||
_types:
|
_types:
|
||||||
all: "All"
|
all: "All"
|
||||||
follow: "New followers"
|
follow: "New followers"
|
||||||
|
@ -102,7 +102,7 @@ unfollow: "Ontvolgen"
|
|||||||
followRequestPending: "Wachten op goedkeuring volgverzoek"
|
followRequestPending: "Wachten op goedkeuring volgverzoek"
|
||||||
enterEmoji: "Voer een emoji in"
|
enterEmoji: "Voer een emoji in"
|
||||||
renote: "Boost"
|
renote: "Boost"
|
||||||
unrenote: "Stop herdelen"
|
unrenote: "Boost intrekken"
|
||||||
renoted: "Boosted."
|
renoted: "Boosted."
|
||||||
cantRenote: "Dit bericht kan niet worden geboost."
|
cantRenote: "Dit bericht kan niet worden geboost."
|
||||||
cantReRenote: "Een boost kan niet worden geboost."
|
cantReRenote: "Een boost kan niet worden geboost."
|
||||||
@ -145,7 +145,7 @@ autoAcceptFollowed: "Accepteer verzoeken om jezelf te volgen vanzelf als je de v
|
|||||||
al volgt"
|
al volgt"
|
||||||
addAccount: "Account toevoegen"
|
addAccount: "Account toevoegen"
|
||||||
loginFailed: "Aanmelding mislukt."
|
loginFailed: "Aanmelding mislukt."
|
||||||
showOnRemote: "Toon op de externe instantie."
|
showOnRemote: "Bekijk op de externe server"
|
||||||
general: "Algemeen"
|
general: "Algemeen"
|
||||||
wallpaper: "Achtergrond"
|
wallpaper: "Achtergrond"
|
||||||
setWallpaper: "Achtergrond instellen"
|
setWallpaper: "Achtergrond instellen"
|
||||||
@ -164,7 +164,7 @@ selectUser: "Kies een gebruiker"
|
|||||||
recipient: "Ontvanger(s)"
|
recipient: "Ontvanger(s)"
|
||||||
annotation: "Reacties"
|
annotation: "Reacties"
|
||||||
federation: "Federatie"
|
federation: "Federatie"
|
||||||
instances: "Server"
|
instances: "Servers"
|
||||||
registeredAt: "Geregistreerd op"
|
registeredAt: "Geregistreerd op"
|
||||||
latestRequestSentAt: "Laatste aanvraag verstuurd"
|
latestRequestSentAt: "Laatste aanvraag verstuurd"
|
||||||
latestRequestReceivedAt: "Laatste aanvraag ontvangen"
|
latestRequestReceivedAt: "Laatste aanvraag ontvangen"
|
||||||
@ -189,8 +189,8 @@ instanceInfo: "Serverinformatie"
|
|||||||
statistics: "Statistieken"
|
statistics: "Statistieken"
|
||||||
clearQueue: "Wachtrij wissen"
|
clearQueue: "Wachtrij wissen"
|
||||||
clearQueueConfirmTitle: "Weet je zeker dat je de wachtrji leeg wil maken?"
|
clearQueueConfirmTitle: "Weet je zeker dat je de wachtrji leeg wil maken?"
|
||||||
clearQueueConfirmText: "Niet-bezorgde biljetten die nog in de wachtrij staan, worden
|
clearQueueConfirmText: "Niet-bezorgde posts die nog in de wachtrij staan, worden niet
|
||||||
niet gefedereerd. Meestal is deze operatie niet nodig."
|
gefedereerd. Meestal is deze operatie niet nodig."
|
||||||
clearCachedFiles: "Cache opschonen"
|
clearCachedFiles: "Cache opschonen"
|
||||||
clearCachedFilesConfirm: "Weet je zeker dat je alle externe bestanden in de cache
|
clearCachedFilesConfirm: "Weet je zeker dat je alle externe bestanden in de cache
|
||||||
wilt verwijderen?"
|
wilt verwijderen?"
|
||||||
@ -519,3 +519,117 @@ renoteUnmute: Ontdemp boosts
|
|||||||
jumpToPrevious: Spring naar vorige
|
jumpToPrevious: Spring naar vorige
|
||||||
caseSensitive: Hoofdlettergevoelig
|
caseSensitive: Hoofdlettergevoelig
|
||||||
cw: Inhoudswaarschuwing
|
cw: Inhoudswaarschuwing
|
||||||
|
recaptcha: reCAPTCHA
|
||||||
|
enableRecaptcha: reCAPTCHA inschakelen
|
||||||
|
recaptchaSiteKey: Site sleutel
|
||||||
|
notFoundDescription: Een pagina met deze URL kon niet worden gevonden.
|
||||||
|
uploadFolder: Standaard map voor uploads
|
||||||
|
markAsReadAllNotifications: Markeer alle notificaties als gelezen
|
||||||
|
text: Tekst
|
||||||
|
enable: Inschakelen
|
||||||
|
or: Of
|
||||||
|
language: Taal
|
||||||
|
securityKey: Veiligheidssleutel
|
||||||
|
groupInvited: Je bent voor een groep uitgenodigd
|
||||||
|
docSource: Bron van dit document
|
||||||
|
createAccount: Maak account aan
|
||||||
|
groupName: Groepsnaam
|
||||||
|
members: Leden
|
||||||
|
messagingWithUser: Privé chat
|
||||||
|
messagingWithGroup: Groepschat
|
||||||
|
title: Titel
|
||||||
|
createGroup: Maak een groep
|
||||||
|
ownedGroups: Beheerde groepen
|
||||||
|
invites: Uitnodigingen
|
||||||
|
useOsNativeEmojis: Gebruik je standaard besturingssysteem Emojis
|
||||||
|
disableDrawer: Gebruik niet de lade-stijl menus
|
||||||
|
joinOrCreateGroup: Krijg een uitnodiging voor een groep of maak er zelf eentje aan.
|
||||||
|
noHistory: Geen geschiedenis beschikbaar
|
||||||
|
signinHistory: Inloggeschiedenis
|
||||||
|
available: Beschikbaar
|
||||||
|
unavailable: Niet beschikbaar
|
||||||
|
tooShort: Te kort
|
||||||
|
signinFailed: Niet gelukt om in te loggen. Gebruikersnaam of wachtwoord is incorrect.
|
||||||
|
tapSecurityKey: Tik je veiligheidssleutel aan
|
||||||
|
recaptchaSecretKey: Geheime sleutel
|
||||||
|
antennas: Antennes
|
||||||
|
antennaUsersDescription: Zet één gebruikersnaam per regel neer
|
||||||
|
notesAndReplies: Posts en antwoorden
|
||||||
|
withFiles: Met bestanden
|
||||||
|
popularUsers: Populaire gebruikers
|
||||||
|
recentlyUpdatedUsers: Recente actieve gebruikers
|
||||||
|
recentlyRegisteredUsers: Nieuwe gebruikers
|
||||||
|
recentlyDiscoveredUsers: Nieuwe ontdekte gebruikers
|
||||||
|
exploreUsersCount: Er zijn {count} gebruikers
|
||||||
|
about: Over
|
||||||
|
exploreFediverse: Ontdek de Fediverse
|
||||||
|
popularTags: Populaire labels
|
||||||
|
moderation: Moderatie
|
||||||
|
nUsersMentioned: Genoemd door {n} gebruikers
|
||||||
|
markAsReadAllUnreadNotes: Markeer alle posts als gelezen
|
||||||
|
markAsReadAllTalkMessages: Markeer alle berichten als gelezen
|
||||||
|
help: Help
|
||||||
|
inputMessageHere: Schrijf hier je bericht
|
||||||
|
close: Sluiten
|
||||||
|
group: Groep
|
||||||
|
groups: Groepen
|
||||||
|
newMessageExists: Er zijn nieuwe berichten
|
||||||
|
next: Volgende
|
||||||
|
noteOf: Post door {user}
|
||||||
|
inviteToGroup: Nodig uit voor de groep
|
||||||
|
quoteAttached: Quote
|
||||||
|
noMessagesYet: Nog geen berichten
|
||||||
|
weakPassword: Zwak wachtwoord
|
||||||
|
normalPassword: Middelmatig wachtwoord
|
||||||
|
strongPassword: Sterk wachtwoord
|
||||||
|
onlyOneFileCanBeAttached: Je kan maar één bestand toevoegen aan je bericht
|
||||||
|
invitationCode: Uitnodigingscode
|
||||||
|
checking: Controleren...
|
||||||
|
uiLanguage: Gebruikersinterface taal
|
||||||
|
aboutX: Over {x}
|
||||||
|
youHaveNoGroups: Je hebt geen groepen
|
||||||
|
disableAnimatedMfm: Schakel MFM met animaties uit
|
||||||
|
passwordMatched: Komt overeen
|
||||||
|
passwordNotMatched: Komt niet overeen
|
||||||
|
signinWith: Log in met {x}
|
||||||
|
fontSize: Tekstgrootte
|
||||||
|
openImageInNewTab: Open afbeeldingen in een nieuwe tab
|
||||||
|
category: Categorie
|
||||||
|
tags: Labels
|
||||||
|
existingAccount: Bestaand account
|
||||||
|
regenerate: Hernieuwen
|
||||||
|
dayOverDayChanges: Verschillen met gisteren
|
||||||
|
appearance: Uiterlijk
|
||||||
|
local: Lokaal
|
||||||
|
remote: Extern
|
||||||
|
total: Totaal
|
||||||
|
weekOverWeekChanges: Verschillen met vorige week
|
||||||
|
hcaptcha: hCaptcha
|
||||||
|
enableHcaptcha: hCaptcha inschakelen
|
||||||
|
hcaptchaSiteKey: Site sleutel
|
||||||
|
hcaptchaSecretKey: Geheime sleutel
|
||||||
|
withReplies: Met antwoorden
|
||||||
|
twoStepAuthentication: Tweefactorauthenticatie
|
||||||
|
moderator: Moderator
|
||||||
|
invitations: Uitnodigingen
|
||||||
|
tooLong: Te lang
|
||||||
|
doing: Verwerken...
|
||||||
|
silencedInstances: Gedempte Servers
|
||||||
|
cacheRemoteFilesDescription: Als deze instelling is uitgeschakeld, worden externe
|
||||||
|
bestanden direct van de externe server geladen. Het uitschakelen zal opslagruimte
|
||||||
|
verminderen, maar verkeer zal toenemen, omdat er geen thumbnails gemaakt zullen
|
||||||
|
worden.
|
||||||
|
flagSpeakAsCatDescription: Je posts zullen worden ge-'nyanified' als je in kat-modus
|
||||||
|
zit
|
||||||
|
avoidMultiCaptchaConfirm: Het gebruik van meerdere Captcha systemen kan voor storing
|
||||||
|
zorgen tussen ze. Wil je de andere actieve Captcha systemen uitschakelen? Als je
|
||||||
|
ze ingeschakeld wilt houden, klik op annuleren.
|
||||||
|
silence: Dempen
|
||||||
|
silenceConfirm: Weet je zeker dat je deze gebruiker wilt dempen?
|
||||||
|
unsilence: Ontdempen
|
||||||
|
unsilenceConfirm: Weet je zeker dat je het dempen van deze gebruiker ongedaan wilt
|
||||||
|
maken?
|
||||||
|
silenceThisInstance: Demp deze server
|
||||||
|
silenced: Gedempt
|
||||||
|
disablingTimelinesInfo: Beheerders en moderators zullen altijd toegang hebben tot
|
||||||
|
alle tijdlijnen, zelfs als deze uitgeschakeld zijn.
|
||||||
|
@ -2,6 +2,7 @@ import define from "../../../define.js";
|
|||||||
import { Emojis } from "@/models/index.js";
|
import { Emojis } from "@/models/index.js";
|
||||||
import { toPuny } from "@/misc/convert-host.js";
|
import { toPuny } from "@/misc/convert-host.js";
|
||||||
import { makePaginationQuery } from "../../../common/make-pagination-query.js";
|
import { makePaginationQuery } from "../../../common/make-pagination-query.js";
|
||||||
|
import { sqlLikeEscape } from "@/misc/sql-like-escape.js";
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ["admin"],
|
tags: ["admin"],
|
||||||
@ -106,7 +107,9 @@ export default define(meta, paramDef, async (ps) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ps.query) {
|
if (ps.query) {
|
||||||
q.andWhere("emoji.name like :query", { query: `%${ps.query}%` });
|
q.andWhere("emoji.name like :query", {
|
||||||
|
query: `%${sqlLikeEscape(ps.query)}%`,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const emojis = await q.orderBy("emoji.id", "DESC").take(ps.limit).getMany();
|
const emojis = await q.orderBy("emoji.id", "DESC").take(ps.limit).getMany();
|
||||||
|
@ -2,6 +2,7 @@ import define from "../../../define.js";
|
|||||||
import { Emojis } from "@/models/index.js";
|
import { Emojis } from "@/models/index.js";
|
||||||
import { makePaginationQuery } from "../../../common/make-pagination-query.js";
|
import { makePaginationQuery } from "../../../common/make-pagination-query.js";
|
||||||
import type { Emoji } from "@/models/entities/emoji.js";
|
import type { Emoji } from "@/models/entities/emoji.js";
|
||||||
|
//import { sqlLikeEscape } from "@/misc/sql-like-escape.js";
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ["admin"],
|
tags: ["admin"],
|
||||||
@ -96,7 +97,7 @@ export default define(meta, paramDef, async (ps) => {
|
|||||||
let emojis: Emoji[];
|
let emojis: Emoji[];
|
||||||
|
|
||||||
if (ps.query) {
|
if (ps.query) {
|
||||||
//q.andWhere('emoji.name ILIKE :q', { q: `%${ps.query}%` });
|
//q.andWhere('emoji.name ILIKE :q', { q: `%${sqlLikeEscape(ps.query)}%` });
|
||||||
//const emojis = await q.take(ps.limit).getMany();
|
//const emojis = await q.take(ps.limit).getMany();
|
||||||
|
|
||||||
emojis = await q.getMany();
|
emojis = await q.getMany();
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { Users } from "@/models/index.js";
|
import { Users } from "@/models/index.js";
|
||||||
import define from "../../define.js";
|
import define from "../../define.js";
|
||||||
|
import { sqlLikeEscape } from "@/misc/sql-like-escape.js";
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ["admin"],
|
tags: ["admin"],
|
||||||
@ -106,7 +107,7 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||||||
|
|
||||||
if (ps.username) {
|
if (ps.username) {
|
||||||
query.andWhere("user.usernameLower like :username", {
|
query.andWhere("user.usernameLower like :username", {
|
||||||
username: `${ps.username.toLowerCase()}%`,
|
username: `${sqlLikeEscape(ps.username.toLowerCase())}%`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ import config from "@/config/index.js";
|
|||||||
import define from "../../define.js";
|
import define from "../../define.js";
|
||||||
import { Instances } from "@/models/index.js";
|
import { Instances } from "@/models/index.js";
|
||||||
import { fetchMeta } from "@/misc/fetch-meta.js";
|
import { fetchMeta } from "@/misc/fetch-meta.js";
|
||||||
|
import { sqlLikeEscape } from "@/misc/sql-like-escape.js";
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ["federation"],
|
tags: ["federation"],
|
||||||
@ -178,7 +179,7 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||||||
|
|
||||||
if (ps.host) {
|
if (ps.host) {
|
||||||
query.andWhere("instance.host like :host", {
|
query.andWhere("instance.host like :host", {
|
||||||
host: `%${ps.host.toLowerCase()}%`,
|
host: `%${sqlLikeEscape(ps.host.toLowerCase())}%`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import define from "../../define.js";
|
import define from "../../define.js";
|
||||||
import { Hashtags } from "@/models/index.js";
|
import { Hashtags } from "@/models/index.js";
|
||||||
|
import { sqlLikeEscape } from "@/misc/sql-like-escape.js";
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ["hashtags"],
|
tags: ["hashtags"],
|
||||||
@ -31,7 +32,9 @@ export const paramDef = {
|
|||||||
|
|
||||||
export default define(meta, paramDef, async (ps) => {
|
export default define(meta, paramDef, async (ps) => {
|
||||||
const hashtags = await Hashtags.createQueryBuilder("tag")
|
const hashtags = await Hashtags.createQueryBuilder("tag")
|
||||||
.where("tag.name like :q", { q: `${ps.query.toLowerCase()}%` })
|
.where("tag.name like :q", {
|
||||||
|
q: `${sqlLikeEscape(ps.query.toLowerCase())}%`,
|
||||||
|
})
|
||||||
.orderBy("tag.count", "DESC")
|
.orderBy("tag.count", "DESC")
|
||||||
.groupBy("tag.id")
|
.groupBy("tag.id")
|
||||||
.take(ps.limit)
|
.take(ps.limit)
|
||||||
|
@ -9,6 +9,7 @@ import { makePaginationQuery } from "../../common/make-pagination-query.js";
|
|||||||
import { generateVisibilityQuery } from "../../common/generate-visibility-query.js";
|
import { generateVisibilityQuery } from "../../common/generate-visibility-query.js";
|
||||||
import { generateMutedUserQuery } from "../../common/generate-muted-user-query.js";
|
import { generateMutedUserQuery } from "../../common/generate-muted-user-query.js";
|
||||||
import { generateBlockedUserQuery } from "../../common/generate-block-query.js";
|
import { generateBlockedUserQuery } from "../../common/generate-block-query.js";
|
||||||
|
import { sqlLikeEscape } from "@/misc/sql-like-escape.js";
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ["notes"],
|
tags: ["notes"],
|
||||||
@ -77,7 +78,7 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
query
|
query
|
||||||
.andWhere("note.text ILIKE :q", { q: `%${ps.query}%` })
|
.andWhere("note.text ILIKE :q", { q: `%${sqlLikeEscape(ps.query)}%` })
|
||||||
.innerJoinAndSelect("note.user", "user")
|
.innerJoinAndSelect("note.user", "user")
|
||||||
.leftJoinAndSelect("user.avatar", "avatar")
|
.leftJoinAndSelect("user.avatar", "avatar")
|
||||||
.leftJoinAndSelect("user.banner", "banner")
|
.leftJoinAndSelect("user.banner", "banner")
|
||||||
|
@ -3,6 +3,7 @@ import { Followings, Users } from "@/models/index.js";
|
|||||||
import { USER_ACTIVE_THRESHOLD } from "@/const.js";
|
import { USER_ACTIVE_THRESHOLD } from "@/const.js";
|
||||||
import type { User } from "@/models/entities/user.js";
|
import type { User } from "@/models/entities/user.js";
|
||||||
import define from "../../define.js";
|
import define from "../../define.js";
|
||||||
|
import { sqlLikeEscape } from "@/misc/sql-like-escape.js";
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ["users"],
|
tags: ["users"],
|
||||||
@ -44,11 +45,13 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||||||
if (ps.host) {
|
if (ps.host) {
|
||||||
const q = Users.createQueryBuilder("user")
|
const q = Users.createQueryBuilder("user")
|
||||||
.where("user.isSuspended = FALSE")
|
.where("user.isSuspended = FALSE")
|
||||||
.andWhere("user.host LIKE :host", { host: `${ps.host.toLowerCase()}%` });
|
.andWhere("user.host LIKE :host", {
|
||||||
|
host: `${sqlLikeEscape(ps.host.toLowerCase())}%`,
|
||||||
|
});
|
||||||
|
|
||||||
if (ps.username) {
|
if (ps.username) {
|
||||||
q.andWhere("user.usernameLower LIKE :username", {
|
q.andWhere("user.usernameLower LIKE :username", {
|
||||||
username: `${ps.username.toLowerCase()}%`,
|
username: `${sqlLikeEscape(ps.username.toLowerCase())}%`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,7 +74,7 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||||||
.andWhere("user.id != :meId", { meId: me.id })
|
.andWhere("user.id != :meId", { meId: me.id })
|
||||||
.andWhere("user.isSuspended = FALSE")
|
.andWhere("user.isSuspended = FALSE")
|
||||||
.andWhere("user.usernameLower LIKE :username", {
|
.andWhere("user.usernameLower LIKE :username", {
|
||||||
username: `${ps.username.toLowerCase()}%`,
|
username: `${sqlLikeEscape(ps.username.toLowerCase())}%`,
|
||||||
})
|
})
|
||||||
.andWhere(
|
.andWhere(
|
||||||
new Brackets((qb) => {
|
new Brackets((qb) => {
|
||||||
@ -95,7 +98,7 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||||||
.andWhere("user.id != :meId", { meId: me.id })
|
.andWhere("user.id != :meId", { meId: me.id })
|
||||||
.andWhere("user.isSuspended = FALSE")
|
.andWhere("user.isSuspended = FALSE")
|
||||||
.andWhere("user.usernameLower LIKE :username", {
|
.andWhere("user.usernameLower LIKE :username", {
|
||||||
username: `${ps.username.toLowerCase()}%`,
|
username: `${sqlLikeEscape(ps.username.toLowerCase())}%`,
|
||||||
})
|
})
|
||||||
.andWhere("user.updatedAt IS NOT NULL");
|
.andWhere("user.updatedAt IS NOT NULL");
|
||||||
|
|
||||||
@ -112,7 +115,7 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||||||
users = await Users.createQueryBuilder("user")
|
users = await Users.createQueryBuilder("user")
|
||||||
.where("user.isSuspended = FALSE")
|
.where("user.isSuspended = FALSE")
|
||||||
.andWhere("user.usernameLower LIKE :username", {
|
.andWhere("user.usernameLower LIKE :username", {
|
||||||
username: `${ps.username.toLowerCase()}%`,
|
username: `${sqlLikeEscape(ps.username.toLowerCase())}%`,
|
||||||
})
|
})
|
||||||
.andWhere("user.updatedAt IS NOT NULL")
|
.andWhere("user.updatedAt IS NOT NULL")
|
||||||
.orderBy("user.updatedAt", "DESC")
|
.orderBy("user.updatedAt", "DESC")
|
||||||
|
@ -2,6 +2,7 @@ import { Brackets } from "typeorm";
|
|||||||
import { UserProfiles, Users } from "@/models/index.js";
|
import { UserProfiles, Users } from "@/models/index.js";
|
||||||
import type { User } from "@/models/entities/user.js";
|
import type { User } from "@/models/entities/user.js";
|
||||||
import define from "../../define.js";
|
import define from "../../define.js";
|
||||||
|
import { sqlLikeEscape } from "@/misc/sql-like-escape.js";
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ["users"],
|
tags: ["users"],
|
||||||
@ -50,7 +51,7 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||||||
if (isUsername) {
|
if (isUsername) {
|
||||||
const usernameQuery = Users.createQueryBuilder("user")
|
const usernameQuery = Users.createQueryBuilder("user")
|
||||||
.where("user.usernameLower LIKE :username", {
|
.where("user.usernameLower LIKE :username", {
|
||||||
username: `${ps.query.replace("@", "").toLowerCase()}%`,
|
username: `${sqlLikeEscape(ps.query.replace("@", "").toLowerCase())}%`,
|
||||||
})
|
})
|
||||||
.andWhere(
|
.andWhere(
|
||||||
new Brackets((qb) => {
|
new Brackets((qb) => {
|
||||||
@ -77,12 +78,14 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||||||
const nameQuery = Users.createQueryBuilder("user")
|
const nameQuery = Users.createQueryBuilder("user")
|
||||||
.where(
|
.where(
|
||||||
new Brackets((qb) => {
|
new Brackets((qb) => {
|
||||||
qb.where("user.name ILIKE :query", { query: `%${ps.query}%` });
|
qb.where("user.name ILIKE :query", {
|
||||||
|
query: `%${sqlLikeEscape(ps.query)}%`,
|
||||||
|
});
|
||||||
|
|
||||||
// Also search username if it qualifies as username
|
// Also search username if it qualifies as username
|
||||||
if (Users.validateLocalUsername(ps.query)) {
|
if (Users.validateLocalUsername(ps.query)) {
|
||||||
qb.orWhere("user.usernameLower LIKE :username", {
|
qb.orWhere("user.usernameLower LIKE :username", {
|
||||||
username: `%${ps.query.toLowerCase()}%`,
|
username: `%${sqlLikeEscape(ps.query.toLowerCase())}%`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
@ -113,7 +116,7 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||||||
const profQuery = UserProfiles.createQueryBuilder("prof")
|
const profQuery = UserProfiles.createQueryBuilder("prof")
|
||||||
.select("prof.userId")
|
.select("prof.userId")
|
||||||
.where("prof.description ILIKE :query", {
|
.where("prof.description ILIKE :query", {
|
||||||
query: `%${ps.query}%`,
|
query: `%${sqlLikeEscape(ps.query)}%`,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ps.origin === "local") {
|
if (ps.origin === "local") {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
v-show="!isDeleted"
|
v-show="!isDeleted"
|
||||||
ref="el"
|
ref="el"
|
||||||
v-hotkey="keymap"
|
v-hotkey="keymap"
|
||||||
v-size="{ max: [500, 450, 350, 300] }"
|
v-size="{ max: [500, 450, 350] }"
|
||||||
class="tkcbzcuz note-container"
|
class="tkcbzcuz note-container"
|
||||||
:tabindex="!isDeleted ? '-1' : null"
|
:tabindex="!isDeleted ? '-1' : null"
|
||||||
:class="{ renote: isRenote }"
|
:class="{ renote: isRenote }"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
ref="elRef"
|
ref="elRef"
|
||||||
v-size="{ max: [500, 600] }"
|
v-size="{ max: [500, 450] }"
|
||||||
class="qglefbjs"
|
class="qglefbjs notification"
|
||||||
:class="notification.type"
|
:class="notification.type"
|
||||||
>
|
>
|
||||||
<div class="head">
|
<div class="head">
|
||||||
@ -114,6 +114,7 @@
|
|||||||
:to="notePage(notification.note)"
|
:to="notePage(notification.note)"
|
||||||
:title="getNoteSummary(notification.note)"
|
:title="getNoteSummary(notification.note)"
|
||||||
>
|
>
|
||||||
|
<span>{{ i18n.ts._notification.reacted }}</span>
|
||||||
<i class="ph-quotes ph-fill ph-lg"></i>
|
<i class="ph-quotes ph-fill ph-lg"></i>
|
||||||
<Mfm
|
<Mfm
|
||||||
:text="getNoteSummary(notification.note)"
|
:text="getNoteSummary(notification.note)"
|
||||||
@ -129,6 +130,7 @@
|
|||||||
:to="notePage(notification.note)"
|
:to="notePage(notification.note)"
|
||||||
:title="getNoteSummary(notification.note.renote)"
|
:title="getNoteSummary(notification.note.renote)"
|
||||||
>
|
>
|
||||||
|
<span>{{ i18n.ts._notification.renoted }}</span>
|
||||||
<i class="ph-quotes ph-fill ph-lg"></i>
|
<i class="ph-quotes ph-fill ph-lg"></i>
|
||||||
<Mfm
|
<Mfm
|
||||||
:text="getNoteSummary(notification.note.renote)"
|
:text="getNoteSummary(notification.note.renote)"
|
||||||
@ -183,6 +185,7 @@
|
|||||||
:to="notePage(notification.note)"
|
:to="notePage(notification.note)"
|
||||||
:title="getNoteSummary(notification.note)"
|
:title="getNoteSummary(notification.note)"
|
||||||
>
|
>
|
||||||
|
<span>{{ i18n.ts._notification.voted }}</span>
|
||||||
<i class="ph-quotes ph-fill ph-lg"></i>
|
<i class="ph-quotes ph-fill ph-lg"></i>
|
||||||
<Mfm
|
<Mfm
|
||||||
:text="getNoteSummary(notification.note)"
|
:text="getNoteSummary(notification.note)"
|
||||||
@ -210,7 +213,7 @@
|
|||||||
<span
|
<span
|
||||||
v-if="notification.type === 'follow'"
|
v-if="notification.type === 'follow'"
|
||||||
class="text"
|
class="text"
|
||||||
style="opacity: 0.6"
|
style="opacity: 0.7"
|
||||||
>{{ i18n.ts.youGotNewFollower }}
|
>{{ i18n.ts.youGotNewFollower }}
|
||||||
<div v-if="full">
|
<div v-if="full">
|
||||||
<MkFollowButton
|
<MkFollowButton
|
||||||
@ -221,13 +224,13 @@
|
|||||||
<span
|
<span
|
||||||
v-if="notification.type === 'followRequestAccepted'"
|
v-if="notification.type === 'followRequestAccepted'"
|
||||||
class="text"
|
class="text"
|
||||||
style="opacity: 0.6"
|
style="opacity: 0.7"
|
||||||
>{{ i18n.ts.followRequestAccepted }}</span
|
>{{ i18n.ts.followRequestAccepted }}</span
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-if="notification.type === 'receiveFollowRequest'"
|
v-if="notification.type === 'receiveFollowRequest'"
|
||||||
class="text"
|
class="text"
|
||||||
style="opacity: 0.6"
|
style="opacity: 0.7"
|
||||||
>{{ i18n.ts.receiveFollowRequest }}
|
>{{ i18n.ts.receiveFollowRequest }}
|
||||||
<div v-if="full && !followRequestDone">
|
<div v-if="full && !followRequestDone">
|
||||||
<button class="_textButton" @click="acceptFollowRequest()">
|
<button class="_textButton" @click="acceptFollowRequest()">
|
||||||
@ -242,7 +245,7 @@
|
|||||||
<span
|
<span
|
||||||
v-if="notification.type === 'groupInvited'"
|
v-if="notification.type === 'groupInvited'"
|
||||||
class="text"
|
class="text"
|
||||||
style="opacity: 0.6"
|
style="opacity: 0.7"
|
||||||
>{{ i18n.ts.groupInvited }}:
|
>{{ i18n.ts.groupInvited }}:
|
||||||
<b>{{ notification.invitation.group.name }}</b>
|
<b>{{ notification.invitation.group.name }}</b>
|
||||||
<div v-if="full && !groupInviteDone">
|
<div v-if="full && !groupInviteDone">
|
||||||
@ -389,14 +392,13 @@ useTooltip(reactionRef, (showing) => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
contain: content;
|
contain: content;
|
||||||
|
|
||||||
&.max-width_600px {
|
|
||||||
padding: 16px;
|
|
||||||
font-size: 0.9em;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.max-width_500px {
|
&.max-width_500px {
|
||||||
padding: 12px;
|
padding-block: 16px;
|
||||||
font-size: 0.85em;
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
&.max-width_450px {
|
||||||
|
padding: 12px 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .head {
|
> .head {
|
||||||
@ -509,9 +511,17 @@ useTooltip(reactionRef, (showing) => {
|
|||||||
|
|
||||||
> .text {
|
> .text {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 3;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
> span:first-child {
|
||||||
|
opacity: .7;
|
||||||
|
&::after { content: ": " }
|
||||||
|
}
|
||||||
|
|
||||||
> i {
|
> i {
|
||||||
vertical-align: super;
|
vertical-align: super;
|
||||||
font-size: 50%;
|
font-size: 50%;
|
||||||
|
@ -361,7 +361,7 @@ onMounted(() => {
|
|||||||
> span {
|
> span {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
:global(span) {
|
:deep(span) {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user