From f690477229707c60a5d79de07ccd859614dd0972 Mon Sep 17 00:00:00 2001 From: NoriDev Date: Tue, 6 Jun 2023 01:12:20 +0900 Subject: [PATCH] =?UTF-8?q?feat(client):=20mfm-cheat-sheet=E3=81=AE?= =?UTF-8?q?=E5=BE=A9=E5=85=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG_CHERRYPICK.md | 1 + locales/en-US.yml | 4 + locales/index.d.ts | 4 + locales/ja-JP.yml | 4 + locales/ko-KR.yml | 4 + .../frontend/src/pages/mfm-cheat-sheet.vue | 387 ++++++++++-------- packages/frontend/src/ui/_common_/common.ts | 16 +- 7 files changed, 244 insertions(+), 176 deletions(-) diff --git a/CHANGELOG_CHERRYPICK.md b/CHANGELOG_CHERRYPICK.md index f50e9cf4b8..df5109ca67 100644 --- a/CHANGELOG_CHERRYPICK.md +++ b/CHANGELOG_CHERRYPICK.md @@ -29,6 +29,7 @@ - 채팅 및 그룹 기능 유지 (revert: [misskey-dev/misskey#9919](https://github.com/misskey-dev/misskey/pull/9919), [misskey-dev/misskey#9942](https://github.com/misskey-dev/misskey/pull/9942)) - 노트 수식 삽입 기능 복원 (MathML 호환을 위해 기존에 제거된 KaTex를 Temml로 대체 ([misskey-dev/misskey#9754](https://github.com/misskey-dev/misskey/issues/9754))) - Cloud Translation - Advanced(v3) 지원 추가 ([@mk-castella](https://github.com/libnare/mk-castella/commit/3c582dd850d00f5b8faea027fd054118efb97856)) +- mfm-cheat-sheet 복원 ### Client - (Friendly) 모바일에서 스크롤 시 각종 요소들의 유동적인 높이 조절을 변경된 헤더 디자인에 대응 diff --git a/locales/en-US.yml b/locales/en-US.yml index d88f1f21dd..766bed3672 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1610,6 +1610,10 @@ _mfm: sparkleDescription: "Gives content a sparkling particle effect." rotate: "Rotate" rotateDescription: "Turns content by a specified angle." + position: "Position" + positionDescription: "Moves content by a specified location." + scale: "Scale" + scaleDescription: "Loosen content by the specified value." plain: "Plain" plainDescription: "Deactivates the effects of all MFM contained within this MFM effect." _instanceTicker: diff --git a/locales/index.d.ts b/locales/index.d.ts index 4637b82161..61c0ca735b 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1716,6 +1716,10 @@ export interface Locale { "sparkleDescription": string; "rotate": string; "rotateDescription": string; + "position": string; + "positionDescription": string; + "scale": string; + "scaleDescription": string; "plain": string; "plainDescription": string; }; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index c7457f00e5..f6515c009e 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1632,6 +1632,10 @@ _mfm: sparkleDescription: "キラキラしたパーティクルのエフェクトを追加します。" rotate: "回転" rotateDescription: "指定した角度で回転させます。" + position: "位置" + positionDescription: "指定した位置に移動させます。" + scale: "スケール" + scaleDescription: "指定した値で緩めます。" plain: "プレーン" plainDescription: "内側の構文を全て無効にします。" diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index dc8d325632..7f68be2cb6 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -1611,6 +1611,10 @@ _mfm: sparkleDescription: "반짝이는 파티클 효과를 추가해요." rotate: "회전" rotateDescription: "지정한 각도로 회전시켜요." + position: "위치" + positionDescription: "지정한 위치로 이동시켜요." + scale: "스케일" + scaleDescription: "지정한 값으로 늘려요." plain: "평문" plainDescription: "안에 있는 MFM 구문을 모두 무시하고 평문으로 표시해요." _instanceTicker: diff --git a/packages/frontend/src/pages/mfm-cheat-sheet.vue b/packages/frontend/src/pages/mfm-cheat-sheet.vue index 580327df60..56637a9784 100644 --- a/packages/frontend/src/pages/mfm-cheat-sheet.vue +++ b/packages/frontend/src/pages/mfm-cheat-sheet.vue @@ -2,297 +2,327 @@ -
-
{{ i18n.ts._mfm.intro }}
-
-
{{ i18n.ts._mfm.mention }}
-
+
+
{{ i18n.ts._mfm.intro }}
+
+
{{ i18n.ts._mfm.mention }}
+

{{ i18n.ts._mfm.mentionDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.hashtag }}
-
+
+
{{ i18n.ts._mfm.hashtag }}
+

{{ i18n.ts._mfm.hashtagDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.url }}
-
+
+
{{ i18n.ts._mfm.url }}
+

{{ i18n.ts._mfm.urlDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.link }}
-
+
+
{{ i18n.ts._mfm.link }}
+

{{ i18n.ts._mfm.linkDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.emoji }}
-
+
+
{{ i18n.ts._mfm.emoji }}
+

{{ i18n.ts._mfm.emojiDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.bold }}
-
+
+
{{ i18n.ts._mfm.bold }}
+

{{ i18n.ts._mfm.boldDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.small }}
-
+
+
{{ i18n.ts._mfm.small }}
+

{{ i18n.ts._mfm.smallDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.quote }}
-
+
+
{{ i18n.ts._mfm.quote }}
+

{{ i18n.ts._mfm.quoteDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.center }}
-
+
+
{{ i18n.ts._mfm.center }}
+

{{ i18n.ts._mfm.centerDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.inlineCode }}
-
+
+
{{ i18n.ts._mfm.inlineCode }}
+

{{ i18n.ts._mfm.inlineCodeDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.blockCode }}
-
+
+
{{ i18n.ts._mfm.blockCode }}
+

{{ i18n.ts._mfm.blockCodeDescription }}

-
+
- + +
+
+
+
+
{{ i18n.ts._mfm.inlineMath }}
+
+

{{ i18n.ts._mfm.inlineMathDescription }}

+
+ +
-
-
{{ i18n.ts._mfm.flip }}
-
+
+
{{ i18n.ts._mfm.flip }}
+

{{ i18n.ts._mfm.flipDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.font }}
-
+
+
{{ i18n.ts._mfm.font }}
+

{{ i18n.ts._mfm.fontDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.x2 }}
-
+
+
{{ i18n.ts._mfm.x2 }}
+

{{ i18n.ts._mfm.x2Description }}

-
+
- +
-
-
{{ i18n.ts._mfm.x3 }}
-
+
+
{{ i18n.ts._mfm.x3 }}
+

{{ i18n.ts._mfm.x3Description }}

-
+
- +
-
-
{{ i18n.ts._mfm.x4 }}
-
+
+
{{ i18n.ts._mfm.x4 }}
+

{{ i18n.ts._mfm.x4Description }}

-
+
- +
-
-
{{ i18n.ts._mfm.blur }}
-
+
+
{{ i18n.ts._mfm.blur }}
+

{{ i18n.ts._mfm.blurDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.jelly }}
-
+
+
{{ i18n.ts._mfm.jelly }}
+

{{ i18n.ts._mfm.jellyDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.tada }}
-
+
+
{{ i18n.ts._mfm.tada }}
+

{{ i18n.ts._mfm.tadaDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.jump }}
-
+
+
{{ i18n.ts._mfm.jump }}
+

{{ i18n.ts._mfm.jumpDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.bounce }}
-
+
+
{{ i18n.ts._mfm.bounce }}
+

{{ i18n.ts._mfm.bounceDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.spin }}
-
+
+
{{ i18n.ts._mfm.spin }}
+

{{ i18n.ts._mfm.spinDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.shake }}
-
+
+
{{ i18n.ts._mfm.shake }}
+

{{ i18n.ts._mfm.shakeDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.twitch }}
-
+
+
{{ i18n.ts._mfm.twitch }}
+

{{ i18n.ts._mfm.twitchDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.rainbow }}
-
+
+
{{ i18n.ts._mfm.rainbow }}
+

{{ i18n.ts._mfm.rainbowDescription }}

-
+
- +
-
-
{{ i18n.ts._mfm.sparkle }}
-
+
+
{{ i18n.ts._mfm.sparkle }}
+

{{ i18n.ts._mfm.sparkleDescription }}

-
+
- MFM + MFM {{ i18n.ts.sample }}
-
-
{{ i18n.ts._mfm.rotate }}
-
+
+
{{ i18n.ts._mfm.rotate }}
+

{{ i18n.ts._mfm.rotateDescription }}

-
+
- MFM + MFM {{ i18n.ts.sample }}
-
-
{{ i18n.ts._mfm.plain }}
-
+
+
{{ i18n.ts._mfm.position }}
+
+

{{ i18n.ts._mfm.positionDescription }}

+
+ + +
+
+
+
+
{{ i18n.ts._mfm.scale }}
+
+

{{ i18n.ts._mfm.scaleDescription }}

+
+ + +
+
+
+
+
{{ i18n.ts._mfm.plain }}
+

{{ i18n.ts._mfm.plainDescription }}

-
+
- MFM + MFM {{ i18n.ts.sample }}
@@ -319,6 +349,7 @@ let preview_small = $ref(`${i18n.ts._mfm.dummy}`); let preview_center = $ref(`
${i18n.ts._mfm.dummy}
`); let preview_inlineCode = $ref('`<: "Hello, world!"`'); let preview_blockCode = $ref('```\n~ (#i, 100) {\n\t<: ? ((i % 15) = 0) "FizzBuzz"\n\t\t.? ((i % 3) = 0) "Fizz"\n\t\t.? ((i % 5) = 0) "Buzz"\n\t\t. i\n}\n```'); +let preview_inlineMath = $ref('\\(x= \\frac{-b\' \\pm \\sqrt{(b\')^2-ac}}{a}\\)'); let preview_quote = $ref(`> ${i18n.ts._mfm.dummy}`); let preview_search = $ref(`${i18n.ts._mfm.dummy} 検索`); let preview_jelly = $ref('$[jelly 🍮] $[jelly.speed=5s 🍮]'); @@ -336,7 +367,9 @@ let preview_x4 = $ref('$[x4 🍮]'); let preview_blur = $ref(`$[blur ${i18n.ts._mfm.dummy}]`); let preview_rainbow = $ref('$[rainbow 🍮] $[rainbow.speed=5s 🍮]'); let preview_sparkle = $ref('$[sparkle 🍮]'); -let preview_rotate = $ref('$[rotate 🍮]'); +let preview_rotate = $ref('$[rotate.deg=90 🍮]'); +let preview_position = $ref('$[position.x=1 🍮]\n$[position.y=-1 🍮]\n\n$[position.x=3,y=-3 🍮]'); +let preview_scale = $ref('$[scale.x=2 🍮]\n$[scale.y=2 🍮]\n\n$[scale.x=2.5,y=2 🍮]'); let preview_plain = $ref('**bold** @mention #hashtag `code` $[x2 🍮]'); const headerActions = $computed(() => []); @@ -349,33 +382,41 @@ definePageMetadata({ }); - diff --git a/packages/frontend/src/ui/_common_/common.ts b/packages/frontend/src/ui/_common_/common.ts index 53042a4ce7..6d326a4e03 100644 --- a/packages/frontend/src/ui/_common_/common.ts +++ b/packages/frontend/src/ui/_common_/common.ts @@ -75,11 +75,21 @@ export function openInstanceMenu(ev: MouseEvent) { icon: 'ti ti-icons', } : undefined], }, null, { + type: 'parent', text: i18n.ts.help, icon: 'ti ti-help-circle', - action: () => { - window.open('https://misskey-hub.net/help.html', '_blank'); - }, + children: [{ + text: i18n.ts.help, + icon: 'ti ti-help-circle', + action: () => { + window.open('https://misskey-hub.net/help.html', '_blank'); + }, + }, { + type: 'link', + text: i18n.ts._mfm.cheatSheet, + icon: 'ti ti-help-circle', + to: '/mfm-cheat-sheet', + }], }, { type: 'link', text: i18n.ts.aboutMisskey,