Compare commits
No commits in common. "master" and "v0.8.2" have entirely different histories.
|
|
@ -559,10 +559,6 @@ div.hbox {
|
||||||
color: blue;
|
color: blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
.jBox-wrapper.jBox-hasTitle > .jBox-container {
|
|
||||||
padding: 4px; /* same as border-radius */
|
|
||||||
}
|
|
||||||
|
|
||||||
.jBox-title h2 {
|
.jBox-title h2 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
@ -609,13 +605,10 @@ div.hbox {
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-tiles {
|
.game-tiles {
|
||||||
width: calc(100vw - 6rem);
|
max-width: 80vw;
|
||||||
max-width: calc(100vw - 6rem);
|
max-height: 80vh;
|
||||||
max-height: calc(100vh - 12rem);
|
overflow-y: auto;
|
||||||
display: grid;
|
text-align: center;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(15em, auto));
|
|
||||||
align-items: center;
|
|
||||||
justify-items: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-tiles > * {
|
.game-tiles > * {
|
||||||
|
|
@ -624,14 +617,14 @@ div.hbox {
|
||||||
|
|
||||||
.game-tile {
|
.game-tile {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: inline-flex;
|
||||||
flex-flow: column nowrap;
|
flex-flow: column nowrap;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 14em;
|
width: 14em;
|
||||||
height: 14em;
|
height: 14em;
|
||||||
box-shadow: 0 0 0 1px black, 5px 5px 3px #00000080;
|
box-shadow: 0 0 0 1px black, 5px 5px 3px #00000080;
|
||||||
margin: 0.5em;
|
margin: 1em;
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
border-radius: 6pt;
|
border-radius: 6pt;
|
||||||
background-color: #FFFFF0;
|
background-color: #FFFFF0;
|
||||||
|
|
@ -664,7 +657,6 @@ div.hbox {
|
||||||
font-size: 3em;
|
font-size: 3em;
|
||||||
text-shadow: 2px 2px 4px #000000c0;
|
text-shadow: 2px 2px 4px #000000c0;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.new-game-text::before {
|
.new-game-text::before {
|
||||||
|
|
@ -787,19 +779,19 @@ div.hbox {
|
||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-tiles {
|
.game-tile {
|
||||||
font-size: calc(12in * 0.014);
|
font-size: calc(12in * 0.015);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 6in) and (max-width: 12in) {
|
@media only screen and (min-width: 6in) and (max-width: 12in) {
|
||||||
.game-tiles {
|
.game-tile {
|
||||||
font-size: 1.4vw;
|
font-size: 1.5vw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 6in) {
|
@media only screen and (max-width: 6in) {
|
||||||
.game-tiles {
|
.game-tile {
|
||||||
font-size: calc(6in * 0.014);
|
font-size: calc(6in * 0.015);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
|
|
||||||
1
index.js
1
index.js
|
|
@ -1,6 +1,5 @@
|
||||||
import './css/chess.css';
|
import './css/chess.css';
|
||||||
import './css/theme/pacosako.css';
|
import './css/theme/pacosako.css';
|
||||||
import './css/theme/traditional.css';
|
|
||||||
|
|
||||||
import '@fortawesome/fontawesome-free/css/fontawesome.css';
|
import '@fortawesome/fontawesome-free/css/fontawesome.css';
|
||||||
import '@fortawesome/fontawesome-free/css/solid.css';
|
import '@fortawesome/fontawesome-free/css/solid.css';
|
||||||
|
|
|
||||||
|
|
@ -370,9 +370,9 @@ function startMetaPoll(afterTime) {
|
||||||
const thisRequest = meta.currentRequest = $.ajax({
|
const thisRequest = meta.currentRequest = $.ajax({
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
url: `${API_BASE}/games${(afterTime === undefined) ? '' : `/poll/${afterTime}`}`,
|
url: `${API_BASE}/games${!afterTime ? '' : `/poll/${afterTime}`}`,
|
||||||
cache: false,
|
cache: false,
|
||||||
timeout: (afterTime === undefined) ? SHORT_TIMEOUT : LONG_TIMEOUT,
|
timeout: afterTime ? LONG_TIMEOUT : SHORT_TIMEOUT,
|
||||||
}).done((data, textStatus, jqXHR) => {
|
}).done((data, textStatus, jqXHR) => {
|
||||||
if (meta.currentRequest === thisRequest) {
|
if (meta.currentRequest === thisRequest) {
|
||||||
meta.currentRequest = null;
|
meta.currentRequest = null;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import deepEqual from 'deep-equal';
|
||||||
import 'webpack-jquery-ui/draggable';
|
import 'webpack-jquery-ui/draggable';
|
||||||
import 'webpack-jquery-ui/droppable';
|
import 'webpack-jquery-ui/droppable';
|
||||||
import 'webpack-jquery-ui/selectmenu';
|
import 'webpack-jquery-ui/selectmenu';
|
||||||
import 'webpack-jquery-ui/clip-effect';
|
import 'webpack-jquery-ui/fold-effect';
|
||||||
import 'webpack-jquery-ui/css';
|
import 'webpack-jquery-ui/css';
|
||||||
|
|
||||||
import 'jquery-ui-touch-punch';
|
import 'jquery-ui-touch-punch';
|
||||||
|
|
@ -780,8 +780,6 @@ $(function (){
|
||||||
$('#cb_dark_name').val(String(d.darkName || ''));
|
$('#cb_dark_name').val(String(d.darkName || ''));
|
||||||
|
|
||||||
$('#cb_board').data('modified', data.modified);
|
$('#cb_board').data('modified', data.modified);
|
||||||
|
|
||||||
updateSelectGameMeta(data, newId);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -1238,7 +1236,6 @@ $(function (){
|
||||||
|
|
||||||
var selectBoxIntervalID = undefined;
|
var selectBoxIntervalID = undefined;
|
||||||
var selectBox = new jBox('Modal', {
|
var selectBox = new jBox('Modal', {
|
||||||
title: '<h2>Recent Games</h2>',
|
|
||||||
content: gameSelectContent,
|
content: gameSelectContent,
|
||||||
blockScroll: false,
|
blockScroll: false,
|
||||||
blockScrollAdjust: false,
|
blockScrollAdjust: false,
|
||||||
|
|
@ -1308,6 +1305,11 @@ $(function (){
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateSelectGameMeta(data, gameId) {
|
function updateSelectGameMeta(data, gameId) {
|
||||||
|
data = Object.assign({}, data, {
|
||||||
|
gameId: gameId || data.gameId,
|
||||||
|
timestamp: data.timestamp || +new Date(),
|
||||||
|
});
|
||||||
|
|
||||||
if (typeof gameId !== 'string' || !gameId.match(/^[0-9a-f]{16}$/)) {
|
if (typeof gameId !== 'string' || !gameId.match(/^[0-9a-f]{16}$/)) {
|
||||||
debug('invalid game ID', gameId);
|
debug('invalid game ID', gameId);
|
||||||
return;
|
return;
|
||||||
|
|
@ -1317,11 +1319,10 @@ $(function (){
|
||||||
const oldTile = $('#game_tile_' + gameId).first();
|
const oldTile = $('#game_tile_' + gameId).first();
|
||||||
|
|
||||||
if (!data.lightName && !data.darkName && !data.moves && gameId !== currentGameId) {
|
if (!data.lightName && !data.darkName && !data.moves && gameId !== currentGameId) {
|
||||||
|
oldTile.removeAttr('id');
|
||||||
if (oldTile.length >= 1) {
|
if (oldTile.length >= 1) {
|
||||||
oldTile.removeAttr('id');
|
|
||||||
oldTile.hide({
|
oldTile.hide({
|
||||||
effect: "clip",
|
effect: "fold",
|
||||||
direction: "horizontal",
|
|
||||||
complete() {
|
complete() {
|
||||||
oldTile.remove();
|
oldTile.remove();
|
||||||
},
|
},
|
||||||
|
|
@ -1330,13 +1331,6 @@ $(function (){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oldTile.length && data.modified && oldTile.data('gameMeta').modified >= data.modified) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
data = Object.assign({ gameId, timestamp: +new Date(), modified: 0 }, data);
|
|
||||||
delete data.board;
|
|
||||||
|
|
||||||
const tile = oldTile.length ? oldTile :
|
const tile = oldTile.length ? oldTile :
|
||||||
$(`<div class="game-tile existing-game-tile"></div>`).hide();
|
$(`<div class="game-tile existing-game-tile"></div>`).hide();
|
||||||
tile.attr('id', 'game_tile_' + gameId).data('gameMeta', data).empty();
|
tile.attr('id', 'game_tile_' + gameId).data('gameMeta', data).empty();
|
||||||
|
|
@ -1386,10 +1380,7 @@ $(function (){
|
||||||
$(list).appendTo(gameTiles);
|
$(list).appendTo(gameTiles);
|
||||||
updateTileAges();
|
updateTileAges();
|
||||||
|
|
||||||
tile.show({
|
tile.show("fold");
|
||||||
effect: "clip",
|
|
||||||
direction: "horizontal",
|
|
||||||
});
|
|
||||||
|
|
||||||
selectBox.setContent(gameSelectContent);
|
selectBox.setContent(gameSelectContent);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
38
package.json
38
package.json
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "paco-sako",
|
"name": "paco-sako",
|
||||||
"version": "0.8.7",
|
"version": "0.8.2",
|
||||||
"description": "Online version of the Paco Ŝako chess variation",
|
"description": "Online version of the Paco Ŝako chess variation",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"game",
|
"game",
|
||||||
|
|
@ -32,34 +32,32 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@fortawesome/fontawesome-free": "^5.13.0",
|
"@fortawesome/fontawesome-free": "^5.13.0",
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^4.9.2",
|
||||||
"clean-webpack-plugin": "^4.0.0",
|
"clean-webpack-plugin": "^3.0.0",
|
||||||
"copy-webpack-plugin": "^6.4.1",
|
"copy-webpack-plugin": "^5.1.1",
|
||||||
"css-element-queries": "^1.2.3",
|
"css-element-queries": "^1.2.3",
|
||||||
"deep-equal": "git+https://jessemcdonald.info/gogs/nybble/node-deep-equal",
|
"deep-equal": "git+https://jessemcdonald.info/gogs/nybble/node-deep-equal",
|
||||||
"extract-loader": "^5.0.1",
|
"extract-loader": "^5.0.1",
|
||||||
"html-webpack-plugin": "^4.5.2",
|
"html-webpack-plugin": "^4.3.0",
|
||||||
"jbox": "^1.2.0",
|
"jbox": "^1.2.0",
|
||||||
"jquery-ui-touch-punch": "^0.2.3",
|
"jquery-ui-touch-punch": "^0.2.3",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
"mini-css-extract-plugin": "^1.6.2",
|
"mini-css-extract-plugin": "^0.9.0",
|
||||||
"optimize-css-assets-webpack-plugin": "^6.0.1",
|
"optimize-css-assets-webpack-plugin": "^5.0.3",
|
||||||
"pako": "^2.0.4",
|
"pako": "^1.0.11",
|
||||||
"sprintf-js": "^1.0.3",
|
"sprintf-js": "^1.0.3",
|
||||||
"svgo": "^2.7.0",
|
"svgo": "^1.3.2",
|
||||||
"svgo-loader": "^3.0.0",
|
"svgo-loader": "^2.2.1",
|
||||||
"webpack": "^4.46.0",
|
"webpack": "^4.43.0",
|
||||||
"webpack-cli": "^4.8.0",
|
"webpack-cli": "^3.3.11",
|
||||||
"webpack-jquery-ui": "^2.0.1",
|
"webpack-jquery-ui": "^2.0.1",
|
||||||
"workbox-precaching": "^6.3.0",
|
"workbox-precaching": "^5.1.3",
|
||||||
"workbox-routing": "^6.3.0",
|
"workbox-routing": "^5.1.3",
|
||||||
"workbox-strategies": "^6.3.0",
|
"workbox-strategies": "^5.1.3",
|
||||||
"workbox-webpack-plugin": "^6.3.0",
|
"workbox-webpack-plugin": "^5.1.3",
|
||||||
"workbox-window": "^6.3.0"
|
"workbox-window": "^5.1.3"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"paco-sako-server": "git+https://jessemcdonald.info/gogs/nybble/paco_sako_server"
|
|
||||||
},
|
},
|
||||||
|
"dependencies": {},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"paco-sako-server": "git+https://jessemcdonald.info/gogs/nybble/paco_sako_server"
|
"paco-sako-server": "git+https://jessemcdonald.info/gogs/nybble/paco_sako_server"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -52,14 +52,7 @@ module.exports = {
|
||||||
loader: "svgo-loader",
|
loader: "svgo-loader",
|
||||||
options: {
|
options: {
|
||||||
plugins: [
|
plugins: [
|
||||||
{
|
{ cleanupIDs: false }
|
||||||
name: "preset-default",
|
|
||||||
params: {
|
|
||||||
overrides: {
|
|
||||||
cleanupIDs: false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -95,11 +88,9 @@ module.exports = {
|
||||||
"window.jQuery": "jquery'",
|
"window.jQuery": "jquery'",
|
||||||
"window.$": "jquery"
|
"window.$": "jquery"
|
||||||
}),
|
}),
|
||||||
new CopyPlugin({
|
new CopyPlugin([
|
||||||
patterns: [
|
{ from: '.htaccess' },
|
||||||
{ from: '.htaccess' },
|
]),
|
||||||
],
|
|
||||||
}),
|
|
||||||
new InjectManifest({
|
new InjectManifest({
|
||||||
swSrc: './sw.js',
|
swSrc: './sw.js',
|
||||||
dontCacheBustURLsMatching: /\.[0-9a-f]{16,}\.\w{2,4}$/,
|
dontCacheBustURLsMatching: /\.[0-9a-f]{16,}\.\w{2,4}$/,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue