From 7b7fa8bdf34a4d8827a33c516c8ae7faa071048b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferdinand=20M=C3=BCtsch?= Date: Thu, 16 Dec 2021 12:39:41 +0100 Subject: [PATCH] refactor(wip): redesign settings page --- middlewares/security.go | 2 +- models/summary.go | 12 - models/view/settings.go | 1 + models/view/summary.go | 13 +- routes/settings.go | 1 + routes/summary.go | 3 +- static/assets/icons.js | 1 + static/assets/vendor/petite-vue.min.js | 1 + views/foot.tpl.html | 3 +- views/head.tpl.html | 1 + views/login.tpl.html | 2 +- views/menu-main.tpl.html | 18 +- views/settings.tpl.html | 1277 ++++++++++++------------ views/signup.tpl.html | 2 +- views/summary.tpl.html | 12 +- 15 files changed, 695 insertions(+), 654 deletions(-) create mode 100644 static/assets/vendor/petite-vue.min.js diff --git a/middlewares/security.go b/middlewares/security.go index 377ffbe..3727c57 100644 --- a/middlewares/security.go +++ b/middlewares/security.go @@ -6,7 +6,7 @@ import ( var securityHeaders = map[string]string{ "Cross-Origin-Opener-Policy": "same-origin", - "Content-Security-Policy": "default-src 'self' 'unsafe-inline'; img-src 'self' https: data:; form-action 'self'; block-all-mixed-content;", + "Content-Security-Policy": "default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' https: data:; form-action 'self'; block-all-mixed-content;", "X-Frame-Options": "DENY", "X-Content-Type-Options": "nosniff", } diff --git a/models/summary.go b/models/summary.go index bc5548e..6d559bf 100644 --- a/models/summary.go +++ b/models/summary.go @@ -49,18 +49,6 @@ type SummaryItemContainer struct { Items []*SummaryItem } -type SummaryViewModel struct { - *Summary - *SummaryParams - User *User - AvatarURL string - LanguageColors map[string]string - Error string - Success string - ApiKey string - RawQuery string -} - type SummaryParams struct { From time.Time To time.Time diff --git a/models/view/settings.go b/models/view/settings.go index 75582d2..7e55f5a 100644 --- a/models/view/settings.go +++ b/models/view/settings.go @@ -8,6 +8,7 @@ type SettingsViewModel struct { Aliases []*SettingsVMCombinedAlias Labels []*SettingsVMCombinedLabel Projects []string + ApiKey string Success string Error string } diff --git a/models/view/summary.go b/models/view/summary.go index 5797b7f..fbf32c9 100644 --- a/models/view/summary.go +++ b/models/view/summary.go @@ -1,8 +1,17 @@ package view +import "github.com/muety/wakapi/models" + type SummaryViewModel struct { - Success string - Error string + *models.Summary + *models.SummaryParams + User *models.User + AvatarURL string + LanguageColors map[string]string + Error string + Success string + ApiKey string + RawQuery string } func (s *SummaryViewModel) WithSuccess(m string) *SummaryViewModel { diff --git a/routes/settings.go b/routes/settings.go index 3ac9ce2..c059bb0 100644 --- a/routes/settings.go +++ b/routes/settings.go @@ -682,6 +682,7 @@ func (h *SettingsHandler) buildViewModel(r *http.Request) *view.SettingsViewMode Aliases: combinedAliases, Labels: combinedLabels, Projects: projects, + ApiKey: user.ApiKey, Success: r.URL.Query().Get("success"), Error: r.URL.Query().Get("error"), } diff --git a/routes/summary.go b/routes/summary.go index fd4deed..0d194ed 100644 --- a/routes/summary.go +++ b/routes/summary.go @@ -4,7 +4,6 @@ import ( "github.com/gorilla/mux" conf "github.com/muety/wakapi/config" "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" "github.com/muety/wakapi/models/view" su "github.com/muety/wakapi/routes/utils" "github.com/muety/wakapi/services" @@ -61,7 +60,7 @@ func (h *SummaryHandler) GetIndex(w http.ResponseWriter, r *http.Request) { return } - vm := models.SummaryViewModel{ + vm := view.SummaryViewModel{ Summary: summary, SummaryParams: summaryParams, User: user, diff --git a/static/assets/icons.js b/static/assets/icons.js index 40cd2e7..2daaa76 100644 --- a/static/assets/icons.js +++ b/static/assets/icons.js @@ -20,3 +20,4 @@ Iconify.addCollection({"prefix":"fa-solid","icons":{"external-link-alt":{"body": Iconify.addCollection({"prefix":"simple-icons","icons":{"wakatime":{"body":""}},"width":24,"height":24}); Iconify.addCollection({"prefix":"heroicons-solid","icons":{"light-bulb":{"body":""},"server":{"body":""}},"width":20,"height":20}); Iconify.addCollection({"prefix":"ion","icons":{"rocket":{"body":""}},"width":512,"height":512}); +Iconify.addCollection({"prefix":"clarity","icons":{"warning-standard-solid":{"body":""}},"width":36,"height":36}); diff --git a/static/assets/vendor/petite-vue.min.js b/static/assets/vendor/petite-vue.min.js new file mode 100644 index 0000000..0d31d2d --- /dev/null +++ b/static/assets/vendor/petite-vue.min.js @@ -0,0 +1 @@ +var __defProp=Object.defineProperty,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__publicField=(e,t,n)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,n),n),PetiteVue=function(e){"use strict";function t(e,t){const n=Object.create(null),s=e.split(",");for(let r=0;r!!n[e.toLowerCase()]:e=>!!n[e]}function n(e){if(p(e)){const t={};for(let s=0;s{if(e){const n=e.split(r);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function o(e){let t="";if(m(e))t=e;else if(p(e))for(let n=0;nc(e,t)))}const f=Object.assign,u=Object.prototype.hasOwnProperty,a=(e,t)=>u.call(e,t),p=Array.isArray,h=e=>"[object Map]"===y(e),d=e=>e instanceof Date,m=e=>"string"==typeof e,g=e=>"symbol"==typeof e,v=e=>null!==e&&"object"==typeof e,b=Object.prototype.toString,y=e=>b.call(e),_=e=>m(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,x=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},w=/-(\w)/g,$=x((e=>e.replace(w,((e,t)=>t?t.toUpperCase():"")))),k=/\B([A-Z])/g,O=x((e=>e.replace(k,"-$1").toLowerCase())),S=e=>{const t=parseFloat(e);return isNaN(t)?e:t};function E(e,t){(t=t||undefined)&&t.active&&t.effects.push(e)}const j=e=>{const t=new Set(e);return t.w=0,t.n=0,t},A=e=>(e.w&C)>0,P=e=>(e.n&C)>0,R=new WeakMap;let N=0,C=1;const T=[];let M;const F=Symbol(""),B=Symbol("");class L{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],E(this,n)}run(){if(!this.active)return this.fn();if(!T.includes(this))try{return T.push(M=this),V.push(K),K=!0,C=1<<++N,N<=30?(({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let s=0;s0?T[e-1]:void 0}}stop(){this.active&&(W(this),this.onStop&&this.onStop(),this.active=!1)}}function W(e){const{deps:t}=e;if(t.length){for(let n=0;n{("length"===t||t>=s)&&c.push(e)}));else switch(void 0!==n&&c.push(o.get(n)),t){case"add":p(e)?_(n)&&c.push(o.get("length")):(c.push(o.get(F)),h(e)&&c.push(o.get(B)));break;case"delete":p(e)||(c.push(o.get(F)),h(e)&&c.push(o.get(B)));break;case"set":h(e)&&c.push(o.get(F))}if(1===c.length)c[0]&&Z(c[0]);else{const e=[];for(const t of c)t&&e.push(...t);Z(j(e))}}function Z(e,t){for(const n of p(e)?e:[...e])(n!==M||n.allowRecurse)&&(n.scheduler?n.scheduler():n.run())}const q=t("__proto__,__v_isRef,__isVue"),D=new Set(Object.getOwnPropertyNames(Symbol).map((e=>Symbol[e])).filter(g)),G=Y(),U=Y(!0),Q=X();function X(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=ue(this);for(let t=0,r=this.length;t{e[t]=function(...e){V.push(K),K=!1;const n=ue(this)[t].apply(this,e);return z(),n}})),e}function Y(e=!1,t=!1){return function(n,s,r){if("__v_isReactive"===s)return!e;if("__v_isReadonly"===s)return e;if("__v_raw"===s&&r===(e?t?oe:ie:t?re:se).get(n))return n;const i=p(n);if(!e&&i&&a(Q,s))return Reflect.get(Q,s,r);const o=Reflect.get(n,s,r);if(g(s)?D.has(s):q(s))return o;if(e||H(n,0,s),t)return o;if(ae(o)){return!i||!_(s)?o.value:o}return v(o)?e?function(e){return fe(e,!0,ne,null,ie)}(o):le(o):o}}function ee(e=!1){return function(t,n,s,r){let i=t[n];if(!e&&!function(e){return!(!e||!e.__v_isReadonly)}(s)&&(s=ue(s),i=ue(i),!p(t)&&ae(i)&&!ae(s)))return i.value=s,!0;const o=p(t)&&_(n)?Number(n)!Object.is(e,t))(s,i)&&J(t,"set",n,s):J(t,"add",n,s)),c}}const te={get:G,set:ee(),deleteProperty:function(e,t){const n=a(e,t);e[t];const s=Reflect.deleteProperty(e,t);return s&&n&&J(e,"delete",t,void 0),s},has:function(e,t){const n=Reflect.has(e,t);return g(t)&&D.has(t)||H(e,0,t),n},ownKeys:function(e){return H(e,0,p(e)?"length":F),Reflect.ownKeys(e)}},ne={get:U,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},se=new WeakMap,re=new WeakMap,ie=new WeakMap,oe=new WeakMap;function ce(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>y(e).slice(8,-1))(e))}function le(e){return e&&e.__v_isReadonly?e:fe(e,!1,te,null,se)}function fe(e,t,n,s,r){if(!v(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=ce(e);if(0===o)return e;const c=new Proxy(e,2===o?s:n);return r.set(e,c),c}function ue(e){const t=e&&e.__v_raw;return t?ue(t):e}function ae(e){return Boolean(e&&!0===e.__v_isRef)}Promise.resolve();let pe=!1;const he=[],de=Promise.resolve(),me=e=>de.then(e),ge=e=>{he.includes(e)||he.push(e),pe||(pe=!0,me(ve))},ve=()=>{for(const e of he)e();he.length=0,pe=!1},be=/^(spellcheck|draggable|form|list|type)$/,ye=({el:e,get:t,effect:n,arg:s,modifiers:r})=>{let i;"class"===s&&(e._class=e.className),n((()=>{let n=t();if(s)(null==r?void 0:r.camel)&&(s=$(s)),_e(e,s,n,i);else{for(const t in n)_e(e,t,n[t],i&&i[t]);for(const t in i)n&&t in n||_e(e,t,null)}i=n}))},_e=(e,t,s,r)=>{if("class"===t)e.setAttribute("class",o(e._class?[e._class,s]:s)||"");else if("style"===t){s=n(s);const{style:t}=e;if(s)if(m(s))s!==r&&(t.cssText=s);else{for(const e in s)we(t,e,s[e]);if(r&&!m(r))for(const e in r)null==s[e]&&we(t,e,"")}else e.removeAttribute("style")}else e instanceof SVGElement||!(t in e)||be.test(t)?"true-value"===t?e._trueValue=s:"false-value"===t?e._falseValue=s:null!=s?e.setAttribute(t,s):e.removeAttribute(t):(e[t]=s,"value"===t&&(e._value=s))},xe=/\s*!important$/,we=(e,t,n)=>{p(n)?n.forEach((n=>we(e,t,n))):t.startsWith("--")?e.setProperty(t,n):xe.test(n)?e.setProperty(O(t),n.replace(xe,""),"important"):e[t]=n},$e=(e,t)=>{const n=e.getAttribute(t);return null!=n&&e.removeAttribute(t),n},ke=(e,t,n,s)=>{e.addEventListener(t,n,s)},Oe=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Se=["ctrl","shift","alt","meta"],Ee={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Se.some((n=>e[`${n}Key`]&&!t[n]))},je=({el:e,get:t,exp:n,arg:s,modifiers:r})=>{if(!s)return;let i=Oe.test(n)?t(`(e => ${n}(e))`):t(`($event => { ${n} })`);if("vue:mounted"!==s){if("vue:unmounted"===s)return()=>i();if(r){"click"===s&&(r.right&&(s="contextmenu"),r.middle&&(s="mouseup"));const e=i;i=t=>{if(!("key"in t)||O(t.key)in r){for(const e in r){const n=Ee[e];if(n&&n(t,r))return}return e(t)}}}ke(e,s,i,r)}else me(i)},Ae=({el:e,get:t,effect:n})=>{n((()=>{e.textContent=Pe(t())}))},Pe=e=>null==e?"":v(e)?JSON.stringify(e,null,2):String(e),Re=e=>"_value"in e?e._value:e.value,Ne=(e,t)=>{const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t},Ce=e=>{e.target.composing=!0},Te=e=>{const t=e.target;t.composing&&(t.composing=!1,Me(t,"input"))},Me=(e,t)=>{const n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)},Fe=Object.create(null),Be=(e,t,n)=>Le(e,`return(${t})`,n),Le=(e,t,n)=>{const s=Fe[t]||(Fe[t]=We(t));try{return s(e,n)}catch(r){console.error(r)}},We=e=>{try{return new Function("$data","$el",`with($data){${e}}`)}catch(t){return console.error(`${t.message} in expression: ${e}`),()=>{}}},Ie={bind:ye,on:je,show:({el:e,get:t,effect:n})=>{const s=e.style.display;n((()=>{e.style.display=t()?s:"none"}))},text:Ae,html:({el:e,get:t,effect:n})=>{n((()=>{e.innerHTML=t()}))},model:({el:e,exp:t,get:n,effect:s,modifiers:r})=>{const i=e.type,o=n(`(val) => { ${t} = val }`),{trim:f,number:u="number"===i}=r||{};if("SELECT"===e.tagName){const t=e;ke(e,"change",(()=>{const e=Array.prototype.filter.call(t.options,(e=>e.selected)).map((e=>u?S(Re(e)):Re(e)));o(t.multiple?e:e[0])})),s((()=>{const e=n(),s=t.multiple;for(let n=0,r=t.options.length;n-1:r.selected=e.has(i);else if(c(Re(r),e))return void(t.selectedIndex!==n&&(t.selectedIndex=n))}s||-1===t.selectedIndex||(t.selectedIndex=-1)}))}else if("checkbox"===i){let t;ke(e,"change",(()=>{const t=n(),s=e.checked;if(p(t)){const n=Re(e),r=l(t,n),i=-1!==r;if(s&&!i)o(t.concat(n));else if(!s&&i){const e=[...t];e.splice(r,1),o(e)}}else o(Ne(e,s))})),s((()=>{const s=n();p(s)?e.checked=l(s,Re(e))>-1:s!==t&&(e.checked=c(s,Ne(e,!0))),t=s}))}else if("radio"===i){let t;ke(e,"change",(()=>{o(Re(e))})),s((()=>{const s=n();s!==t&&(e.checked=c(s,Re(e)))}))}else{const t=e=>f?e.trim():u?S(e):e;ke(e,"compositionstart",Ce),ke(e,"compositionend",Te),ke(e,(null==r?void 0:r.lazy)?"change":"input",(()=>{e.composing||o(t(e.value))})),f&&ke(e,"change",(()=>{e.value=e.value.trim()})),s((()=>{if(e.composing)return;const s=e.value,r=n();document.activeElement===e&&t(s)===r||s!==r&&(e.value=r)}))}},effect:({el:e,ctx:t,exp:n,effect:s})=>{me((()=>s((()=>Le(t.scope,n,e)))))}},Ke=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Ve=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ze=/^\(|\)$/g,He=/^[{[]\s*((?:[\w_$]+\s*,?\s*)+)[\]}]$/,Je=(e,t,n)=>{const s=t.match(Ke);if(!s)return;const r=e.nextSibling,i=e.parentElement,o=new Text("");i.insertBefore(o,e),i.removeChild(e);const c=s[2].trim();let l,f,u,a,h=s[1].trim().replace(ze,"").trim(),d=!1,m="key",g=e.getAttribute(m)||e.getAttribute(m=":key")||e.getAttribute(m="v-bind:key");g&&(e.removeAttribute(m),"key"===m&&(g=JSON.stringify(g))),(a=h.match(Ve))&&(h=h.replace(Ve,"").trim(),f=a[1].trim(),a[2]&&(u=a[2].trim())),(a=h.match(He))&&(l=a[1].split(",").map((e=>e.trim())),d="["===h[0]);let b,y,_,x=!1;const w=(e,t,s,r)=>{const i={};l?l.forEach(((e,n)=>i[e]=t[d?n:e])):i[h]=t,r?(f&&(i[f]=r),u&&(i[u]=s)):f&&(i[f]=s);const o=nt(n,i),c=g?Be(o.scope,g):s;return e.set(c,s),o.key=c,o},$=(t,n)=>{const s=new rt(e,t);return s.key=t.key,s.insert(i,n),s};return n.effect((()=>{const e=Be(n.scope,c),t=_;if([y,_]=(e=>{const t=new Map,n=[];if(p(e))for(let s=0;s$(e,o))),x=!0})),r},Ze=({el:e,ctx:{scope:{$refs:t}},get:n,effect:s})=>{let r;return s((()=>{const s=n();t[s]=e,r&&s!==r&&delete t[r],r=s})),()=>{r&&delete t[r]}},qe=/^(?:v-|:|@)/,De=/\.([\w-]+)/g;let Ge=!1;const Ue=(e,t)=>{const n=e.nodeType;if(1===n){const n=e;if(n.hasAttribute("v-pre"))return;let s;if($e(n,"v-cloak"),s=$e(n,"v-if"))return((e,t,n)=>{const s=e.parentElement,r=new Comment("v-if");s.insertBefore(r,e);const i=[{exp:t,el:e}];let o,c;for(;(o=e.nextElementSibling)&&(c=null,""===$e(o,"v-else")||(c=$e(o,"v-else-if")));)s.removeChild(o),i.push({exp:c,el:o});const l=e.nextSibling;let f;s.removeChild(e);let u=-1;const a=()=>{f&&(s.insertBefore(r,f.el),f.remove(),f=void 0)};return n.effect((()=>{for(let e=0;e{let n=e.firstChild;for(;n;)n=Ue(n,t)||n.nextSibling},Xe=(e,t,n,s)=>{let r,i,o;if(":"===(t=t.replace(De,((e,t)=>((o||(o={}))[t]=!0,""))))[0])r=ye,i=t.slice(1);else if("@"===t[0])r=je,i=t.slice(1);else{const e=t.indexOf(":"),n=e>0?t.slice(2,e):t.slice(2);r=Ie[n]||s.dirs[n],i=e>0?t.slice(e+1):void 0}r&&(r===ye&&"ref"===i&&(r=Ze),Ye(e,r,n,s,i,o),e.removeAttribute(t))},Ye=(e,t,n,s,r,i)=>{const o=t({el:e,get:(t=n)=>Be(s.scope,t,e),effect:s.effect,ctx:s,exp:n,arg:r,modifiers:i});o&&s.cleanups.push(o)},et=(e,t)=>{if("#"!==t[0])e.innerHTML=t;else{const n=document.querySelector(t);e.appendChild(n.content.cloneNode(!0))}},tt=e=>{const t={...e,scope:e?e.scope:le({}),dirs:e?e.dirs:{},effects:[],blocks:[],cleanups:[],delimiters:["{{","}}"],delimitersRE:/\{\{([^]+?)\}\}/g,effect:e=>{if(Ge)return ge(e),e;const n=function(e,t){e.effect&&(e=e.effect.fn);const n=new L(e);t&&(f(n,t),t.scope&&E(n,t.scope)),t&&t.lazy||n.run();const s=n.run.bind(n);return s.effect=n,s}(e,{scheduler:()=>ge(n)});return t.effects.push(n),n}};return t},nt=(e,t={})=>{const n=e.scope,s=Object.create(n);Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)),s.$refs=Object.create(n.$refs);const r=le(new Proxy(s,{set:(e,t,s,i)=>i!==r||e.hasOwnProperty(t)?Reflect.set(e,t,s,i):Reflect.set(n,t,s)}));return st(r),{...e,scope:r}},st=e=>{for(const t of Object.keys(e))"function"==typeof e[t]&&(e[t]=e[t].bind(e))};class rt{constructor(e,t,n=!1){__publicField(this,"template"),__publicField(this,"ctx"),__publicField(this,"key"),__publicField(this,"parentCtx"),__publicField(this,"isFragment"),__publicField(this,"start"),__publicField(this,"end"),this.isFragment=e instanceof HTMLTemplateElement,n?this.template=e:this.isFragment?this.template=e.content.cloneNode(!0):this.template=e.cloneNode(!0),n?this.ctx=t:(this.parentCtx=t,t.blocks.push(this),this.ctx=tt(t)),Ue(this.template,this.ctx)}get el(){return this.start||this.template}insert(e,t=null){if(this.isFragment)if(this.start){let n,s=this.start;for(;s&&(n=s.nextSibling,e.insertBefore(s,t),s!==this.end);)s=n}else this.start=new Text(""),this.end=new Text(""),e.insertBefore(this.end,t),e.insertBefore(this.start,this.end),e.insertBefore(this.template,this.end);else e.insertBefore(this.template,t)}remove(){if(this.parentCtx&&((e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)})(this.parentCtx.blocks,this),this.start){const e=this.start.parentNode;let t,n=this.start;for(;n&&(t=n.nextSibling,e.removeChild(n),n!==this.end);)n=t}else this.template.parentNode.removeChild(this.template);this.teardown()}teardown(){this.ctx.blocks.forEach((e=>{e.teardown()})),this.ctx.effects.forEach(I),this.ctx.cleanups.forEach((e=>e()))}}const it=e=>e.replace(/[-.*+?^${}()|[\]\/\\]/g,"\\$&"),ot=e=>{const t=tt();if(e&&(t.scope=le(e),st(t.scope),e.$delimiters)){const[n,s]=t.delimiters=e.$delimiters;t.delimitersRE=new RegExp(it(n)+"([^]+?)"+it(s),"g")}let n;return t.scope.$s=Pe,t.scope.$nextTick=me,t.scope.$refs=Object.create(null),{directive(e,n){return n?(t.dirs[e]=n,this):t.dirs[e]},mount(e){if("string"==typeof e&&!(e=document.querySelector(e)))return;let s;return s=(e=e||document.documentElement).hasAttribute("v-scope")?[e]:[...e.querySelectorAll("[v-scope]")].filter((e=>!e.matches("[v-scope] [v-scope]"))),s.length||(s=[e]),n=s.map((e=>new rt(e,t,!0))),this},unmount(){n.forEach((e=>e.teardown()))}}};let ct;return(ct=document.currentScript)&&ct.hasAttribute("init")&&ot().mount(),e.createApp=ot,e.nextTick=me,e.reactive=le,Object.defineProperty(e,"__esModule",{value:!0}),e[Symbol.toStringTag]="Module",e}({}); diff --git a/views/foot.tpl.html b/views/foot.tpl.html index 390c34c..edbd038 100644 --- a/views/foot.tpl.html +++ b/views/foot.tpl.html @@ -1,4 +1,5 @@ + - \ No newline at end of file + diff --git a/views/head.tpl.html b/views/head.tpl.html index 2781a56..ae03e41 100644 --- a/views/head.tpl.html +++ b/views/head.tpl.html @@ -17,4 +17,5 @@ {{ end }} + \ No newline at end of file diff --git a/views/login.tpl.html b/views/login.tpl.html index 4236c06..245b7de 100644 --- a/views/login.tpl.html +++ b/views/login.tpl.html @@ -12,7 +12,7 @@
-

Welcome!

+

Welcome!

Log in to continue using Wakapi
diff --git a/views/menu-main.tpl.html b/views/menu-main.tpl.html index 1169920..0feb896 100644 --- a/views/menu-main.tpl.html +++ b/views/menu-main.tpl.html @@ -3,10 +3,10 @@ {{ template "logo.tpl.html" }}
- + Dashboard +