remove pinned users

Changelog: Removed
This commit is contained in:
Johann150 2024-01-02 23:42:46 +01:00
parent 6bd42ab3f9
commit 2cf80a8ccf
Signed by: Johann150
GPG key ID: 9EE6577A2A06F8F1
27 changed files with 10 additions and 123 deletions

View file

@ -299,9 +299,6 @@ inMb: "بالميغابايت"
iconUrl: "رابط الأيقونة"
bannerUrl: "رابط صورة اللافتة"
backgroundImageUrl: "رابط صورة الخلفية"
pinnedUsers: "المستخدمون المدبسون"
pinnedUsersDescription: "قائمة المستخدمين المدبسين في لسان \"استكشف\" ، اجعل كل اسم\
\ مستخدم في سطر لوحده."
hcaptchaSiteKey: "مفتاح الموقع"
hcaptchaSecretKey: "المفتاح السري"
recaptchaSiteKey: "مفتاح الموقع"

View file

@ -314,9 +314,6 @@ inMb: "মেগাবাইটে লিখুন"
iconUrl: "আইকনের URL (ফ্যাভিকন, ইত্যাদি)"
bannerUrl: "ব্যানার ছবির URL"
backgroundImageUrl: "পটভূমির চিত্রের URL"
pinnedUsers: "পিন করা ব্যাবহারকারীগণ"
pinnedUsersDescription: "আপনি যেসব ব্যবহারকারীদের \"ঘুরে দেখুন\" পৃষ্ঠায় পিন করতে\
\ চান তাদের বর্ণনা করুন, প্রত্যেকের বর্ণনা আলাদা লাইনে লিখুন"
hcaptchaSiteKey: "সাইট কী"
hcaptchaSecretKey: "সিক্রেট কী"
recaptchaSiteKey: "সাইট কী"

View file

@ -280,7 +280,6 @@ inMb: "V megabajtech"
iconUrl: "Favicon URL"
bannerUrl: "Baner URL"
backgroundImageUrl: "Adresa URL obrázku pozadí"
pinnedUsers: "Připnutí uživatelé"
hcaptchaSecretKey: "Tajný Klíč (Secret Key)"
recaptchaSecretKey: "Tajný Klíč (Secret Key)"
antennas: "Antény"

View file

@ -327,9 +327,6 @@ inMb: "In Megabytes"
iconUrl: "Icon-URL (favicon etc)"
bannerUrl: "Banner-URL"
backgroundImageUrl: "Hintergrundbild-URL"
pinnedUsers: "Angeheftete Benutzer"
pinnedUsersDescription: "Gib durch Leerzeichen getrennte Benutzer an, die an die \"\
Erkunden\"-Seite angeheftet werden sollen."
hcaptchaSiteKey: "Site key"
hcaptchaSecretKey: "Geheimer Schlüssel"
recaptchaSiteKey: "Site-Schlüssel"

View file

@ -323,9 +323,6 @@ inMb: "In megabytes"
iconUrl: "Icon URL"
bannerUrl: "Banner image URL"
backgroundImageUrl: "Background image URL"
pinnedUsers: "Pinned users"
pinnedUsersDescription: "List usernames separated by line breaks to be pinned in the\
\ \"Explore\" tab."
hcaptchaSiteKey: "Site key"
hcaptchaSecretKey: "Secret key"
recaptchaSiteKey: "Site key"

View file

@ -318,9 +318,6 @@ inMb: "En megabytes"
iconUrl: "URL de la imagen del avatar"
bannerUrl: "URL de la imagen del banner"
backgroundImageUrl: "URL de la imagen de fondo"
pinnedUsers: "Usuarios fijados"
pinnedUsersDescription: "Describir los usuarios que quiere fijar en la página \"Descubrir\"\
\ separados por una linea nueva"
hcaptchaSiteKey: "Clave del sitio"
hcaptchaSecretKey: "Clave secreta"
recaptchaSiteKey: "Clave del sitio"

View file

@ -319,9 +319,6 @@ inMb: "en mégaoctets"
iconUrl: "URL de l'icône"
bannerUrl: "URL de limage de la bannière"
backgroundImageUrl: "URL de l'image d'arrière-plan"
pinnedUsers: "Utilisateur·rice épinglé·e"
pinnedUsersDescription: "Listez les utilisateur·rice·s que vous souhaitez voir épinglé·e·s\
\ sur la page \"Découvrir\", un·e par ligne."
hcaptchaSiteKey: "Clé du site"
hcaptchaSecretKey: "Clé secrète"
recaptchaSiteKey: "Clé du site"

View file

@ -316,9 +316,6 @@ inMb: "dalam Megabytes"
iconUrl: "URL Gambar ikon"
bannerUrl: "URL Banner"
backgroundImageUrl: "URL Gambar latar"
pinnedUsers: "Pengguna yang disematkan"
pinnedUsersDescription: "Tuliskan satu nama pengguna dalam satu baris. Pengguna yang\
\ dituliskan disini akan disematkan dalam bilah \"Jelajahi\"."
hcaptchaSiteKey: "Site Key"
hcaptchaSecretKey: "Secret Key"
recaptchaSiteKey: "Site key"

View file

@ -310,9 +310,6 @@ inMb: "in Megabytes"
iconUrl: "URL di icona (favicon, ecc.)"
bannerUrl: "URL dell'immagine d'intestazione"
backgroundImageUrl: "URL dello sfondo"
pinnedUsers: "Utenti in evidenza"
pinnedUsersDescription: "Elenca gli/le utenti che vuoi fissare in cima alla pagina\
\ \"Esplora\", un@ per riga."
hcaptchaSiteKey: "Chiave del sito"
hcaptchaSecretKey: "Chiave segreta"
recaptchaSiteKey: "Chiave del sito"

View file

@ -291,8 +291,6 @@ inMb: "メガバイト単位"
iconUrl: "アイコン画像のURL (faviconなど)"
bannerUrl: "バナー画像のURL"
backgroundImageUrl: "背景画像のURL"
pinnedUsers: "ピン留めユーザー"
pinnedUsersDescription: "「みつける」ページなどにピン留めしたいユーザーを改行で区切って記述します。"
hcaptchaSiteKey: "サイトキー"
hcaptchaSecretKey: "シークレットキー"
recaptchaSiteKey: "サイトキー"

View file

@ -297,8 +297,6 @@ inMb: "메가바이트 단위"
iconUrl: "아이콘 URL"
bannerUrl: "배너 이미지 URL"
backgroundImageUrl: "배경 이미지 URL"
pinnedUsers: "고정된 유저"
pinnedUsersDescription: "\"발견하기\" 페이지 등에 고정하고 싶은 유저를 한 줄에 한 명씩 적습니다."
hcaptchaSiteKey: "사이트 키"
hcaptchaSecretKey: "시크릿 키"
recaptchaSiteKey: "사이트 키"

View file

@ -306,9 +306,6 @@ inMb: "W megabajtach"
iconUrl: "Adres URL ikony"
bannerUrl: "Adres URL banera"
backgroundImageUrl: "Adres URL tła"
pinnedUsers: "Przypięty użytkownik"
pinnedUsersDescription: "Wypisz po jednej nazwie użytkownika w wierszu. Podani użytkownicy\
\ zostaną przypięci pod kartą „Eksploruj”."
hcaptchaSiteKey: "Klucz strony"
hcaptchaSecretKey: "Tajny klucz"
recaptchaSiteKey: "Klucz strony"

View file

@ -317,9 +317,6 @@ inMb: "În megabytes"
iconUrl: "URL-ul iconiței"
bannerUrl: "URL-ul imaginii de banner"
backgroundImageUrl: "URL-ul imaginii de fundal"
pinnedUsers: "Utilizatori fixați"
pinnedUsersDescription: "Scrie utilizatorii, separați prin pauză de rând, care vor\
\ fi fixați pe pagina \"Explorează\"."
hcaptchaSiteKey: "Site key"
hcaptchaSecretKey: "Secret key"
recaptchaSiteKey: "Site key"

View file

@ -311,9 +311,6 @@ inMb: "В мегабайтах"
iconUrl: "Ссылка на аватар"
bannerUrl: "Ссылка на изображение в шапке"
backgroundImageUrl: "Ссылка на фоновое изображение"
pinnedUsers: "Прикреплённый пользователь"
pinnedUsersDescription: "Перечислите по одному имени пользователя в строке. Пользователи,\
\ перечисленные здесь, будут привязаны к закладке \"Изучение\"."
hcaptchaSiteKey: "Ключ сайта"
hcaptchaSecretKey: "Секретный ключ"
recaptchaSiteKey: "Ключ сайта"

View file

@ -311,9 +311,6 @@ inMb: "V megabajtoch"
iconUrl: "Favicon URL"
bannerUrl: "URL obrázku bannera"
backgroundImageUrl: "URL obrázku pozadia"
pinnedUsers: "Pripnutí používatelia"
pinnedUsersDescription: "Zoznam mien používateľov oddelených riadkami, ktorý budú\
\ pripnutí v záložke \"Objavovať\"."
hcaptchaSiteKey: "Site key"
hcaptchaSecretKey: "Secret key"
recaptchaSiteKey: "Site key"

View file

@ -313,9 +313,6 @@ inMb: "В мегабайтах"
iconUrl: "URL аватара"
bannerUrl: "URL банера"
backgroundImageUrl: "URL-адреса фонового зображення"
pinnedUsers: "Закріплені користувачі"
pinnedUsersDescription: "Впишіть в список користувачів, яких хочете закріпити на сторінці\
\ \"Знайти\", ім'я в стовпчик."
hcaptchaSiteKey: "Ключ сайту"
hcaptchaSecretKey: "Секретний ключ"
recaptchaSiteKey: "Ключ сайту"

View file

@ -311,9 +311,6 @@ inMb: "Tính bằng MB"
iconUrl: "URL Icon"
bannerUrl: "URL Ảnh bìa"
backgroundImageUrl: "URL Ảnh nền"
pinnedUsers: "Những người thú vị"
pinnedUsersDescription: "Liệt kê mỗi hàng một tên người dùng xuống dòng để ghim trên\
\ tab \"Khám phá\"."
hcaptchaSiteKey: "Khóa của trang"
hcaptchaSecretKey: "Khóa bí mật"
recaptchaSiteKey: "Khóa của trang"

View file

@ -289,8 +289,6 @@ inMb: "以兆字节(MegaByte)为单位"
iconUrl: "图标URL"
bannerUrl: "横幅URL"
backgroundImageUrl: "背景图URL"
pinnedUsers: "置顶用户"
pinnedUsersDescription: "在「发现」页面中使用换行标记想要置顶的用户。"
hcaptchaSiteKey: "网站密钥"
hcaptchaSecretKey: "密钥"
recaptchaSiteKey: "网站密钥"

View file

@ -289,8 +289,6 @@ inMb: "以Mbps為單位"
iconUrl: "圖像URL"
bannerUrl: "橫幅圖像URL"
backgroundImageUrl: "背景圖片的來源網址"
pinnedUsers: "置頂用戶"
pinnedUsersDescription: "在「發現」頁面中使用換行標記想要置頂的使用者。"
hcaptchaSiteKey: "網站金鑰"
hcaptchaSecretKey: "金鑰"
recaptchaSiteKey: "網站金鑰"

View file

@ -0,0 +1,10 @@
export class removePinnedUsers1704234742539 {
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedUsers"`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ADD "pinnedUsers" character varying(256) array NOT NULL DEFAULT '{}'::varchar[]`);
}
}

View file

@ -67,11 +67,6 @@ export class Meta {
})
public langs: string[];
@Column('varchar', {
length: 256, array: true, default: '{}',
})
public pinnedUsers: string[];
@Column('varchar', {
length: 256, array: true, default: '{}',
})

View file

@ -252,7 +252,6 @@ import * as ep___pages_show from './endpoints/pages/show.js';
import * as ep___pages_unlike from './endpoints/pages/unlike.js';
import * as ep___pages_update from './endpoints/pages/update.js';
import * as ep___ping from './endpoints/ping.js';
import * as ep___pinnedUsers from './endpoints/pinned-users.js';
import * as ep___requestResetPassword from './endpoints/request-reset-password.js';
import * as ep___resetDb from './endpoints/reset-db.js';
import * as ep___resetPassword from './endpoints/reset-password.js';
@ -548,7 +547,6 @@ const eps = [
['pages/unlike', ep___pages_unlike],
['pages/update', ep___pages_update],
['ping', ep___ping],
['pinned-users', ep___pinnedUsers],
['request-reset-password', ep___requestResetPassword],
['reset-db', ep___resetDb],
['reset-password', ep___resetPassword],

View file

@ -114,14 +114,6 @@ export const meta = {
type: 'boolean',
optional: true, nullable: false,
},
pinnedUsers: {
type: 'array',
optional: true, nullable: false,
items: {
type: 'string',
optional: false, nullable: false,
},
},
hiddenTags: {
type: 'array',
optional: true, nullable: false,
@ -291,7 +283,6 @@ export default define(meta, paramDef, async () => {
cacheRemoteFiles: instance.cacheRemoteFiles,
useStarForReactionFallback: instance.useStarForReactionFallback,
pinnedUsers: instance.pinnedUsers,
hiddenTags: instance.hiddenTags,
blockedHosts: instance.blockedHosts,
hcaptchaSecretKey: instance.hcaptchaSecretKey,

View file

@ -17,9 +17,6 @@ export const paramDef = {
disableLocalTimeline: { type: 'boolean', nullable: true },
disableGlobalTimeline: { type: 'boolean', nullable: true },
useStarForReactionFallback: { type: 'boolean', nullable: true },
pinnedUsers: { type: 'array', nullable: true, items: {
type: 'string',
} },
hiddenTags: { type: 'array', nullable: true, items: {
type: 'string',
} },
@ -101,10 +98,6 @@ export default define(meta, paramDef, async (ps, me) => {
set.useStarForReactionFallback = ps.useStarForReactionFallback;
}
if (Array.isArray(ps.pinnedUsers)) {
set.pinnedUsers = ps.pinnedUsers.filter(Boolean);
}
if (Array.isArray(ps.hiddenTags)) {
set.hiddenTags = ps.hiddenTags.filter(Boolean);
}

View file

@ -1,40 +0,0 @@
import { IsNull } from 'typeorm';
import { Users } from '@/models/index.js';
import { fetchMeta } from '@/misc/fetch-meta.js';
import * as Acct from '@/misc/acct.js';
import { User } from '@/models/entities/user.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['users'],
requireCredential: false,
res: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'object',
optional: false, nullable: false,
ref: 'UserDetailed',
},
},
} as const;
export const paramDef = {
type: 'object',
properties: {},
required: [],
} as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => {
const meta = await fetchMeta();
const users = await Promise.all(meta.pinnedUsers.map(acct => Acct.parse(acct)).map(acct => Users.findOneBy({
usernameLower: acct.username.toLowerCase(),
host: acct.host ?? IsNull(),
})));
return await Users.packMany(users.filter(x => x !== undefined) as User[], me, { detail: true });
});

View file

@ -29,11 +29,6 @@
</FormInput>
</FormSplit>
<FormTextarea v-model="pinnedUsers" class="_formBlock">
<template #label>{{ i18n.ts.pinnedUsers }}</template>
<template #caption>{{ i18n.ts.pinnedUsersDescription }}</template>
</FormTextarea>
<FormSection>
<FormSwitch v-model="enableRegistration" class="_formBlock">
<template #label>{{ i18n.ts.enableRegistration }}</template>
@ -140,7 +135,6 @@ let defaultLightTheme: any = $ref(null);
let defaultDarkTheme: any = $ref(null);
let enableLocalTimeline: boolean = $ref(false);
let enableGlobalTimeline: boolean = $ref(false);
let pinnedUsers: string = $ref('');
let cacheRemoteFiles: boolean = $ref(false);
let localDriveCapacityMb: any = $ref(0);
let remoteDriveCapacityMb: any = $ref(0);
@ -162,7 +156,6 @@ async function init(): Promise<void> {
maintainerEmail = meta.maintainerEmail;
enableLocalTimeline = !meta.disableLocalTimeline;
enableGlobalTimeline = !meta.disableGlobalTimeline;
pinnedUsers = meta.pinnedUsers.join('\n');
cacheRemoteFiles = meta.cacheRemoteFiles;
localDriveCapacityMb = meta.driveCapacityPerLocalUserMb;
remoteDriveCapacityMb = meta.driveCapacityPerRemoteUserMb;
@ -185,7 +178,6 @@ function save(): void {
maintainerEmail,
disableLocalTimeline: !enableLocalTimeline,
disableGlobalTimeline: !enableGlobalTimeline,
pinnedUsers: pinnedUsers.split('\n'),
cacheRemoteFiles,
localDriveCapacityMb: parseInt(localDriveCapacityMb, 10),
remoteDriveCapacityMb: parseInt(remoteDriveCapacityMb, 10),

View file

@ -446,7 +446,6 @@ export type Endpoints = {
'pages/unlike': { req: { pageId: Page['id']; }; res: null; };
'pages/update': { req: TODO; res: null; };
'ping': { req: NoParams; res: { pong: number; }; };
'pinned-users': { req: TODO; res: TODO; };
'request-reset-password': { req: { username: string; email: string; }; res: null; };
'reset-db': { req: TODO; res: TODO; };
'reset-password': { req: { token: string; password: string; }; res: null; };