merge: Add "unixtime" to the MFM cheatsheet (resolves #1086) (!1080)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1080

Closes #1086

Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
Hazelnoot 2025-06-01 17:24:26 +00:00
commit 09e939fe40
3 changed files with 23 additions and 0 deletions

8
locales/index.d.ts vendored
View file

@ -12492,6 +12492,14 @@ export interface Locale extends ILocale {
* Displays content centered. * Displays content centered.
*/ */
"centerDescription": string; "centerDescription": string;
/**
* Unix Time
*/
"unixtime": string;
/**
* Displays a timestamp in the viewer's current timezone.
*/
"unixtimeDescription": string;
/** /**
* Code (Inline) * Code (Inline)
*/ */

View file

@ -99,6 +99,16 @@ SPDX-License-Identifier: AGPL-3.0-only
</div> </div>
</div> </div>
</div> </div>
<div class="section _block">
<div class="title">{{ i18n.ts._mfm.unixtime }}</div>
<div class="content">
<p>{{ i18n.ts._mfm.unixtimeDescription }}</p>
<div class="preview">
<Mfm :text="preview_unixtime"/>
<MkTextarea v-model="preview_unixtime"><template #label>MFM</template></MkTextarea>
</div>
</div>
</div>
<div class="section _block"> <div class="section _block">
<div class="title">{{ i18n.ts._mfm.inlineCode }}</div> <div class="title">{{ i18n.ts._mfm.inlineCode }}</div>
<div class="content"> <div class="content">
@ -429,6 +439,9 @@ const preview_small = ref(
const preview_center = ref( const preview_center = ref(
`<center>${i18n.ts._mfm.dummy}</center>`, `<center>${i18n.ts._mfm.dummy}</center>`,
); );
const preview_unixtime = ref(
`$[unixtime ${Math.floor(Date.now() / 1000)}]`,
);
const preview_inlineCode = ref('`<: "Hello, world!"`'); const preview_inlineCode = ref('`<: "Hello, world!"`');
const preview_blockCode = ref( const preview_blockCode = ref(
'```ai\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```', '```ai\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```',

View file

@ -371,6 +371,8 @@ _mfm:
smallDescription: "Displays content small and thin." smallDescription: "Displays content small and thin."
center: "Center" center: "Center"
centerDescription: "Displays content centered." centerDescription: "Displays content centered."
unixtime: "Unix Time"
unixtimeDescription: "Displays a timestamp in the viewer's current timezone."
inlineCode: "Code (Inline)" inlineCode: "Code (Inline)"
inlineCodeDescription: "Displays inline syntax highlighting for (program) code." inlineCodeDescription: "Displays inline syntax highlighting for (program) code."
blockCode: "Code (Block)" blockCode: "Code (Block)"