From ebfd6037093b7bb28418b3f56b888df2f95692a3 Mon Sep 17 00:00:00 2001
From: "(quasar) nebula"
Date: Wed, 16 Feb 2022 22:31:36 -0400
Subject: update old wikiInfo.features.X style accesses
---
src/page/artist.js | 10 +++++-----
src/page/flash.js | 2 +-
src/page/group.js | 8 ++++----
src/page/homepage.js | 8 ++++----
src/page/listing.js | 2 +-
src/page/news.js | 2 +-
src/page/tag.js | 4 ++--
src/page/track.js | 4 ++--
8 files changed, 20 insertions(+), 20 deletions(-)
(limited to 'src/page')
diff --git a/src/page/artist.js b/src/page/artist.js
index e6160be3..5cdb97f1 100644
--- a/src/page/artist.js
+++ b/src/page/artist.js
@@ -114,7 +114,7 @@ export function write(artist, {wikiData}) {
const artGroups = countGroups(artThingsAll);
let flashes, flashListChunks;
- if (wikiInfo.features.flashesAndGames) {
+ if (wikiInfo.enableFlashesAndGames) {
flashes = sortByDate(artist.flashes.asContributor.slice());
flashListChunks = (
chunkByProperties(flashes.map(flash => ({
@@ -232,7 +232,7 @@ export function write(artist, {wikiData}) {
asWallpaperArtist: artist.albums.asWallpaperArtist.map(serializeArtistsAndContrib('wallpaperArtists')),
asBannerArtist: artist.albums.asBannerArtist.map(serializeArtistsAndContrib('bannerArtists'))
},
- flashes: wikiInfo.features.flashesAndGames ? {
+ flashes: wikiInfo.enableFlashesAndGames ? {
asContributor: artist.flashes.asContributor
.map(flash => getArtistsAndContrib(flash, 'contributors'))
.map(({ contrib, thing: flash }) => ({
@@ -303,7 +303,7 @@ export function write(artist, {wikiData}) {
unreleasedTracks.length && `(${strings('artistPage.unreleasedTrackList.title')})`
].filter(Boolean).join(' '),
artThingsAll.length && `${strings('artistPage.artList.title')}`,
- wikiInfo.features.flashesAndGames && flashes.length && `${strings('artistPage.flashList.title')}`,
+ wikiInfo.enableFlashesAndGames && flashes.length && `${strings('artistPage.flashList.title')}`,
commentaryThings.length && `${strings('artistPage.commentaryList.title')}`
].filter(Boolean))
})}
@@ -369,7 +369,7 @@ export function write(artist, {wikiData}) {
`).join('\n')}
`}
- ${wikiInfo.features.flashesAndGames && flashes.length && fixWS`
+ ${wikiInfo.enableFlashesAndGames && flashes.length && fixWS`
${strings('artistPage.flashList.title')}
${flashListChunks.map(({act, chunk, dateFirst, dateLast}) => fixWS`
@@ -492,7 +492,7 @@ function generateNavForArtist(artist, isGallery, hasGallery, {
return {
links: [
{toHome: true},
- wikiInfo.features.listings &&
+ wikiInfo.enableListings &&
{
path: ['localized.listingIndex'],
title: strings('listingIndex.title')
diff --git a/src/page/flash.js b/src/page/flash.js
index 9c59016d..9d88bc79 100644
--- a/src/page/flash.js
+++ b/src/page/flash.js
@@ -13,7 +13,7 @@ import {
// Page exports
export function condition({wikiData}) {
- return wikiData.wikiInfo.features.flashesAndGames;
+ return wikiData.wikiInfo.enableFlashesAndGames;
}
export function targets({wikiData}) {
diff --git a/src/page/group.js b/src/page/group.js
index 7282fc81..47828965 100644
--- a/src/page/group.js
+++ b/src/page/group.js
@@ -132,7 +132,7 @@ export function write(group, {wikiData}) {
time: `${strings.count.duration(totalDuration, {unit: true})}`
})
}
- ${wikiInfo.features.groupUI && wikiInfo.features.listings && html.tag('p',
+ ${wikiInfo.enableGroupUI && wikiInfo.enableListings && html.tag('p',
{class: 'quick-info'},
strings('groupGalleryPage.anotherGroupLine', {
link: link.listing(listingSpec.find(l => l.directory === 'groups/by-category'), {
@@ -179,7 +179,7 @@ function generateGroupSidebar(currentGroup, isGallery, {
}) {
const { groupCategoryData, wikiInfo } = wikiData;
- if (!wikiInfo.features.groupUI) {
+ if (!wikiInfo.enableGroupUI) {
return null;
}
@@ -222,7 +222,7 @@ function generateGroupNav(currentGroup, isGallery, {
}) {
const { groupData, wikiInfo } = wikiData;
- if (!wikiInfo.features.groupUI) {
+ if (!wikiInfo.enableGroupUI) {
return {simple: true};
}
@@ -242,7 +242,7 @@ function generateGroupNav(currentGroup, isGallery, {
return {
links: [
{toHome: true},
- wikiInfo.features.listings &&
+ wikiInfo.enableListings &&
{
path: ['localized.listingIndex'],
title: strings('listingIndex.title')
diff --git a/src/page/homepage.js b/src/page/homepage.js
index e60256dc..e40392a1 100644
--- a/src/page/homepage.js
+++ b/src/page/homepage.js
@@ -87,7 +87,7 @@ export function writeTargetless({wikiData}) {
// And no, I will not make [[news]] into part of transformMultiline
// (even though that would 8e hilarious).
content: (transformMultiline(homepageInfo.sidebar.replace('[[news]]', '__GENERATE_NEWS__'))
- .replace('__GENERATE_NEWS__
', wikiInfo.features.news ? fixWS`
+ .replace('__GENERATE_NEWS__
', wikiInfo.enableNews ? fixWS`
${strings('homepage.news.title')}
${newsData.slice(0, 3).map((entry, i) => html.tag('article',
{class: ['news-entry', i === 0 && 'first-news-entry']},
@@ -106,11 +106,11 @@ export function writeTargetless({wikiData}) {
${[
link.home('', {text: wikiInfo.shortName, class: 'current', to}),
- wikiInfo.features.listings &&
+ wikiInfo.enableListings &&
link.listingIndex('', {text: strings('listingIndex.title'), to}),
- wikiInfo.features.news &&
+ wikiInfo.enableNews &&
link.newsIndex('', {text: strings('newsIndex.title'), to}),
- wikiInfo.features.flashesAndGames &&
+ wikiInfo.enableFlashesAndGames &&
link.flashIndex('', {text: strings('flashIndex.title'), to}),
...staticPageData.filter(page => page.listed).map(page =>
link.staticPage(page, {text: page.shortName}))
diff --git a/src/page/listing.js b/src/page/listing.js
index d3ab79e0..3083a599 100644
--- a/src/page/listing.js
+++ b/src/page/listing.js
@@ -25,7 +25,7 @@ import {
// Page exports
export function condition({wikiData}) {
- return wikiData.wikiInfo.features.listings;
+ return wikiData.wikiInfo.enableListings;
}
export function targets({wikiData}) {
diff --git a/src/page/news.js b/src/page/news.js
index 99cbe8d5..75ae9e48 100644
--- a/src/page/news.js
+++ b/src/page/news.js
@@ -7,7 +7,7 @@ import fixWS from 'fix-whitespace';
// Page exports
export function condition({wikiData}) {
- return wikiData.wikiInfo.features.news;
+ return wikiData.wikiInfo.enableNews;
}
export function targets({wikiData}) {
diff --git a/src/page/tag.js b/src/page/tag.js
index 791c713d..60b8d217 100644
--- a/src/page/tag.js
+++ b/src/page/tag.js
@@ -7,7 +7,7 @@ import fixWS from 'fix-whitespace';
// Page exports
export function condition({wikiData}) {
- return wikiData.wikiInfo.features.artTagUI;
+ return wikiData.wikiInfo.enableArtTagUI;
}
export function targets({wikiData}) {
@@ -89,7 +89,7 @@ function generateTagNav(tag, {
return {
links: [
{toHome: true},
- wikiData.wikiInfo.features.listings &&
+ wikiData.wikiInfo.enableListings &&
{
path: ['localized.listingIndex'],
title: strings('listingIndex.title')
diff --git a/src/page/track.js b/src/page/track.js
index c2f2c592..b3cec414 100644
--- a/src/page/track.js
+++ b/src/page/track.js
@@ -49,7 +49,7 @@ export function write(track, {wikiData}) {
const listTag = getAlbumListTag(album);
let flashesThatFeature;
- if (wikiInfo.features.flashesAndGames) {
+ if (wikiInfo.enableFlashesAndGames) {
flashesThatFeature = sortByDate([track, ...otherReleases]
.flatMap(track => track.flashes.map(flash => ({flash, as: track}))));
}
@@ -250,7 +250,7 @@ export function write(track, {wikiData}) {
`}
${!useDividedReferences && generateTrackList(tracksThatReference)}
`}
- ${wikiInfo.features.flashesAndGames && flashesThatFeature.length && fixWS`
+ ${wikiInfo.enableFlashesAndGames && flashesThatFeature.length && fixWS`
${strings('releaseInfo.flashesThatFeature', {track: `${track.name}`})}
${flashesThatFeature.map(({ flash, as }) => html.tag('li',
--
cgit 1.3.0-6-gf8a5