mirror of
https://github.com/eugene-serb/wavelovers.git
synced 2023-09-09 23:41:16 +03:00
2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
|
(function(){"use strict";var t={3935:function(t,e,n){var a=n(9242),i=n(3396);const r={class:"wavelovers"},s=(0,i.Uk)("Press any gamepad button or connect a new gamepad to vibrate.");function o(t,e,n,a,o,c){const u=(0,i.up)("NavigationList"),d=(0,i.up)("router-view"),p=(0,i.up)("GamepadList"),m=(0,i.up)("MessageItem");return(0,i.wg)(),(0,i.iD)("div",r,[(0,i.Wm)(u),(0,i.Wm)(d),t.gamepads.length>0?((0,i.wg)(),(0,i.j4)(p,{key:0,gamepads:t.gamepads},null,8,["gamepads"])):((0,i.wg)(),(0,i.j4)(m,{key:1},{default:(0,i.w5)((()=>[s])),_:1}))])}var c=n(1746);const u={class:"content-item navigation-list"},d=(0,i.Uk)("Manual"),p=(0,i.Uk)("Patterns");function m(t,e,n,a,r,s){const o=(0,i.up)("router-link");return(0,i.wg)(),(0,i.iD)("div",u,[(0,i.Wm)(o,{to:"/manual",class:"navigation-item"},{default:(0,i.w5)((()=>[d])),_:1}),(0,i.Wm)(o,{to:"/",class:"navigation-item"},{default:(0,i.w5)((()=>[p])),_:1})])}var l=(0,i.aZ)({name:"NavigationList"}),f=n(89);const v=(0,f.Z)(l,[["render",m]]);var g=v,h=n(7139);const w={class:"content-item device-list"};function b(t,e,n,a,r,s){const o=(0,i.up)("GamepadItem");return(0,i.wg)(),(0,i.iD)("div",w,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t.gamepads,(t=>((0,i.wg)(),(0,i.j4)(o,{key:t.id,textContent:(0,h.zw)(t.unit.id)},null,8,["textContent"])))),128))])}const y={class:"list-item"};function A(t,e,n,a,r,s){return(0,i.wg)(),(0,i.iD)("div",y)}var Z=(0,i.aZ)({name:"GamepadItem"});const C=(0,f.Z)(Z,[["render",A]]);var k=C,P=(0,i.aZ)({name:"GamepadList",props:{gamepads:{type:Array}},components:{GamepadItem:k}});const _=(0,f.Z)(P,[["render",b]]);var E=_;const L={class:"content-item message"};function j(t,e,n,a,r,s){return(0,i.wg)(),(0,i.iD)("div",L,[(0,i._)("span",null,[(0,i.WI)(t.$slots,"default")])])}var I=(0,i.aZ)({name:"MessageItem"});const x=(0,f.Z)(I,[["render",j]]);var G=x,M=(0,i.aZ)({name:"App",components:{NavigationList:g,GamepadList:E,MessageItem:G},computed:{gamepads:function(){return c.Z.getters.gamepads}},methods:{addEventListeners(){window.addEventListener("gamepadconnected",(t=>c.Z.dispatch("addGamepad",t))),window.addEventListener("gamepaddisconnected",(t=>c.Z.dispatch("deleteGamepad",t)))},removeEventListeners(){window.removeEventListener("gamepadconnected",(t=>c.Z.dispatch("addGamepad",t))),window.removeEventListener("gamepaddisconnected",(t=>c.Z.dispatch("deleteGamepad",t)))}},mounted(){this.addEventListeners()},unmounted(){this.removeEventListeners()}});const O=(0,f.Z)(M,[["render",o]]);var D=O,N=n(2483);function T(t,e,n,a,r,s){const o=(0,i.up)("AppPatterns");return(0,i.wg)(),(0,i.j4)(o)}const S={class:"app-patterns"},V=(0,i.Uk)("Loading...");function B(t,e,n,a,r,s){const o=(0,i.up)("PatternList"),c=(0,i.up)("MessageItem");return(0,i.wg)(),(0,i.iD)("div",S,[t.patterns.length>0?((0,i.wg)(),(0,i.j4)(o,{key:0,patterns:t.patterns,mode:t.mode,isActive:t.isActive,onChange:t.change},null,8,["patterns","mode","isActive","onChange"])):((0,i.wg)(),(0,i.j4)(c,{key:1},{default:(0,i.w5)((()=>[V])),_:1}))])}const U={class:"content-item pattern-list"};function W(t,e,n,a,r,s){const o=(0,i.up)("PatternItem");return(0,i.wg)(),(0,i.iD)("div",U,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t.patterns,((e,n)=>((0,i.wg)(),(0,i.j4)(o,{key:e.name,pattern:e,index:n,mode:t.mode,isActive:t.isActive,onChange:t.change},null,8,["pattern","index","mode","isActive","onChange"])))),128))])}const z=["textContent"],F={class:"pattern-item__info-container"},H=["textContent"],K=["textContent"];function $(t,e,n,a,r,s){return(0,i.wg)(),(0,i.iD)("div",{onClick:e[0]||(e[0]=e=>t.change(t.index)),class:(0,h.C_)(["pattern-item",t.index===t.mode&&!0===t.isActive?"pattern-item_selected":""])},[(0,i._)("span",{class:"pattern-item__icon",textContent:(0,h.zw)(t.pattern.icon)},null,8,z),(0,i._)("div",F,[(0,i._)("span",{class:"pattern-item__name",textContent:(0,h.zw)(t.pattern.name)},null,8,H),(0,i._)("span",{class:"pattern-item__type",textContent:(0,h.zw)(t.pattern.type)},null,8,K)])],2)}var q=(0,i.aZ)({name:"PatternItem",props:{pattern:{type:Object},index:{type:Number},mode:{type:Number},isActive:{type:Boolean}},methods:{change:function(t){
|
||
|
//# sourceMappingURL=app.f79bb7b6.js.map
|