mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-24 21:19:07 +01:00
refactor: 🚩 post editing is no longer experimental
This commit is contained in:
parent
f6009dc6e8
commit
66b61bb41b
@ -2082,11 +2082,7 @@ _experiments:
|
||||
alpha: Alfa
|
||||
beta: Beta
|
||||
release: Publicà
|
||||
enablePostEditing: Activà l'edició de publicacions
|
||||
title: Experiments
|
||||
postEditingCaption: Mostra l'opció perquè els usuaris editin les seves publicacions
|
||||
mitjançant el menú d'opcions de publicació, i permet rebre publicacions editades
|
||||
d'altres servidors.
|
||||
enablePostImports: Activar l'importació de publicacions
|
||||
postImportsCaption: Permet els usuaris importar publicacions desde comptes a Calckey,
|
||||
Misskey, Mastodon, Akkoma i Pleroma. Pot fer que el servidor vagi més lent durant
|
||||
|
@ -2095,10 +2095,7 @@ jumpToPrevious: Zum Vorherigen springen
|
||||
silencedWarning: Diese Meldung wird angezeigt, weil diese Nutzer von Servern stammen,
|
||||
die Ihr Administrator abgeschaltet hat, so dass es sich möglicherweise um Spam handelt.
|
||||
_experiments:
|
||||
enablePostEditing: Beitragsbearbeitung ermöglichen
|
||||
title: Funktionstests
|
||||
postEditingCaption: Zeigt die Option für Nutzer an, ihre bestehenden Beiträge über
|
||||
das Menü "Beitragsoptionen" zu bearbeiten
|
||||
enablePostImports: Beitragsimporte aktivieren
|
||||
postImportsCaption: Erlaubt es Nutzer:innen ihre Posts von alten Calckey, Misskey,
|
||||
Mastodon, Akkoma und Pleroma Accounts zu importieren. Bei Engpässen in der Warteschlange
|
||||
|
@ -2070,9 +2070,6 @@ _deck:
|
||||
direct: "Direct messages"
|
||||
_experiments:
|
||||
title: "Experiments"
|
||||
enablePostEditing: "Enable post editing"
|
||||
postEditingCaption: "Shows the option for users to edit their existing posts via\
|
||||
\ the post options menu, and allows post edits from other instances to be recieved."
|
||||
enablePostImports: "Enable post imports"
|
||||
postImportsCaption: "Allows users to import their posts from past Calckey,\
|
||||
\ Misskey, Mastodon, Akkoma, and Pleroma accounts. It may cause slowdowns during\
|
||||
|
@ -2028,7 +2028,7 @@ flagShowTimelineRepliesDescription: Si activé, affiche dans le fil les réponse
|
||||
_experiments:
|
||||
alpha: Alpha
|
||||
beta: Beta
|
||||
enablePostEditing: Autoriser l'édition de note
|
||||
enablePostImports: Autoriser l'importation de messages
|
||||
title: Expérimentations
|
||||
findOtherInstance: Trouver un autre serveur
|
||||
userSaysSomethingReasonQuote: '{name} a cité une note contenant {reason}'
|
||||
|
@ -1887,9 +1887,7 @@ hiddenTagsDescription: 'トレンドと「みつける」から除外したい
|
||||
hiddenTags: 非表示にするハッシュタグ
|
||||
apps: "アプリ"
|
||||
_experiments:
|
||||
enablePostEditing: 投稿の編集機能を有効にする
|
||||
title: 試験的な機能
|
||||
postEditingCaption: 投稿のメニューに既存の投稿を編集するボタンを表示し、他サーバーの編集も受信できるようにします。
|
||||
postImportsCaption:
|
||||
ユーザーが過去の投稿をCalckey・Misskey・Mastodon・Akkoma・Pleromaからインポートすることを許可します。キューが溜まっているときにインポートするとサーバーに負荷がかかる可能性があります。
|
||||
enablePostImports: 投稿のインポートを有効にする
|
||||
|
@ -1816,7 +1816,6 @@ silenceThisInstance: 靜音此伺服器
|
||||
silencedInstances: 已靜音的伺服器
|
||||
silenced: 已靜音
|
||||
_experiments:
|
||||
enablePostEditing: 啟用帖子編輯
|
||||
title: 試驗功能
|
||||
findOtherInstance: 找找另一個伺服器
|
||||
noGraze: 瀏覽器擴展 "Graze for Mastodon" 會與Calckey發生衝突,請停用該擴展。
|
||||
|
@ -541,10 +541,6 @@ function notEmpty(partial: Partial<any>) {
|
||||
export async function updateNote(value: string | IObject, resolver?: Resolver) {
|
||||
const uri = typeof value === "string" ? value : value.id;
|
||||
if (!uri) throw new Error("Missing note uri");
|
||||
const instanceMeta = await fetchMeta();
|
||||
if (instanceMeta.experimentalFeatures?.postEdits === false) {
|
||||
throw new Error("Post edits disabled.");
|
||||
}
|
||||
|
||||
// Skip if URI points to this server
|
||||
if (uri.startsWith(`${config.url}/`)) throw new Error("uri points local");
|
||||
|
@ -476,9 +476,6 @@ export const meta = {
|
||||
optional: true,
|
||||
nullable: true,
|
||||
properties: {
|
||||
postEditing: {
|
||||
type: "boolean",
|
||||
},
|
||||
postImports: {
|
||||
type: "boolean",
|
||||
},
|
||||
|
@ -174,7 +174,6 @@ export const paramDef = {
|
||||
type: "object",
|
||||
nullable: true,
|
||||
properties: {
|
||||
postEditing: { type: "boolean" },
|
||||
postImports: { type: "boolean" },
|
||||
},
|
||||
},
|
||||
|
@ -529,7 +529,7 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||
github: instance.enableGithubIntegration,
|
||||
discord: instance.enableDiscordIntegration,
|
||||
serviceWorker: instance.enableServiceWorker,
|
||||
postEditing: instance.experimentalFeatures?.postEditing || false,
|
||||
postEditing: true,
|
||||
postImports: instance.experimentalFeatures?.postImports || false,
|
||||
miauth: true,
|
||||
};
|
||||
|
@ -140,12 +140,6 @@ export const meta = {
|
||||
code: "NOT_LOCAL_USER",
|
||||
id: "b907f407-2aa0-4283-800b-a2c56290b822",
|
||||
},
|
||||
|
||||
editsDisabled: {
|
||||
message: "Post edits are disabled.",
|
||||
code: "EDITS_DISABLED",
|
||||
id: "99306f00-fb81-11ed-be56-0242ac120002",
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
||||
@ -244,11 +238,6 @@ export const paramDef = {
|
||||
export default define(meta, paramDef, async (ps, user) => {
|
||||
if (user.movedToUri != null) throw new ApiError(meta.errors.accountLocked);
|
||||
|
||||
const instanceMeta = await fetchMeta();
|
||||
if (instanceMeta.experimentalFeatures?.postEdits === false) {
|
||||
throw new ApiError(meta.errors.editsDisabled);
|
||||
}
|
||||
|
||||
if (!Users.isLocalUser(user)) {
|
||||
throw new ApiError(meta.errors.notLocalUser);
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ const nodeinfo2 = async () => {
|
||||
disableGlobalTimeline: meta.disableGlobalTimeline,
|
||||
emailRequiredForSignup: meta.emailRequiredForSignup,
|
||||
searchFilters: config.meilisearch ? true : false,
|
||||
postEditing: meta.experimentalFeatures?.postEditing || false,
|
||||
postEditing: true,
|
||||
postImports: meta.experimentalFeatures?.postImports || false,
|
||||
enableHcaptcha: meta.enableHcaptcha,
|
||||
enableRecaptcha: meta.enableRecaptcha,
|
||||
|
@ -8,19 +8,6 @@
|
||||
/></template>
|
||||
<MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
|
||||
<FormSuspense :p="init">
|
||||
<FormSwitch
|
||||
v-model="enablePostEditing"
|
||||
@update:modelValue="save"
|
||||
class="_formBlock"
|
||||
>
|
||||
<template #label>
|
||||
<i class="ph-pencil-line ph-bold ph-lg"></i>
|
||||
{{ i18n.ts._experiments.enablePostEditing }}
|
||||
</template>
|
||||
<template #caption>{{
|
||||
i18n.ts._experiments.postEditingCaption
|
||||
}}</template>
|
||||
</FormSwitch>
|
||||
<FormSwitch
|
||||
v-model="enablePostImports"
|
||||
@update:modelValue="save"
|
||||
@ -49,13 +36,11 @@ import { fetchInstance } from "@/instance";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
|
||||
let enablePostEditing = $ref(false);
|
||||
let enablePostImports = $ref(false);
|
||||
let meta = $ref<MetaExperiments | null>(null);
|
||||
|
||||
type MetaExperiments = {
|
||||
experimentalFeatures?: {
|
||||
postEditing?: boolean;
|
||||
postImports?: boolean;
|
||||
};
|
||||
};
|
||||
@ -64,14 +49,12 @@ async function init() {
|
||||
meta = (await os.api("admin/meta")) as MetaExperiments;
|
||||
if (!meta) return;
|
||||
|
||||
enablePostEditing = meta.experimentalFeatures?.postEditing ?? false;
|
||||
enablePostImports = meta.experimentalFeatures?.postImports ?? false;
|
||||
}
|
||||
|
||||
function save() {
|
||||
const experiments: MetaExperiments = {
|
||||
experimentalFeatures: {
|
||||
postEditing: enablePostEditing,
|
||||
postImports: enablePostImports,
|
||||
},
|
||||
};
|
||||
|
@ -408,7 +408,7 @@ export function getNoteMenu(props: {
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
instance.features.postEditing && isAppearAuthor
|
||||
isAppearAuthor
|
||||
? {
|
||||
icon: "ph-pencil-line ph-bold ph-lg",
|
||||
text: i18n.ts.edit,
|
||||
|
Loading…
Reference in New Issue
Block a user