From b1ca25d64639744827debdf750884c7fb0d0f522 Mon Sep 17 00:00:00 2001 From: sweshelo Date: Mon, 21 Aug 2023 10:54:19 +0900 Subject: [PATCH 01/51] =?UTF-8?q?[feat]=20mfm=20crop=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/global/MkMisskeyFlavoredMarkdown.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts index 1c417991e095..997b74462df6 100644 --- a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts +++ b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts @@ -185,6 +185,14 @@ export default function(props: { style = `transform: rotate(${degrees}deg); transform-origin: center center;`; break; } + case "crop": { + const top = parseFloat(token.props.args.top ?? "0"); + const right = parseFloat(token.props.args.right ?? "0"); + const bottom = parseFloat(token.props.args.bottom ?? "0"); + const left = parseFloat(token.props.args.left ?? "0"); + style = `clip-path: inset(${top}% ${right}% ${bottom}% ${left}%);`; + break; + } case 'position': { if (!defaultStore.state.advancedMfm) break; const x = parseFloat(token.props.args.x ?? '0'); From 18921a9c0c6330348f9e2e4b490f621ffc8dd2ea Mon Sep 17 00:00:00 2001 From: sweshelo Date: Tue, 26 Sep 2023 12:02:48 +0900 Subject: [PATCH 02/51] =?UTF-8?q?[add]=20mfm=E3=81=AE=E3=82=BF=E3=82=B0?= =?UTF-8?q?=E3=81=ABcrop=E3=82=92=E8=BF=BD=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/scripts/mfm-tags.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/scripts/mfm-tags.ts b/packages/frontend/src/scripts/mfm-tags.ts index a84198282da1..0aaed07eebe0 100644 --- a/packages/frontend/src/scripts/mfm-tags.ts +++ b/packages/frontend/src/scripts/mfm-tags.ts @@ -1 +1 @@ -export const MFM_TAGS = ['tada', 'jelly', 'twitch', 'shake', 'spin', 'jump', 'bounce', 'flip', 'x2', 'x3', 'x4', 'scale', 'position', 'fg', 'bg', 'font', 'blur', 'rainbow', 'sparkle', 'rotate']; +export const MFM_TAGS = ['tada', 'jelly', 'twitch', 'shake', 'spin', 'jump', 'bounce', 'flip', 'crop', 'x2', 'x3', 'x4', 'scale', 'position', 'fg', 'bg', 'font', 'blur', 'rainbow', 'sparkle', 'rotate']; From d68fb7b58202d761c7ba34d19083557a3d9ed906 Mon Sep 17 00:00:00 2001 From: sweshelo Date: Tue, 26 Sep 2023 12:50:33 +0900 Subject: [PATCH 03/51] =?UTF-8?q?[change]=20=E3=83=81=E3=83=A3=E3=83=B3?= =?UTF-8?q?=E3=83=8D=E3=83=AB=E3=81=B8=E3=81=AE=E6=8A=95=E7=A8=BF=E3=81=A7?= =?UTF-8?q?=E3=82=82=E5=8F=AF=E8=A6=96=E6=80=A7=E3=81=AF=E3=83=AA=E3=82=AF?= =?UTF-8?q?=E3=82=A8=E3=82=B9=E3=83=88=E5=86=85=E5=AE=B9=E3=81=AB=E6=BA=96?= =?UTF-8?q?=E6=8B=A0=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/NoteCreateService.ts | 3 --- packages/frontend/src/components/MkPostForm.vue | 16 +++++++--------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 648ff7648332..5d2f875a4925 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -234,9 +234,6 @@ export class NoteCreateService implements OnApplicationShutdown { if (data.createdAt == null) data.createdAt = new Date(); if (data.visibility == null) data.visibility = 'public'; if (data.localOnly == null) data.localOnly = false; - if (data.channel != null) data.visibility = 'public'; - if (data.channel != null) data.visibleUsers = []; - if (data.channel != null) data.localOnly = true; if (data.visibility === 'public' && data.channel == null) { const sensitiveWords = (await this.metaService.fetch()).sensitiveWords; diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index 0527811ab030..c0a65d14741d 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -15,16 +15,16 @@
{{ i18n.ts.notSpecifiedMentionWarning }} - - +