mirror of
https://github.com/misenhower/splatoon3.ink.git
synced 2026-09-11 18:15:39 -05:00
Prefer single quotes and enforce semicolons
This commit is contained in:
@@ -1,53 +1,55 @@
|
||||
/* eslint-env node */
|
||||
const createAliasSetting = require('@vue/eslint-config-airbnb/createAliasSetting')
|
||||
const createAliasSetting = require('@vue/eslint-config-airbnb/createAliasSetting');
|
||||
|
||||
module.exports = {
|
||||
"root": true,
|
||||
"extends": [
|
||||
"plugin:vue/vue3-recommended",
|
||||
"eslint:recommended",
|
||||
"plugin:import/recommended",
|
||||
"plugin:jsdoc/recommended",
|
||||
'root': true,
|
||||
'extends': [
|
||||
'plugin:vue/vue3-recommended',
|
||||
'eslint:recommended',
|
||||
'plugin:import/recommended',
|
||||
'plugin:jsdoc/recommended',
|
||||
],
|
||||
"rules": {
|
||||
'rules': {
|
||||
// ESLint
|
||||
"indent": ["warn", 2, { "SwitchCase": 1 }],
|
||||
"comma-dangle": ["warn", "always-multiline"],
|
||||
"no-unused-vars": ["warn", { "args": "none" }],
|
||||
'indent': ['warn', 2, { 'SwitchCase': 1 }],
|
||||
'comma-dangle': ['warn', 'always-multiline'],
|
||||
'no-unused-vars': ['warn', { 'args': 'none' }],
|
||||
'semi': 'warn',
|
||||
'quotes': ['warn' , 'single'],
|
||||
|
||||
// Vue
|
||||
"vue/multi-word-component-names": "off",
|
||||
"vue/require-default-prop": "off",
|
||||
"vue/max-attributes-per-line": ["warn", { singleline: { max: 4 } }],
|
||||
"vue/html-self-closing": ["warn", { html: { void: "always" } }],
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/require-default-prop': 'off',
|
||||
'vue/max-attributes-per-line': ['warn', { singleline: { max: 4 } }],
|
||||
'vue/html-self-closing': ['warn', { html: { void: 'always' } }],
|
||||
|
||||
// Imports
|
||||
"import/order": "warn",
|
||||
'import/order': 'warn',
|
||||
|
||||
// JSDoc
|
||||
"jsdoc/require-jsdoc": "off",
|
||||
"jsdoc/require-returns": "off",
|
||||
"jsdoc/require-param-description": "off",
|
||||
'jsdoc/require-jsdoc': 'off',
|
||||
'jsdoc/require-returns': 'off',
|
||||
'jsdoc/require-param-description': 'off',
|
||||
},
|
||||
"globals": {
|
||||
"__dirname": "readonly",
|
||||
"process": "readonly",
|
||||
"require": "readonly",
|
||||
"module": "readonly",
|
||||
"Buffer": "readonly",
|
||||
'globals': {
|
||||
'__dirname': 'readonly',
|
||||
'process': 'readonly',
|
||||
'require': 'readonly',
|
||||
'module': 'readonly',
|
||||
'Buffer': 'readonly',
|
||||
},
|
||||
"env": {
|
||||
"vue/setup-compiler-macros": true,
|
||||
'env': {
|
||||
'vue/setup-compiler-macros': true,
|
||||
},
|
||||
"ignorePatterns": [
|
||||
"src/assets/i18n/index.mjs", // "assert" syntax is currently unrecognized
|
||||
'ignorePatterns': [
|
||||
'src/assets/i18n/index.mjs', // "assert" syntax is currently unrecognized
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 13,
|
||||
'parserOptions': {
|
||||
'ecmaVersion': 13,
|
||||
},
|
||||
settings: {
|
||||
...createAliasSetting({
|
||||
'@': './src',
|
||||
}),
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Sentry from "@sentry/node";
|
||||
import * as Sentry from '@sentry/node';
|
||||
|
||||
export function sentryInit() {
|
||||
if (!process.env.SENTRY_DSN) {
|
||||
|
||||
10
app/cron.mjs
10
app/cron.mjs
@@ -1,8 +1,8 @@
|
||||
import { CronJob } from "cron";
|
||||
import { update } from "./data/index.mjs";
|
||||
import { warmCaches } from "./splatnet/index.mjs";
|
||||
import { sendStatuses } from "./social/index.mjs";
|
||||
import { archiveData } from "./data/DataArchiver.mjs";
|
||||
import { CronJob } from 'cron';
|
||||
import { update } from './data/index.mjs';
|
||||
import { warmCaches } from './splatnet/index.mjs';
|
||||
import { sendStatuses } from './social/index.mjs';
|
||||
import { archiveData } from './data/DataArchiver.mjs';
|
||||
|
||||
let updating = false;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import fs from 'fs/promises';
|
||||
import { PutObjectCommand, S3Client } from '@aws-sdk/client-s3';
|
||||
import prefixedConsole from "../common/prefixedConsole.mjs";
|
||||
import prefixedConsole from '../common/prefixedConsole.mjs';
|
||||
|
||||
export function archiveData() {
|
||||
return (new DataArchiver).process();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import fs from 'fs/promises';
|
||||
import path from 'path';
|
||||
import mkdirp from 'mkdirp';
|
||||
import prefixedConsole from "../common/prefixedConsole.mjs";
|
||||
import prefixedConsole from '../common/prefixedConsole.mjs';
|
||||
import { normalizeSplatnetResourcePath } from '../common/util.mjs';
|
||||
import { exists } from '../common/fs.mjs';
|
||||
|
||||
@@ -41,7 +41,7 @@ export default class ImageProcessor
|
||||
async maybeDownload(url, destination) {
|
||||
// If the file already exists, we don't need to download it again
|
||||
if (await exists(this.localPath(destination))) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
return await this.download(url, destination);
|
||||
|
||||
@@ -83,7 +83,7 @@ export class LocalizationProcessor {
|
||||
|
||||
data = JSON.stringify(data, undefined, space);
|
||||
|
||||
await mkdirp(path.dirname(this.filename))
|
||||
await mkdirp(path.dirname(this.filename));
|
||||
await fs.writeFile(this.filename, data);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import * as Sentry from "@sentry/node";
|
||||
import GearUpdater from "./updaters/GearUpdater.mjs";
|
||||
import StageScheduleUpdater from "./updaters/StageScheduleUpdater.mjs";
|
||||
import CoopUpdater from "./updaters/CoopUpdater.mjs";
|
||||
import FestivalUpdater from "./updaters/FestivalUpdater.mjs";
|
||||
import XRankUpdater from "./updaters/XRankUpdater.mjs";
|
||||
import StagesUpdater from "./updaters/StagesUpdater.mjs";
|
||||
import * as Sentry from '@sentry/node';
|
||||
import GearUpdater from './updaters/GearUpdater.mjs';
|
||||
import StageScheduleUpdater from './updaters/StageScheduleUpdater.mjs';
|
||||
import CoopUpdater from './updaters/CoopUpdater.mjs';
|
||||
import FestivalUpdater from './updaters/FestivalUpdater.mjs';
|
||||
import XRankUpdater from './updaters/XRankUpdater.mjs';
|
||||
import StagesUpdater from './updaters/StagesUpdater.mjs';
|
||||
|
||||
function updaters() {
|
||||
return [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import DataUpdater from "./DataUpdater.mjs";
|
||||
import DataUpdater from './DataUpdater.mjs';
|
||||
|
||||
export default class CoopUpdater extends DataUpdater
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@ import { Console } from 'node:console';
|
||||
import mkdirp from 'mkdirp';
|
||||
import jsonpath from 'jsonpath';
|
||||
import ical from 'ical-generator';
|
||||
import prefixedConsole from "../../common/prefixedConsole.mjs";
|
||||
import SplatNet3Client from "../../splatnet/SplatNet3Client.mjs";
|
||||
import prefixedConsole from '../../common/prefixedConsole.mjs';
|
||||
import SplatNet3Client from '../../splatnet/SplatNet3Client.mjs';
|
||||
import ImageProcessor from '../ImageProcessor.mjs';
|
||||
import NsoClient from '../../splatnet/NsoClient.mjs';
|
||||
import { locales, regionalLocales, defaultLocale } from '../../../src/common/i18n.mjs';
|
||||
@@ -212,7 +212,7 @@ export default class DataUpdater
|
||||
}
|
||||
|
||||
async writeFile(file, data) {
|
||||
await mkdirp(path.dirname(file))
|
||||
await mkdirp(path.dirname(file));
|
||||
await fs.writeFile(file, data);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import prefixedConsole from "../../common/prefixedConsole.mjs";
|
||||
import prefixedConsole from '../../common/prefixedConsole.mjs';
|
||||
import { getFestId, getFestTeamId } from '../../common/util.mjs';
|
||||
import { olderThan } from '../../common/fs.mjs';
|
||||
import DataUpdater from "./DataUpdater.mjs";
|
||||
import DataUpdater from './DataUpdater.mjs';
|
||||
|
||||
export default class FestivalRankingUpdater extends DataUpdater
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ import { getFestId } from '../../common/util.mjs';
|
||||
import ValueCache from '../../common/ValueCache.mjs';
|
||||
import { regionTokens } from '../../splatnet/NsoClient.mjs';
|
||||
import FestivalRankingUpdater from './FestivalRankingUpdater.mjs';
|
||||
import DataUpdater from "./DataUpdater.mjs";
|
||||
import DataUpdater from './DataUpdater.mjs';
|
||||
|
||||
function generateFestUrl(id) {
|
||||
return process.env.DEBUG ?
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import DataUpdater from "./DataUpdater.mjs";
|
||||
import DataUpdater from './DataUpdater.mjs';
|
||||
|
||||
export default class GearUpdater extends DataUpdater
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import _ from 'lodash';
|
||||
import DataUpdater from "./DataUpdater.mjs";
|
||||
import DataUpdater from './DataUpdater.mjs';
|
||||
|
||||
export default class StageScheduleUpdater extends DataUpdater
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import DataUpdater from "./DataUpdater.mjs";
|
||||
import DataUpdater from './DataUpdater.mjs';
|
||||
|
||||
export default class StagesUpdater extends DataUpdater
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { olderThan } from "../../common/fs.mjs";
|
||||
import prefixedConsole from "../../common/prefixedConsole.mjs";
|
||||
import { getXRankSeasonId } from "../../common/util.mjs";
|
||||
import DataUpdater from "./DataUpdater.mjs";
|
||||
import { olderThan } from '../../common/fs.mjs';
|
||||
import prefixedConsole from '../../common/prefixedConsole.mjs';
|
||||
import { getXRankSeasonId } from '../../common/util.mjs';
|
||||
import DataUpdater from './DataUpdater.mjs';
|
||||
|
||||
export default class XRankDetailUpdater extends DataUpdater
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import prefixedConsole from "../../common/prefixedConsole.mjs";
|
||||
import prefixedConsole from '../../common/prefixedConsole.mjs';
|
||||
import { getXRankSeasonId } from '../../common/util.mjs';
|
||||
import DataUpdater from "./DataUpdater.mjs";
|
||||
import XRankDetailUpdater from "./XRankDetailUpdater.mjs";
|
||||
import DataUpdater from './DataUpdater.mjs';
|
||||
import XRankDetailUpdater from './XRankDetailUpdater.mjs';
|
||||
|
||||
export default class XRankUpdater extends DataUpdater
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ import consoleStamp from 'console-stamp';
|
||||
import cron from './cron.mjs';
|
||||
import { sendStatuses, testStatuses } from './social/index.mjs';
|
||||
import { update } from './data/index.mjs';
|
||||
import { warmCaches } from "./splatnet/index.mjs";
|
||||
import { warmCaches } from './splatnet/index.mjs';
|
||||
import MastodonClient from './social/clients/MastodonClient.mjs';
|
||||
import ImageWriter from './social/clients/ImageWriter.mjs';
|
||||
import BlueskyClient from './social/clients/BlueskyClient.mjs';
|
||||
@@ -26,7 +26,7 @@ const actions = {
|
||||
splatnet: update,
|
||||
warmCaches,
|
||||
dataArchive: archiveData,
|
||||
}
|
||||
};
|
||||
|
||||
const command = process.argv[2];
|
||||
const params = process.argv.slice(3);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import prefixedConsole from "../common/prefixedConsole.mjs";
|
||||
import ScreenshotHelper from "../screenshots/ScreenshotHelper.mjs";
|
||||
import Client from "./clients/Client.mjs";
|
||||
import StatusGenerator from "./generators/StatusGenerator.mjs";
|
||||
import prefixedConsole from '../common/prefixedConsole.mjs';
|
||||
import ScreenshotHelper from '../screenshots/ScreenshotHelper.mjs';
|
||||
import Client from './clients/Client.mjs';
|
||||
import StatusGenerator from './generators/StatusGenerator.mjs';
|
||||
|
||||
export default class StatusGeneratorManager
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import atprotoApi from "@atproto/api";
|
||||
import sharp from "sharp";
|
||||
import Client from "./Client.mjs";
|
||||
import atprotoApi from '@atproto/api';
|
||||
import sharp from 'sharp';
|
||||
import Client from './Client.mjs';
|
||||
|
||||
const { BskyAgent, RichText } = atprotoApi;
|
||||
|
||||
@@ -39,7 +39,7 @@ export default class BlueskyClient extends Client
|
||||
// We have to convert the PNG to a JPG for Bluesky because of size limits
|
||||
let jpeg = await sharp(m.file).jpeg().toBuffer();
|
||||
|
||||
let response = await this.#agent.uploadBlob(jpeg, { encoding: 'image/jpeg' })
|
||||
let response = await this.#agent.uploadBlob(jpeg, { encoding: 'image/jpeg' });
|
||||
|
||||
return {
|
||||
image: response.data.blob,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Status from "../Status.mjs";
|
||||
import StatusGenerator from "../generators/StatusGenerator.mjs";
|
||||
import Status from '../Status.mjs';
|
||||
import StatusGenerator from '../generators/StatusGenerator.mjs';
|
||||
|
||||
export default class Client
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import fs from 'fs/promises';
|
||||
import mkdirp from 'mkdirp';
|
||||
import Client from "./Client.mjs";
|
||||
import Client from './Client.mjs';
|
||||
|
||||
export default class FileWriter extends Client {
|
||||
key = 'file';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import fs from 'fs/promises';
|
||||
import mkdirp from 'mkdirp';
|
||||
import Client from "./Client.mjs";
|
||||
import Client from './Client.mjs';
|
||||
|
||||
export default class ImageWriter extends Client {
|
||||
key = 'image';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createRestAPIClient } from 'masto';
|
||||
import Client from "./Client.mjs";
|
||||
import Client from './Client.mjs';
|
||||
|
||||
export default class MastodonClient extends Client
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import sharp from "sharp";
|
||||
import threads from "threads-api";
|
||||
import Client from "./Client.mjs";
|
||||
import sharp from 'sharp';
|
||||
import threads from 'threads-api';
|
||||
import Client from './Client.mjs';
|
||||
|
||||
export default class ThreadsClient extends Client {
|
||||
key = "threads";
|
||||
name = "Threads";
|
||||
key = 'threads';
|
||||
name = 'Threads';
|
||||
|
||||
#api;
|
||||
|
||||
@@ -33,7 +33,7 @@ export default class ThreadsClient extends Client {
|
||||
|
||||
await this.#api.publish({
|
||||
text: status.status,
|
||||
image: { type: "image/jpeg", data: jpeg },
|
||||
image: { type: 'image/jpeg', data: jpeg },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { TwitterApi } from "twitter-api-v2";
|
||||
import Client from "./Client.mjs";
|
||||
import { TwitterApi } from 'twitter-api-v2';
|
||||
import Client from './Client.mjs';
|
||||
|
||||
export default class TwitterClient extends Client
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import Media from "../Media.mjs";
|
||||
import { useEventSchedulesStore } from "../../../src/stores/schedules.mjs";
|
||||
import { br2nl } from "../../../src/common/util.mjs";
|
||||
import ScreenshotHelper from "../../screenshots/ScreenshotHelper.mjs";
|
||||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import Media from '../Media.mjs';
|
||||
import { useEventSchedulesStore } from '../../../src/stores/schedules.mjs';
|
||||
import { br2nl } from '../../../src/common/util.mjs';
|
||||
import ScreenshotHelper from '../../screenshots/ScreenshotHelper.mjs';
|
||||
import StatusGenerator from './StatusGenerator.mjs';
|
||||
export default class ChallengeStatus extends StatusGenerator
|
||||
{
|
||||
key = 'challenge';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Media from "../Media.mjs";
|
||||
import ScreenshotHelper from "../../screenshots/ScreenshotHelper.mjs";
|
||||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import Media from '../Media.mjs';
|
||||
import ScreenshotHelper from '../../screenshots/ScreenshotHelper.mjs';
|
||||
import StatusGenerator from './StatusGenerator.mjs';
|
||||
|
||||
const releaseDate = new Date('2022-09-09');
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import Media from "../Media.mjs";
|
||||
import { useGearStore } from "../../../src/stores/gear.mjs";
|
||||
import { getGearIcon } from "../../common/util.mjs";
|
||||
import ScreenshotHelper from "../../screenshots/ScreenshotHelper.mjs";
|
||||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import Media from '../Media.mjs';
|
||||
import { useGearStore } from '../../../src/stores/gear.mjs';
|
||||
import { getGearIcon } from '../../common/util.mjs';
|
||||
import ScreenshotHelper from '../../screenshots/ScreenshotHelper.mjs';
|
||||
import StatusGenerator from './StatusGenerator.mjs';
|
||||
|
||||
export default class DailyDropGearStatus extends StatusGenerator
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Media from "../Media.mjs";
|
||||
import { useEggstraWorkSchedulesStore } from "../../../src/stores/schedules.mjs";
|
||||
import ScreenshotHelper from "../../screenshots/ScreenshotHelper.mjs";
|
||||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import Media from '../Media.mjs';
|
||||
import { useEggstraWorkSchedulesStore } from '../../../src/stores/schedules.mjs';
|
||||
import ScreenshotHelper from '../../screenshots/ScreenshotHelper.mjs';
|
||||
import StatusGenerator from './StatusGenerator.mjs';
|
||||
|
||||
export default class EggstraWorkStatus extends StatusGenerator
|
||||
{
|
||||
@@ -25,7 +25,7 @@ export default class EggstraWorkStatus extends StatusGenerator
|
||||
|
||||
let lines = [];
|
||||
|
||||
let mode = 'EGGSTRA WORK'
|
||||
let mode = 'EGGSTRA WORK';
|
||||
|
||||
lines.push(`${mode} is now open on ${schedule.settings.coopStage.name}! #salmonrun #splatoon3`);
|
||||
|
||||
@@ -41,7 +41,7 @@ export default class EggstraWorkStatus extends StatusGenerator
|
||||
async _getMedia(screenshotHelper) {
|
||||
let media = new Media;
|
||||
media.file = await screenshotHelper.capture('salmonrun', {
|
||||
params: {eggstra: "true"},
|
||||
params: {eggstra: 'true'},
|
||||
});
|
||||
|
||||
return media;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import Media from "../Media.mjs";
|
||||
import { useEggstraWorkSchedulesStore } from "../../../src/stores/schedules.mjs";
|
||||
import { useTimeStore } from "../../../src/stores/time.mjs";
|
||||
import ScreenshotHelper from "../../screenshots/ScreenshotHelper.mjs";
|
||||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import Media from '../Media.mjs';
|
||||
import { useEggstraWorkSchedulesStore } from '../../../src/stores/schedules.mjs';
|
||||
import { useTimeStore } from '../../../src/stores/time.mjs';
|
||||
import ScreenshotHelper from '../../screenshots/ScreenshotHelper.mjs';
|
||||
import StatusGenerator from './StatusGenerator.mjs';
|
||||
|
||||
export default class EggstraWorkUpcomingStatus extends StatusGenerator
|
||||
{
|
||||
@@ -66,7 +66,7 @@ export default class EggstraWorkUpcomingStatus extends StatusGenerator
|
||||
|
||||
let media = new Media;
|
||||
media.file = await screenshotHelper.capture('salmonRun', {
|
||||
params: { startTime: schedule?.startTime, eggstra: "true" },
|
||||
params: { startTime: schedule?.startTime, eggstra: 'true' },
|
||||
});
|
||||
|
||||
return media;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Media from "../Media.mjs";
|
||||
import { useGearStore } from "../../../src/stores/gear.mjs";
|
||||
import { getGearIcon } from "../../common/util.mjs";
|
||||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import Media from '../Media.mjs';
|
||||
import { useGearStore } from '../../../src/stores/gear.mjs';
|
||||
import { getGearIcon } from '../../common/util.mjs';
|
||||
import StatusGenerator from './StatusGenerator.mjs';
|
||||
|
||||
export default class RegularGearStatus extends StatusGenerator
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Media from "../Media.mjs";
|
||||
import { useCoopGearStore } from "../../../src/stores/gear.mjs";
|
||||
import ScreenshotHelper from "../../screenshots/ScreenshotHelper.mjs";
|
||||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import Media from '../Media.mjs';
|
||||
import { useCoopGearStore } from '../../../src/stores/gear.mjs';
|
||||
import ScreenshotHelper from '../../screenshots/ScreenshotHelper.mjs';
|
||||
import StatusGenerator from './StatusGenerator.mjs';
|
||||
|
||||
export default class SalmonRunGearStatus extends StatusGenerator
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Media from "../Media.mjs";
|
||||
import { useSalmonRunSchedulesStore } from "../../../src/stores/schedules.mjs";
|
||||
import ScreenshotHelper from "../../screenshots/ScreenshotHelper.mjs";
|
||||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import Media from '../Media.mjs';
|
||||
import { useSalmonRunSchedulesStore } from '../../../src/stores/schedules.mjs';
|
||||
import ScreenshotHelper from '../../screenshots/ScreenshotHelper.mjs';
|
||||
import StatusGenerator from './StatusGenerator.mjs';
|
||||
|
||||
export default class SalmonRunStatus extends StatusGenerator
|
||||
{
|
||||
@@ -11,7 +11,7 @@ export default class SalmonRunStatus extends StatusGenerator
|
||||
async getActiveSchedule() {
|
||||
await this.preparePinia();
|
||||
|
||||
return useSalmonRunSchedulesStore().activeSchedule
|
||||
return useSalmonRunSchedulesStore().activeSchedule;
|
||||
}
|
||||
|
||||
async getDataTime() {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import Media from "../Media.mjs";
|
||||
import { useSalmonRunSchedulesStore } from "../../../src/stores/schedules.mjs";
|
||||
import { useTimeStore } from "../../../src/stores/time.mjs";
|
||||
import ScreenshotHelper from "../../screenshots/ScreenshotHelper.mjs";
|
||||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import Media from '../Media.mjs';
|
||||
import { useSalmonRunSchedulesStore } from '../../../src/stores/schedules.mjs';
|
||||
import { useTimeStore } from '../../../src/stores/time.mjs';
|
||||
import ScreenshotHelper from '../../screenshots/ScreenshotHelper.mjs';
|
||||
import StatusGenerator from './StatusGenerator.mjs';
|
||||
|
||||
export default class SalmonRunUpcomingStatus extends StatusGenerator
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import Media from "../Media.mjs";
|
||||
import { useAnarchyOpenSchedulesStore, useAnarchySeriesSchedulesStore, useRegularSchedulesStore, useSplatfestOpenSchedulesStore, useSplatfestProSchedulesStore, useXSchedulesStore } from "../../../src/stores/schedules.mjs";
|
||||
import Media from '../Media.mjs';
|
||||
import { useAnarchyOpenSchedulesStore, useAnarchySeriesSchedulesStore, useRegularSchedulesStore, useSplatfestOpenSchedulesStore, useSplatfestProSchedulesStore, useXSchedulesStore } from '../../../src/stores/schedules.mjs';
|
||||
import { useUSSplatfestsStore } from '../../../src/stores/splatfests.mjs';
|
||||
import ScreenshotHelper from "../../screenshots/ScreenshotHelper.mjs";
|
||||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import ScreenshotHelper from '../../screenshots/ScreenshotHelper.mjs';
|
||||
import StatusGenerator from './StatusGenerator.mjs';
|
||||
export default class SchedulesStatus extends StatusGenerator
|
||||
{
|
||||
key = 'schedules';
|
||||
@@ -19,7 +19,7 @@ export default class SchedulesStatus extends StatusGenerator
|
||||
splatfestOpen: useSplatfestOpenSchedulesStore().activeSchedule,
|
||||
splatfestPro: useSplatfestProSchedulesStore().activeSchedule,
|
||||
tricolor: useUSSplatfestsStore().tricolor,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
async getDataTime() {
|
||||
@@ -42,7 +42,7 @@ export default class SchedulesStatus extends StatusGenerator
|
||||
'',
|
||||
`– Open: ${festOpenStages[0].name} and ${festOpenStages[1].name}`,
|
||||
`– Pro: ${festProStages[0].name} and ${festProStages[1].name}`,
|
||||
]
|
||||
];
|
||||
|
||||
if(stages.tricolor?.isTricolorActive) {
|
||||
lines.push(`– Tricolor: ${stages.tricolor.tricolorStage.name}`);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Media from "../Media.mjs";
|
||||
import Media from '../Media.mjs';
|
||||
import { useUSSplatfestsStore, useEUSplatfestsStore, useJPSplatfestsStore, useAPSplatfestsStore } from '../../../src/stores/splatfests.mjs';
|
||||
import ScreenshotHelper from "../../screenshots/ScreenshotHelper.mjs";
|
||||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import ScreenshotHelper from '../../screenshots/ScreenshotHelper.mjs';
|
||||
import StatusGenerator from './StatusGenerator.mjs';
|
||||
|
||||
export default class SplatfestResultsStatus extends StatusGenerator
|
||||
{
|
||||
@@ -20,10 +20,10 @@ export default class SplatfestResultsStatus extends StatusGenerator
|
||||
|
||||
let store;
|
||||
switch(this.region) {
|
||||
case "NA": store = useUSSplatfestsStore(); break;
|
||||
case "EU": store = useEUSplatfestsStore(); break;
|
||||
case "JP": store = useJPSplatfestsStore(); break;
|
||||
case "AP": store = useAPSplatfestsStore(); break;
|
||||
case 'NA': store = useUSSplatfestsStore(); break;
|
||||
case 'EU': store = useEUSplatfestsStore(); break;
|
||||
case 'JP': store = useJPSplatfestsStore(); break;
|
||||
case 'AP': store = useAPSplatfestsStore(); break;
|
||||
}
|
||||
|
||||
return store.recentFestival;
|
||||
@@ -49,7 +49,7 @@ export default class SplatfestResultsStatus extends StatusGenerator
|
||||
let winningTeam = festival.teams.find(t => t.result.isWinner);
|
||||
|
||||
const global = festival.regions.length == 4;
|
||||
const regionText = global ? 'Global' : festival.regions.join("/");
|
||||
const regionText = global ? 'Global' : festival.regions.join('/');
|
||||
|
||||
return `${regionText} Splatfest results: Team ${winningTeam.teamName} wins! #splatfest #splatoon3`;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import Media from "../Media.mjs";
|
||||
import Media from '../Media.mjs';
|
||||
import { useUSSplatfestsStore, useEUSplatfestsStore, useJPSplatfestsStore, useAPSplatfestsStore, STATUS_ACTIVE, STATUS_PAST } from '../../../src/stores/splatfests.mjs';
|
||||
import { useTimeStore } from "../../../src/stores/time.mjs";
|
||||
import ScreenshotHelper from "../../screenshots/ScreenshotHelper.mjs";
|
||||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import { useTimeStore } from '../../../src/stores/time.mjs';
|
||||
import ScreenshotHelper from '../../screenshots/ScreenshotHelper.mjs';
|
||||
import StatusGenerator from './StatusGenerator.mjs';
|
||||
|
||||
export default class SplatfestStatus extends StatusGenerator
|
||||
{
|
||||
@@ -20,10 +20,10 @@ export default class SplatfestStatus extends StatusGenerator
|
||||
await this.preparePinia();
|
||||
let store;
|
||||
switch(this.region) {
|
||||
case "NA": store = useUSSplatfestsStore(); break;
|
||||
case "EU": store = useEUSplatfestsStore(); break;
|
||||
case "JP": store = useJPSplatfestsStore(); break;
|
||||
case "AP": store = useAPSplatfestsStore(); break;
|
||||
case 'NA': store = useUSSplatfestsStore(); break;
|
||||
case 'EU': store = useEUSplatfestsStore(); break;
|
||||
case 'JP': store = useJPSplatfestsStore(); break;
|
||||
case 'AP': store = useAPSplatfestsStore(); break;
|
||||
}
|
||||
return store.upcomingFestival
|
||||
|| store.activeFestival
|
||||
@@ -87,19 +87,19 @@ export default class SplatfestStatus extends StatusGenerator
|
||||
}
|
||||
|
||||
const global = festival.regions.length == 4;
|
||||
const regionText = global ? 'global' : festival.regions.join("/");
|
||||
const regionText = global ? 'global' : festival.regions.join('/');
|
||||
|
||||
switch (state) {
|
||||
case 'upcoming':
|
||||
return `You can now vote in the next ${regionText} Splatfest: ${festival.title} #splatfest #splatoon3`;
|
||||
case 'upcoming:3d':
|
||||
return `Reminder: The next ${regionText} Splatfest starts in 3 DAYS! ${festival.title} #splatfest #splatoon3`
|
||||
return `Reminder: The next ${regionText} Splatfest starts in 3 DAYS! ${festival.title} #splatfest #splatoon3`;
|
||||
case 'upcoming:1d':
|
||||
return `Reminder: The next ${regionText} Splatfest starts in 24 HOURS! ${festival.title} #splatfest #splatoon3`
|
||||
return `Reminder: The next ${regionText} Splatfest starts in 24 HOURS! ${festival.title} #splatfest #splatoon3`;
|
||||
case 'active':
|
||||
return `The ${regionText} Splatfest is NOW OPEN! ${festival.title} #splatfest #splatoon3`
|
||||
return `The ${regionText} Splatfest is NOW OPEN! ${festival.title} #splatfest #splatoon3`;
|
||||
case 'ended':
|
||||
return `The ${regionText} Splatfest is now closed. Results are usually posted within 2 hours! #splatfest #splatoon3`
|
||||
return `The ${regionText} Splatfest is now closed. Results are usually posted within 2 hours! #splatfest #splatoon3`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
import FileWriter from "./clients/FileWriter.mjs";
|
||||
import ImageWriter from "./clients/ImageWriter.mjs";
|
||||
import MastodonClient from "./clients/MastodonClient.mjs";
|
||||
import TwitterClient from "./clients/TwitterClient.mjs";
|
||||
import DailyDropGearStatus from "./generators/DailyDropGearStatus.mjs";
|
||||
import RegularGearStatus from "./generators/RegularGearStatus.mjs";
|
||||
import SalmonRunGearStatus from "./generators/SalmonRunGearStatus.mjs";
|
||||
import SalmonRunStatus from "./generators/SalmonRunStatus.mjs";
|
||||
import SchedulesStatus from "./generators/SchedulesStatus.mjs";
|
||||
import SplatfestStatus from "./generators/SplatfestStatus.mjs";
|
||||
import SplatfestResultsStatus from "./generators/SplatfestResultsStatus.mjs";
|
||||
import StatusGeneratorManager from "./StatusGeneratorManager.mjs"
|
||||
import SalmonRunUpcomingStatus from "./generators/SalmonRunUpcomingStatus.mjs";
|
||||
import EggstraWorkStatus from "./generators/EggstraWorkStatus.mjs";
|
||||
import EggstraWorkUpcomingStatus from "./generators/EggstraWorkUpcomingStatus.mjs";
|
||||
import BlueskyClient from "./clients/BlueskyClient.mjs";
|
||||
import ChallengeStatus from "./generators/ChallengeStatus.mjs";
|
||||
import ThreadsClient from "./clients/ThreadsClient.mjs";
|
||||
import FileWriter from './clients/FileWriter.mjs';
|
||||
import ImageWriter from './clients/ImageWriter.mjs';
|
||||
import MastodonClient from './clients/MastodonClient.mjs';
|
||||
import TwitterClient from './clients/TwitterClient.mjs';
|
||||
import DailyDropGearStatus from './generators/DailyDropGearStatus.mjs';
|
||||
import RegularGearStatus from './generators/RegularGearStatus.mjs';
|
||||
import SalmonRunGearStatus from './generators/SalmonRunGearStatus.mjs';
|
||||
import SalmonRunStatus from './generators/SalmonRunStatus.mjs';
|
||||
import SchedulesStatus from './generators/SchedulesStatus.mjs';
|
||||
import SplatfestStatus from './generators/SplatfestStatus.mjs';
|
||||
import SplatfestResultsStatus from './generators/SplatfestResultsStatus.mjs';
|
||||
import StatusGeneratorManager from './StatusGeneratorManager.mjs';
|
||||
import SalmonRunUpcomingStatus from './generators/SalmonRunUpcomingStatus.mjs';
|
||||
import EggstraWorkStatus from './generators/EggstraWorkStatus.mjs';
|
||||
import EggstraWorkUpcomingStatus from './generators/EggstraWorkUpcomingStatus.mjs';
|
||||
import BlueskyClient from './clients/BlueskyClient.mjs';
|
||||
import ChallengeStatus from './generators/ChallengeStatus.mjs';
|
||||
import ThreadsClient from './clients/ThreadsClient.mjs';
|
||||
|
||||
function defaultStatusGenerators() {
|
||||
return [
|
||||
@@ -26,14 +26,14 @@ function defaultStatusGenerators() {
|
||||
new SalmonRunStatus,
|
||||
new SalmonRunUpcomingStatus,
|
||||
new SalmonRunGearStatus,
|
||||
new SplatfestStatus("NA"),
|
||||
new SplatfestStatus("EU"),
|
||||
new SplatfestStatus("JP"),
|
||||
new SplatfestStatus("AP"),
|
||||
new SplatfestResultsStatus("NA"),
|
||||
new SplatfestResultsStatus("EU"),
|
||||
new SplatfestResultsStatus("JP"),
|
||||
new SplatfestResultsStatus("AP"),
|
||||
new SplatfestStatus('NA'),
|
||||
new SplatfestStatus('EU'),
|
||||
new SplatfestStatus('JP'),
|
||||
new SplatfestStatus('AP'),
|
||||
new SplatfestResultsStatus('NA'),
|
||||
new SplatfestResultsStatus('EU'),
|
||||
new SplatfestResultsStatus('JP'),
|
||||
new SplatfestResultsStatus('AP'),
|
||||
new EggstraWorkStatus,
|
||||
new EggstraWorkUpcomingStatus,
|
||||
];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import CoralApi from 'nxapi/coral';
|
||||
import { addUserAgent } from "nxapi";
|
||||
import { addUserAgent } from 'nxapi';
|
||||
import ValueCache from '../common/ValueCache.mjs';
|
||||
import prefixedConsole from '../common/prefixedConsole.mjs';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import fs from 'fs/promises';
|
||||
import ValueCache from "../common/ValueCache.mjs";
|
||||
import ValueCache from '../common/ValueCache.mjs';
|
||||
import prefixedConsole from '../common/prefixedConsole.mjs';
|
||||
|
||||
export const SPLATNET3_WEB_SERVICE_ID = '4834290508791808';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import NsoClient, { regionTokens } from "./NsoClient.mjs";
|
||||
import SplatNet3Client, { SPLATNET3_WEB_SERVICE_ID } from "./SplatNet3Client.mjs";
|
||||
import NsoClient, { regionTokens } from './NsoClient.mjs';
|
||||
import SplatNet3Client, { SPLATNET3_WEB_SERVICE_ID } from './SplatNet3Client.mjs';
|
||||
|
||||
/**
|
||||
* Cache Warming
|
||||
|
||||
@@ -3,4 +3,4 @@ module.exports = {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createI18n } from 'vue-i18n'
|
||||
import languages from '../assets/i18n/index.mjs'
|
||||
import { createI18n } from 'vue-i18n';
|
||||
import languages from '../assets/i18n/index.mjs';
|
||||
|
||||
const LANGUAGE_KEY = 'lang';
|
||||
|
||||
@@ -79,19 +79,19 @@ export function initializeI18n() {
|
||||
// Adapted from: https://vue-i18n.intlify.dev/guide/essentials/pluralization.html#custom-pluralization
|
||||
function ruPluralization(choice, choicesLength, orgRule) {
|
||||
if (choice === 0) {
|
||||
return 0
|
||||
return 0;
|
||||
}
|
||||
|
||||
const teen = choice > 10 && choice < 20
|
||||
const endsWithOne = choice % 10 === 1
|
||||
const teen = choice > 10 && choice < 20;
|
||||
const endsWithOne = choice % 10 === 1;
|
||||
if (!teen && endsWithOne) {
|
||||
return 1
|
||||
return 1;
|
||||
}
|
||||
if (!teen && choice % 10 >= 2 && choice % 10 <= 4) {
|
||||
return 2
|
||||
return 2;
|
||||
}
|
||||
|
||||
return choicesLength < 4 ? 2 : 3
|
||||
return choicesLength < 4 ? 2 : 3;
|
||||
}
|
||||
|
||||
function reload() {
|
||||
@@ -100,18 +100,18 @@ function reload() {
|
||||
|
||||
switch (currentLocale().code) {
|
||||
case 'zh-CN':
|
||||
document.documentElement.style.setProperty("--font-family-s1", "splatoon1, splatoon1chzh, sans-serif");
|
||||
document.documentElement.style.setProperty("--font-family-s2", "splatoon2, splatoon2chzh, sans-serif");
|
||||
document.documentElement.style.setProperty('--font-family-s1', 'splatoon1, splatoon1chzh, sans-serif');
|
||||
document.documentElement.style.setProperty('--font-family-s2', 'splatoon2, splatoon2chzh, sans-serif');
|
||||
break;
|
||||
|
||||
case 'zh-TW':
|
||||
document.documentElement.style.setProperty("--font-family-s1", "splatoon1, splatoon1twzh, sans-serif");
|
||||
document.documentElement.style.setProperty("--font-family-s2", "splatoon2, splatoon2twzh, sans-serif");
|
||||
document.documentElement.style.setProperty('--font-family-s1', 'splatoon1, splatoon1twzh, sans-serif');
|
||||
document.documentElement.style.setProperty('--font-family-s2', 'splatoon2, splatoon2twzh, sans-serif');
|
||||
break;
|
||||
|
||||
default:
|
||||
document.documentElement.style.setProperty("--font-family-s1", "splatoon1, splatoon1jpja, sans-serif");
|
||||
document.documentElement.style.setProperty("--font-family-s2", "splatoon2, splatoon2jpja, sans-serif");
|
||||
document.documentElement.style.setProperty('--font-family-s1', 'splatoon1, splatoon1jpja, sans-serif');
|
||||
document.documentElement.style.setProperty('--font-family-s2', 'splatoon2, splatoon2jpja, sans-serif');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const baseUrl = 'https://s.nintendo.com/av5ja-lp1/znca/game/4834290508791808';
|
||||
|
||||
export function getGesotownGearUrl(id) {
|
||||
return `${baseUrl}?p=/gesotown/${id}`
|
||||
return `${baseUrl}?p=/gesotown/${id}`;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ export function formatDurationFromNow(value, hideSeconds = false) {
|
||||
}
|
||||
|
||||
export function formatShortDuration(value) {
|
||||
const { t } = useI18n()
|
||||
const { t } = useI18n();
|
||||
let { negative, days, hours, minutes, seconds } = getDurationParts(value);
|
||||
|
||||
if (days)
|
||||
@@ -67,7 +67,7 @@ export function formatShortDurationFromNow(value) {
|
||||
}
|
||||
|
||||
export function formatDurationHours(value) {
|
||||
const { t } = useI18n()
|
||||
const { t } = useI18n();
|
||||
let { negative, days, hours } = getDurationParts(value);
|
||||
|
||||
hours += 24 * days;
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from "vue";
|
||||
import { useI18n } from "vue-i18n"
|
||||
import { computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { locales, setPreferredLocale } from '@/common/i18n';
|
||||
|
||||
const i18n = useI18n();
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { Dialog, DialogPanel, TransitionChild, TransitionRoot } from '@headlessui/vue'
|
||||
import { Dialog, DialogPanel, TransitionChild, TransitionRoot } from '@headlessui/vue';
|
||||
|
||||
defineProps({
|
||||
show: {
|
||||
|
||||
@@ -12,7 +12,7 @@ const props = defineProps({
|
||||
default: 'bg-splatoon-blue',
|
||||
},
|
||||
bgStyle: String,
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { XMarkIcon } from '@heroicons/vue/24/outline'
|
||||
import { XMarkIcon } from '@heroicons/vue/24/outline';
|
||||
import ScheduleRow from './ScheduleRow.vue';
|
||||
import SquidTape from './SquidTape.vue';
|
||||
import { useScheduleTypes } from './concerns/scheduleTypes.mjs';
|
||||
|
||||
@@ -45,7 +45,7 @@ const remainingTime = computed(() => {
|
||||
let adjustment = (new Date).getTimezoneOffset() * 60 * 1000;
|
||||
|
||||
return releaseDate - time.now + adjustment;
|
||||
})
|
||||
});
|
||||
const completedTime = computed(() => totalTime - remainingTime.value);
|
||||
const percent = computed(() => Math.min(100, 100 * completedTime.value / totalTime));
|
||||
const isReleased = computed(() => remainingTime.value <= 0);
|
||||
@@ -62,7 +62,7 @@ function formatDate(date) {
|
||||
return date.toLocaleDateString(undefined, {
|
||||
timeZone: 'UTC',
|
||||
dateStyle: 'long',
|
||||
})
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { XMarkIcon } from '@heroicons/vue/24/outline'
|
||||
import { XMarkIcon } from '@heroicons/vue/24/outline';
|
||||
import ModalDialog from './ModalDialog.vue';
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
@@ -58,7 +58,7 @@ import { useUSSplatfestsStore } from '@/stores/splatfests';
|
||||
|
||||
const { types } = useScheduleTypes();
|
||||
|
||||
const type = computed(() => types["splatfestTricolor"]);
|
||||
const type = computed(() => types['splatfestTricolor']);
|
||||
const tricolor = computed(() => useUSSplatfestsStore().tricolor);
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ const props = defineProps({
|
||||
type: String,
|
||||
default: 'w-6',
|
||||
},
|
||||
})
|
||||
});
|
||||
|
||||
const boss = computed(() => props.schedule.settings.boss)
|
||||
const boss = computed(() => props.schedule.settings.boss);
|
||||
</script>
|
||||
|
||||
@@ -56,7 +56,7 @@ import { useScheduleTypes } from '@/components/concerns/scheduleTypes.mjs';
|
||||
|
||||
const { types } = useScheduleTypes();
|
||||
|
||||
const type = computed(() => types["splatfestTricolor"]);
|
||||
const type = computed(() => types['splatfestTricolor']);
|
||||
const tricolor = computed(() => useUSSplatfestsStore().tricolor);
|
||||
</script>
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ const props = defineProps({
|
||||
header: {
|
||||
type: String,
|
||||
},
|
||||
})
|
||||
});
|
||||
|
||||
const route = useRoute();
|
||||
const time = useTimeStore();
|
||||
|
||||
20
src/main.js
20
src/main.js
@@ -1,17 +1,17 @@
|
||||
import { createApp } from 'vue'
|
||||
import { createPinia } from 'pinia'
|
||||
import { createApp } from 'vue';
|
||||
import { createPinia } from 'pinia';
|
||||
|
||||
import { initializeI18n } from './common/i18n'
|
||||
import { initializeI18n } from './common/i18n';
|
||||
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import App from './App.vue';
|
||||
import router from './router';
|
||||
|
||||
const i18n = initializeI18n();
|
||||
|
||||
const app = createApp(App)
|
||||
const app = createApp(App);
|
||||
|
||||
app.use(i18n)
|
||||
app.use(createPinia())
|
||||
app.use(router)
|
||||
app.use(i18n);
|
||||
app.use(createPinia());
|
||||
app.use(router);
|
||||
|
||||
app.mount('#app')
|
||||
app.mount('#app');
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import HomeView from '../views/HomeView.vue'
|
||||
import SalmonRunView from '../views/SalmonRunView.vue'
|
||||
import GearView from '../views/GearView.vue'
|
||||
import AboutView from '../views/AboutView.vue'
|
||||
import SplatfestsView from '../views/SplatfestsView.vue'
|
||||
import ChallengesView from '../views/ChallengesView.vue'
|
||||
import SocialsView from '../views/SocialsView.vue'
|
||||
import { createRouter, createWebHistory } from 'vue-router';
|
||||
import HomeView from '../views/HomeView.vue';
|
||||
import SalmonRunView from '../views/SalmonRunView.vue';
|
||||
import GearView from '../views/GearView.vue';
|
||||
import AboutView from '../views/AboutView.vue';
|
||||
import SplatfestsView from '../views/SplatfestsView.vue';
|
||||
import ChallengesView from '../views/ChallengesView.vue';
|
||||
import SocialsView from '../views/SocialsView.vue';
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
@@ -50,6 +50,6 @@ const router = createRouter({
|
||||
redirect: { name: 'about' },
|
||||
},
|
||||
],
|
||||
})
|
||||
});
|
||||
|
||||
export default router
|
||||
export default router;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import ScreenshotsHomeView from '@/views/screenshots/ScreenshotsHomeView.vue'
|
||||
import CountdownView from '@/views/screenshots/CountdownView.vue'
|
||||
import SchedulesView from '@/views/screenshots/SchedulesView.vue'
|
||||
import ChallengesView from '@/views/screenshots/ChallengesView.vue'
|
||||
import SalmonRunView from '@/views/screenshots/SalmonRunView.vue'
|
||||
import SalmonRunGearView from '@/views/screenshots/SalmonRunGearView.vue'
|
||||
import RegularGearView from '@/views/screenshots/RegularGearView.vue'
|
||||
import DailyDropGearView from '@/views/screenshots/DailyDropGearView.vue'
|
||||
import SplatfestView from '@/views/screenshots/SplatfestView.vue'
|
||||
import { createRouter, createWebHashHistory } from 'vue-router';
|
||||
import ScreenshotsHomeView from '@/views/screenshots/ScreenshotsHomeView.vue';
|
||||
import CountdownView from '@/views/screenshots/CountdownView.vue';
|
||||
import SchedulesView from '@/views/screenshots/SchedulesView.vue';
|
||||
import ChallengesView from '@/views/screenshots/ChallengesView.vue';
|
||||
import SalmonRunView from '@/views/screenshots/SalmonRunView.vue';
|
||||
import SalmonRunGearView from '@/views/screenshots/SalmonRunGearView.vue';
|
||||
import RegularGearView from '@/views/screenshots/RegularGearView.vue';
|
||||
import DailyDropGearView from '@/views/screenshots/DailyDropGearView.vue';
|
||||
import SplatfestView from '@/views/screenshots/SplatfestView.vue';
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(import.meta.env.BASE_URL + 'screenshots/'),
|
||||
@@ -73,6 +73,6 @@ const router = createRouter({
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
});
|
||||
|
||||
export default router
|
||||
export default router;
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import { createApp } from 'vue'
|
||||
import { createPinia } from 'pinia'
|
||||
import { createApp } from 'vue';
|
||||
import { createPinia } from 'pinia';
|
||||
|
||||
import { initializeI18n } from './common/i18n'
|
||||
import { initializeI18n } from './common/i18n';
|
||||
|
||||
import App from './App.vue'
|
||||
import router from './router/screenshots'
|
||||
import App from './App.vue';
|
||||
import router from './router/screenshots';
|
||||
|
||||
const i18n = initializeI18n();
|
||||
|
||||
const app = createApp(App)
|
||||
const app = createApp(App);
|
||||
|
||||
app.use(i18n)
|
||||
app.use(createPinia())
|
||||
app.use(router)
|
||||
app.use(i18n);
|
||||
app.use(createPinia());
|
||||
app.use(router);
|
||||
|
||||
app.mount('#app')
|
||||
app.mount('#app');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { acceptHMRUpdate, defineStore } from 'pinia'
|
||||
import { acceptHMRUpdate, defineStore } from 'pinia';
|
||||
import { computed, ref, shallowRef } from 'vue';
|
||||
|
||||
// Endpoint store definition (used for each individual data endpoint)
|
||||
@@ -100,7 +100,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
gear: computed(() => stores.gear.data),
|
||||
coop: computed(() => stores.coop.data),
|
||||
festivals: computed(() => stores.festivals.data),
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { acceptHMRUpdate, defineStore } from "pinia";
|
||||
import { computed } from "vue";
|
||||
import { useCoopDataStore, useGearDataStore } from "./data.mjs";
|
||||
import { useTimeStore } from "./time.mjs";
|
||||
import { acceptHMRUpdate, defineStore } from 'pinia';
|
||||
import { computed } from 'vue';
|
||||
import { useCoopDataStore, useGearDataStore } from './data.mjs';
|
||||
import { useTimeStore } from './time.mjs';
|
||||
|
||||
function whenCurrent(node) {
|
||||
const time = useTimeStore();
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { acceptHMRUpdate, defineStore } from "pinia";
|
||||
import { computed } from "vue";
|
||||
import { acceptHMRUpdate, defineStore } from 'pinia';
|
||||
import { computed } from 'vue';
|
||||
import sortBy from 'lodash/sortBy.js';
|
||||
import min from 'lodash/min.js';
|
||||
import max from 'lodash/max.js';
|
||||
import { useTimeStore } from "./time.mjs";
|
||||
import { useSchedulesDataStore } from "./data.mjs";
|
||||
import { useTimeStore } from './time.mjs';
|
||||
import { useSchedulesDataStore } from './data.mjs';
|
||||
|
||||
// Schedule store definition (used for each type of schedule)
|
||||
function defineScheduleStore(id, options) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { acceptHMRUpdate, defineStore } from "pinia";
|
||||
import { computed } from "vue";
|
||||
import { useFestivalsDataStore, useSchedulesDataStore } from "./data.mjs";
|
||||
import { useTimeStore } from "./time.mjs";
|
||||
import { acceptHMRUpdate, defineStore } from 'pinia';
|
||||
import { computed } from 'vue';
|
||||
import { useFestivalsDataStore, useSchedulesDataStore } from './data.mjs';
|
||||
import { useTimeStore } from './time.mjs';
|
||||
|
||||
export const STATUS_PAST = 'past';
|
||||
export const STATUS_ACTIVE = 'active';
|
||||
@@ -25,13 +25,13 @@ function defineSplatfestRegionStore(region) {
|
||||
|
||||
function getRegions(node) {
|
||||
let result = [];
|
||||
const regions = node.__splatoon3ink_id.split("-")[0];
|
||||
const regions = node.__splatoon3ink_id.split('-')[0];
|
||||
|
||||
// The order here is important for SplatfestStatus/SplatfestResultsStatus posts
|
||||
if (regions.includes("U")) result.push("NA");
|
||||
if (regions.includes("J")) result.push("JP");
|
||||
if (regions.includes("E")) result.push("EU");
|
||||
if (regions.includes("A")) result.push("AP");
|
||||
if (regions.includes('U')) result.push('NA');
|
||||
if (regions.includes('J')) result.push('JP');
|
||||
if (regions.includes('E')) result.push('EU');
|
||||
if (regions.includes('A')) result.push('AP');
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { acceptHMRUpdate, defineStore } from 'pinia'
|
||||
import { acceptHMRUpdate, defineStore } from 'pinia';
|
||||
|
||||
function now() {
|
||||
let time = (new Date).getTime();
|
||||
|
||||
@@ -93,8 +93,8 @@
|
||||
<script setup>
|
||||
import Splat2 from '../components/splats/Splat2.vue';
|
||||
import Splat5 from '../components/splats/Splat5.vue';
|
||||
import MainLayout from '@/layouts/MainLayout.vue'
|
||||
import ProductContainer from '@/components/ProductContainer.vue'
|
||||
import MainLayout from '@/layouts/MainLayout.vue';
|
||||
import ProductContainer from '@/components/ProductContainer.vue';
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
import { computed } from 'vue';
|
||||
|
||||
import ProductContainer from '../components/ProductContainer.vue';
|
||||
import MainLayout from '@/layouts/MainLayout.vue'
|
||||
import ChallengeScheduleBox from '@/components/challenge/ChallengeScheduleBox.vue'
|
||||
import MainLayout from '@/layouts/MainLayout.vue';
|
||||
import ChallengeScheduleBox from '@/components/challenge/ChallengeScheduleBox.vue';
|
||||
|
||||
import { useScheduleTypes } from '@/components/concerns/scheduleTypes.mjs';
|
||||
import { useEventSchedulesStore } from '@/stores/schedules.mjs'
|
||||
import { useEventSchedulesStore } from '@/stores/schedules.mjs';
|
||||
|
||||
const store = useEventSchedulesStore();
|
||||
const { types } = useScheduleTypes();
|
||||
|
||||
@@ -19,5 +19,5 @@
|
||||
<script setup>
|
||||
import DailyDropGear from '../components/gear/DailyDropGear.vue';
|
||||
import RegularGear from '../components/gear/RegularGear.vue';
|
||||
import MainLayout from '@/layouts/MainLayout.vue'
|
||||
import MainLayout from '@/layouts/MainLayout.vue';
|
||||
</script>
|
||||
|
||||
@@ -62,7 +62,7 @@ import TricolorBox from '../components/TricolorBox.vue';
|
||||
import SplatfestBox from '../components/SplatfestBox.vue';
|
||||
import SplatfestResultsBox from '../components/SplatfestResultsBox.vue';
|
||||
import { useUSSplatfestsStore, useEUSplatfestsStore, useJPSplatfestsStore, useAPSplatfestsStore } from '@/stores/splatfests';
|
||||
import MainLayout from '@/layouts/MainLayout.vue'
|
||||
import MainLayout from '@/layouts/MainLayout.vue';
|
||||
|
||||
const usSplatfests = useUSSplatfestsStore();
|
||||
const euSplatfests = useEUSplatfestsStore();
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
<script setup>
|
||||
import SalmonRunBox from '../components/salmonrun/SalmonRunBox.vue';
|
||||
import { useEggstraWorkSchedulesStore } from '@/stores/schedules.mjs';
|
||||
import MainLayout from '@/layouts/MainLayout.vue'
|
||||
import MainLayout from '@/layouts/MainLayout.vue';
|
||||
const eggstraWork = useEggstraWorkSchedulesStore();
|
||||
</script>
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
import { computed } from 'vue';
|
||||
import Splat3 from '../components/splats/Splat3.vue';
|
||||
import Splat6 from '../components/splats/Splat6.vue';
|
||||
import MainLayout from '@/layouts/MainLayout.vue'
|
||||
import ProductContainer from '@/components/ProductContainer.vue'
|
||||
import MainLayout from '@/layouts/MainLayout.vue';
|
||||
import ProductContainer from '@/components/ProductContainer.vue';
|
||||
|
||||
const socials = [
|
||||
{
|
||||
@@ -85,7 +85,7 @@ const socials = [
|
||||
const displaySocials = computed(() => {
|
||||
// Return the socials in a random order
|
||||
return socials.slice().sort(() => Math.random() - 0.5);
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -21,16 +21,16 @@
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { sortBy, uniqBy } from "lodash";
|
||||
import { sortBy, uniqBy } from 'lodash';
|
||||
import SplatfestBox from '../components/SplatfestBox.vue';
|
||||
import SplatfestResultsBox from '../components/SplatfestResultsBox.vue';
|
||||
import MainLayout from '@/layouts/MainLayout.vue'
|
||||
import MainLayout from '@/layouts/MainLayout.vue';
|
||||
import { useUSSplatfestsStore, useEUSplatfestsStore, useJPSplatfestsStore, useAPSplatfestsStore } from '@/stores/splatfests';
|
||||
|
||||
const usSplatfests = useUSSplatfestsStore();
|
||||
const euSplatfests = useEUSplatfestsStore();
|
||||
const jpSplatfests = useJPSplatfestsStore();
|
||||
const apSplatfests = useAPSplatfestsStore();
|
||||
const festivalsWithResults = computed(() => sortBy(uniqBy([...usSplatfests.festivals, ...euSplatfests.festivals, ...jpSplatfests.festivals, ...apSplatfests.festivals].filter(festival => festival?.hasResults), '__splatoon3ink_id'), 'startTime').reverse())
|
||||
const festivalsWithResults = computed(() => sortBy(uniqBy([...usSplatfests.festivals, ...euSplatfests.festivals, ...jpSplatfests.festivals, ...apSplatfests.festivals].filter(festival => festival?.hasResults), '__splatoon3ink_id'), 'startTime').reverse());
|
||||
|
||||
</script>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<script setup>
|
||||
import ScreenshotLayout from '../../layouts/ScreenshotLayout.vue';
|
||||
import ChallengeScheduleBox from '@/components/challenge/ChallengeScheduleBox.vue';
|
||||
import { useEventSchedulesStore } from '@/stores/schedules.mjs'
|
||||
import { useEventSchedulesStore } from '@/stores/schedules.mjs';
|
||||
|
||||
const store = useEventSchedulesStore();
|
||||
</script>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<script setup>
|
||||
import ScreenshotLayout from '../../layouts/ScreenshotLayout.vue';
|
||||
import Splatoon3Countdown from '@/components/Splatoon3Countdown.vue'
|
||||
import Splatoon3Countdown from '@/components/Splatoon3Countdown.vue';
|
||||
import Splat2 from '@/components/splats/Splat2.vue';
|
||||
import Splat3 from '@/components/splats/Splat3.vue';
|
||||
import Splat4 from '@/components/splats/Splat4.vue';
|
||||
|
||||
@@ -38,10 +38,10 @@ const props = defineProps({
|
||||
const festival = computed(() => {
|
||||
let store;
|
||||
switch(props.region) {
|
||||
case "NA": store = usSplatfests; break;
|
||||
case "EU": store = euSplatfests; break;
|
||||
case "JP": store = jpSplatfests; break;
|
||||
case "AP": store = apSplatfests; break;
|
||||
case 'NA': store = usSplatfests; break;
|
||||
case 'EU': store = euSplatfests; break;
|
||||
case 'JP': store = jpSplatfests; break;
|
||||
case 'AP': store = apSplatfests; break;
|
||||
default: return null;
|
||||
}
|
||||
return store.upcomingFestival ?? store.activeFestival ?? store.recentFestival;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const plugin = require("tailwindcss/plugin");
|
||||
const plugin = require('tailwindcss/plugin');
|
||||
|
||||
module.exports = {
|
||||
content: [
|
||||
@@ -44,4 +44,4 @@ module.exports = {
|
||||
addVariant('ss', 'body.for-screenshots &');
|
||||
}),
|
||||
],
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { resolve } from 'path'
|
||||
import { fileURLToPath, URL } from 'url'
|
||||
import { resolve } from 'path';
|
||||
import { fileURLToPath, URL } from 'url';
|
||||
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import vueI18n from '@intlify/vite-plugin-vue-i18n'
|
||||
import { defineConfig } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import vueI18n from '@intlify/vite-plugin-vue-i18n';
|
||||
|
||||
const redirectToDist = [
|
||||
'/assets/splatnet/',
|
||||
@@ -44,4 +44,4 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user