« get me outta code hell

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:
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(),