mirror of
https://github.com/misenhower/splatoon3.ink.git
synced 2026-04-25 15:36:31 -05:00
Merge pull request #73 from misenhower/auto-fix-styles
Add an action to automatically fix code styles
This commit is contained in:
commit
c6be014066
|
|
@ -4,27 +4,38 @@ module.exports = {
|
|||
"extends": [
|
||||
"plugin:vue/vue3-recommended",
|
||||
"eslint:recommended",
|
||||
"plugin:jsdoc/recommended",
|
||||
],
|
||||
"rules": {
|
||||
// ESLint
|
||||
"indent": ["warn", 2, { "SwitchCase": 1 }],
|
||||
"comma-dangle": ["warn", "always-multiline"],
|
||||
"no-unused-vars": ["warn", { "args": "none" }],
|
||||
|
||||
// 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" } }],
|
||||
|
||||
// JSDoc
|
||||
"jsdoc/require-jsdoc": "off",
|
||||
"jsdoc/require-returns": "off",
|
||||
"jsdoc/require-param-description": "off",
|
||||
},
|
||||
"globals": {
|
||||
"__dirname": "readonly",
|
||||
"process": "readonly",
|
||||
"require": "readonly",
|
||||
"module": "readonly",
|
||||
"Buffer": "readonly",
|
||||
},
|
||||
"env": {
|
||||
"vue/setup-compiler-macros": true,
|
||||
},
|
||||
"ignorePatterns": [
|
||||
"src/assets/i18n/index.mjs", // "assert" syntax is currently unrecognized
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 13,
|
||||
},
|
||||
|
|
|
|||
25
.github/workflows/fix-code-styles.yml
vendored
Normal file
25
.github/workflows/fix-code-styles.yml
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
name: Fix code styles
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: npm run lint-fix
|
||||
- name: Commit changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: Fix styling
|
||||
|
|
@ -27,10 +27,6 @@ export function getDateParts(date = null) {
|
|||
};
|
||||
}
|
||||
|
||||
export function br2nl(str, replace = '\n') {
|
||||
return str.replace(/<br\s*\/?>/gi, replace);
|
||||
}
|
||||
|
||||
export function getGearIcon(gear) {
|
||||
switch (gear.gear.__typename) {
|
||||
case 'HeadGear': return '🧢';
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import NsoClient from '../../splatnet/NsoClient.mjs';
|
|||
import { locales, regionalLocales, defaultLocale } from '../../../src/common/i18n.mjs';
|
||||
import { LocalizationProcessor } from '../LocalizationProcessor.mjs';
|
||||
import { deriveId, getDateParts, getTopOfCurrentHour } from '../../common/util.mjs';
|
||||
import { Console } from 'node:console';
|
||||
|
||||
export default class DataUpdater
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import ValueCache from "../../common/ValueCache.mjs";
|
||||
import DataUpdater from "./DataUpdater.mjs";
|
||||
import _ from 'lodash';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import jsonpath from 'jsonpath';
|
||||
import prefixedConsole from "../../common/prefixedConsole.mjs";
|
||||
import { getXRankSeasonId } from '../../common/util.mjs';
|
||||
import DataUpdater from "./DataUpdater.mjs";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import ecstatic from 'ecstatic';
|
|||
|
||||
export default class HttpServer
|
||||
{
|
||||
/** @var {http.Server} */
|
||||
/** @member {http.Server} */
|
||||
#server = null;
|
||||
|
||||
get port() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { URL } from 'url';
|
||||
import puppeteer from 'puppeteer';
|
||||
import HttpServer from './HttpServer.mjs';
|
||||
import timers from 'timers/promises';
|
||||
|
||||
const defaultViewport = {
|
||||
// Using a 16:9 ratio here by default to match Twitter's image card dimensions
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
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
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ export default class TwitterClient extends Client
|
|||
key = 'twitter';
|
||||
name = 'Twitter';
|
||||
|
||||
/** @var {TwitterApi} */
|
||||
/** @member {TwitterApi} */
|
||||
#api;
|
||||
|
||||
async canSend() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import Media from "../Media.mjs";
|
||||
import { useEventSchedulesStore } from "../../../src/stores/schedules.mjs";
|
||||
import { br2nl } from "../../common/util.mjs";
|
||||
import { br2nl } from "../../../src/common/util.mjs";
|
||||
import ScreenshotHelper from "../../screenshots/ScreenshotHelper.mjs";
|
||||
export default class ChallengeStatus extends StatusGenerator
|
||||
{
|
||||
key = 'challenge';
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ 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";
|
||||
|
||||
export default class DailyDropGearStatus extends StatusGenerator
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import Media from "../Media.mjs";
|
||||
import { useEggstraWorkSchedulesStore } from "../../../src/stores/schedules.mjs";
|
||||
import ScreenshotHelper from "../../screenshots/ScreenshotHelper.mjs";
|
||||
|
||||
export default class EggstraWorkStatus extends StatusGenerator
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ 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";
|
||||
|
||||
export default class EggstraWorkUpcomingStatus extends StatusGenerator
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export default class RegularGearStatus extends StatusGenerator
|
|||
let icon = getGearIcon(gear);
|
||||
let name = gear.gear.name;
|
||||
let power = gear.gear.primaryGearPower.name;
|
||||
let url = `https://splatoon3.ink/nso/g/${gear.id}`;
|
||||
// let url = `https://splatoon3.ink/nso/g/${gear.id}`;
|
||||
|
||||
return [
|
||||
`Up now on SplatNet: ${icon} ${name} with ${power} #splatnet3`,
|
||||
|
|
@ -36,7 +36,7 @@ export default class RegularGearStatus extends StatusGenerator
|
|||
].join('\n');
|
||||
}
|
||||
|
||||
/** @param {ScreenshotHelper} screenshotHelper */
|
||||
/** @param {screenshotHelper} screenshotHelper */
|
||||
async _getMedia(screenshotHelper) {
|
||||
let media = new Media;
|
||||
media.file = await screenshotHelper.capture('gear/regular');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import Media from "../Media.mjs";
|
||||
import { useCoopGearStore } from "../../../src/stores/gear.mjs";
|
||||
import ScreenshotHelper from "../../screenshots/ScreenshotHelper.mjs";
|
||||
|
||||
export default class SalmonRunGearStatus extends StatusGenerator
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import Media from "../Media.mjs";
|
||||
import { useSalmonRunSchedulesStore } from "../../../src/stores/schedules.mjs";
|
||||
import ScreenshotHelper from "../../screenshots/ScreenshotHelper.mjs";
|
||||
|
||||
export default class SalmonRunStatus extends StatusGenerator
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ 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";
|
||||
|
||||
export default class SalmonRunUpcomingStatus extends StatusGenerator
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import StatusGenerator from "./StatusGenerator.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";
|
||||
export default class SchedulesStatus extends StatusGenerator
|
||||
{
|
||||
key = 'schedules';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import StatusGenerator from "./StatusGenerator.mjs";
|
||||
import Media from "../Media.mjs";
|
||||
import { useUSSplatfestsStore, useEUSplatfestsStore, useJPSplatfestsStore, useAPSplatfestsStore } from '../../../src/stores/splatfests.mjs';
|
||||
import ScreenshotHelper from "../../screenshots/ScreenshotHelper.mjs";
|
||||
|
||||
export default class SplatfestResultsStatus extends StatusGenerator
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import StatusGenerator from "./StatusGenerator.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";
|
||||
|
||||
export default class SplatfestStatus extends StatusGenerator
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ import { createPinia, setActivePinia } from 'pinia';
|
|||
import { useCoopDataStore, useFestivalsDataStore, useGearDataStore, useSchedulesDataStore } from '../../../src/stores/data.mjs';
|
||||
import prefixedConsole from '../../common/prefixedConsole.mjs';
|
||||
import Status from '../Status.mjs';
|
||||
import Client from '../clients/Client.mjs';
|
||||
import ScreenshotHelper from '../../screenshots/ScreenshotHelper.mjs';
|
||||
import { getTopOfCurrentHour } from '../../common/util.mjs';
|
||||
import { useTimeStore } from '../../../src/stores/time.mjs';
|
||||
import ValueCache from '../../common/ValueCache.mjs';
|
||||
import { Console } from 'node:console';
|
||||
|
||||
export default class StatusGenerator
|
||||
{
|
||||
|
|
|
|||
114
package-lock.json
generated
114
package-lock.json
generated
|
|
@ -37,6 +37,7 @@
|
|||
"@vitejs/plugin-vue": "^3.1.0",
|
||||
"autoprefixer": "^10.4.12",
|
||||
"eslint": "^8.23.1",
|
||||
"eslint-plugin-jsdoc": "^48.2.1",
|
||||
"eslint-plugin-vue": "^9.5.1",
|
||||
"postcss": "^8.4.16",
|
||||
"tailwindcss": "^3.1.8",
|
||||
|
|
@ -929,6 +930,20 @@
|
|||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@es-joy/jsdoccomment": {
|
||||
"version": "0.42.0",
|
||||
"resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.42.0.tgz",
|
||||
"integrity": "sha512-R1w57YlVA6+YE01wch3GPYn6bCsrOV3YW/5oGGE2tmX6JcL9Nr+b5IikrjMPF+v9CV3ay+obImEdsDhovhJrzw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"comment-parser": "1.4.1",
|
||||
"esquery": "^1.5.0",
|
||||
"jsdoc-type-pratt-parser": "~4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-arm": {
|
||||
"version": "0.15.18",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.18.tgz",
|
||||
|
|
@ -2321,6 +2336,15 @@
|
|||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/are-docs-informative": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz",
|
||||
"integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"node_modules/arg": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
|
||||
|
|
@ -2613,6 +2637,18 @@
|
|||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/builtin-modules": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz",
|
||||
"integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/bytes": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
||||
|
|
@ -2868,6 +2904,15 @@
|
|||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/comment-parser": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz",
|
||||
"integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
|
|
@ -3831,6 +3876,29 @@
|
|||
"url": "https://opencollective.com/eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-jsdoc": {
|
||||
"version": "48.2.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.1.tgz",
|
||||
"integrity": "sha512-iUvbcyDZSO/9xSuRv2HQBw++8VkV/pt3UWtX9cpPH0l7GKPq78QC/6+PmyQHHvNZaTjAce6QVciEbnc6J/zH5g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@es-joy/jsdoccomment": "~0.42.0",
|
||||
"are-docs-informative": "^0.0.2",
|
||||
"comment-parser": "1.4.1",
|
||||
"debug": "^4.3.4",
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"esquery": "^1.5.0",
|
||||
"is-builtin-module": "^3.2.1",
|
||||
"semver": "^7.6.0",
|
||||
"spdx-expression-parse": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^7.0.0 || ^8.0.0 || ^9.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-vue": {
|
||||
"version": "9.23.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.23.0.tgz",
|
||||
|
|
@ -4768,6 +4836,21 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/is-builtin-module": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz",
|
||||
"integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"builtin-modules": "^3.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.13.1",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
|
||||
|
|
@ -4927,6 +5010,15 @@
|
|||
"js-yaml": "bin/js-yaml.js"
|
||||
}
|
||||
},
|
||||
"node_modules/jsdoc-type-pratt-parser": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz",
|
||||
"integrity": "sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/json-buffer": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
|
||||
|
|
@ -6610,6 +6702,28 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/spdx-exceptions": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz",
|
||||
"integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/spdx-expression-parse": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz",
|
||||
"integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"spdx-exceptions": "^2.1.0",
|
||||
"spdx-license-ids": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/spdx-license-ids": {
|
||||
"version": "3.0.17",
|
||||
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz",
|
||||
"integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/splatnet3-types": {
|
||||
"version": "0.2.20231119210145",
|
||||
"resolved": "https://registry.npmjs.org/splatnet3-types/-/splatnet3-types-0.2.20231119210145.tgz",
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
"@vitejs/plugin-vue": "^3.1.0",
|
||||
"autoprefixer": "^10.4.12",
|
||||
"eslint": "^8.23.1",
|
||||
"eslint-plugin-jsdoc": "^48.2.1",
|
||||
"eslint-plugin-vue": "^9.5.1",
|
||||
"postcss": "^8.4.16",
|
||||
"tailwindcss": "^3.1.8",
|
||||
|
|
|
|||
3
src/common/util.mjs
Normal file
3
src/common/util.mjs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export function br2nl(str, replace = '\n') {
|
||||
return str.replace(/<br\s*\/?>/gi, replace);
|
||||
}
|
||||
|
|
@ -13,6 +13,7 @@ import ruleYaguraSvg from '@/assets/img/rules/yagura.svg';
|
|||
|
||||
const props = defineProps({
|
||||
rule: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@ const props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
defineEmits(['close']);
|
||||
|
||||
const { types } = useScheduleTypes();
|
||||
|
||||
const type = computed(() => types[props.type]);
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ import { useTimeStore } from '../stores/time.mjs';
|
|||
|
||||
const props = defineProps({
|
||||
schedule: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -15,15 +15,19 @@ import { computed } from 'vue';
|
|||
|
||||
const props = defineProps({
|
||||
bg: {
|
||||
type: String,
|
||||
default: 'bg-splatoon-blue',
|
||||
},
|
||||
squidBg: {
|
||||
type: String,
|
||||
default: 'bg-white',
|
||||
},
|
||||
border: {
|
||||
type: String,
|
||||
default: 'border-white',
|
||||
},
|
||||
squidSize: {
|
||||
type: String,
|
||||
default: '10px',
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -30,5 +30,7 @@ const props = defineProps({
|
|||
stage: Object,
|
||||
});
|
||||
|
||||
defineEmits(['close']);
|
||||
|
||||
const imgUrl = computed(() => props.stage?.image.url);
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ import { computed } from 'vue';
|
|||
import { useUSSplatfestsStore } from '@/stores/splatfests';
|
||||
import ProductContainer from './ProductContainer.vue';
|
||||
import StageImage from './StageImage.vue';
|
||||
import RuleIcon from './RuleIcon.vue';
|
||||
import { useScheduleTypes } from './concerns/scheduleTypes.mjs';
|
||||
import TricolorIcon from './TricolorIcon.vue';
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
a: {
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@
|
|||
<div class="font-splatoon1 lg:text-2xl xl:text-3xl text-shadow">
|
||||
{{ $t(`splatnet.events.${event.settings.leagueMatchEvent.id}.name`, event.settings.leagueMatchEvent.name) }}
|
||||
|
||||
<div
|
||||
class="font-splatoon2 lg:text-md xl:text-xl text-shadow"
|
||||
v-html="$t(`splatnet.events.${event.settings.leagueMatchEvent.id}.desc`, event.settings.leagueMatchEvent.desc)"
|
||||
/>
|
||||
<div class="font-splatoon2 lg:text-md xl:text-xl text-shadow whitespace-pre-line">
|
||||
{{ br2nl($t(`splatnet.events.${event.settings.leagueMatchEvent.id}.desc`, event.settings.leagueMatchEvent.desc)) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -82,10 +81,9 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="font-splatoon2 mx-2 p-2 text-zinc-200 bg-zinc-900 bg-opacity-50 backdrop-blur-sm rounded-lg"
|
||||
v-html="$t(`splatnet.events.${event.settings.leagueMatchEvent.id}.regulation`, event.settings.leagueMatchEvent.regulation)"
|
||||
/>
|
||||
<div class="font-splatoon2 mx-2 p-2 text-zinc-200 bg-zinc-900 bg-opacity-50 backdrop-blur-sm rounded-lg whitespace-pre-line">
|
||||
{{ br2nl($t(`splatnet.events.${event.settings.leagueMatchEvent.id}.regulation`, event.settings.leagueMatchEvent.regulation)) }}
|
||||
</div>
|
||||
</div>
|
||||
</ProductContainer>
|
||||
</template>
|
||||
|
|
@ -99,7 +97,7 @@ import RuleIcon from '../RuleIcon.vue';
|
|||
import SquidTape from '../SquidTape.vue';
|
||||
import { useScheduleTypes } from '../concerns/scheduleTypes.mjs';
|
||||
import ChallengeScheduleRow from './ChallengeScheduleRow.vue';
|
||||
import { formatDurationFromNow } from '../../common/time';
|
||||
import { br2nl } from '../../common/util.mjs';
|
||||
|
||||
const props = defineProps({
|
||||
type: {
|
||||
|
|
@ -107,6 +105,7 @@ const props = defineProps({
|
|||
required: true,
|
||||
},
|
||||
event: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import { useAnarchyOpenSchedulesStore, useAnarchySeriesSchedulesStore, useRegula
|
|||
import battleRegularSvg from '@/assets/img/modes/regular.svg';
|
||||
import battleBankaraSvg from '@/assets/img/modes/bankara.svg';
|
||||
import battleXSvg from '@/assets/img/modes/x.svg';
|
||||
import battleLeagueSvg from '@/assets/img/modes/league.svg';
|
||||
import battleEventSvg from '@/assets/img/modes/event.svg';
|
||||
|
||||
export function useScheduleTypes() {
|
||||
|
|
|
|||
|
|
@ -14,8 +14,13 @@
|
|||
|
||||
<div class="pb-24 lg:pb-36">
|
||||
<div class="text-center py-4">
|
||||
<SquidTape class="font-splatoon1 text-2xl text-black rounded-sm -rotate-2 z-10" bg="bg-splatoon-orange"
|
||||
squid-bg="bg-black" border="border border-black" squid-size="15px">
|
||||
<SquidTape
|
||||
class="font-splatoon1 text-2xl text-black rounded-sm -rotate-2 z-10"
|
||||
bg="bg-splatoon-orange"
|
||||
squid-bg="bg-black"
|
||||
border="border border-black"
|
||||
squid-size="15px"
|
||||
>
|
||||
<div class="px-1">
|
||||
{{ $t("gear.sale") }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -21,8 +21,10 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="schedule.isBigRun"
|
||||
class="bg-zinc-800 bg-opacity-80 text-sm text-white rounded-lg px-2 border-2 border-splatoon-bigRun">
|
||||
<div
|
||||
v-if="schedule.isBigRun"
|
||||
class="bg-zinc-800 bg-opacity-80 text-sm text-white rounded-lg px-2 border-2 border-splatoon-bigRun"
|
||||
>
|
||||
<img src="@/assets/img/modes/coop.bigrun.svg" :title="$t('salmonrun.bigrun')" class="w-4 inline-block" />
|
||||
{{ $t('salmonrun.bigrun') }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import { computed } from 'vue';
|
|||
const props = defineProps({
|
||||
schedule: Object,
|
||||
size: {
|
||||
type: String,
|
||||
default: 'w-6',
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ const props = defineProps({
|
|||
required: true,
|
||||
},
|
||||
weaponClass: {
|
||||
type: String,
|
||||
default: 'w-10',
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@
|
|||
|
||||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { useUSSplatfestsStore } from '@/stores/splatfests';
|
||||
import ProductContainer from '../ProductContainer.vue';
|
||||
import StageImage from '../StageImage.vue';
|
||||
import RuleIcon from '../RuleIcon.vue';
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pt-2 pb-6 px-2 space-y-2">
|
||||
<div class="pt-2 pb-6 px-2 space-y-2">
|
||||
<div class="flex items-center justify-between font-splatoon2">
|
||||
<div class="flex items-center space-x-2 text-xl">
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -61,14 +61,14 @@ watchEffect(() => {
|
|||
}
|
||||
});
|
||||
|
||||
function formatDateTime(date) {
|
||||
date = new Date(date);
|
||||
// function formatDateTime(date) {
|
||||
// date = new Date(date);
|
||||
|
||||
return date.toLocaleString(undefined, {
|
||||
dateStyle: 'long',
|
||||
timeStyle: 'short',
|
||||
})
|
||||
}
|
||||
// return date.toLocaleString(undefined, {
|
||||
// dateStyle: 'long',
|
||||
// timeStyle: 'short',
|
||||
// })
|
||||
// }
|
||||
|
||||
const isDev = import.meta.env.DEV;
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -36,11 +36,15 @@
|
|||
</ProductContainer>
|
||||
|
||||
<img class="absolute hidden sm:block -top-6 right-36 w-32 -rotate-3" src="@/assets/img/tape/tape-2.png" />
|
||||
<img class="absolute hidden sm:block top-20 -left-16 w-20 rotate-3"
|
||||
src="@/assets/img/stickers/sticker-2-red.png" />
|
||||
<img
|
||||
class="absolute hidden sm:block top-20 -left-16 w-20 rotate-3"
|
||||
src="@/assets/img/stickers/sticker-2-red.png"
|
||||
/>
|
||||
<img class="absolute -bottom-4 -right-12 w-32 -rotate-6" src="@/assets/img/stickers/sticker-1.png" />
|
||||
<img class="absolute hidden sm:block -bottom-4 left-40 w-60 rotate-3"
|
||||
src="@/assets/img/stickers/sticker-8.png" />
|
||||
<img
|
||||
class="absolute hidden sm:block -bottom-4 left-40 w-60 rotate-3"
|
||||
src="@/assets/img/stickers/sticker-8.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user