diff options
author | Khloe Leclair <xivkhloeleclair@gmail.com> | 2022-04-08 15:26:35 -0400 |
---|---|---|
committer | Khloe Leclair <xivkhloeleclair@gmail.com> | 2022-04-08 15:26:35 -0400 |
commit | 631d0375c3868cb68d1487662955db4ea1b7dd77 (patch) | |
tree | 5a9859885ae43250a35f5e4ecc0f93c4b6b46718 /src/SMAPI.Web/wwwroot/Content/js/log-parser.js | |
parent | 0beff189d19416dfcbb64bce800af41de37ccd08 (diff) | |
download | SMAPI-631d0375c3868cb68d1487662955db4ea1b7dd77.tar.gz SMAPI-631d0375c3868cb68d1487662955db4ea1b7dd77.tar.bz2 SMAPI-631d0375c3868cb68d1487662955db4ea1b7dd77.zip |
Simplify visible section checking by abusing Vue behavior, since the proper way is being buggy.
Diffstat (limited to 'src/SMAPI.Web/wwwroot/Content/js/log-parser.js')
-rw-r--r-- | src/SMAPI.Web/wwwroot/Content/js/log-parser.js | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/SMAPI.Web/wwwroot/Content/js/log-parser.js b/src/SMAPI.Web/wwwroot/Content/js/log-parser.js index c16b237a..1984d58f 100644 --- a/src/SMAPI.Web/wwwroot/Content/js/log-parser.js +++ b/src/SMAPI.Web/wwwroot/Content/js/log-parser.js @@ -347,10 +347,6 @@ smapi.logParser = function (data, sectionUrl) { type: Object, required: true }, - sectionExpanded: { - type: Boolean, - required: false - }, highlight: { type: Boolean, required: false @@ -379,7 +375,7 @@ smapi.logParser = function (data, sectionUrl) { const events = {}; let toggleMessage; if (msg.IsStartOfSection) { - const visible = context.props.sectionExpanded; + const visible = msg.SectionName && window.app && app.sectionsAllow(msg.SectionName); events.click = smapi.clickLogLine; toggleMessage = visible ? 'This section is shown. Click here to hide it.' : @@ -477,13 +473,6 @@ smapi.logParser = function (data, sectionUrl) { // Maybe not strictly necessary, but the Vue template is being // weird about accessing data entries on the app rather than // computed properties. - visibleSections: function () { - const ret = []; - for (const [k, v] of Object.entries(this.showSections)) - if (v !== false) - ret.push(k); - return ret; - }, hideContentPacks: function () { return !data.showContentPacks; }, |