townsquare/js/app.ef5ec1fc.js

2 lines
11 KiB
JavaScript
Raw Normal View History

(function(e){function t(t){for(var i,n,o=t[0],l=t[1],u=t[2],h=0,c=[];h<o.length;h++)n=o[h],Object.prototype.hasOwnProperty.call(a,n)&&a[n]&&c.push(a[n][0]),a[n]=0;for(i in l)Object.prototype.hasOwnProperty.call(l,i)&&(e[i]=l[i]);d&&d(t);while(c.length)c.shift()();return s.push.apply(s,u||[]),r()}function r(){for(var e,t=0;t<s.length;t++){for(var r=s[t],i=!0,o=1;o<r.length;o++){var l=r[o];0!==a[l]&&(i=!1)}i&&(s.splice(t--,1),e=n(n.s=r[0]))}return e}var i={},a={app:0},s=[];function n(t){if(i[t])return i[t].exports;var r=i[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=i,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/townsquare/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],l=o.push.bind(o);o.push=t,o=o.slice();for(var u=0;u<o.length;u++)t(o[u]);var d=l;s.push(["56d7","chunk-vendors"]),r()})({"22d7":function(e,t,r){"use strict";var i=r("be87"),a=r.n(i);a.a},3636:function(e,t,r){"use strict";var i=r("d4b2"),a=r.n(i);a.a},"56d7":function(e,t,r){"use strict";r.r(t);var i=r("2b0e"),a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{attrs:{id:"app"}},[r("TownSquare",{attrs:{"is-public":e.isPublic}}),r("div",{staticClass:"controls"},[r("button",{on:{click:e.togglePublic}},[e._v("Toggle")])])],1)},s=[],n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"square",class:{public:e.isPublic},attrs:{id:"townsquare"}},[r("ul",{staticClass:"circle",class:["size-"+e.players.length]},e._l(e.players,(function(t){return r("Player",{key:t.name,attrs:{player:t,roles:e.roles,"is-public":e.isPublic},on:{"add-reminder":e.openReminderModal}})})),1),r("Modal",{directives:[{name:"show",rawName:"v-show",value:e.availableReminders.length,expression:"availableReminders.length"}],on:{close:e.closeModal}},[r("ul",{staticClass:"reminders"},e._l(e.availableReminders,(function(t){return r("li",{staticClass:"reminder",class:[t.role],on:{click:function(r){return e.addReminder(t)}}},[e._v(" "+e._s(t.name)+" ")])})),0)])],1)},o=[],l=r("b1d9"),u=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("li",[r("div",{staticClass:"player",class:{dead:e.player.hasDied,"no-vote":e.player.hasVoted}},[r("div",{staticClass:"shroud",on:{click:function(t){return e.toggleStatus()}}}),r("div",{staticClass:"token",class:[e.player.role],on:{click:function(t){return e.changeRole()}}},[e.role.firstNight?r("span",{staticClass:"leaf-left"}):e._e(),e.role.otherNight?r("span",{staticClass:"leaf-right"}):e._e(),e.role.reminders.length?r("span",{class:["leaf-top"+e.role.reminders.length]}):e._e(),e.role.setup?r("span",{staticClass:"leaf-orange"}):e._e(),r("div",[e._v(e._s(e.role.name))])]),e.role.ability?r("div",{staticClass:"ability"},[e._v(e._s(e.role.ability))]):e._e(),r("div",{staticClass:"name"},[e._v(e._s(e.player.name))])]),e._l(e.player.reminders,(function(t){return e.player.reminders?r("div",{staticClass:"reminder",class:[t.role],on:{click:function(r){return e.removeReminder(t)}}},[e._v(e._s(t.name))]):e._e()})),r("div",{staticClass:"reminder add",on:{click:function(t){return e.$emit("add-reminder",e.player)}}})],2)},d=[],h={props:{player:{type:Object,required:!0},roles:{type:Map,required:!0},isPublic:{type:Boolean,required:!0}},data(){return{role:this.roles.get(this.player.role)||{reminders:[]}}},methods:{toggleStatus(){this.isPublic&&this.player.hasDied?this.$set(this.pl
//# sourceMappingURL=app.ef5ec1fc.js.map