diff --git a/lib/depject/page/html/render/chess.js b/lib/depject/page/html/render/chess.js
index 7576df2a..fb45064b 100644
--- a/lib/depject/page/html/render/chess.js
+++ b/lib/depject/page/html/render/chess.js
@@ -12,49 +12,39 @@ exports.needs = nest({
exports.gives = nest("page.html.render");
exports.create = function (api) {
- const i18n = api.intl.sync.i18n;
return nest("page.html.render", function channel(path) {
if (path !== "/chess") return;
- const prepend = [
- h("PageHeading", [
- h("h1", [h("strong", i18n("Chess"))]),
- h("div.meta", []),
- ]),
- ];
-
- const page = h("Scroller", { style: { overflow: "auto" } }, [
+ const page =
h("div.wrapper", [
- h("section.prepend", prepend),
h(
"section.content",
- h("div", { id: "ssb-chess-mithril-plugin" }),
+ h("div", { id: "ssb-chess-mithril-plugin", style: { 'margin-top':'20px' } }),
),
- ]),
- ]);
+ ]);
- onceTrue(api.sbot.obs.connection, (ssb) => {
- const loadChess = () => {
- const attachToElement = document.getElementById(
- "ssb-chess-mithril-plugin",
- );
+ onceTrue(api.sbot.obs.connection, (ssb) => {
+ const loadChess = () => {
+ const attachToElement = document.getElementById(
+ "ssb-chess-mithril-plugin",
+ );
- if (!attachToElement) {
- console.log("no element, loop");
- setTimeout(() => {
- loadChess();
- }, 500);
- return;
- }
+ if (!attachToElement) {
+ console.log("no element, loop");
+ setTimeout(() => {
+ loadChess();
+ }, 500);
+ return;
+ }
- const dataAccess = new SsbChessDataAccess.SbotClassic(ssb);
+ const dataAccess = new SsbChessDataAccess.SbotClassic(ssb);
- SsbChessMithril(attachToElement, dataAccess);
- };
+ SsbChessMithril(attachToElement, dataAccess);
+ };
- loadChess();
- });
+ loadChess();
+ });
- return page;
+ return page;
});
};
diff --git a/package-lock.json b/package-lock.json
index a54f7498..a47a1187 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -77,8 +77,8 @@
"ssb-blob-files": "^1.2.0",
"ssb-blobs": "^2.0.1",
"ssb-book-schema": "^1.0.3",
- "ssb-chess-data-access": "2.1.4",
- "ssb-chess-mithril": "2.0.7",
+ "ssb-chess-data-access": "^2.1.4",
+ "ssb-chess-mithril": "2.0.9",
"ssb-client": "^4.9.0",
"ssb-config": "^3.4.4",
"ssb-conn": "~1.0.0",
@@ -709,6 +709,7 @@
"dev": true,
"license": "BSD-2-Clause",
"optional": true,
+ "peer": true,
"dependencies": {
"cross-dirname": "^0.1.0",
"debug": "^4.3.4",
@@ -730,6 +731,7 @@
"dev": true,
"license": "MIT",
"optional": true,
+ "peer": true,
"dependencies": {
"ms": "^2.1.3"
},
@@ -749,6 +751,7 @@
"dev": true,
"license": "MIT",
"optional": true,
+ "peer": true,
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
@@ -759,7 +762,8 @@
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true,
"license": "MIT",
- "optional": true
+ "optional": true,
+ "peer": true
},
"node_modules/@eslint/eslintrc": {
"version": "0.2.2",
@@ -1265,7 +1269,6 @@
"node_modules/acorn": {
"version": "7.1.1",
"license": "MIT",
- "peer": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -3697,7 +3700,8 @@
"integrity": "sha512-+R08/oI0nl3vfPcqftZRpytksBXDzOUveBq/NBVx0sUp1axwzPQrKinNx5yd5sxPu8j1wIy8AfnVQ+5eFdha6Q==",
"dev": true,
"license": "MIT",
- "optional": true
+ "optional": true,
+ "peer": true
},
"node_modules/cross-spawn": {
"version": "4.0.2",
@@ -4275,7 +4279,6 @@
"resolved": "https://registry.npmjs.org/electron/-/electron-44.7.0.tgz",
"integrity": "sha512-aUq9/zLAAFYc+a9gy6cd0C3Y/N/RmovLCD8TV8LhIzNhuND6HEgsu96jJz9cbAxvckSPv+Trf2PKEjktoZgFkw==",
"license": "MIT",
- "peer": true,
"dependencies": {
"@electron-internal/extract-zip": "^1.0.1",
"@electron/get": "^5.0.0",
@@ -4618,6 +4621,7 @@
"dev": true,
"hasInstallScript": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@electron/asar": "^3.2.1",
"debug": "^4.1.1",
@@ -4638,6 +4642,7 @@
"integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"ms": "^2.1.3"
},
@@ -4656,6 +4661,7 @@
"integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"graceful-fs": "^4.1.2",
"jsonfile": "^4.0.0",
@@ -4670,7 +4676,8 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true,
- "license": "MIT"
+ "license": "MIT",
+ "peer": true
},
"node_modules/electron-winstaller/node_modules/universalify": {
"version": "0.1.2",
@@ -4678,6 +4685,7 @@
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
"dev": true,
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">= 4.0.0"
}
@@ -5054,7 +5062,6 @@
"version": "7.13.0",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"@babel/code-frame": "^7.0.0",
"@eslint/eslintrc": "^0.2.1",
@@ -5207,7 +5214,6 @@
"version": "2.22.1",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"array-includes": "^3.1.1",
"array.prototype.flat": "^1.2.3",
@@ -5257,7 +5263,6 @@
"version": "11.1.0",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"eslint-plugin-es": "^3.0.0",
"eslint-utils": "^2.0.0",
@@ -5285,7 +5290,6 @@
"version": "4.2.1",
"dev": true,
"license": "ISC",
- "peer": true,
"engines": {
"node": ">=6"
}
@@ -5294,7 +5298,6 @@
"version": "7.21.5",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"array-includes": "^3.1.1",
"array.prototype.flatmap": "^1.2.3",
@@ -9740,7 +9743,6 @@
"integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=12"
},
@@ -9942,6 +9944,7 @@
"dev": true,
"license": "MIT",
"optional": true,
+ "peer": true,
"dependencies": {
"commander": "^9.4.0"
},
@@ -9959,6 +9962,7 @@
"dev": true,
"license": "MIT",
"optional": true,
+ "peer": true,
"engines": {
"node": "^12.20.0 || >=14"
}
@@ -9972,7 +9976,6 @@
"node_modules/prettier": {
"version": "2.2.1",
"license": "MIT",
- "peer": true,
"bin": {
"prettier": "bin-prettier.js"
},
@@ -11549,7 +11552,6 @@
"node_modules/secret-stack": {
"version": "6.3.2",
"license": "MIT",
- "peer": true,
"dependencies": {
"debug": "^4.1.0",
"hoox": "0.0.1",
@@ -12171,9 +12173,9 @@
"license": "CC0-1.0"
},
"node_modules/ssb-chess": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/ssb-chess/-/ssb-chess-4.0.4.tgz",
- "integrity": "sha512-LAk7eCRn6ZDRZNoxVl0sPJZHVv4iyg7hbs4grMU+1s3E4KXxelVy5kTCLZCcJMsdszZQFBdtwiFd7EUGFJgJWQ==",
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/ssb-chess/-/ssb-chess-4.0.5.tgz",
+ "integrity": "sha512-iT6TgXh7alif1WIDYj9LJSm8eLAEZ2tJ0xWSac/yLkCAnVd7b2iCCpCW9psehMUGuFJLVypS8Id8J1cMAGvm/Q==",
"license": "GPL-2.0",
"dependencies": {
"bluebird": "^3.7.2",
@@ -12195,6 +12197,8 @@
},
"node_modules/ssb-chess-data-access": {
"version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/ssb-chess-data-access/-/ssb-chess-data-access-2.1.4.tgz",
+ "integrity": "sha512-fp6t5zLzczMfFuy4OpzzPlMN3K/x2oKFjly3uNrQDnWUqqhvhAAPE230F1GdaHayIU+l9Oq8geXpaRLhaBRYZA==",
"license": "MIT",
"dependencies": {
"pull-abortable": "^4.1.1",
@@ -12218,24 +12222,23 @@
}
},
"node_modules/ssb-chess-mithril": {
- "version": "2.0.7",
- "resolved": "https://registry.npmjs.org/ssb-chess-mithril/-/ssb-chess-mithril-2.0.7.tgz",
- "integrity": "sha512-udteX1KbUUohsGar+toyX2rTDcO1pch0NiV+k5JAMf7zQDtAU4r2Y/CekHFWHHOhXGC35E8IVtL2otFNsbwluA==",
+ "version": "2.0.9",
+ "resolved": "https://registry.npmjs.org/ssb-chess-mithril/-/ssb-chess-mithril-2.0.9.tgz",
+ "integrity": "sha512-zovDFhTfqRg+O2fKClIt1cIcBh1h/fdc41g3d3mmwk6rtwKrJ2RntrwZc4dP7a/dL846I+VsnsAibx80/SQhNw==",
"license": "GPL-3.0",
"dependencies": {
"chessground": "7.6.8",
"howler": "^2.0.15",
"human-time": "0.0.2",
"hyperscript": "^2.0.2",
- "lodash": "^4.17.11",
"mithril": "1.1.7",
"mutant": "3.29.0",
"pubsub-js": "^1.7.0",
"pull-scroll": "^1.0.9",
"pull-stream": "^3.6.14",
"ramda": "^0.25.0",
- "ssb-chess": "4.0.4",
- "ssb-embedded-chat": "2.0.1"
+ "ssb-chess": "4.0.5",
+ "ssb-embedded-chat": "2.0.2"
}
},
"node_modules/ssb-chess-mithril/node_modules/browser-split": {
@@ -12844,9 +12847,9 @@
}
},
"node_modules/ssb-embedded-chat": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/ssb-embedded-chat/-/ssb-embedded-chat-2.0.1.tgz",
- "integrity": "sha512-W7sh9Qt4jI4JS5kSJ9FEPS3ETU+Bgd2ZFtTFbAvtfH5Nbg3yEeo7ZwS3cnCNwylfoV7nHS0G2e9hlnkKfux9FA==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/ssb-embedded-chat/-/ssb-embedded-chat-2.0.2.tgz",
+ "integrity": "sha512-ei2xU2MsXGPJ87Um6QnWGazplBcMqlMIU4IqcMfDfF2JIyqJs/fmtPQsSxqXk1SXRew/4T+eiHgXTAFzkYQFEw==",
"license": "GPL-3.0",
"dependencies": {
"hyperscript": "2.0.2",
@@ -14162,6 +14165,7 @@
"integrity": "sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"mkdirp": "^0.5.1",
"rimraf": "~2.6.2"
@@ -14216,6 +14220,7 @@
"deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me",
"dev": true,
"license": "ISC",
+ "peer": true,
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -14237,6 +14242,7 @@
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
"dev": true,
"license": "MIT",
+ "peer": true,
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
@@ -14247,6 +14253,7 @@
"integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"minimist": "^1.2.6"
},
@@ -14261,6 +14268,7 @@
"deprecated": "Rimraf versions prior to v4 are no longer supported",
"dev": true,
"license": "ISC",
+ "peer": true,
"dependencies": {
"glob": "^7.1.3"
},
diff --git a/package.json b/package.json
index 73622250..12ff7e45 100644
--- a/package.json
+++ b/package.json
@@ -88,6 +88,8 @@
"ssb-blob-files": "^1.2.0",
"ssb-blobs": "^2.0.1",
"ssb-book-schema": "^1.0.3",
+ "ssb-chess-data-access": "^2.1.4",
+ "ssb-chess-mithril": "2.0.9",
"ssb-client": "^4.9.0",
"ssb-config": "^3.4.4",
"ssb-conn": "~1.0.0",
@@ -121,9 +123,7 @@
"ssb-ws": "^6.2.3",
"suggest-box": "github:mmckegg/suggest-box#scroll-selection-into-view",
"text-node-searcher": "^1.1.1",
- "xtend": "^4.0.2",
- "ssb-chess-data-access": "2.1.4",
- "ssb-chess-mithril": "2.0.7"
+ "xtend": "^4.0.2"
},
"devDependencies": {
"@electron/notarize": "^3.1.2",