forked from platypush/platypush
[Automatic] Updated UI files
This commit is contained in:
parent
b1b51b4b7e
commit
cf813e4197
31 changed files with 24 additions and 25 deletions
|
@ -1 +1 @@
|
|||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><!--[if IE]><link rel="icon" href="/favicon.ico"><![endif]--><link rel="stylesheet" href="/fonts/poppins.css"><title>platypush</title><script defer="defer" src="/static/js/chunk-vendors.05911ac4.js"></script><script defer="defer" src="/static/js/app.be593e21.js"></script><link href="/static/css/chunk-vendors.d510eff2.css" rel="stylesheet"><link href="/static/css/app.21f0b7e0.css" rel="stylesheet"><link rel="icon" type="image/svg+xml" href="/img/icons/favicon.svg"><link rel="icon" type="image/png" sizes="32x32" href="/img/icons/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/img/icons/favicon-16x16.png"><link rel="manifest" href="/manifest.json"><meta name="theme-color" content="#ffffff"><meta name="apple-mobile-web-app-capable" content="no"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="Platypush"><link rel="apple-touch-icon" href="/img/icons/apple-touch-icon-152x152.png"><link rel="mask-icon" href="/img/icons/safari-pinned-tab.svg" color="#ffffff"><meta name="msapplication-TileImage" content="/img/icons/msapplication-icon-144x144.png"><meta name="msapplication-TileColor" content="#000000"></head><body><noscript><strong>We're sorry but platypush doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><!--[if IE]><link rel="icon" href="/favicon.ico"><![endif]--><link rel="stylesheet" href="/fonts/poppins.css"><title>platypush</title><script defer="defer" src="/static/js/chunk-vendors.05911ac4.js"></script><script defer="defer" src="/static/js/app.47aad9f7.js"></script><link href="/static/css/chunk-vendors.d510eff2.css" rel="stylesheet"><link href="/static/css/app.81a70139.css" rel="stylesheet"><link rel="icon" type="image/svg+xml" href="/img/icons/favicon.svg"><link rel="icon" type="image/png" sizes="32x32" href="/img/icons/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/img/icons/favicon-16x16.png"><link rel="manifest" href="/manifest.json"><meta name="theme-color" content="#ffffff"><meta name="apple-mobile-web-app-capable" content="no"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="Platypush"><link rel="apple-touch-icon" href="/img/icons/apple-touch-icon-152x152.png"><link rel="mask-icon" href="/img/icons/safari-pinned-tab.svg" color="#ffffff"><meta name="msapplication-TileImage" content="/img/icons/msapplication-icon-144x144.png"><meta name="msapplication-TileColor" content="#000000"></head><body><noscript><strong>We're sorry but platypush doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/css/2063.8c9e97f8.css
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/css/2063.8c9e97f8.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/app.47aad9f7.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/app.47aad9f7.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/app.47aad9f7.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/app.47aad9f7.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,2 +0,0 @@
|
|||
(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[9966],{6791:function(e,s,t){"use strict";t.d(s,{Z:function(){return c}});var n=t(6252);const r={class:"loading"},a={class:"icon"};function o(e,s){return(0,n.wg)(),(0,n.iD)("div",r,[(0,n._)("div",a,[((0,n.wg)(),(0,n.iD)(n.HY,null,(0,n.Ko)(4,(e=>(0,n._)("div",{key:e}))),64))])])}var d=t(3744);const l={},i=(0,d.Z)(l,[["render",o],["__scopeId","data-v-4d9c871b"]]);var c=i},8332:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return _}});var n=t(6252),r=t(3577);function a(e,s,t,a,o,d){const l=(0,n.up)("Loading"),i=(0,n.up)("Widget"),c=(0,n.up)("Row");return(0,n.wg)(),(0,n.iD)(n.HY,null,[o.loading?((0,n.wg)(),(0,n.j4)(l,{key:0})):(0,n.kq)("",!0),(0,n._)("div",{id:"dashboard",class:(0,r.C_)(["col-12",d.classes]),style:(0,r.j5)(o.style)},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(o.rows,((e,s)=>((0,n.wg)(),(0,n.j4)(c,{key:s,class:(0,r.C_)(e.class),style:(0,r.j5)(e.style)},{default:(0,n.w5)((()=>[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.widgets,((e,s)=>((0,n.wg)(),(0,n.j4)(n.Ob,{key:s},[(0,n.Wm)(i,{style:(0,r.j5)(e.style),class:(0,r.C_)(e.class)},{default:(0,n.w5)((()=>[((0,n.wg)(),(0,n.j4)((0,n.LL)(e.component),(0,n.dG)({ref_for:!0},d.getWidgetProps(e)),null,16))])),_:2},1032,["style","class"])],1024)))),128))])),_:2},1032,["class","style"])))),128))],6)],64)}var o=t(2262),d=t(8637),l=t(6791);function i(e,s,t,a,o,d){return(0,n.wg)(),(0,n.iD)("div",{class:(0,r.C_)(["row",d.classes]),style:(0,r.j5)(t.style)},[(0,n.WI)(e.$slots,"default",{},void 0,!0)],6)}var c={name:"Row",props:{class:{type:String,required:!1,default:""},style:{type:String,required:!1,default:""}},computed:{classes(){return this.class}}},u=t(3744);const p=(0,u.Z)(c,[["render",i],["__scopeId","data-v-1b4663f2"]]);var h=p;function f(e,s,t,a,o,d){return(0,n.wg)(),(0,n.iD)("div",{style:(0,r.j5)(t.style),class:(0,r.C_)(d.classes)},[(0,n.WI)(e.$slots,"default",{},void 0,!0)],6)}var g={name:"Widget",props:{style:{type:String,required:!1,default:""},class:{type:String,required:!1,default:""}},computed:{classes(){return(this.class?.length?this.class.split(" "):["col-3"]).concat(["widget","column"])}}};const m=(0,u.Z)(g,[["render",f],["__scopeId","data-v-5df52982"]]);var y=m,w={name:"Dashboard",mixins:[d.Z],components:{Widget:y,Loading:l.Z,Row:h},props:{refreshSeconds:{type:Number,required:!1,default:0}},data(){return{rows:[],loading:!1,style:void 0,class:void 0}},computed:{classes(){return this.class},_refreshSeconds(){return parseFloat(this.refreshSeconds)||0}},methods:{getWidgetProps(e){const s={...e.props};return s.class&&delete s.class,s},parseTemplate(e){const s=(new DOMParser).parseFromString(e,"text/xml").childNodes[0],r=this;this.style=s.attributes.style?.nodeValue,this.class=s.attributes.class?.nodeValue,this.rows=[...s.getElementsByTagName("Row")].map((e=>({style:e.attributes.style?.nodeValue,class:e.attributes.class?.nodeValue,widgets:[...e.children].map((e=>{const s=(0,o.XI)((0,n.RC)((()=>t(6725)(`./${e.nodeName}/Index`)))),a=e.attributes.style?.nodeValue,d=e.attributes.class?.nodeValue,l=[...e.attributes].reduce(((e,s)=>("style"!==s.nodeName&&(e[s.nodeName]=s.nodeValue),e)),{content:e.innerHTML}),i={component:s,style:a,class:d,props:l||{}};return r.$options.components[e.nodeName]=s,i}))}))),this.loading=!1},async refreshDashboard(){this.loading=!0,this.widgets=[];const e=this.$route.params.name,s=await this.request("config.get_dashboard",{name:e});s||this.notifyError(`Dashboard ${e} not found`),this.parseTemplate(s)}},mounted(){if(this.refreshDashboard(),this._refreshSeconds){const e=this;setInterval((()=>{e.refreshDashboard()}),parseInt((1e3*this._refreshSeconds).toFixed(0)))}}};const v=(0,u.Z)(w,[["render",a],["__scopeId","data-v-462fad8c"]]);var _=v},6725:function(e,s,t){var n={"./Calendar/Index":[5638,5638],"./Camera/Index":[446,446],"./Component/Index":[1449,7651,2844,1449],"./DateTime/Index":[4619,1391,4619],"./DateTimeWeather/Index":[9962,9211,1391,9962],"./ImageCarousel/Index":[2140,9211,1391,2140],"./Music/Index":[7841,7651,906,7841],"./Plugin/Index":[8179,8179],"./RssNews/Index":[6523,6523],"./Weather/Index":[9211,9211]};function r(e){if(!t.o(n,e))return Promise.resolve().then((function(){var s=new Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}));var s=n[e],r=s[0];return Promise.all(s.slice(1).map(t.e)).then((function(){return t(r)}))}r.keys=function(){return Object.keys(n)},r.id=6725,e.exports=r}}]);
|
||||
//# sourceMappingURL=dashboard.3b1ddc55.js.map
|
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/dashboard.8eaf2de4.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/dashboard.8eaf2de4.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[9966],{8332:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return _}});var a=t(6252),r=t(3577);function n(e,s,t,n,o,l){const d=(0,a.up)("Loading"),i=(0,a.up)("Widget"),c=(0,a.up)("Row");return(0,a.wg)(),(0,a.iD)(a.HY,null,[o.loading?((0,a.wg)(),(0,a.j4)(d,{key:0})):(0,a.kq)("",!0),(0,a._)("div",{id:"dashboard",class:(0,r.C_)(["col-12",l.classes]),style:(0,r.j5)(o.style)},[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(o.rows,((e,s)=>((0,a.wg)(),(0,a.j4)(c,{key:s,class:(0,r.C_)(e.class),style:(0,r.j5)(e.style)},{default:(0,a.w5)((()=>[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.widgets,((e,s)=>((0,a.wg)(),(0,a.j4)(a.Ob,{key:s},[(0,a.Wm)(i,{style:(0,r.j5)(e.style),class:(0,r.C_)(e.class)},{default:(0,a.w5)((()=>[((0,a.wg)(),(0,a.j4)((0,a.LL)(e.component),(0,a.dG)({ref_for:!0},l.getWidgetProps(e)),null,16))])),_:2},1032,["style","class"])],1024)))),128))])),_:2},1032,["class","style"])))),128))],6)],64)}var o=t(2262),l=t(8637),d=t(6791);function i(e,s,t,n,o,l){return(0,a.wg)(),(0,a.iD)("div",{class:(0,r.C_)(["row",l.classes]),style:(0,r.j5)(t.style)},[(0,a.WI)(e.$slots,"default",{},void 0,!0)],6)}var c={name:"Row",props:{class:{type:String,required:!1,default:""},style:{type:String,required:!1,default:""}},computed:{classes(){return this.class}}},u=t(3744);const p=(0,u.Z)(c,[["render",i],["__scopeId","data-v-1b4663f2"]]);var h=p;function f(e,s,t,n,o,l){return(0,a.wg)(),(0,a.iD)("div",{style:(0,r.j5)(t.style),class:(0,r.C_)(l.classes)},[(0,a.WI)(e.$slots,"default",{},void 0,!0)],6)}var m={name:"Widget",props:{style:{type:String,required:!1,default:""},class:{type:String,required:!1,default:""}},computed:{classes(){return(this.class?.length?this.class.split(" "):["col-3"]).concat(["widget","column"])}}};const g=(0,u.Z)(m,[["render",f],["__scopeId","data-v-5df52982"]]);var y=g,w={name:"Dashboard",mixins:[l.Z],components:{Widget:y,Loading:d.Z,Row:h},props:{refreshSeconds:{type:Number,required:!1,default:0}},data(){return{rows:[],loading:!1,style:void 0,class:void 0}},computed:{classes(){return this.class},_refreshSeconds(){return parseFloat(this.refreshSeconds)||0}},methods:{getWidgetProps(e){const s={...e.props};return s.class&&delete s.class,s},parseTemplate(e){const s=(new DOMParser).parseFromString(e,"text/xml").childNodes[0],r=this;this.style=s.attributes.style?.nodeValue,this.class=s.attributes.class?.nodeValue,this.rows=[...s.getElementsByTagName("Row")].map((e=>({style:e.attributes.style?.nodeValue,class:e.attributes.class?.nodeValue,widgets:[...e.children].map((e=>{const s=(0,o.XI)((0,a.RC)((()=>t(6725)(`./${e.nodeName}/Index`)))),n=e.attributes.style?.nodeValue,l=e.attributes.class?.nodeValue,d=[...e.attributes].reduce(((e,s)=>("style"!==s.nodeName&&(e[s.nodeName]=s.nodeValue),e)),{content:e.innerHTML}),i={component:s,style:n,class:l,props:d||{}};return r.$options.components[e.nodeName]=s,i}))}))),this.loading=!1},async refreshDashboard(){this.loading=!0,this.widgets=[];const e=this.$route.params.name,s=await this.request("config.get_dashboard",{name:e});s||this.notifyError(`Dashboard ${e} not found`),this.parseTemplate(s)}},mounted(){if(this.refreshDashboard(),this._refreshSeconds){const e=this;setInterval((()=>{e.refreshDashboard()}),parseInt((1e3*this._refreshSeconds).toFixed(0)))}}};const v=(0,u.Z)(w,[["render",n],["__scopeId","data-v-462fad8c"]]);var _=v},6725:function(e,s,t){var a={"./Calendar/Index":[5638,5638],"./Camera/Index":[446,446],"./Component/Index":[1449,7651,2844,1449],"./DateTime/Index":[4619,1391,4619],"./DateTimeWeather/Index":[9962,9211,1391,9962],"./ImageCarousel/Index":[2140,9211,1391,2140],"./Music/Index":[7841,7651,906,7841],"./Plugin/Index":[8179,8179],"./RssNews/Index":[6523,6523],"./Weather/Index":[9211,9211]};function r(e){if(!t.o(a,e))return Promise.resolve().then((function(){var s=new Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}));var s=a[e],r=s[0];return Promise.all(s.slice(1).map(t.e)).then((function(){return t(r)}))}r.keys=function(){return Object.keys(a)},r.id=6725,e.exports=r}}]);
|
||||
//# sourceMappingURL=dashboard.8eaf2de4.js.map
|
1
platypush/backend/http/webapp/dist/static/js/dashboard.8eaf2de4.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/dashboard.8eaf2de4.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/login.2645d0f5.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/login.2645d0f5.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[4535],{8925:function(e,t,s){s.r(t),s.d(t,{default:function(){return q}});var r=s(6252),a=s(3577);const i=e=>((0,r.dD)("data-v-f5e7f974"),e=e(),(0,r.Cn)(),e),n={key:1,class:"login-container"},o=i((()=>(0,r._)("div",{class:"header"},[(0,r._)("span",{class:"logo"},[(0,r._)("img",{src:"/logo.svg",alt:"logo"})]),(0,r._)("span",{class:"text"},"Platypush")],-1))),l={class:"row"},c=["disabled"],d={class:"row"},u=["disabled"],h={key:0,class:"row"},p=["disabled"],g={class:"row buttons"},m=["disabled"],w=i((()=>(0,r._)("div",{class:"row pull-right"},[(0,r._)("label",{class:"checkbox"},[(0,r._)("input",{type:"checkbox",name:"remember"}),(0,r.Uk)(" Keep me logged in on this device ")])],-1))),_={key:1,class:"auth-error"};function b(e,t,s,i,b,y){const k=(0,r.up)("Loading");return b.initialized?((0,r.wg)(),(0,r.iD)("div",n,[b.isAuthenticated?(0,r.kq)("",!0):((0,r.wg)(),(0,r.iD)("form",{key:0,class:"login",method:"POST",onSubmit:t[0]||(t[0]=(...e)=>y.submitForm&&y.submitForm(...e))},[o,(0,r._)("div",l,[(0,r._)("label",null,[(0,r._)("input",{type:"text",name:"username",disabled:b.authenticating,placeholder:"Username",ref:"username"},null,8,c)])]),(0,r._)("div",d,[(0,r._)("label",null,[(0,r._)("input",{type:"password",name:"password",disabled:b.authenticating,placeholder:"Password"},null,8,u)])]),s.register?((0,r.wg)(),(0,r.iD)("div",h,[(0,r._)("label",null,[(0,r._)("input",{type:"password",name:"confirm_password",disabled:b.authenticating,placeholder:"Confirm password"},null,8,p)])])):(0,r.kq)("",!0),(0,r._)("div",g,[(0,r._)("button",{type:"submit",class:(0,a.C_)(["btn btn-primary",{loading:b.authenticating}]),disabled:b.authenticating},[b.authenticating?((0,r.wg)(),(0,r.j4)(k,{key:0})):(0,r.kq)("",!0),(0,r.Uk)(" "+(0,a.zw)(s.register?"Register":"Login"),1)],10,m)]),w,b.authError?((0,r.wg)(),(0,r.iD)("div",_,(0,a.zw)(b.authError),1)):(0,r.kq)("",!0)],32))])):((0,r.wg)(),(0,r.j4)(k,{key:0}))}var y=s(6791),k=s(8637),f=s(7066),v={name:"Login",mixins:[k.Z],components:{Loading:y.Z},props:{register:{type:Boolean,required:!1,default:!1}},computed:{redirect(){return this.$route.query.redirect?.length?this.$route.query.redirect:"/"}},data(){return{authError:null,authenticating:!1,isAuthenticated:!1,initialized:!1}},methods:{async submitForm(e){e.preventDefault();const t=e.target,s=new FormData(t),r="/auth?type="+(this.register?"register":"login");if(this.register&&s.get("password")!==s.get("confirm_password"))this.authError="Passwords don't match";else{this.authError=null;try{const e=await f.Z.post(r,s),t=e?.data?.session_token;if(t){const s=e.expires_at?Date.parse(e.expires_at):null;this.isAuthenticated=!0,this.setCookie("session_token",t,{expires:s}),window.location.href=e.redirect||this.redirect}else this.authError="Invalid credentials"}catch(e){this.authError=e.response.data.message||e.response.data.error,401===e.response?.status?this.authError=this.authError||"Invalid credentials":(this.authError=this.authError||"An error occurred while processing the request",e.response?console.error(e.response.status,e.response.data):console.error(e))}}},async checkAuth(){try{const e=await f.Z.get("/auth");e.data.session_token&&(this.isAuthenticated=!0,window.location.href=e.redirect||this.redirect)}catch(e){this.isAuthenticated=!1}finally{this.initialized=!0}}},async created(){await this.checkAuth()},async mounted(){this.$nextTick((()=>{this.$refs.username?.focus()}))}},E=s(3744);const x=(0,E.Z)(v,[["render",b],["__scopeId","data-v-f5e7f974"]]);var q=x}}]);
|
||||
//# sourceMappingURL=login.2645d0f5.js.map
|
1
platypush/backend/http/webapp/dist/static/js/login.2645d0f5.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/login.2645d0f5.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,2 +0,0 @@
|
|||
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[4535],{1918:function(a,e,s){s.r(e),s.d(e,{default:function(){return w}});var t=s(6252);const d=a=>((0,t.dD)("data-v-af0b14d0"),a=a(),(0,t.Cn)(),a),r={class:"login-container"},l={class:"login",method:"POST"},n=(0,t.uE)('<div class="header" data-v-af0b14d0><span class="logo" data-v-af0b14d0><img src="/logo.svg" alt="logo" data-v-af0b14d0></span><span class="text" data-v-af0b14d0>Platypush</span></div><div class="row" data-v-af0b14d0><label data-v-af0b14d0><input type="text" name="username" placeholder="Username" data-v-af0b14d0></label></div><div class="row" data-v-af0b14d0><label data-v-af0b14d0><input type="password" name="password" placeholder="Password" data-v-af0b14d0></label></div>',3),i={key:0,class:"row"},o=d((()=>(0,t._)("label",null,[(0,t._)("input",{type:"password",name:"confirm_password",placeholder:"Confirm password"})],-1))),p=[o],c={class:"row buttons"},u=["value"],v=d((()=>(0,t._)("div",{class:"row pull-right"},[(0,t._)("label",{class:"checkbox"},[(0,t._)("input",{type:"checkbox",name:"remember"}),(0,t.Uk)(" Keep me logged in on this device ")])],-1)));function b(a,e,s,d,o,b){return(0,t.wg)(),(0,t.iD)("div",r,[(0,t._)("form",l,[n,b._register?((0,t.wg)(),(0,t.iD)("div",i,p)):(0,t.kq)("",!0),(0,t._)("div",c,[(0,t._)("input",{type:"submit",class:"btn btn-primary",value:b._register?"Register":"Login"},null,8,u)]),v])])}var f=s(8637),g={name:"Login",mixins:[f.Z],props:{register:{type:Boolean,required:!1,default:!1}},computed:{_register(){return this.parseBoolean(this.register)}}},m=s(3744);const h=(0,m.Z)(g,[["render",b],["__scopeId","data-v-af0b14d0"]]);var w=h}}]);
|
||||
//# sourceMappingURL=login.98ae4df8.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"static/js/login.98ae4df8.js","mappings":"4OACOA,MAAM,mB,GACHA,MAAM,QAAQC,OAAO,Q,qfAoBpBD,MAAM,O,UACTE,EAAAA,EAAAA,GAEQ,eADNA,EAAAA,EAAAA,GAA8E,SAAvEC,KAAK,WAAWC,KAAK,mBAAmBC,YAAY,uB,QAD7DC,G,GAKGN,MAAM,e,sBAIXE,EAAAA,EAAAA,GAKM,OALDF,MAAM,kBAAgB,EACzBE,EAAAA,EAAAA,GAGQ,SAHDF,MAAM,YAAU,EACrBE,EAAAA,EAAAA,GAAuC,SAAhCC,KAAK,WAAWC,KAAK,c,QAAW,6CAEzC,K,0CAnCNG,EAAAA,EAAAA,IAsCM,MAtCNC,EAsCM,EArCJN,EAAAA,EAAAA,GAoCO,OApCPO,EAoCO,CAnCLC,EAmBuBC,EAAAC,YAAS,WAAhCL,EAAAA,EAAAA,IAIM,MAJNM,EAIMC,KAAA,gBAENZ,EAAAA,EAAAA,GAEM,MAFNa,EAEM,EADJb,EAAAA,EAAAA,GAAuF,SAAhFC,KAAK,SAASH,MAAM,kBAAmBgB,MAAOL,EAAAC,UAAY,WAAa,S,YAGhFK,K,eAaN,GACEb,KAAM,QACNc,OAAQ,CAACC,EAAAA,GACTC,MAAO,CAELC,SAAU,CACRlB,KAAMmB,QACNC,UAAU,EACVC,SAAS,IAIbC,SAAU,CACRb,SAAAA,GACE,OAAOc,KAAKC,aAAaD,KAAKL,SAChC,I,UCrDJ,MAAMO,GAA2B,OAAgB,EAAQ,CAAC,CAAC,SAASC,GAAQ,CAAC,YAAY,qBAEzF,O","sources":["webpack://platypush/./src/views/Login.vue","webpack://platypush/./src/views/Login.vue?240b"],"sourcesContent":["<template>\n <div class=\"login-container\">\n <form class=\"login\" method=\"POST\">\n <div class=\"header\">\n <span class=\"logo\">\n <img src=\"/logo.svg\" alt=\"logo\" />\n </span>\n <span class=\"text\">Platypush</span>\n </div>\n\n <div class=\"row\">\n <label>\n <input type=\"text\" name=\"username\" placeholder=\"Username\">\n </label>\n </div>\n\n <div class=\"row\">\n <label>\n <input type=\"password\" name=\"password\" placeholder=\"Password\">\n </label>\n </div>\n\n <div class=\"row\" v-if=\"_register\">\n <label>\n <input type=\"password\" name=\"confirm_password\" placeholder=\"Confirm password\">\n </label>\n </div>\n\n <div class=\"row buttons\">\n <input type=\"submit\" class=\"btn btn-primary\" :value=\"_register ? 'Register' : 'Login'\">\n </div>\n\n <div class=\"row pull-right\">\n <label class=\"checkbox\">\n <input type=\"checkbox\" name=\"remember\"> \n Keep me logged in on this device \n </label>\n </div>\n </form>\n </div>\n</template>\n\n<script>\nimport Utils from \"@/Utils\";\n\nexport default {\n name: \"Login\",\n mixins: [Utils],\n props: {\n // Set to true for a registration form, false for a login form\n register: {\n type: Boolean,\n required: false,\n default: false,\n },\n },\n\n computed: {\n _register() {\n return this.parseBoolean(this.register)\n },\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\nbody {\n width: 100vw;\n height: 100vh;\n margin: 0;\n}\n\n.login-container {\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n background: $default-bg-6;\n}\n\n.header {\n font-size: 1.2em;\n margin-bottom: 2em;\n display: flex;\n justify-content: center;\n align-items: center;\n\n .logo {\n width: 3em;\n height: 3em;\n display: inline-flex;\n background-size: cover;\n }\n\n .text {\n font-family: Poppins, sans-serif;\n margin-left: .5em;\n }\n}\n\nform {\n display: flex;\n flex-direction: column;\n padding: 4em;\n border: $default-border-3;\n border-radius: 3em;\n box-shadow: 2px 2px 3px 3px $border-color-2;\n background: $background-color;\n\n .row {\n margin: 0.5em 0;\n }\n\n input[type=text],\n input[type=password] {\n width: 100%;\n }\n\n input[type=submit],\n input[type=password] {\n border-radius: 1em;\n }\n\n input[type=password] {\n padding: .25em .5em;\n }\n\n .checkbox {\n display: flex;\n font-size: 0.8em;\n }\n\n .buttons {\n text-align: center;\n\n input[type=submit] {\n padding: .5em .75em;\n }\n }\n}\n\na {\n color: $default-link-fg;\n}\n</style>\n","import { render } from \"./Login.vue?vue&type=template&id=af0b14d0&scoped=true\"\nimport script from \"./Login.vue?vue&type=script&lang=js\"\nexport * from \"./Login.vue?vue&type=script&lang=js\"\n\nimport \"./Login.vue?vue&type=style&index=0&id=af0b14d0&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-af0b14d0\"]])\n\nexport default __exports__"],"names":["class","method","_createElementVNode","type","name","placeholder","_hoisted_7","_createElementBlock","_hoisted_1","_hoisted_2","_hoisted_3","$options","_register","_hoisted_6","_hoisted_8","_hoisted_9","value","_hoisted_11","mixins","Utils","props","register","Boolean","required","default","computed","this","parseBoolean","__exports__","render"],"sourceRoot":""}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/panel.f97445c6.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/panel.f97445c6.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/panel.f97445c6.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/panel.f97445c6.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/plugin.95e66081.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/plugin.95e66081.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/plugin.95e66081.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/plugin.95e66081.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/register.5ed802b7.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/register.5ed802b7.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[685,4535],{8925:function(e,t,r){r.r(t),r.d(t,{default:function(){return q}});var s=r(6252),i=r(3577);const a=e=>((0,s.dD)("data-v-f5e7f974"),e=e(),(0,s.Cn)(),e),n={key:1,class:"login-container"},o=a((()=>(0,s._)("div",{class:"header"},[(0,s._)("span",{class:"logo"},[(0,s._)("img",{src:"/logo.svg",alt:"logo"})]),(0,s._)("span",{class:"text"},"Platypush")],-1))),l={class:"row"},u=["disabled"],d={class:"row"},c=["disabled"],h={key:0,class:"row"},p=["disabled"],g={class:"row buttons"},m=["disabled"],w=a((()=>(0,s._)("div",{class:"row pull-right"},[(0,s._)("label",{class:"checkbox"},[(0,s._)("input",{type:"checkbox",name:"remember"}),(0,s.Uk)(" Keep me logged in on this device ")])],-1))),f={key:1,class:"auth-error"};function y(e,t,r,a,y,_){const b=(0,s.up)("Loading");return y.initialized?((0,s.wg)(),(0,s.iD)("div",n,[y.isAuthenticated?(0,s.kq)("",!0):((0,s.wg)(),(0,s.iD)("form",{key:0,class:"login",method:"POST",onSubmit:t[0]||(t[0]=(...e)=>_.submitForm&&_.submitForm(...e))},[o,(0,s._)("div",l,[(0,s._)("label",null,[(0,s._)("input",{type:"text",name:"username",disabled:y.authenticating,placeholder:"Username",ref:"username"},null,8,u)])]),(0,s._)("div",d,[(0,s._)("label",null,[(0,s._)("input",{type:"password",name:"password",disabled:y.authenticating,placeholder:"Password"},null,8,c)])]),r.register?((0,s.wg)(),(0,s.iD)("div",h,[(0,s._)("label",null,[(0,s._)("input",{type:"password",name:"confirm_password",disabled:y.authenticating,placeholder:"Confirm password"},null,8,p)])])):(0,s.kq)("",!0),(0,s._)("div",g,[(0,s._)("button",{type:"submit",class:(0,i.C_)(["btn btn-primary",{loading:y.authenticating}]),disabled:y.authenticating},[y.authenticating?((0,s.wg)(),(0,s.j4)(b,{key:0})):(0,s.kq)("",!0),(0,s.Uk)(" "+(0,i.zw)(r.register?"Register":"Login"),1)],10,m)]),w,y.authError?((0,s.wg)(),(0,s.iD)("div",f,(0,i.zw)(y.authError),1)):(0,s.kq)("",!0)],32))])):((0,s.wg)(),(0,s.j4)(b,{key:0}))}var _=r(6791),b=r(8637),k=r(7066),v={name:"Login",mixins:[b.Z],components:{Loading:_.Z},props:{register:{type:Boolean,required:!1,default:!1}},computed:{redirect(){return this.$route.query.redirect?.length?this.$route.query.redirect:"/"}},data(){return{authError:null,authenticating:!1,isAuthenticated:!1,initialized:!1}},methods:{async submitForm(e){e.preventDefault();const t=e.target,r=new FormData(t),s="/auth?type="+(this.register?"register":"login");if(this.register&&r.get("password")!==r.get("confirm_password"))this.authError="Passwords don't match";else{this.authError=null;try{const e=await k.Z.post(s,r),t=e?.data?.session_token;if(t){const r=e.expires_at?Date.parse(e.expires_at):null;this.isAuthenticated=!0,this.setCookie("session_token",t,{expires:r}),window.location.href=e.redirect||this.redirect}else this.authError="Invalid credentials"}catch(e){this.authError=e.response.data.message||e.response.data.error,401===e.response?.status?this.authError=this.authError||"Invalid credentials":(this.authError=this.authError||"An error occurred while processing the request",e.response?console.error(e.response.status,e.response.data):console.error(e))}}},async checkAuth(){try{const e=await k.Z.get("/auth");e.data.session_token&&(this.isAuthenticated=!0,window.location.href=e.redirect||this.redirect)}catch(e){this.isAuthenticated=!1}finally{this.initialized=!0}}},async created(){await this.checkAuth()},async mounted(){this.$nextTick((()=>{this.$refs.username?.focus()}))}},E=r(3744);const x=(0,E.Z)(v,[["render",y],["__scopeId","data-v-f5e7f974"]]);var q=x},9780:function(e,t,r){r.r(t),r.d(t,{default:function(){return u}});var s=r(6252);function i(e,t,r,i,a,n){const o=(0,s.up)("Login");return(0,s.wg)(),(0,s.j4)(o,{register:!0})}var a=r(8925),n={name:"Register",mixins:[a["default"]],components:{Login:a["default"]},props:{register:{type:Boolean,required:!1,default:!0}}},o=r(3744);const l=(0,o.Z)(n,[["render",i]]);var u=l}}]);
|
||||
//# sourceMappingURL=register.5ed802b7.js.map
|
1
platypush/backend/http/webapp/dist/static/js/register.5ed802b7.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/register.5ed802b7.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,2 +0,0 @@
|
|||
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[685,4535],{1918:function(a,e,s){s.r(e),s.d(e,{default:function(){return w}});var t=s(6252);const r=a=>((0,t.dD)("data-v-af0b14d0"),a=a(),(0,t.Cn)(),a),n={class:"login-container"},d={class:"login",method:"POST"},l=(0,t.uE)('<div class="header" data-v-af0b14d0><span class="logo" data-v-af0b14d0><img src="/logo.svg" alt="logo" data-v-af0b14d0></span><span class="text" data-v-af0b14d0>Platypush</span></div><div class="row" data-v-af0b14d0><label data-v-af0b14d0><input type="text" name="username" placeholder="Username" data-v-af0b14d0></label></div><div class="row" data-v-af0b14d0><label data-v-af0b14d0><input type="password" name="password" placeholder="Password" data-v-af0b14d0></label></div>',3),o={key:0,class:"row"},i=r((()=>(0,t._)("label",null,[(0,t._)("input",{type:"password",name:"confirm_password",placeholder:"Confirm password"})],-1))),p=[i],u={class:"row buttons"},c=["value"],v=r((()=>(0,t._)("div",{class:"row pull-right"},[(0,t._)("label",{class:"checkbox"},[(0,t._)("input",{type:"checkbox",name:"remember"}),(0,t.Uk)(" Keep me logged in on this device ")])],-1)));function f(a,e,s,r,i,f){return(0,t.wg)(),(0,t.iD)("div",n,[(0,t._)("form",d,[l,f._register?((0,t.wg)(),(0,t.iD)("div",o,p)):(0,t.kq)("",!0),(0,t._)("div",u,[(0,t._)("input",{type:"submit",class:"btn btn-primary",value:f._register?"Register":"Login"},null,8,c)]),v])])}var b=s(8637),g={name:"Login",mixins:[b.Z],props:{register:{type:Boolean,required:!1,default:!1}},computed:{_register(){return this.parseBoolean(this.register)}}},m=s(3744);const h=(0,m.Z)(g,[["render",f],["__scopeId","data-v-af0b14d0"]]);var w=h},9780:function(a,e,s){s.r(e),s.d(e,{default:function(){return i}});var t=s(6252);function r(a,e,s,r,n,d){const l=(0,t.up)("Login");return(0,t.wg)(),(0,t.j4)(l,{register:!0})}var n=s(1918),d={name:"Register",mixins:[n["default"]],components:{Login:n["default"]},props:{register:{type:Boolean,required:!1,default:!0}}},l=s(3744);const o=(0,l.Z)(d,[["render",r]]);var i=o}}]);
|
||||
//# sourceMappingURL=register.64e266ad.js.map
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue