Skip to content

Commit

Permalink
v3.0.1
Browse files Browse the repository at this point in the history
- Require confirmation before closing a game
- Documentation  updates
- Dependency updates
- Bug fixes
  • Loading branch information
Craig Laparo committed Dec 15, 2019
2 parents 25b9390 + 062a559 commit 28323f2
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 12 deletions.
13 changes: 9 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"axios": "^0.19.0",
"diff-match-patch": "^1.0.4",
"firebase-functions": "^3.3.0",
"firebase-tools": "^7.9.0",
"firebase-tools": "^7.10.0",
"lodash": "^4.17.14",
"lz-string": "^1.4.4",
"marray": "^1.1.6",
Expand Down
1 change: 1 addition & 0 deletions quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ module.exports = function(ctx) {
"AddressbarColor",
"AppFullscreen",
"BottomSheet",
"Dialog",
"Loading",
"LocalStorage",
"Notify"
Expand Down
21 changes: 20 additions & 1 deletion src/components/controls/GameSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,26 @@ export default {
}
},
close(index) {
this.$store.dispatch("REMOVE_GAME", index);
this.$q
.dialog({
title: this.$t("Confirm"),
message: this.$t("confirm.close", this.$store.state.games[index]),
persistent: true,
ok: {
label: this.$t("OK"),
flat: true,
color: "accent"
},
cancel: {
label: this.$t("Cancel"),
flat: true,
color: "accent"
},
class: "bg-secondary"
})
.onOk(() => {
this.$store.dispatch("REMOVE_GAME", index);
});
},
edit() {
this.$emit("edit");
Expand Down
5 changes: 5 additions & 0 deletions src/i18n/en-us/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default {
Clock: "Clock",
Close: "Close",
"Coming soon": "Coming soon!",
Confirm: "Confirm",
Copy: "Copy",
"Copy PTN": "Copy PTN",
"Copy Link": "Copy Link",
Expand Down Expand Up @@ -122,6 +123,10 @@ export default {
tie: "It's a tie"
},

confirm: {
close: "Are you sure you want to close the game '{name}'?"
},

error: {
"Branch already exists": "Branch already exists",
"Invalid branch": "Invalid branch",
Expand Down
17 changes: 12 additions & 5 deletions src/i18n/en-us/usage.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
Getting Started
===
::: tip
To **right-click** on most touchscreen devices, **long-press**.
:::

### Load a Game
PTN Ninja can load games from URLs generated from [PlayTak](https://www.playtak.com/games) or PTN Ninja itself. Loaded games are stored in the browser until closed via the game selector.
- **Click** the "+" button in the main menu to create a new game or load an existing game.
### Games
PTN Ninja can store multiple games to allow easy switching between them via the Game Selector. Loaded games are stored in the browser until closed from the Game Selector. You're responsible for closing games you no longer need. Be careful when closing a game; there's no way to un-close a game!

You can load games from .ptn or .txt files, or from URLs generated from [PlayTak](https://www.playtak.com/games) or PTN Ninja itself.
- To create a new game, **click** the "+" button in the main menu to open the New Game dialog.
- To load an existing game, **click** the "+" button in the main menu, then select the Load Game tab.
- Or, **drag** one or more .ptn or .txt files into the window.

### Playback
Expand Down Expand Up @@ -49,8 +55,9 @@ Notes

TPS Mode
---
TPS Mode enables you to create any board state directly. Enter TPS Mode by **clicking** the Edit button in the TPS field of the Edit Game dialog.
- TPS edit mode is available only for games with no plies.
TPS Mode enables you to create any board state directly. Enter TPS Mode by **clicking** the Edit button in the TPS field of the Edit Game dialog. TPS edit mode is available only for games with no plies.
- Select a piece type and color from the piece selector, then **click** a square to place a piece.
- **Right-click** a square to remove a piece. The color and type of that piece will be selected.

3D Mode
---
Expand Down
2 changes: 1 addition & 1 deletion src/store/ui/getters.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const url = state => (game, options = {}) => {
url +=
"&" +
Object.keys(params)
.map(key => key + "=" + params[key])
.map(key => key + "=" + encodeURIComponent(params[key]))
.join("&");
}
return url;
Expand Down

0 comments on commit 28323f2

Please sign in to comment.