projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Draft game upload logic (unwritten yet for Analysis mode)
[vchess.git]
/
client
/
src
/
views
/
Game.vue
diff --git
a/client/src/views/Game.vue
b/client/src/views/Game.vue
index
b77f6b0
..
2a565f6
100644
(file)
--- a/
client/src/views/Game.vue
+++ b/
client/src/views/Game.vue
@@
-96,7
+96,7
@@
main
)
img(src="/images/icons/rematch.svg")
#playersInfo
)
img(src="/images/icons/rematch.svg")
#playersInfo
- p(v-if="
largeScreen
")
+ p(v-if="
isLargeScreen()
")
span.name(:class="{connected: isConnected(0)}")
| {{ game.players[0].name || "@nonymous" }}
span.time(
span.name(:class="{connected: isConnected(0)}")
| {{ game.players[0].name || "@nonymous" }}
span.time(
@@
-153,6
+153,7
@@
import BaseGame from "@/components/BaseGame.vue";
import Chat from "@/components/Chat.vue";
import { store } from "@/store";
import { GameStorage } from "@/utils/gameStorage";
import Chat from "@/components/Chat.vue";
import { store } from "@/store";
import { GameStorage } from "@/utils/gameStorage";
+import { ImportgameStorage } from "@/utils/importgameStorage";
import { ppt } from "@/utils/datetime";
import { notify } from "@/utils/notifications";
import { ajax } from "@/utils/ajax";
import { ppt } from "@/utils/datetime";
import { notify } from "@/utils/notifications";
import { ajax } from "@/utils/ajax";
@@
-284,6
+285,9
@@
export default {
}
this.send("losefocus");
},
}
this.send("losefocus");
},
+ isLargeScreen: function() {
+ return window.innerWidth >= 500;
+ },
participateInChat: function(p) {
return Object.keys(p.tmpIds).some(x => p.tmpIds[x].focus) && !!p.name;
},
participateInChat: function(p) {
return Object.keys(p.tmpIds).some(x => p.tmpIds[x].focus) && !!p.name;
},
@@
-1190,8
+1194,12
@@
export default {
}
}
);
}
}
);
- } else
- // Local game (or live remote)
+ }
+ else if (!!this.gameRef.match(/^I_/))
+ // Game import (maybe remote)
+ ImportgameStorage.get(this.gameRef, callback);
+ else
+ // Local live game (or remote)
GameStorage.get(this.gameRef, callback);
},
re_setClocks: function() {
GameStorage.get(this.gameRef, callback);
},
re_setClocks: function() {