Fix CustomTimestamps Canary
Some checks are pending
Sync to Codeberg / Sync Codeberg and Github (push) Waiting to run
Test / Test (push) Waiting to run

This commit is contained in:
thororen1234 2025-03-18 22:58:20 -04:00
parent 534e940f1b
commit 96df3abaac
No known key found for this signature in database

View file

@ -66,11 +66,12 @@ export default definePlugin({
</Forms.FormText> </Forms.FormText>
</> </>
), ),
patches: [{ patches: [
{
find: "#{intl::MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL}", find: "#{intl::MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL}",
replacement: [ replacement: [
{ {
match: /(?<=\i=\i\?)\(0,\i\.\i\)\((\i),"LT"\):\(0,\i\.\i\)\(\i\)/, match: /(?<=\i=\i\?)\(0,\i\.\i\)\((\i),"LT"\):\(0,\i\.\i\)\(\i,!0\)/,
replace: '$self.format($1,"compactFormat","[calendar]"):$self.format($1,"cozyFormat","LT")', replace: '$self.format($1,"compactFormat","[calendar]"):$self.format($1,"cozyFormat","LT")',
}, },
{ {
@ -78,7 +79,8 @@ export default definePlugin({
replace: '$self.format($1,"tooltipFormat","LLLL")', replace: '$self.format($1,"tooltipFormat","LLLL")',
}, },
] ]
}], }
],
format(date: Date, key: string, fallback: string) { format(date: Date, key: string, fallback: string) {
const t = moment(date); const t = moment(date);