« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/listing-spec.js4
-rw-r--r--src/misc-templates.js8
-rw-r--r--src/page/tag.js4
-rw-r--r--src/util/serialize.js4
4 files changed, 10 insertions, 10 deletions
diff --git a/src/listing-spec.js b/src/listing-spec.js
index 6603e963..97c1ef4a 100644
--- a/src/listing-spec.js
+++ b/src/listing-spec.js
@@ -724,7 +724,7 @@ const listingSpec = [
 
         data({wikiData}) {
             return wikiData.artTagData
-                .filter(tag => !tag.isCW)
+                .filter(tag => !tag.isContentWarning)
                 .sort(sortByName)
                 .map(tag => ({tag, timesUsed: tag.taggedInThings?.length}));
         },
@@ -744,7 +744,7 @@ const listingSpec = [
 
         data({wikiData}) {
             return wikiData.artTagData
-                .filter(tag => !tag.isCW)
+                .filter(tag => !tag.isContentWarning)
                 .map(tag => ({tag, timesUsed: tag.taggedInThings?.length}))
                 .sort((a, b) => b.timesUsed - a.timesUsed);
         },
diff --git a/src/misc-templates.js b/src/misc-templates.js
index 300fd8a1..d9b3f33d 100644
--- a/src/misc-templates.js
+++ b/src/misc-templates.js
@@ -111,8 +111,8 @@ export function getRevealStringFromWarnings(warnings, {strings}) {
 }
 
 export function getRevealStringFromTags(tags, {strings}) {
-    return tags && tags.some(tag => tag.isCW) && (
-        getRevealStringFromWarnings(strings.list.unit(tags.filter(tag => tag.isCW).map(tag => tag.name)), {strings}));
+    return tags && tags.some(tag => tag.isContentWarning) && (
+        getRevealStringFromWarnings(strings.list.unit(tags.filter(tag => tag.isContentWarning).map(tag => tag.name)), {strings}));
 }
 
 // Cover art links
@@ -145,11 +145,11 @@ export function generateCoverLink({
                 square: true,
                 reveal: getRevealStringFromTags(tags, {strings})
             })}
-            ${wikiInfo.enableArtTagUI && tags.filter(tag => !tag.isCW).length && fixWS`
+            ${wikiInfo.enableArtTagUI && tags.filter(tag => !tag.isContentWarning).length && fixWS`
                 <p class="tags">
                     ${strings('releaseInfo.artTags')}
                     ${(tags
-                        .filter(tag => !tag.isCW)
+                        .filter(tag => !tag.isContentWarning)
                         .map(link.tag)
                         .join(',\n'))}
                 </p>
diff --git a/src/page/tag.js b/src/page/tag.js
index d7706458..f911d84b 100644
--- a/src/page/tag.js
+++ b/src/page/tag.js
@@ -11,7 +11,7 @@ export function condition({wikiData}) {
 }
 
 export function targets({wikiData}) {
-    return wikiData.artTagData.filter(tag => !tag.isCW);
+    return wikiData.artTagData.filter(tag => !tag.isContentWarning);
 }
 
 export function write(tag, {wikiData}) {
@@ -82,7 +82,7 @@ function generateTagNav(tag, {
     wikiData
 }) {
     const previousNextLinks = generatePreviousNextLinks(tag, {
-        data: wikiData.artTagData.filter(tag => !tag.isCW),
+        data: wikiData.artTagData.filter(tag => !tag.isContentWarning),
         linkKey: 'tag'
     });
 
diff --git a/src/util/serialize.js b/src/util/serialize.js
index 7b0f890f..e30951f6 100644
--- a/src/util/serialize.js
+++ b/src/util/serialize.js
@@ -33,8 +33,8 @@ export function serializeCover(thing, pathFunction, {
 
     const { artTags } = thing;
 
-    const cwTags = artTags.filter(tag => tag.isCW);
-    const linkTags = artTags.filter(tag => !tag.isCW);
+    const cwTags = artTags.filter(tag => tag.isContentWarning);
+    const linkTags = artTags.filter(tag => !tag.isContentWarning);
 
     return {
         paths: serializeImagePaths(coverPath),