diff --git a/.gitignore b/.gitignore index 544d72e16..8ce23049e 100644 --- a/.gitignore +++ b/.gitignore @@ -90,15 +90,15 @@ Icon .Trashes .VolumeIcon.icns -# Yarn 2 files -.yarn/* -!.yarn/cache -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/sdks -!.yarn/versions +# Yarn 2 Files to exclude +.yarn-integrity +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* # See https://github.com/yarnpkg/berry/issues/454 +# Almost all other yarn files benefit from just being tracked and thrown in the repo +# so that later installs still work even if left-pad goes away or something. node_modules/ diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 55ea5d59f..540c28480 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -27,6 +27,7 @@ blocks: - ./configure secrets: - name: Tchalvak COMPOSER_AUTH with github pat + - name: Tchalvak GITHUB Open Source - name: Tchalvak Github Ratelimit Avoidance Token Readonly dependencies: [] - name: JS Tests diff --git a/deploy/lib/control/HomepageController.php b/deploy/lib/control/HomepageController.php index 3328a7ebe..6b843ce4b 100644 --- a/deploy/lib/control/HomepageController.php +++ b/deploy/lib/control/HomepageController.php @@ -18,7 +18,7 @@ class HomepageController extends AbstractController public const PRIV = false; public const ALIVE = false; private $loggedIn = false; - public const NW_VERSION = 'v1.20.2 2023.12.28'; + public const NW_VERSION = 'v1.21.0-2024.05.22'; /** * Stores logged-in status of user in member variable for use later diff --git a/deploy/templates/header.tpl b/deploy/templates/header.tpl index 8f669456e..f257975de 100644 --- a/deploy/templates/header.tpl +++ b/deploy/templates/header.tpl @@ -25,7 +25,8 @@ - + + {if $smarty.const.LOCAL_JS} diff --git a/deploy/www/js/nw.js b/deploy/www/js/nw.js index 19839e456..7289e1e4a 100644 --- a/deploy/www/js/nw.js +++ b/deploy/www/js/nw.js @@ -231,7 +231,7 @@ $(selector).keyup(function () { 'message_id', 'latestMessage', 'message_id', - ) + ) || this.updateDataStore( data.member_counts, 'active', @@ -444,7 +444,8 @@ $(() => { if (g_isIndex || g_isRoot) { // Catchphrases: Hide the second two sections. const catchphrases = $('#nw-catchphrases span'); - const rand = Math.floor(Math.random() * catchphrases.size()); + const catchphrasesLength = catchphrases.length || 0; + const rand = Math.floor(Math.random() * catchphrasesLength); // Choose random index. catchphrases.hide().eq(rand).show(); // Hide all, show one at random. diff --git a/package.json b/package.json index dd72407a8..e21b2e1ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ninjawars", - "version": "1.20.2", + "version": "1.21.0", "description": "The Ninja Game at ninjawars.net", "main": "deploy/www/js/nw.js", "directories": {