From 29270121efd12f9f5555a5a06f84bfd3b54aaa85 Mon Sep 17 00:00:00 2001 From: duncte123 Date: Mon, 26 Feb 2024 09:09:47 +0100 Subject: [PATCH 1/2] Use new oengus display names and support the youtube connection --- .eslintrc.browser.js | 4 ++-- .eslintrc.extension.js | 6 ++++-- .gitignore | 1 + configschema.json | 7 +------ schemas/reused/RunData.json | 5 ++++- src/dashboard/oengus-schedule-import/main.vue | 11 ----------- .../run-modification-dialog/components/Player.vue | 8 ++++++++ src/extension/oengus-import.ts | 11 ++++++----- src/types/Oengus.d.ts | 5 +++-- src/types/RunData.d.ts | 1 + src/types/schemas/configschema.d.ts | 1 - src/types/schemas/runDataActiveRun.d.ts | 1 + src/types/schemas/runDataArray.d.ts | 1 + webpack.config.mjs | 2 +- 14 files changed, 33 insertions(+), 31 deletions(-) diff --git a/.eslintrc.browser.js b/.eslintrc.browser.js index c1678a13..61e25cbc 100644 --- a/.eslintrc.browser.js +++ b/.eslintrc.browser.js @@ -8,7 +8,7 @@ module.exports = { parser: 'vue-eslint-parser', parserOptions: { parser: '@typescript-eslint/parser', - project: 'tsconfig.browser.json', + project: path.join(__dirname, 'tsconfig.browser.json'), extraFileExtensions: ['.vue'], ecmaVersion: 2020, }, @@ -31,7 +31,7 @@ module.exports = { 'import/resolver': { typescript: { // This is needed to properly resolve paths. - project: 'tsconfig.browser.json', + project: path.join(__dirname, 'tsconfig.browser.json'), }, webpack: { config: path.join(__dirname, 'webpack.config.mjs'), diff --git a/.eslintrc.extension.js b/.eslintrc.extension.js index a7f7334a..3f6a4a9f 100644 --- a/.eslintrc.extension.js +++ b/.eslintrc.extension.js @@ -1,3 +1,5 @@ +const path = require('path'); + module.exports = { root: true, env: { @@ -5,7 +7,7 @@ module.exports = { }, parser: '@typescript-eslint/parser', parserOptions: { - project: 'tsconfig.extension.json', + project: path.join(__dirname, 'tsconfig.extension.json'), }, plugins: [ '@typescript-eslint', @@ -21,7 +23,7 @@ module.exports = { 'import/resolver': { typescript: { // This is needed to properly resolve paths. - project: 'tsconfig.extension.json', + project: path.join(__dirname, 'tsconfig.extension.json'), }, }, 'import/extensions': ['.js', '.jsx', '.ts', '.tsx'], diff --git a/.gitignore b/.gitignore index be54081b..24f6661e 100644 --- a/.gitignore +++ b/.gitignore @@ -133,3 +133,4 @@ dist /dashboard/ /extension/ /graphics/ +.idea/ diff --git a/configschema.json b/configschema.json index 35c8d041..51ffb03b 100644 --- a/configschema.json +++ b/configschema.json @@ -193,10 +193,6 @@ "type": "string", "default": "SHORTNAME" }, - "useJapanese": { - "type": "boolean", - "default": false - }, "ignoreGamesWhileImporting": { "$ref": "#/definitions/ignoreGamesWhileImporting" }, @@ -217,7 +213,6 @@ }, "required": [ "defaultMarathon", - "useJapanese", "disableSpeedrunComLookup" ] }, @@ -271,4 +266,4 @@ "horaro", "oengus" ] -} \ No newline at end of file +} diff --git a/schemas/reused/RunData.json b/schemas/reused/RunData.json index e589e778..0f812d61 100644 --- a/schemas/reused/RunData.json +++ b/schemas/reused/RunData.json @@ -86,6 +86,9 @@ "properties": { "twitch": { "type": "string" + }, + "youtube": { + "type": "string" } } }, @@ -136,4 +139,4 @@ "customData", "id" ] -} \ No newline at end of file +} diff --git a/src/dashboard/oengus-schedule-import/main.vue b/src/dashboard/oengus-schedule-import/main.vue index cbe603c8..6bc1b591 100644 --- a/src/dashboard/oengus-schedule-import/main.vue +++ b/src/dashboard/oengus-schedule-import/main.vue @@ -5,7 +5,6 @@ "shortname": "Oengus Marathon Shortname", "helpText": "Insert the Oengus marathon shortname (not including \"/schedule\") above and press the \"Import Schedule Data\" button.", "importInProgressHelpText": "Import currently in progress...", - "useJapaneseNames": "Use Japanese names?", "import": "Import Schedule Data", "importProgress": "Importing {item}/{total}" }, @@ -14,7 +13,6 @@ "shortname": "Oengusマラソンの略称", "helpText": "上記にインポートしたいOengusのイベントの略称を入力し(\"/schedule\"を含めないでください)、「スケジュール情報のインポート」ボタンを押してください。", "importInProgressHelpText": "インポート処理の実行中...", - "useJapaneseNames": "日本語ユーザーネームを使用しますか?", "import": "スケジュール情報のインポート", "importProgress": "{item}/{total}件をインポート" } @@ -38,13 +36,6 @@
{{ $t('helpText') }}
- -