From 73cf6291d8018094c46f2cf86238a6793e3bc22b Mon Sep 17 00:00:00 2001 From: Quitch Date: Sat, 12 Jan 2019 22:07:55 +0000 Subject: [PATCH 01/34] Grammar in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 13dc97c..53ec7f1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![alt text](https://i.imgur.com/k5fM6FD.png "All In One Spectator Tab") -Adds a two tabs to the spectator player panel: ALL and ALL2. +Adds two tabs to the spectator player panel: ALL and ALL2. ALL displays the following: From 6eb788c500460a1b28aa127fb15d4b8b746f3723 Mon Sep 17 00:00:00 2001 From: Quitch Date: Sun, 15 Sep 2019 15:11:38 +0100 Subject: [PATCH 02/34] Prettier formatting --- CHANGELOG.md | 6 +-- README.md | 16 +++---- modinfo.json | 15 ++----- .../live_game_players.css | 30 ++++++------- .../live_game_players.js | 40 ++++++++++------- .../live_game_players1.html | 2 +- .../live_game_players2.html | 44 ++++++++++++++----- .../live_game_players3.html | 2 +- .../live_game_players4.html | 44 ++++++++++++++----- 9 files changed, 125 insertions(+), 74 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index afeeebc..ccd2b7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,9 @@ ## v1.1 - 2019-01-12 - - Added ALL2 tab with army metal count - - Set ALL tab to be the default +- Added ALL2 tab with army metal count +- Set ALL tab to be the default ## v1.0 - 2018-10-01 - - Added ALL tab to spectator panel \ No newline at end of file +- Added ALL tab to spectator panel diff --git a/README.md b/README.md index 53ec7f1..d252fea 100644 --- a/README.md +++ b/README.md @@ -6,12 +6,12 @@ Adds two tabs to the spectator player panel: ALL and ALL2. ALL displays the following: - - Metal income - - Energy income - - Efficiency - - Army count - - Fabber count - - Factory count +- Metal income +- Energy income +- Efficiency +- Army count +- Fabber count +- Factory count ALL2 displays army metal in place of army count. Army metal counts all units and structures owned by a player, not just offensive units. @@ -31,7 +31,7 @@ Because I wanted to avoid having the ALL tab be any wider than the other tabs. I **Why does your mod wrap the text when the numbers get big?** -I've tried to ensure this is very unlikely to happen, but because the columns are narrower it *could* happen. Things will get more cramped though. You can switch to the other tabs still if things get ugly. +I've tried to ensure this is very unlikely to happen, but because the columns are narrower it _could_ happen. Things will get more cramped though. You can switch to the other tabs still if things get ugly. **Do you support translations?** @@ -39,4 +39,4 @@ No. When you include translations in a Planetary Annihilation client mod, it bre ## Thanks - - mikeyh, who once again covered for my total inability to inject Javascript and HTML \ No newline at end of file +- mikeyh, who once again covered for my total inability to inject Javascript and HTML diff --git a/modinfo.json b/modinfo.json index 75725f7..51158f9 100644 --- a/modinfo.json +++ b/modinfo.json @@ -10,19 +10,12 @@ "signature": " ", "forum": "https://forums.planetaryannihilation.com/threads/client-all-in-one-spectator-tab.73161/", "icon": "https://i.imgur.com/oF09PFr.jpg", - "category": - [ - "ui", - "classic", - "titans" - ], + "category": ["ui", "classic", "titans"], "priority": 100, - "scenes": - { - "live_game_players": - [ + "scenes": { + "live_game_players": [ "coui://ui/mods/com.quitch.qallinonetab/live_game_players.css", "coui://ui/mods/com.quitch.qallinonetab/live_game_players.js" ] } -} \ No newline at end of file +} diff --git a/ui/mods/com.quitch.qallinonetab/live_game_players.css b/ui/mods/com.quitch.qallinonetab/live_game_players.css index 60ea90e..5fcceb4 100644 --- a/ui/mods/com.quitch.qallinonetab/live_game_players.css +++ b/ui/mods/com.quitch.qallinonetab/live_game_players.css @@ -1,34 +1,34 @@ .div_metal_header_quitch { - min-width: 80px; - text-align: right; + min-width: 80px; + text-align: right; } .div_energy_header_quitch { - min-width: 105px; - text-align: right; + min-width: 105px; + text-align: right; } .div_build_efficiency_header_quitch { - min-width: 50px; - text-align: right; + min-width: 50px; + text-align: right; } .div_army_mobile_value_header_quitch { - min-width: 55px; - text-align: right; + min-width: 55px; + text-align: right; } .div_army_metal_value_header_quitch { - min-width: 55px; - text-align: right; + min-width: 55px; + text-align: right; } .div_army_fabber_value_header_quitch { - min-width: 35px; - text-align: right; + min-width: 35px; + text-align: right; } .div_army_factory_value_header_quitch { - min-width: 35px; - text-align: right; -} \ No newline at end of file + min-width: 35px; + text-align: right; +} diff --git a/ui/mods/com.quitch.qallinonetab/live_game_players.js b/ui/mods/com.quitch.qallinonetab/live_game_players.js index 9d2f1ec..2771613 100644 --- a/ui/mods/com.quitch.qallinonetab/live_game_players.js +++ b/ui/mods/com.quitch.qallinonetab/live_game_players.js @@ -1,32 +1,42 @@ function allinonetab() { - // Setup tabs - model.spectatorPanelMode('all'); - model.showAllData = ko.computed(function () { - return model.spectatorPanelMode() === 'all'; + model.spectatorPanelMode("all"); + model.showAllData = ko.computed(function() { + return model.spectatorPanelMode() === "all"; }); - model.showAllData2 = ko.computed(function () { - return model.spectatorPanelMode() === 'all2'; + model.showAllData2 = ko.computed(function() { + return model.spectatorPanelMode() === "all2"; }); // ALL - All-in-one army count - $('div.div_spectator_panel_buttons').append('
ALL
'); + $("div.div_spectator_panel_buttons").append( + '
ALL
' + ); - $('table.tbl_spectator_stats tr:first').append(loadHtml('coui://ui/mods/com.quitch.qallinonetab/live_game_players1.html')); + $("table.tbl_spectator_stats tr:first").append( + loadHtml("coui://ui/mods/com.quitch.qallinonetab/live_game_players1.html") + ); - $('table.tbl_spectator_stats tr:last').append(loadHtml('coui://ui/mods/com.quitch.qallinonetab/live_game_players2.html')); + $("table.tbl_spectator_stats tr:last").append( + loadHtml("coui://ui/mods/com.quitch.qallinonetab/live_game_players2.html") + ); // ALL2 - All-in-one army metal - $('div.div_spectator_panel_buttons').append('
ALL2
'); + $("div.div_spectator_panel_buttons").append( + '
ALL2
' + ); - $('table.tbl_spectator_stats tr:first').append(loadHtml('coui://ui/mods/com.quitch.qallinonetab/live_game_players3.html')); + $("table.tbl_spectator_stats tr:first").append( + loadHtml("coui://ui/mods/com.quitch.qallinonetab/live_game_players3.html") + ); - $('table.tbl_spectator_stats tr:last').append(loadHtml('coui://ui/mods/com.quitch.qallinonetab/live_game_players4.html')); + $("table.tbl_spectator_stats tr:last").append( + loadHtml("coui://ui/mods/com.quitch.qallinonetab/live_game_players4.html") + ); } try { allinonetab(); -} -catch (e) { +} catch (e) { console.error(e); -} \ No newline at end of file +} diff --git a/ui/mods/com.quitch.qallinonetab/live_game_players1.html b/ui/mods/com.quitch.qallinonetab/live_game_players1.html index 355a72b..5265cfd 100644 --- a/ui/mods/com.quitch.qallinonetab/live_game_players1.html +++ b/ui/mods/com.quitch.qallinonetab/live_game_players1.html @@ -17,4 +17,4 @@ Fac - \ No newline at end of file + diff --git a/ui/mods/com.quitch.qallinonetab/live_game_players2.html b/ui/mods/com.quitch.qallinonetab/live_game_players2.html index cfd307f..1139480 100644 --- a/ui/mods/com.quitch.qallinonetab/live_game_players2.html +++ b/ui/mods/com.quitch.qallinonetab/live_game_players2.html @@ -1,20 +1,44 @@ - - + + - - + + - - + + - + - + - + - \ No newline at end of file + diff --git a/ui/mods/com.quitch.qallinonetab/live_game_players3.html b/ui/mods/com.quitch.qallinonetab/live_game_players3.html index b0f02e4..819122d 100644 --- a/ui/mods/com.quitch.qallinonetab/live_game_players3.html +++ b/ui/mods/com.quitch.qallinonetab/live_game_players3.html @@ -17,4 +17,4 @@ Fac - \ No newline at end of file + diff --git a/ui/mods/com.quitch.qallinonetab/live_game_players4.html b/ui/mods/com.quitch.qallinonetab/live_game_players4.html index 690b98a..e19bcea 100644 --- a/ui/mods/com.quitch.qallinonetab/live_game_players4.html +++ b/ui/mods/com.quitch.qallinonetab/live_game_players4.html @@ -1,20 +1,44 @@ - - + + - - + + - - + + - + - + - + - \ No newline at end of file + From a59cc32af6352c3eb167bd5733e93d40f1683663 Mon Sep 17 00:00:00 2001 From: Quitch Date: Mon, 13 Apr 2020 21:02:53 +0100 Subject: [PATCH 03/34] Prettier formatting --- ui/mods/com.quitch.qallinonetab/live_game_players.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/mods/com.quitch.qallinonetab/live_game_players.js b/ui/mods/com.quitch.qallinonetab/live_game_players.js index 2771613..d25d865 100644 --- a/ui/mods/com.quitch.qallinonetab/live_game_players.js +++ b/ui/mods/com.quitch.qallinonetab/live_game_players.js @@ -1,10 +1,10 @@ function allinonetab() { // Setup tabs model.spectatorPanelMode("all"); - model.showAllData = ko.computed(function() { + model.showAllData = ko.computed(function () { return model.spectatorPanelMode() === "all"; }); - model.showAllData2 = ko.computed(function() { + model.showAllData2 = ko.computed(function () { return model.spectatorPanelMode() === "all2"; }); From 8a38375adc838e0b02ae6efd80cab2eb6733e351 Mon Sep 17 00:00:00 2001 From: Quitch Date: Thu, 23 Apr 2020 11:50:52 +0100 Subject: [PATCH 04/34] Add linter rules --- .eslintrc.json | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..6e07758 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,33 @@ +{ + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + }, + "env": { + "browser": true, + "jquery": true, + "amd": true + }, + "settings": { + "lodash": { + "version": 3, + "pragma": "_" + } + }, + "extends": ["eslint:recommended", "prettier"], + "globals": { + "model": "readonly", + "ko": "readonly", + "loadHtml": "readonly" + }, + "plugins": ["lodash"], + "rules": { + "lodash/callback-binding": 2, + "lodash/collection-method-value": 2, + "lodash/collection-return": 2, + "lodash/no-double-unwrap": 2, + "lodash/no-extra-args": 2, + "lodash/unwrap": 2 + } +} From 5528a05aab303ca560a4a6f81c939639e57c6ca2 Mon Sep 17 00:00:00 2001 From: Quitch Date: Thu, 21 May 2020 08:15:39 +0100 Subject: [PATCH 05/34] Extend use of lodash linter rules --- .eslintrc.json | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 6e07758..8a77b48 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -15,7 +15,7 @@ "pragma": "_" } }, - "extends": ["eslint:recommended", "prettier"], + "extends": ["eslint:recommended", "prettier", "plugin:lodash/v3"], "globals": { "model": "readonly", "ko": "readonly", @@ -23,11 +23,7 @@ }, "plugins": ["lodash"], "rules": { - "lodash/callback-binding": 2, - "lodash/collection-method-value": 2, - "lodash/collection-return": 2, - "lodash/no-double-unwrap": 2, - "lodash/no-extra-args": 2, - "lodash/unwrap": 2 + "lodash/preferred-alias": [2, { "ignoreMethods": ["extend", "any"] }], + "lodash/prefer-lodash-method": 0 } } From ced0ffdb960b0b119d2380a477cdffe19356dc6d Mon Sep 17 00:00:00 2001 From: Quitch Date: Thu, 21 May 2020 09:13:17 +0100 Subject: [PATCH 06/34] Extend prettier last to ensure override --- .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 8a77b48..ddc8d9a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -15,7 +15,7 @@ "pragma": "_" } }, - "extends": ["eslint:recommended", "prettier", "plugin:lodash/v3"], + "extends": ["eslint:recommended", "plugin:lodash/v3", "prettier"], "globals": { "model": "readonly", "ko": "readonly", From 9d41a61ceb74097df3fd15fbe3f1519fe1daab30 Mon Sep 17 00:00:00 2001 From: Quitch Date: Fri, 22 May 2020 13:26:44 +0100 Subject: [PATCH 07/34] Update linter --- .eslintrc.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index ddc8d9a..23f9872 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,12 +9,6 @@ "jquery": true, "amd": true }, - "settings": { - "lodash": { - "version": 3, - "pragma": "_" - } - }, "extends": ["eslint:recommended", "plugin:lodash/v3", "prettier"], "globals": { "model": "readonly", From 873d1bb53cc2f475dd54712c69c469a25810a4ea Mon Sep 17 00:00:00 2001 From: Quitch Date: Sat, 15 Aug 2020 23:03:36 +0100 Subject: [PATCH 08/34] Update changelog format --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ccd2b7d..c34f8ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,12 @@ # CHANGELOG -## v1.1 - 2019-01-12 +## [Unreleased] + +## [1.1] - 2019-01-12 - Added ALL2 tab with army metal count - Set ALL tab to be the default -## v1.0 - 2018-10-01 +## [1.0] - 2018-10-01 - Added ALL tab to spectator panel From 17457640eb2b40070ebbdb3e95f0aafd2b501898 Mon Sep 17 00:00:00 2001 From: Quitch Date: Sat, 15 Aug 2020 23:14:07 +0100 Subject: [PATCH 09/34] Add links to the readme sections --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d252fea..1a256db 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# All-In-One Spectator Tab +# [All-In-One Spectator Tab] -![alt text](https://i.imgur.com/k5fM6FD.png "All In One Spectator Tab") +![An example of the mod in use](https://i.imgur.com/k5fM6FD.png "All In One Spectator Tab") Adds two tabs to the spectator player panel: ALL and ALL2. @@ -15,15 +15,15 @@ ALL displays the following: ALL2 displays army metal in place of army count. Army metal counts all units and structures owned by a player, not just offensive units. -## Installation +## [Installation] You should download and install this mod via the Planetary Annihilation TITANS in-game Community Mod Manager. You will need to [enable Community Mods](https://steamcommunity.com/sharedfiles/filedetails/?id=1417396826). -## Translations +## [Translations] Please help [translate All-In-One Spectator Tab](https://poeditor.com/join/project/juanyAfxIm) to your local language. -## FAQ +## [FAQ] **Why didn't you include total unit count?** @@ -37,6 +37,6 @@ I've tried to ensure this is very unlikely to happen, but because the columns ar No. When you include translations in a Planetary Annihilation client mod, it breaks all other translations in the game. Until this is fixed this mod can't ship with translations. -## Thanks +## [Thanks] - mikeyh, who once again covered for my total inability to inject Javascript and HTML From 455e8e99d115287e0e88687295ebff7169b918f1 Mon Sep 17 00:00:00 2001 From: Quitch Date: Sun, 16 Aug 2020 10:00:21 +0100 Subject: [PATCH 10/34] Revert "Update changelog format" This reverts commit 873d1bb53cc2f475dd54712c69c469a25810a4ea. --- CHANGELOG.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c34f8ce..ccd2b7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,10 @@ # CHANGELOG -## [Unreleased] - -## [1.1] - 2019-01-12 +## v1.1 - 2019-01-12 - Added ALL2 tab with army metal count - Set ALL tab to be the default -## [1.0] - 2018-10-01 +## v1.0 - 2018-10-01 - Added ALL tab to spectator panel From 7af78d49d69773ba34620c1c9074802f80740a8a Mon Sep 17 00:00:00 2001 From: Quitch Date: Sun, 16 Aug 2020 10:00:24 +0100 Subject: [PATCH 11/34] Revert "Add links to the readme sections" This reverts commit 17457640eb2b40070ebbdb3e95f0aafd2b501898. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1a256db..d252fea 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# [All-In-One Spectator Tab] +# All-In-One Spectator Tab -![An example of the mod in use](https://i.imgur.com/k5fM6FD.png "All In One Spectator Tab") +![alt text](https://i.imgur.com/k5fM6FD.png "All In One Spectator Tab") Adds two tabs to the spectator player panel: ALL and ALL2. @@ -15,15 +15,15 @@ ALL displays the following: ALL2 displays army metal in place of army count. Army metal counts all units and structures owned by a player, not just offensive units. -## [Installation] +## Installation You should download and install this mod via the Planetary Annihilation TITANS in-game Community Mod Manager. You will need to [enable Community Mods](https://steamcommunity.com/sharedfiles/filedetails/?id=1417396826). -## [Translations] +## Translations Please help [translate All-In-One Spectator Tab](https://poeditor.com/join/project/juanyAfxIm) to your local language. -## [FAQ] +## FAQ **Why didn't you include total unit count?** @@ -37,6 +37,6 @@ I've tried to ensure this is very unlikely to happen, but because the columns ar No. When you include translations in a Planetary Annihilation client mod, it breaks all other translations in the game. Until this is fixed this mod can't ship with translations. -## [Thanks] +## Thanks - mikeyh, who once again covered for my total inability to inject Javascript and HTML From c5830d409dbc7b6cc1f3799acf1130fc25318519 Mon Sep 17 00:00:00 2001 From: Quitch Date: Sun, 16 Aug 2020 10:00:48 +0100 Subject: [PATCH 12/34] Add readme image alt text --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d252fea..56ced69 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # All-In-One Spectator Tab -![alt text](https://i.imgur.com/k5fM6FD.png "All In One Spectator Tab") +![An example of the mod in use](https://i.imgur.com/k5fM6FD.png "All In One Spectator Tab") Adds two tabs to the spectator player panel: ALL and ALL2. From b73ed7fb83673b31ab170e91a66f9eca8a3abaf6 Mon Sep 17 00:00:00 2001 From: Quitch Date: Sat, 3 Oct 2020 19:56:33 +0100 Subject: [PATCH 13/34] Avoid using aliases --- .eslintrc.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 23f9872..df16938 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -17,7 +17,6 @@ }, "plugins": ["lodash"], "rules": { - "lodash/preferred-alias": [2, { "ignoreMethods": ["extend", "any"] }], "lodash/prefer-lodash-method": 0 } } From 2c5c15f61bba155367db04cb43757804a5b31536 Mon Sep 17 00:00:00 2001 From: Quitch Date: Sat, 3 Oct 2020 20:32:04 +0100 Subject: [PATCH 14/34] Prepare for move to v4 lodash --- .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index df16938..6f5384a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,7 +9,7 @@ "jquery": true, "amd": true }, - "extends": ["eslint:recommended", "plugin:lodash/v3", "prettier"], + "extends": ["eslint:recommended", "plugin:lodash/recommended", "prettier"], "globals": { "model": "readonly", "ko": "readonly", From aa5ee93bf07290c06abb68225f5f3892f4404755 Mon Sep 17 00:00:00 2001 From: Quitch Date: Sat, 17 Oct 2020 09:54:27 +0100 Subject: [PATCH 15/34] Camel case the function --- ui/mods/com.quitch.qallinonetab/live_game_players.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/mods/com.quitch.qallinonetab/live_game_players.js b/ui/mods/com.quitch.qallinonetab/live_game_players.js index d25d865..5b1ae4b 100644 --- a/ui/mods/com.quitch.qallinonetab/live_game_players.js +++ b/ui/mods/com.quitch.qallinonetab/live_game_players.js @@ -1,4 +1,4 @@ -function allinonetab() { +function allInOneTab() { // Setup tabs model.spectatorPanelMode("all"); model.showAllData = ko.computed(function () { @@ -36,7 +36,7 @@ function allinonetab() { } try { - allinonetab(); + allInOneTab(); } catch (e) { console.error(e); } From e7958e6339de8fb9c08f6153434c692b7faabf4b Mon Sep 17 00:00:00 2001 From: Quitch Date: Sat, 17 Oct 2020 10:02:56 +0100 Subject: [PATCH 16/34] Improve file naming --- modinfo.json | 4 ++-- .../{live_game_players3.html => all2_headers.html} | 0 .../{live_game_players4.html => all2_values.html} | 0 .../{live_game_players1.html => all_headers.html} | 0 .../{live_game_players.css => all_tabs.css} | 0 .../{live_game_players.js => all_tabs.js} | 8 ++++---- .../{live_game_players2.html => all_values.html} | 0 7 files changed, 6 insertions(+), 6 deletions(-) rename ui/mods/com.quitch.qallinonetab/{live_game_players3.html => all2_headers.html} (100%) rename ui/mods/com.quitch.qallinonetab/{live_game_players4.html => all2_values.html} (100%) rename ui/mods/com.quitch.qallinonetab/{live_game_players1.html => all_headers.html} (100%) rename ui/mods/com.quitch.qallinonetab/{live_game_players.css => all_tabs.css} (100%) rename ui/mods/com.quitch.qallinonetab/{live_game_players.js => all_tabs.js} (77%) rename ui/mods/com.quitch.qallinonetab/{live_game_players2.html => all_values.html} (100%) diff --git a/modinfo.json b/modinfo.json index 51158f9..61e5b95 100644 --- a/modinfo.json +++ b/modinfo.json @@ -14,8 +14,8 @@ "priority": 100, "scenes": { "live_game_players": [ - "coui://ui/mods/com.quitch.qallinonetab/live_game_players.css", - "coui://ui/mods/com.quitch.qallinonetab/live_game_players.js" + "coui://ui/mods/com.quitch.qallinonetab/all_tabs.css", + "coui://ui/mods/com.quitch.qallinonetab/all_tabs.js" ] } } diff --git a/ui/mods/com.quitch.qallinonetab/live_game_players3.html b/ui/mods/com.quitch.qallinonetab/all2_headers.html similarity index 100% rename from ui/mods/com.quitch.qallinonetab/live_game_players3.html rename to ui/mods/com.quitch.qallinonetab/all2_headers.html diff --git a/ui/mods/com.quitch.qallinonetab/live_game_players4.html b/ui/mods/com.quitch.qallinonetab/all2_values.html similarity index 100% rename from ui/mods/com.quitch.qallinonetab/live_game_players4.html rename to ui/mods/com.quitch.qallinonetab/all2_values.html diff --git a/ui/mods/com.quitch.qallinonetab/live_game_players1.html b/ui/mods/com.quitch.qallinonetab/all_headers.html similarity index 100% rename from ui/mods/com.quitch.qallinonetab/live_game_players1.html rename to ui/mods/com.quitch.qallinonetab/all_headers.html diff --git a/ui/mods/com.quitch.qallinonetab/live_game_players.css b/ui/mods/com.quitch.qallinonetab/all_tabs.css similarity index 100% rename from ui/mods/com.quitch.qallinonetab/live_game_players.css rename to ui/mods/com.quitch.qallinonetab/all_tabs.css diff --git a/ui/mods/com.quitch.qallinonetab/live_game_players.js b/ui/mods/com.quitch.qallinonetab/all_tabs.js similarity index 77% rename from ui/mods/com.quitch.qallinonetab/live_game_players.js rename to ui/mods/com.quitch.qallinonetab/all_tabs.js index 5b1ae4b..f5a1bf4 100644 --- a/ui/mods/com.quitch.qallinonetab/live_game_players.js +++ b/ui/mods/com.quitch.qallinonetab/all_tabs.js @@ -14,11 +14,11 @@ function allInOneTab() { ); $("table.tbl_spectator_stats tr:first").append( - loadHtml("coui://ui/mods/com.quitch.qallinonetab/live_game_players1.html") + loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_headers.html") ); $("table.tbl_spectator_stats tr:last").append( - loadHtml("coui://ui/mods/com.quitch.qallinonetab/live_game_players2.html") + loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_values.html") ); // ALL2 - All-in-one army metal @@ -27,11 +27,11 @@ function allInOneTab() { ); $("table.tbl_spectator_stats tr:first").append( - loadHtml("coui://ui/mods/com.quitch.qallinonetab/live_game_players3.html") + loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_headers.html") ); $("table.tbl_spectator_stats tr:last").append( - loadHtml("coui://ui/mods/com.quitch.qallinonetab/live_game_players4.html") + loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_values.html") ); } diff --git a/ui/mods/com.quitch.qallinonetab/live_game_players2.html b/ui/mods/com.quitch.qallinonetab/all_values.html similarity index 100% rename from ui/mods/com.quitch.qallinonetab/live_game_players2.html rename to ui/mods/com.quitch.qallinonetab/all_values.html From b988857aa6e244ea3f32c248cb7c84d7f7e210fb Mon Sep 17 00:00:00 2001 From: Quitch Date: Mon, 7 Dec 2020 13:39:39 +0000 Subject: [PATCH 17/34] Add GitHub info --- modinfo.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modinfo.json b/modinfo.json index 61e5b95..d44ab17 100644 --- a/modinfo.json +++ b/modinfo.json @@ -17,5 +17,6 @@ "coui://ui/mods/com.quitch.qallinonetab/all_tabs.css", "coui://ui/mods/com.quitch.qallinonetab/all_tabs.js" ] - } + }, + "github": "https://github.com/Quitch/All-In-One-Spectator-Tab" } From 11218ac0111a9fd19bfba01ada5849d1d8908752 Mon Sep 17 00:00:00 2001 From: Quitch Date: Mon, 28 Dec 2020 15:50:52 +0000 Subject: [PATCH 18/34] Improve error catching code --- ui/mods/com.quitch.qallinonetab/all_tabs.js | 83 +++++++++++---------- 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/ui/mods/com.quitch.qallinonetab/all_tabs.js b/ui/mods/com.quitch.qallinonetab/all_tabs.js index f5a1bf4..a30b0c0 100644 --- a/ui/mods/com.quitch.qallinonetab/all_tabs.js +++ b/ui/mods/com.quitch.qallinonetab/all_tabs.js @@ -1,42 +1,45 @@ -function allInOneTab() { - // Setup tabs - model.spectatorPanelMode("all"); - model.showAllData = ko.computed(function () { - return model.spectatorPanelMode() === "all"; - }); - model.showAllData2 = ko.computed(function () { - return model.spectatorPanelMode() === "all2"; - }); - - // ALL - All-in-one army count - $("div.div_spectator_panel_buttons").append( - '
ALL
' - ); - - $("table.tbl_spectator_stats tr:first").append( - loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_headers.html") - ); - - $("table.tbl_spectator_stats tr:last").append( - loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_values.html") - ); - - // ALL2 - All-in-one army metal - $("div.div_spectator_panel_buttons").append( - '
ALL2
' - ); - - $("table.tbl_spectator_stats tr:first").append( - loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_headers.html") - ); - - $("table.tbl_spectator_stats tr:last").append( - loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_values.html") - ); -} +var allInOneSpectatorTab; + +if (!allInOneSpectatorTab) { + allInOneSpectatorTab = true; + + try { + // Setup tabs + model.spectatorPanelMode("all"); + model.showAllData = ko.computed(function () { + return model.spectatorPanelMode() === "all"; + }); + model.showAllData2 = ko.computed(function () { + return model.spectatorPanelMode() === "all2"; + }); + + // ALL - All-in-one army count + $("div.div_spectator_panel_buttons").append( + '
ALL
' + ); + + $("table.tbl_spectator_stats tr:first").append( + loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_headers.html") + ); + + $("table.tbl_spectator_stats tr:last").append( + loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_values.html") + ); + + // ALL2 - All-in-one army metal + $("div.div_spectator_panel_buttons").append( + '
ALL2
' + ); + + $("table.tbl_spectator_stats tr:first").append( + loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_headers.html") + ); -try { - allInOneTab(); -} catch (e) { - console.error(e); + $("table.tbl_spectator_stats tr:last").append( + loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_values.html") + ); + } catch (e) { + console.error(e); + console.error(JSON.stringify(e)); + } } From 752143807d0aca9545d536e893c82fc1517f8745 Mon Sep 17 00:00:00 2001 From: Quitch Date: Mon, 28 Dec 2020 15:55:50 +0000 Subject: [PATCH 19/34] Improve error checking variable name --- ui/mods/com.quitch.qallinonetab/all_tabs.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/mods/com.quitch.qallinonetab/all_tabs.js b/ui/mods/com.quitch.qallinonetab/all_tabs.js index a30b0c0..d87ab68 100644 --- a/ui/mods/com.quitch.qallinonetab/all_tabs.js +++ b/ui/mods/com.quitch.qallinonetab/all_tabs.js @@ -1,7 +1,7 @@ -var allInOneSpectatorTab; +var allInOneSpectatorTabLoaded; -if (!allInOneSpectatorTab) { - allInOneSpectatorTab = true; +if (!allInOneSpectatorTabLoaded) { + allInOneSpectatorTabLoaded = true; try { // Setup tabs From 0a87d6cb73b1733286584c9fc536679b1013e9b5 Mon Sep 17 00:00:00 2001 From: Quitch Date: Sat, 17 Apr 2021 17:21:04 +0100 Subject: [PATCH 20/34] Enclose try/catch within named function --- .eslintrc.json | 3 +- ui/mods/com.quitch.qallinonetab/all_tabs.js | 79 +++++++++++---------- 2 files changed, 43 insertions(+), 39 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 6f5384a..bc8cb2b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -17,6 +17,7 @@ }, "plugins": ["lodash"], "rules": { - "lodash/prefer-lodash-method": 0 + "lodash/prefer-lodash-method": 0, + "no-inner-declarations": 0 } } diff --git a/ui/mods/com.quitch.qallinonetab/all_tabs.js b/ui/mods/com.quitch.qallinonetab/all_tabs.js index d87ab68..c007c72 100644 --- a/ui/mods/com.quitch.qallinonetab/all_tabs.js +++ b/ui/mods/com.quitch.qallinonetab/all_tabs.js @@ -3,43 +3,46 @@ var allInOneSpectatorTabLoaded; if (!allInOneSpectatorTabLoaded) { allInOneSpectatorTabLoaded = true; - try { - // Setup tabs - model.spectatorPanelMode("all"); - model.showAllData = ko.computed(function () { - return model.spectatorPanelMode() === "all"; - }); - model.showAllData2 = ko.computed(function () { - return model.spectatorPanelMode() === "all2"; - }); - - // ALL - All-in-one army count - $("div.div_spectator_panel_buttons").append( - '
ALL
' - ); - - $("table.tbl_spectator_stats tr:first").append( - loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_headers.html") - ); - - $("table.tbl_spectator_stats tr:last").append( - loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_values.html") - ); - - // ALL2 - All-in-one army metal - $("div.div_spectator_panel_buttons").append( - '
ALL2
' - ); - - $("table.tbl_spectator_stats tr:first").append( - loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_headers.html") - ); - - $("table.tbl_spectator_stats tr:last").append( - loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_values.html") - ); - } catch (e) { - console.error(e); - console.error(JSON.stringify(e)); + function allInOneSpectatorTab() { + try { + // Setup tabs + model.spectatorPanelMode("all"); + model.showAllData = ko.computed(function () { + return model.spectatorPanelMode() === "all"; + }); + model.showAllData2 = ko.computed(function () { + return model.spectatorPanelMode() === "all2"; + }); + + // ALL - All-in-one army count + $("div.div_spectator_panel_buttons").append( + '
ALL
' + ); + + $("table.tbl_spectator_stats tr:first").append( + loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_headers.html") + ); + + $("table.tbl_spectator_stats tr:last").append( + loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_values.html") + ); + + // ALL2 - All-in-one army metal + $("div.div_spectator_panel_buttons").append( + '
ALL2
' + ); + + $("table.tbl_spectator_stats tr:first").append( + loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_headers.html") + ); + + $("table.tbl_spectator_stats tr:last").append( + loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_values.html") + ); + } catch (e) { + console.error(e); + console.error(JSON.stringify(e)); + } } + allInOneSpectatorTab(); } From 92d9aa53191725365a10b63ed0f6eac28038ac9d Mon Sep 17 00:00:00 2001 From: Quitch Date: Fri, 30 Apr 2021 16:26:30 +0100 Subject: [PATCH 21/34] Ignore VSCode settings --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..da8d1e2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +.vscode/settings.json From fcca882137403676b20e878aa1aadfb4b2df4114 Mon Sep 17 00:00:00 2001 From: Quitch Date: Tue, 4 May 2021 22:36:57 +0100 Subject: [PATCH 22/34] Use lodash v3 linter recommendations --- .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index bc8cb2b..83e4b33 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,7 +9,7 @@ "jquery": true, "amd": true }, - "extends": ["eslint:recommended", "plugin:lodash/recommended", "prettier"], + "extends": ["eslint:recommended", "plugin:lodash/v3", "prettier"], "globals": { "model": "readonly", "ko": "readonly", From 6cabc6ef32967acf784e860cf607ac9f7d9f05b8 Mon Sep 17 00:00:00 2001 From: Quitch Date: Sat, 2 Oct 2021 21:02:12 +0100 Subject: [PATCH 23/34] Setup styleint for CSS --- .stylelintrc.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .stylelintrc.json diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 0000000..2e8ff58 --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,3 @@ +{ + "extends": ["stylelint-config-standard", "stylelint-config-prettier"] +} From b6e9047a72a6240254b4b226211ffc9dc71249bc Mon Sep 17 00:00:00 2001 From: Quitch Date: Fri, 12 Nov 2021 10:25:31 +0000 Subject: [PATCH 24/34] Indicate prettier usage through blank config file This is per the recommendations of the official documentation - https://prettier.io/docs/en/install.html --- .prettierrc.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .prettierrc.json diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..e69de29 From 0c5942968f40487c3f50f0117552cdf266782a5a Mon Sep 17 00:00:00 2001 From: Quitch Date: Sun, 12 Dec 2021 17:39:54 +0000 Subject: [PATCH 25/34] Move all HTML into files --- ui/mods/com.quitch.qallinonetab/all2_buttons.html | 6 ++++++ ui/mods/com.quitch.qallinonetab/all_buttons.html | 6 ++++++ ui/mods/com.quitch.qallinonetab/all_tabs.js | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 ui/mods/com.quitch.qallinonetab/all2_buttons.html create mode 100644 ui/mods/com.quitch.qallinonetab/all_buttons.html diff --git a/ui/mods/com.quitch.qallinonetab/all2_buttons.html b/ui/mods/com.quitch.qallinonetab/all2_buttons.html new file mode 100644 index 0000000..27db568 --- /dev/null +++ b/ui/mods/com.quitch.qallinonetab/all2_buttons.html @@ -0,0 +1,6 @@ +
+ ALL2 +
diff --git a/ui/mods/com.quitch.qallinonetab/all_buttons.html b/ui/mods/com.quitch.qallinonetab/all_buttons.html new file mode 100644 index 0000000..40d540a --- /dev/null +++ b/ui/mods/com.quitch.qallinonetab/all_buttons.html @@ -0,0 +1,6 @@ +
+ ALL +
diff --git a/ui/mods/com.quitch.qallinonetab/all_tabs.js b/ui/mods/com.quitch.qallinonetab/all_tabs.js index c007c72..7ff2792 100644 --- a/ui/mods/com.quitch.qallinonetab/all_tabs.js +++ b/ui/mods/com.quitch.qallinonetab/all_tabs.js @@ -16,7 +16,7 @@ if (!allInOneSpectatorTabLoaded) { // ALL - All-in-one army count $("div.div_spectator_panel_buttons").append( - '
ALL
' + loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_buttons.html") ); $("table.tbl_spectator_stats tr:first").append( @@ -29,7 +29,7 @@ if (!allInOneSpectatorTabLoaded) { // ALL2 - All-in-one army metal $("div.div_spectator_panel_buttons").append( - '
ALL2
' + loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_buttons.html") ); $("table.tbl_spectator_stats tr:first").append( From 8ab450149d3609ff5652930780e5b7faa385d727 Mon Sep 17 00:00:00 2001 From: Quitch Date: Sun, 12 Dec 2021 17:46:15 +0000 Subject: [PATCH 26/34] Require curly braces for IF and ELSE statements --- .eslintrc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 83e4b33..7bebfb7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -18,6 +18,7 @@ "plugins": ["lodash"], "rules": { "lodash/prefer-lodash-method": 0, - "no-inner-declarations": 0 + "no-inner-declarations": 0, + "curly": [2, "all"] } } From 0b95b7d1d4c94787c163e0001cdb00ff7a7d1675 Mon Sep 17 00:00:00 2001 From: Quitch Date: Wed, 29 Dec 2021 17:59:01 +0000 Subject: [PATCH 27/34] Remove illegal escape characters These are unneeded since we moved to dedicated HTML files --- ui/mods/com.quitch.qallinonetab/all2_buttons.html | 2 +- ui/mods/com.quitch.qallinonetab/all_buttons.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/mods/com.quitch.qallinonetab/all2_buttons.html b/ui/mods/com.quitch.qallinonetab/all2_buttons.html index 27db568..710ca69 100644 --- a/ui/mods/com.quitch.qallinonetab/all2_buttons.html +++ b/ui/mods/com.quitch.qallinonetab/all2_buttons.html @@ -1,6 +1,6 @@
ALL2
diff --git a/ui/mods/com.quitch.qallinonetab/all_buttons.html b/ui/mods/com.quitch.qallinonetab/all_buttons.html index 40d540a..1d23ba9 100644 --- a/ui/mods/com.quitch.qallinonetab/all_buttons.html +++ b/ui/mods/com.quitch.qallinonetab/all_buttons.html @@ -1,6 +1,6 @@
ALL
From 7f181a956774ffb839821cdf54003120e16bf3d9 Mon Sep 17 00:00:00 2001 From: Quitch Date: Sun, 23 Jan 2022 12:09:08 +0000 Subject: [PATCH 28/34] Point at Steam forum post --- modinfo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modinfo.json b/modinfo.json index d44ab17..18285f7 100644 --- a/modinfo.json +++ b/modinfo.json @@ -8,7 +8,7 @@ "build": "112595", "date": "2019/01/12", "signature": " ", - "forum": "https://forums.planetaryannihilation.com/threads/client-all-in-one-spectator-tab.73161/", + "forum": "https://steamcommunity.com/app/386070/discussions/0/1694914736008697542/", "icon": "https://i.imgur.com/oF09PFr.jpg", "category": ["ui", "classic", "titans"], "priority": 100, From 039e6bd36a3cdec9079aa5b2012c0a16994477b0 Mon Sep 17 00:00:00 2001 From: Quitch Date: Sun, 24 Jul 2022 21:18:15 +0100 Subject: [PATCH 29/34] Allow snake_case to match PA classes --- .stylelintrc.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.stylelintrc.json b/.stylelintrc.json index 2e8ff58..2ed91fe 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,3 +1,6 @@ { - "extends": ["stylelint-config-standard", "stylelint-config-prettier"] + "extends": ["stylelint-config-standard", "stylelint-config-prettier"], + "rules": { + "selector-class-pattern": "^([a-z][a-z0-9]*)((_|-)[a-z0-9]+)*$" + } } From 15414c76ec0437ecc638f0d9aa6cfdfe4ae3a87c Mon Sep 17 00:00:00 2001 From: Quitch Date: Sun, 24 Jul 2022 21:24:29 +0100 Subject: [PATCH 30/34] Expand spectator panel by default --- CHANGELOG.md | 4 ++++ ui/mods/com.quitch.qallinonetab/all_tabs.js | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ccd2b7d..8c80dc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## Unreleased + +- Expands the spectator panel by default + ## v1.1 - 2019-01-12 - Added ALL2 tab with army metal count diff --git a/ui/mods/com.quitch.qallinonetab/all_tabs.js b/ui/mods/com.quitch.qallinonetab/all_tabs.js index 7ff2792..72680ee 100644 --- a/ui/mods/com.quitch.qallinonetab/all_tabs.js +++ b/ui/mods/com.quitch.qallinonetab/all_tabs.js @@ -39,6 +39,8 @@ if (!allInOneSpectatorTabLoaded) { $("table.tbl_spectator_stats tr:last").append( loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_values.html") ); + + model.pinSpectatorPanel(true); } catch (e) { console.error(e); console.error(JSON.stringify(e)); From 5cac5fa49f6597c8bd9a6cc823b387df3f767b49 Mon Sep 17 00:00:00 2001 From: Quitch Date: Sun, 24 Jul 2022 21:26:19 +0100 Subject: [PATCH 31/34] Add HTML for tabs before assigning them --- ui/mods/com.quitch.qallinonetab/all_tabs.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ui/mods/com.quitch.qallinonetab/all_tabs.js b/ui/mods/com.quitch.qallinonetab/all_tabs.js index 72680ee..f7082ab 100644 --- a/ui/mods/com.quitch.qallinonetab/all_tabs.js +++ b/ui/mods/com.quitch.qallinonetab/all_tabs.js @@ -5,15 +5,6 @@ if (!allInOneSpectatorTabLoaded) { function allInOneSpectatorTab() { try { - // Setup tabs - model.spectatorPanelMode("all"); - model.showAllData = ko.computed(function () { - return model.spectatorPanelMode() === "all"; - }); - model.showAllData2 = ko.computed(function () { - return model.spectatorPanelMode() === "all2"; - }); - // ALL - All-in-one army count $("div.div_spectator_panel_buttons").append( loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_buttons.html") @@ -40,6 +31,15 @@ if (!allInOneSpectatorTabLoaded) { loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_values.html") ); + // Setup tabs + model.spectatorPanelMode("all"); + model.showAllData = ko.computed(function () { + return model.spectatorPanelMode() === "all"; + }); + model.showAllData2 = ko.computed(function () { + return model.spectatorPanelMode() === "all2"; + }); + model.pinSpectatorPanel(true); } catch (e) { console.error(e); From da9af22c11b9f68787170b7b30f403b509b198a4 Mon Sep 17 00:00:00 2001 From: Quitch Date: Sun, 24 Jul 2022 21:27:38 +0100 Subject: [PATCH 32/34] Select tab after assigning computed action --- ui/mods/com.quitch.qallinonetab/all_tabs.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ui/mods/com.quitch.qallinonetab/all_tabs.js b/ui/mods/com.quitch.qallinonetab/all_tabs.js index f7082ab..0c92fe0 100644 --- a/ui/mods/com.quitch.qallinonetab/all_tabs.js +++ b/ui/mods/com.quitch.qallinonetab/all_tabs.js @@ -5,7 +5,6 @@ if (!allInOneSpectatorTabLoaded) { function allInOneSpectatorTab() { try { - // ALL - All-in-one army count $("div.div_spectator_panel_buttons").append( loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_buttons.html") ); @@ -17,8 +16,6 @@ if (!allInOneSpectatorTabLoaded) { $("table.tbl_spectator_stats tr:last").append( loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_values.html") ); - - // ALL2 - All-in-one army metal $("div.div_spectator_panel_buttons").append( loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_buttons.html") ); @@ -31,8 +28,6 @@ if (!allInOneSpectatorTabLoaded) { loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_values.html") ); - // Setup tabs - model.spectatorPanelMode("all"); model.showAllData = ko.computed(function () { return model.spectatorPanelMode() === "all"; }); @@ -40,6 +35,7 @@ if (!allInOneSpectatorTabLoaded) { return model.spectatorPanelMode() === "all2"; }); + model.spectatorPanelMode("all"); model.pinSpectatorPanel(true); } catch (e) { console.error(e); From f4054ef786b387be7a3d0b099d222a7cee3b7fd1 Mon Sep 17 00:00:00 2001 From: Quitch Date: Sun, 24 Jul 2022 21:30:46 +0100 Subject: [PATCH 33/34] Support some es6 elements --- .eslintrc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 7bebfb7..f2b7c43 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -7,7 +7,8 @@ "env": { "browser": true, "jquery": true, - "amd": true + "amd": true, + "es6": true // PA uses Chrome 40 which supports a subset of ES6 }, "extends": ["eslint:recommended", "plugin:lodash/v3", "prettier"], "globals": { From b5bf4cb761355f8d3233aff8a86a19e3cc3ecb0b Mon Sep 17 00:00:00 2001 From: Quitch Date: Sun, 24 Jul 2022 21:30:53 +0100 Subject: [PATCH 34/34] Prep for release --- CHANGELOG.md | 2 +- modinfo.json | 6 +++--- sonar-project.properties | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 sonar-project.properties diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c80dc3..1cacf78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # CHANGELOG -## Unreleased +## v1.2.0 - 2022-07-24 - Expands the spectator panel by default diff --git a/modinfo.json b/modinfo.json index 18285f7..14a3940 100644 --- a/modinfo.json +++ b/modinfo.json @@ -4,9 +4,9 @@ "display_name": "All-In-One Spectator Tab DEV", "description": "Adds a tab called ALL to the spectator panel, which contains both economy and army information.", "author": "Quitch", - "version": "dev", - "build": "112595", - "date": "2019/01/12", + "version": "1.2.0", + "build": "115872", + "date": "2022/07/24", "signature": " ", "forum": "https://steamcommunity.com/app/386070/discussions/0/1694914736008697542/", "icon": "https://i.imgur.com/oF09PFr.jpg", diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..538b3e0 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,3 @@ +sonar.projectKey=Quitch_All-In-One-Spectator-Tab +sonar.organization=quitch +sonar.projectVersion=1.2.0 \ No newline at end of file