diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9608391..3c03df0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
# Release Notes
+### Version 2.8.0
+- added hands-off live session support for homebrew / custom characters again!
+- added custom image opt-in that will prevent any (potentially malicious / harmful) images from loading until a player manually allows them to
+
+---
+
## Version 2.7.0
- added support for assigning duplicate characters to more than one player (like Legion)
- further live session bandwidth optimizations
diff --git a/package-lock.json b/package-lock.json
index 6f4d63e..6f53472 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "townsquare",
- "version": "2.7.0",
+ "version": "2.8.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index abbaeff..8eabedb 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "townsquare",
- "version": "2.7.0",
+ "version": "2.8.0",
"description": "Blood on the Clocktower Town Square",
"author": "Steffen Baumgart",
"scripts": {
diff --git a/src/assets/icons/minion.png b/src/assets/icons/minion.png
new file mode 100644
index 0000000..ef0ccb1
Binary files /dev/null and b/src/assets/icons/minion.png differ
diff --git a/src/assets/icons/outsider.png b/src/assets/icons/outsider.png
new file mode 100644
index 0000000..71b7a58
Binary files /dev/null and b/src/assets/icons/outsider.png differ
diff --git a/src/components/Menu.vue b/src/components/Menu.vue
index 5160305..fa46beb 100644
--- a/src/components/Menu.vue
+++ b/src/components/Menu.vue
@@ -69,11 +69,21 @@
/>
+
+ Show Custom Images
+
+
Background image
-
+
Mute Sounds
+
{{ session.isSpectator ? "Playing" : "Hosting" }}
Live Session
-
- Host (Storyteller)[H]
-
-
- Join (Player)[J]
-
-
- Delay to {{ session.isSpectator ? "host" : "players" }}
- {{ session.ping }}ms
-
-
- Copy player link
-
-
-
- Send Characters
-
-
-
- Nomination history[V]
-
-
- Leave Session
- {{ session.sessionId }}
-
+
+ Host (Storyteller)[H]
+ Join (Player)[J]
+
+
+
+ Delay to {{ session.isSpectator ? "host" : "players" }}
+ {{ session.ping }}ms
+
+
+ Copy player link
+
+
+
+ Send Characters
+
+
+
+ Nomination history[V]
+
+
+ Leave Session
+ {{ session.sessionId }}
+
+
@@ -203,7 +214,7 @@ import { mapMutations, mapState } from "vuex";
export default {
computed: {
- ...mapState(["grimoire", "session"]),
+ ...mapState(["grimoire", "session", "edition"]),
...mapState("players", ["players"])
},
data() {
@@ -218,9 +229,6 @@ export default {
this.$store.commit("setBackground", background);
}
},
- toggleMute() {
- this.$store.commit("setIsMuted", !this.grimoire.isMuted);
- },
hostSession() {
if (this.session.sessionId) return;
const sessionId = prompt(
@@ -253,6 +261,13 @@ export default {
);
}
},
+ imageOptIn() {
+ const popup =
+ "Are you sure you want to allow custom images? A malicious script file author might track your IP address this way.";
+ if (this.grimoire.isImageOptIn || confirm(popup)) {
+ this.toggleImageOptIn();
+ }
+ },
joinSession() {
if (this.session.sessionId) return this.leaveSession();
let sessionId = prompt(
@@ -302,6 +317,8 @@ export default {
...mapMutations([
"toggleGrimoire",
"toggleMenu",
+ "toggleImageOptIn",
+ "toggleMuted",
"toggleNight",
"toggleNightOrder",
"setZoom",
diff --git a/src/components/Player.vue b/src/components/Player.vue
index 91f8f5a..4068144 100644
--- a/src/components/Player.vue
+++ b/src/components/Player.vue
@@ -23,7 +23,7 @@
>
{{ nightOrder.get(player).first }}.
{{
- player.role.firstNightReminder | handleEmojis
+ player.role.firstNightReminder
}}
{{ nightOrder.get(player).other }}.
{{
- player.role.otherNightReminder | handleEmojis
+ player.role.otherNightReminder
}}
@@ -165,8 +165,13 @@
{{ reminder.name }}
@@ -226,9 +231,6 @@ export default {
isSwap: false
};
},
- filters: {
- handleEmojis: text => text.replace(/:([^: ]+?):/g, "").replace(/ •/g, "\n•")
- },
methods: {
toggleStatus() {
if (this.grimoire.isPublic) {
diff --git a/src/components/Token.vue b/src/components/Token.vue
index a08fd50..147a315 100644
--- a/src/components/Token.vue
+++ b/src/components/Token.vue
@@ -4,8 +4,11 @@
class="icon"
v-if="role.id"
:style="{
- backgroundImage: `url(${role.image ||
- require('../assets/icons/' + role.id + '.png')})`
+ backgroundImage: `url(${
+ role.image && grimoire.isImageOptIn
+ ? role.image
+ : require('../assets/icons/' + (role.imageAlt || role.id) + '.png')
+ })`
}"
>