From a46c24cda00408066033a1ee53d78fbc3a36086f Mon Sep 17 00:00:00 2001 From: Roberto Tonino Date: Sun, 31 Jan 2021 22:35:29 +0100 Subject: [PATCH] fix: deemix icon on slim sidebar --- public/js/bundle.js | 4 ++-- src/components/TheSidebar.vue | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/public/js/bundle.js b/public/js/bundle.js index 4b4af26..538dc65 100644 --- a/public/js/bundle.js +++ b/public/js/bundle.js @@ -2774,13 +2774,13 @@ PERFORMANCE OF THIS SOFTWARE. .st8{fill-rule:evenodd;clip-rule:evenodd;fill:url(#rect8241_1_);} .st9{fill-rule:evenodd;clip-rule:evenodd;fill:url(#rect8248_1_);} -`,script$3=defineComponent({setup(e,a){const n=reactive({activeTablink:"home",updateAvailable:!1,links}),{THEMES:r,currentTheme:i}=useTheme();return socket.on("updateAvailable",()=>{n.updateAvailable=!0}),a.root.$router.afterEach((s,l)=>{const c=n.links.find(o=>o.routerName===s.name);if(!c)return;n.activeTablink=c.name}),{...toRefs(n),THEMES:r,currentTheme:i,isSlim:computed(()=>a.root.$store.getters.getSlimSidebar),deemixIcon}}});const __vue_script__$3=script$3;var __vue_render__$4=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("aside",{staticClass:"top-0 left-0 flex flex-col h-screen bg-panels-bg text-foreground",class:{"w-12":e.isSlim},style:{minWidth:e.isSlim?null:"14rem"},attrs:{id:"sidebar","aria-label":"sidebar",role:"navigation"}},[n("div",{staticClass:"deemix-icon-container",domProps:{innerHTML:e._s(e.deemixIcon)}}),e._v(" "),e._l(e.links,function(r){return n("router-link",{key:r.name,staticClass:"relative flex items-center h-16 no-underline group main_tablinks hover:bg-background-main text-foreground",class:{"bg-background-main":e.activeTablink===r.name},attrs:{"aria-label":r.ariaLabel,to:{name:r.routerName},tag:"a"},nativeOn:{click:function(i){e.activeTablink=r.name}}},[n("i",{staticClass:"p-2 text-3xl material-icons side_icon group-hover:text-primary",class:{"text-primary":e.activeTablink===r.name}},[e._v(` +`,script$3=defineComponent({setup(e,a){const n=reactive({activeTablink:"home",updateAvailable:!1,links}),{THEMES:r,currentTheme:i}=useTheme();return socket.on("updateAvailable",()=>{n.updateAvailable=!0}),a.root.$router.afterEach((s,l)=>{const c=n.links.find(o=>o.routerName===s.name);if(!c)return;n.activeTablink=c.name}),{...toRefs(n),THEMES:r,currentTheme:i,isSlim:computed(()=>a.root.$store.getters.getSlimSidebar),deemixIcon}}});const __vue_script__$3=script$3;var __vue_render__$4=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("aside",{staticClass:"top-0 left-0 flex flex-col h-screen bg-panels-bg text-foreground",class:{"slim-sidebar w-12":e.isSlim},style:{minWidth:e.isSlim?null:"14rem"},attrs:{id:"sidebar","aria-label":"sidebar",role:"navigation"}},[n("div",{staticClass:"deemix-icon-container",domProps:{innerHTML:e._s(e.deemixIcon)}}),e._v(" "),e._l(e.links,function(r){return n("router-link",{key:r.name,staticClass:"relative flex items-center h-16 no-underline group main_tablinks hover:bg-background-main text-foreground",class:{"bg-background-main":e.activeTablink===r.name},attrs:{"aria-label":r.ariaLabel,to:{name:r.routerName},tag:"a"},nativeOn:{click:function(i){e.activeTablink=r.name}}},[n("i",{staticClass:"p-2 text-3xl material-icons side_icon group-hover:text-primary",class:{"text-primary":e.activeTablink===r.name}},[e._v(` `+e._s(r.icon)+` `)]),e._v(" "),n("span",{staticClass:"ml-5 overflow-hidden capitalize whitespace-no-wrap main-tablinks-text",class:{hidden:e.isSlim},staticStyle:{"letter-spacing":"1.3px"}},[e._v(` `+e._s(e.$t(r.label))+` `)]),e._v(" "),r.name==="about"&&e.updateAvailable?n("span",{staticClass:"absolute w-3 h-3 bg-red-600 rounded-full",attrs:{id:"update-notification"}}):e._e()])}),e._v(" "),n("span",{staticClass:"flex h-12 mt-5",class:{"inline-grid gap-2":e.isSlim},attrs:{id:"theme_selector","aria-label":"theme selector",role:"link"}},[n("i",{staticClass:"p-2 text-3xl transition-all duration-500 cursor-default material-icons side_icon side_icon--theme"},[e._v(` brush - `)]),e._v(" "),n("div",{staticClass:"relative flex items-center w-full justify-evenly",class:{"inline-grid gap-2":e.isSlim},attrs:{id:"theme_togglers"}},e._l(e.THEMES,function(r){return n("div",{key:r,staticClass:"w-6 h-6 border rounded-full cursor-pointer theme_toggler border-grayscale-500 gap",class:[{"theme_toggler--active":e.currentTheme===r},"theme_toggler--"+r],on:{click:function(i){e.currentTheme=r}}})}),0)])],2)},__vue_staticRenderFns__$4=[];const __vue_inject_styles__$4=function(e){if(!e)return;e("data-v-48bac43c_0",{source:".deemix-icon-container[data-v-48bac43c]{display:grid;place-content:center}.deemix-icon-container[data-v-48bac43c] svg{height:75px}#update-notification[data-v-48bac43c]{top:12px;left:30px}.theme_toggler[data-v-48bac43c]{transition:border .2s ease-in-out}.theme_toggler--active[data-v-48bac43c]{border-width:3px}.theme_toggler--light[data-v-48bac43c]{background-color:#fff}.theme_toggler--dark[data-v-48bac43c]{background-color:#141414}.theme_toggler--purple[data-v-48bac43c]{background:#460eaf}",map:void 0,media:void 0})},__vue_scope_id__$4="data-v-48bac43c",__vue_module_identifier__$3=void 0,__vue_is_functional_template__$4=!1;function __vue_normalize__$4(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="TheSidebar.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$3(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$3.styles||(__vue_create_injector__$3.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` + `)]),e._v(" "),n("div",{staticClass:"relative flex items-center w-full justify-evenly",class:{"inline-grid gap-2":e.isSlim},attrs:{id:"theme_togglers"}},e._l(e.THEMES,function(r){return n("div",{key:r,staticClass:"w-6 h-6 border rounded-full cursor-pointer theme_toggler border-grayscale-500 gap",class:[{"theme_toggler--active":e.currentTheme===r},"theme_toggler--"+r],on:{click:function(i){e.currentTheme=r}}})}),0)])],2)},__vue_staticRenderFns__$4=[];const __vue_inject_styles__$4=function(e){if(!e)return;e("data-v-070ab92d_0",{source:".deemix-icon-container[data-v-070ab92d]{display:grid;place-content:center}.slim-sidebar .deemix-icon-container[data-v-070ab92d]{margin:.5rem 0}.slim-sidebar .deemix-icon-container[data-v-070ab92d] svg{height:30px}.deemix-icon-container[data-v-070ab92d] svg{height:75px}#update-notification[data-v-070ab92d]{top:12px;left:30px}.theme_toggler[data-v-070ab92d]{transition:border .2s ease-in-out}.theme_toggler--active[data-v-070ab92d]{border-width:3px}.theme_toggler--light[data-v-070ab92d]{background-color:#fff}.theme_toggler--dark[data-v-070ab92d]{background-color:#141414}.theme_toggler--purple[data-v-070ab92d]{background:#460eaf}",map:void 0,media:void 0})},__vue_scope_id__$4="data-v-070ab92d",__vue_module_identifier__$3=void 0,__vue_is_functional_template__$4=!1;function __vue_normalize__$4(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="TheSidebar.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$3(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$3.styles||(__vue_create_injector__$3.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` /*# sourceURL=`+s.map.sources[0]+" */",o+=` /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(s.map))))+" */"),n&&(c.element=c.element||document.querySelector("style[data-group="+l+"]")),!c.element){const d=c.element=document.createElement("style");d.type="text/css",s.media&&d.setAttribute("media",s.media),n&&(d.setAttribute("data-group",l),d.setAttribute("data-next-index","0")),e.appendChild(d)}if(n&&(u=parseInt(c.element.getAttribute("data-next-index")),c.element.setAttribute("data-next-index",u+1)),c.element.styleSheet)c.parts.push(o),c.element.styleSheet.cssText=c.parts.filter(Boolean).join(` `);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var TheSidebar=__vue_normalize__$4({render:__vue_render__$4,staticRenderFns:__vue_staticRenderFns__$4},__vue_inject_styles__$4,__vue_script__$3,__vue_scope_id__$4,__vue_is_functional_template__$4,__vue_module_identifier__$3,__vue_create_injector__$3),script$4=defineComponent({setup(){return{lastTextSearch:ref$2("")}},created(){const e=n=>{n.keyCode===70&&n.ctrlKey&&(n.preventDefault(),this.$refs.searchbar.focus())},a=n=>{if(!(n.key=="Backspace"&&n.ctrlKey&&n.shiftKey))return;this.$refs.searchbar.value="",this.$refs.searchbar.focus()};document.addEventListener("keydown",e),document.addEventListener("keyup",a),this.$on("hook:destroyed",()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",a)})},methods:{async performSearch(e){let a=e.keyCode===13;if(!a)return;let n=this.$refs.searchbar.value,r=n==="";if(r)return;let i=isValidURL(n),s=e.ctrlKey,l=this.$route.name==="Link Analyzer",c=this.$route.name==="Search",o=n===this.lastTextSearch;if(i){if(s){this.$root.$emit("ContextMenu:searchbar",n);return}if(l){socket.emit("analyzeLink",n);return}sendAddToQueue(n)}else{if(c&&o)return;this.lastTextSearch=n,await this.$router.push({name:"Search",query:{term:n}})}}}});const __vue_script__$4=script$4;var __vue_render__$5=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("header",{attrs:{id:"search","aria-label":"searchbar"}},[e._m(0),e._v(" "),n("input",{ref:"searchbar",staticClass:"w-full",attrs:{id:"searchbar",autocomplete:"off",type:"search",name:"searchbar",value:"",placeholder:e.$t("searchbar"),autofocus:""},on:{keyup:function(r){return e.performSearch(r)}}})])},__vue_staticRenderFns__$5=[function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",{staticClass:"search__icon"},[n("i",{staticClass:"material-icons"},[e._v("search")])])}];const __vue_inject_styles__$5=function(e){if(!e)return;e("data-v-4b197d1c_0",{source:`input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;width:28px;height:28px;background-color:var(--foreground);-webkit-mask-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='28' viewBox='0 0 24 24' width='28'%3E%%3Cpath fill='%23ffffff' d='M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 12.59L17.59 17 14 13.41 10.41 17 9 15.59 12.59 12 9 8.41 10.41 7 14 10.59 17.59 7 19 8.41 15.41 12 19 15.59z'/%3E3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='28' viewBox='0 0 24 24' width='28'%3E%%3Cpath fill='%23ffffff' d='M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 12.59L17.59 17 14 13.41 10.41 17 9 15.59 12.59 12 9 8.41 10.41 7 14 10.59 17.59 7 19 8.41 15.41 12 19 15.59z'/%3E3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E")}#search{background-color:var(--secondary-background);padding:0 1em;display:flex;align-items:center;border:1px solid transparent;transition:border .2s ease-in-out;border-radius:15px;margin:10px 10px 20px 10px}#search .search__icon{width:2rem;height:2rem}#search .search__icon i{font-size:2rem;color:var(--foreground)}#search .search__icon i::selection{background:0 0}#search #searchbar{height:45px;padding-left:.5em;border:0;border-radius:0;background-color:var(--secondary-background);color:var(--foreground);font-size:1.2rem;font-family:'Open Sans';font-weight:300;margin-bottom:0}#search #searchbar:focus{outline:0}#search #searchbar::-webkit-search-cancel-button{appearance:none;width:28px;height:28px;background-color:var(--foreground);mask-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='28' viewBox='0 0 24 24' width='28'%3E%%3Cpath fill='%23ffffff' d='M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 12.59L17.59 17 14 13.41 10.41 17 9 15.59 12.59 12 9 8.41 10.41 7 14 10.59 17.59 7 19 8.41 15.41 12 19 15.59z'/%3E3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E")}#search #searchbar:-webkit-autofill,#search #searchbar:-webkit-autofill:active,#search #searchbar:-webkit-autofill:focus,#search #searchbar:-webkit-autofill:hover{box-shadow:0 0 0 45px var(--secondary-background) inset!important}#search:focus-within{border:1px solid var(--foreground)}`,map:void 0,media:void 0})},__vue_scope_id__$5=void 0,__vue_module_identifier__$4=void 0,__vue_is_functional_template__$5=!1;function __vue_normalize__$5(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="TheSearchBar.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$4(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$4.styles||(__vue_create_injector__$4.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` diff --git a/src/components/TheSidebar.vue b/src/components/TheSidebar.vue index 30afb85..0641260 100644 --- a/src/components/TheSidebar.vue +++ b/src/components/TheSidebar.vue @@ -1,7 +1,7 @@