diff --git a/src/css/main.scss b/src/css/main.scss index ca231bd..57955b9 100644 --- a/src/css/main.scss +++ b/src/css/main.scss @@ -198,16 +198,6 @@ body.has-modal #main { transform: scale(1.2); } } - - .calendar-attribution { - background: rgba(0,0,0,0.5); - font-family: $family-sans-serif; - font-size: 0.7rem; - padding: 2px 20px; - a { - color: mix($green, $white-ter, 25%); - } - } } .splatfest { diff --git a/src/img/salmon-run-random-weapon.png b/src/img/salmon-run-random-weapon.png new file mode 100644 index 0000000..04eee67 Binary files /dev/null and b/src/img/salmon-run-random-weapon.png differ diff --git a/src/js/components/App.vue b/src/js/components/App.vue index c6e55f3..a4edd58 100644 --- a/src/js/components/App.vue +++ b/src/js/components/App.vue @@ -88,10 +88,10 @@ -
+
- +
@@ -177,11 +177,11 @@ export default { now: null, splatnet: { schedules: null, + coopSchedules: null, timeline: null, merchandises: null, festivals: null, }, - salmonruncalendar: null, aboutOpen: false, splatNetGearOpen: false, }; @@ -229,11 +229,11 @@ export default { if (this.splatnet.timeline && this.splatnet.timeline.coop && this.splatnet.timeline.coop.schedule.end_time > this.now) return this.splatnet.timeline.coop; }, - coopCalendar() { - if (this.salmonruncalendar) { - let schedules = this.salmonruncalendar.schedules.filter(this.filterEndTime); - if (schedules.length > 0) - return schedules; + coopSchedules() { + if (this.splatnet.coopSchedules) { + let details = this.splatnet.coopSchedules.details.filter(this.filterEndTime); + let schedules = this.splatnet.coopSchedules.schedules.filter(this.filterEndTime); + return { details, schedules }; } }, @@ -257,7 +257,7 @@ export default { // Other bottomRowHasThreeColumns() { - return this.selectedFestival && !this.isSelectedFestivalActive && (this.coop || this.coopCalendar) && this.newWeapons; + return this.selectedFestival && !this.isSelectedFestivalActive && (this.coop || this.coopSchedules) && this.newWeapons; }, }, created() { @@ -306,7 +306,12 @@ export default { .then(response => this.splatnet.schedules = response.data) .catch(e => console.error(e)); - // Co-op (Salmon Run) data + // Co-op schedules + axios.get('/data/coop-schedules.json') + .then(response => this.splatnet.coopSchedules = response.data) + .catch(e => console.error(e)); + + // Timeline data (Salmon Run weapon of the month and new weapon availability) axios.get('/data/timeline.json') .then(response => this.splatnet.timeline = response.data) .catch(e => console.error(e)); @@ -320,11 +325,6 @@ export default { axios.get('/data/merchandises.json') .then(response => this.splatnet.merchandises = response.data) .catch(e => console.error(e)); - - // Salmon Run calendar data (upcoming Salmon Run schedules) - axios.get('/data/salmonruncalendar.json') - .then(response => this.salmonruncalendar = response.data) - .catch(e => console.error(e)); }, updateNow() { this.now = Math.trunc((new Date).getTime() / 1000); diff --git a/src/js/components/screenshots/ScreenshotHelper.vue b/src/js/components/screenshots/ScreenshotHelper.vue index 461fd20..7fe0d16 100644 --- a/src/js/components/screenshots/ScreenshotHelper.vue +++ b/src/js/components/screenshots/ScreenshotHelper.vue @@ -57,9 +57,9 @@ export default { data() { return { schedules: null, + coopSchedules: null, merchandises: null, timeline: null, - salmonruncalendar: null, festivals: null, }; }, @@ -79,11 +79,8 @@ export default { return this.merchandises[this.merchandises.length - 1]; }, latestSalmonRun() { - if (this.salmonruncalendar) - return this.salmonruncalendar.schedules[0]; - - if (this.timeline && this.timeline.coop) - return this.timeline.coop; + if (this.coopSchedules) + return this.coopSchedules.details[0]; }, newWeaponAvailability() { if (this.timeline && this.timeline.weapon_availability && this.timeline.weapon_availability.availabilities) { @@ -108,12 +105,12 @@ export default { created() { axios.get('data/schedules.json') .then(response => this.schedules = response.data); + axios.get('data/coop-schedules.json') + .then(response => this.coopSchedules = response.data); axios.get('data/merchandises.json') .then(response => this.merchandises = response.data.merchandises); axios.get('data/timeline.json') .then(response => this.timeline = response.data); - axios.get('data/salmonruncalendar.json') - .then(response => this.salmonruncalendar = response.data); axios.get('data/festivals.json') .then(response => this.festivals = response.data); }, diff --git a/src/js/components/screenshots/salmonrun/SalmonRun.vue b/src/js/components/screenshots/salmonrun/SalmonRun.vue index f7ff34f..89028a5 100644 --- a/src/js/components/screenshots/salmonrun/SalmonRun.vue +++ b/src/js/components/screenshots/salmonrun/SalmonRun.vue @@ -3,8 +3,9 @@
@@ -23,8 +24,8 @@ export default { props: ['startTime'], data() { return { + coopSchedules: null, timeline: null, - salmonruncalendar: null, }; }, computed: { @@ -35,19 +36,19 @@ export default { if (this.timeline && this.timeline.coop && this.timeline.coop.schedule.end_time > this.now) return this.timeline.coop; }, - coopCalendar() { - if (this.salmonruncalendar) { - let schedules = this.salmonruncalendar.schedules.filter(s => s.start_time == this.now); - if (schedules.length > 0) - return schedules; + coopSchedules() { + if (this.coopSchedules) { + let details = this.splatnet.coopSchedules.details.filter(s => s.start_time == this.now); + let schedules = this.splatnet.coopSchedules.schedules.filter(s => s.start_time == this.now); + return { details, schedules }; } }, }, created() { + axios.get('data/coop-schedules.json') + .then(response => this.coopSchedules = response.data) axios.get('data/timeline.json') .then(response => this.timeline = response.data) - axios.get('data/salmonruncalendar.json') - .then(response => this.salmonruncalendar = response.data) }, } diff --git a/src/js/components/splatoon/SalmonRunBox.vue b/src/js/components/splatoon/SalmonRunBox.vue index 892911d..fa46eab 100644 --- a/src/js/components/splatoon/SalmonRunBox.vue +++ b/src/js/components/splatoon/SalmonRunBox.vue @@ -90,11 +90,6 @@
- -
- Salmon Run schedule courtesy of - thejellydude -
@@ -112,7 +107,7 @@ import SalmonRunGearDialog from './SalmonRunGearDialog.vue'; export default { components: { SalmonRunDetailsBar, SalmonRunGearDialog }, - props: ['coop', 'coopCalendar', 'now', 'screenshotMode'], + props: ['coop', 'coopSchedules', 'now', 'screenshotMode'], data() { return { gearDialogOpen: false, @@ -120,17 +115,16 @@ export default { }, computed: { allSchedules() { + // Combine the "schedules" and "details" sections into one list of schedules let results = {}; - // "Official" schedule from SplatNet - if (this.coop && this.coop.schedule.end_time > this.now) - results[this.coop.schedule.start_time] = this.coop.schedule; + // Add the less-detailed schedules in first + for (let schedule of this.coopSchedules.schedules) + results[schedule.start_time] = schedule; - // Other schedules - if (this.coopCalendar) { - for (let schedule of this.coopCalendar) - results[schedule.start_time] = schedule; - } + // Add/replace the schedules that have map/weapon details + for (let schedule of this.coopSchedules.details) + results[schedule.start_time] = schedule; return Object.values(results).sort((a, b) => { return a.start_time - b.start_time }); }, @@ -139,9 +133,6 @@ export default { if (this.allSchedules.length > 0 && this.allSchedules[0].start_time <= this.now) return this.allSchedules[0]; }, - showSourceBar() { - return this.upcomingSchedules && this.upcomingSchedules.find(s => s.source == 'thejellydude'); - }, }, } diff --git a/src/js/components/splatoon/SalmonRunDetailsBar.vue b/src/js/components/splatoon/SalmonRunDetailsBar.vue index 6666dad..4a405cb 100644 --- a/src/js/components/splatoon/SalmonRunDetailsBar.vue +++ b/src/js/components/splatoon/SalmonRunDetailsBar.vue @@ -15,7 +15,8 @@
- + +
diff --git a/src/js/splatoonStages.js b/src/js/splatoonStages.js index 40c0335..aaffd90 100644 --- a/src/js/splatoonStages.js +++ b/src/js/splatoonStages.js @@ -47,21 +47,4 @@ export default [ image: '/images/stage/96fd8c0492331a30e60a217c94fd1d4c73a966cc.png', largeImage: require('@/img/stages/turf-wars-stage-8_2x.jpg'), }, - - // Salmon Run stages with fake IDs for tracking purposes - { - id: '999901', - name: 'Spawning Grounds', - image: require('@/img/stages/turf-wars-stage-5_2x.jpg'), - }, - { - id: '999902', - name: 'Marooner\'s Bay', - image: require('@/img/stages/marooners-bay.jpg'), - }, - { - id: '999903', - name: 'Lost Outpost', - image: require('@/img/stages/lost-outpost.jpg'), - }, ] diff --git a/src/updater/twitter/SalmonRunTweet.js b/src/updater/twitter/SalmonRunTweet.js index ef3d02d..861d2f5 100644 --- a/src/updater/twitter/SalmonRunTweet.js +++ b/src/updater/twitter/SalmonRunTweet.js @@ -7,19 +7,16 @@ class SalmonRunTweet extends TwitterPostBase { getName() { return 'Salmon Run'; } getSalmonRunSchedules() { - let schedules = {}; + let results = {}; + let coopSchedules = readData('coop-schedules.json'); - let timeline = readData('timeline.json').coop; - if (timeline) - schedules[timeline.start_time] = timeline; + for (let schedule of coopSchedules.schedules) + results[schedule.start_time] = schedule; - let calendar = readData('salmonruncalendar.json').schedules; - if (calendar) { - for (let schedule of calendar) - schedules[schedule.start_time] = schedule; - } + for (let schedule of coopSchedules.details) + results[schedule.start_time] = schedule; - return Object.values(schedules); + return Object.values(results); } getData() {