diff --git a/CHANGELOG.md b/CHANGELOG.md index 690bf06..a400ff9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Release Notes +### Version 2.16.0 +- Add ability to use json from clipboard to upload script (by @alexanderfletcher) + +--- + ### Version 2.15.4 - fixed flickering of add reminder token - added redirect to Chinese version diff --git a/package-lock.json b/package-lock.json index 0007791..a42d989 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "townsquare", - "version": "2.15.4", + "version": "2.16.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f97d8c7..3073cb0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "townsquare", - "version": "2.15.4", + "version": "2.16.0", "description": "Blood on the Clocktower Town Square", "author": "Steffen Baumgart", "scripts": { diff --git a/src/components/modals/EditionModal.vue b/src/components/modals/EditionModal.vue index 02b2bd5..551b1af 100644 --- a/src/components/modals/EditionModal.vue +++ b/src/components/modals/EditionModal.vue @@ -69,6 +69,9 @@
+ @@ -156,6 +159,15 @@ export default { } } }, + async readFromClipboard() { + const text = await navigator.clipboard.readText(); + try { + const roles = JSON.parse(text); + this.parseRoles(roles); + } catch (e) { + alert("Error reading custom script: " + e.message); + } + }, parseRoles(roles) { if (!roles || !roles.length) return; const metaIndex = roles.findIndex(({ id }) => id === "_meta"); diff --git a/src/main.js b/src/main.js index 9d7af31..039a5cb 100644 --- a/src/main.js +++ b/src/main.js @@ -16,6 +16,7 @@ const faIcons = [ "CloudMoon", "Cog", "Copy", + "Clipboard", "Dice", "Dragon", "ExchangeAlt",