summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkPostForm.vue
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/components/MkPostForm.vue')
-rw-r--r--packages/frontend/src/components/MkPostForm.vue30
1 files changed, 30 insertions, 0 deletions
diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue
index a06bdecaa8..f15906c1c1 100644
--- a/packages/frontend/src/components/MkPostForm.vue
+++ b/packages/frontend/src/components/MkPostForm.vue
@@ -579,6 +579,36 @@ async function post(ev?: MouseEvent) {
os.popup(MkRippleEffect, { x, y }, {}, 'end');
}
+ const annoying =
+ text.includes('$[x2') ||
+ text.includes('$[x3') ||
+ text.includes('$[x4') ||
+ text.includes('$[scale') ||
+ text.includes('$[position');
+ if (annoying) {
+ const { canceled, result } = await os.actions({
+ type: 'warning',
+ text: i18n.ts.thisPostMayBeAnnoying,
+ actions: [{
+ value: 'home',
+ text: i18n.ts.thisPostMayBeAnnoyingHome,
+ primary: true,
+ }, {
+ value: 'cancel',
+ text: i18n.ts.thisPostMayBeAnnoyingCancel,
+ }, {
+ value: 'ignore',
+ text: i18n.ts.thisPostMayBeAnnoyingIgnore,
+ }],
+ });
+
+ if (canceled) return;
+ if (result === 'cancel') return;
+ if (result === 'home') {
+ visibility = 'home';
+ }
+ }
+
let postData = {
text: text === '' ? undefined : text,
fileIds: files.length > 0 ? files.map(f => f.id) : undefined,