« get me outta code hell

content: generate{Absolute,Relative}Datetimestamp: always tooltip - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateRelativeDatetimestamp.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-10-21 15:46:42 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-10-21 15:46:42 -0300
commitdb1f23ae99a4ae45a95d5da40e44158c5b74d4dd (patch)
treef473b18bd59905147b0666deb75b847e26d34123 /src/content/dependencies/generateRelativeDatetimestamp.js
parent7b812859143997592387a794ececcecf618b9e0b (diff)
content: generate{Absolute,Relative}Datetimestamp: always tooltip
Diffstat (limited to 'src/content/dependencies/generateRelativeDatetimestamp.js')
-rw-r--r--src/content/dependencies/generateRelativeDatetimestamp.js27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/content/dependencies/generateRelativeDatetimestamp.js b/src/content/dependencies/generateRelativeDatetimestamp.js
index b3fe6239..1415564e 100644
--- a/src/content/dependencies/generateRelativeDatetimestamp.js
+++ b/src/content/dependencies/generateRelativeDatetimestamp.js
@@ -20,19 +20,11 @@ export default {
       validate: v => v.is('full', 'year'),
       default: 'full',
     },
-
-    tooltip: {
-      type: 'boolean',
-      default: false,
-    },
   },
 
   generate(data, relations, slots, {language}) {
     if (data.equal) {
-      return relations.fallback.slots({
-        style: slots.style,
-        tooltip: slots.tooltip,
-      });
+      return relations.fallback.slot('style', slots.style);
     }
 
     return relations.template.slots({
@@ -44,15 +36,14 @@ export default {
           : null),
 
       tooltip:
-        slots.tooltip &&
-          relations.tooltip.slots({
-            content:
-              language.formatRelativeDate(data.currentDate, data.referenceDate, {
-                considerRoundingDays: true,
-                approximate: true,
-                absolute: slots.style === 'year',
-              }),
-          }),
+        relations.tooltip.slots({
+          content:
+            language.formatRelativeDate(data.currentDate, data.referenceDate, {
+              considerRoundingDays: true,
+              approximate: true,
+              absolute: slots.style === 'year',
+            }),
+        }),
 
       datetime:
         data.currentDate.toISOString(),