From 729869df51ff7509a99d8b91da44875e0195415e Mon Sep 17 00:00:00 2001 From: Alexander Fletcher Date: Mon, 30 May 2022 19:40:40 +0800 Subject: [PATCH 1/3] Add ability to use json from clipboard to upload script --- src/components/modals/EditionModal.vue | 12 ++++++++++++ src/main.js | 1 + 2 files changed, 13 insertions(+) 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 @@
Enter URL
+
+ Use JSON from Clipboard +
Back
@@ -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", From 2a66dfff4b33e4d56dc490086e4e2e33d982e03c Mon Sep 17 00:00:00 2001 From: Steffen Date: Tue, 14 Jun 2022 14:56:44 +0200 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) 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 From f98b43e304696d2931874d47d45a26650bd3fa72 Mon Sep 17 00:00:00 2001 From: Steffen Date: Tue, 14 Jun 2022 14:56:50 +0200 Subject: [PATCH 3/3] 2.16.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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": {