mirror of https://github.com/bra1n/townsquare.git
commit
4eca3f15db
|
@ -1,5 +1,10 @@
|
||||||
# Release Notes
|
# Release Notes
|
||||||
|
|
||||||
|
### Version 2.16.0
|
||||||
|
- Add ability to use json from clipboard to upload script (by @alexanderfletcher)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### Version 2.15.4
|
### Version 2.15.4
|
||||||
- fixed flickering of add reminder token
|
- fixed flickering of add reminder token
|
||||||
- added redirect to Chinese version
|
- added redirect to Chinese version
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "townsquare",
|
"name": "townsquare",
|
||||||
"version": "2.15.4",
|
"version": "2.16.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "townsquare",
|
"name": "townsquare",
|
||||||
"version": "2.15.4",
|
"version": "2.16.0",
|
||||||
"description": "Blood on the Clocktower Town Square",
|
"description": "Blood on the Clocktower Town Square",
|
||||||
"author": "Steffen Baumgart",
|
"author": "Steffen Baumgart",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -69,6 +69,9 @@
|
||||||
<div class="button" @click="promptURL">
|
<div class="button" @click="promptURL">
|
||||||
<font-awesome-icon icon="link" /> Enter URL
|
<font-awesome-icon icon="link" /> Enter URL
|
||||||
</div>
|
</div>
|
||||||
|
<div class="button" @click="readFromClipboard">
|
||||||
|
<font-awesome-icon icon="clipboard" /> Use JSON from Clipboard
|
||||||
|
</div>
|
||||||
<div class="button" @click="isCustom = false">
|
<div class="button" @click="isCustom = false">
|
||||||
<font-awesome-icon icon="undo" /> Back
|
<font-awesome-icon icon="undo" /> Back
|
||||||
</div>
|
</div>
|
||||||
|
@ -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) {
|
parseRoles(roles) {
|
||||||
if (!roles || !roles.length) return;
|
if (!roles || !roles.length) return;
|
||||||
const metaIndex = roles.findIndex(({ id }) => id === "_meta");
|
const metaIndex = roles.findIndex(({ id }) => id === "_meta");
|
||||||
|
|
|
@ -16,6 +16,7 @@ const faIcons = [
|
||||||
"CloudMoon",
|
"CloudMoon",
|
||||||
"Cog",
|
"Cog",
|
||||||
"Copy",
|
"Copy",
|
||||||
|
"Clipboard",
|
||||||
"Dice",
|
"Dice",
|
||||||
"Dragon",
|
"Dragon",
|
||||||
"ExchangeAlt",
|
"ExchangeAlt",
|
||||||
|
|
Loading…
Reference in New Issue