mirror of
https://github.com/ZSCGR/CloudFlare-ImgBed.git
synced 2026-08-13 04:03:42 +08:00
2 lines
7.0 KiB
JavaScript
2 lines
7.0 KiB
JavaScript
"use strict";(self["webpackChunksanyue_imghub"]=self["webpackChunksanyue_imghub"]||[]).push([[22],{213:function(e,n,t){t(85331),t(19104)},4318:function(){},10456:function(e,n,t){t(85331)},18785:function(e,n,t){t(85331)},19104:function(e,n,t){t(85331)},30694:function(e,n,t){t(85331)},38736:function(e,n,t){t(85331)},67819:function(e,n,t){t(85331)},70797:function(e,n,t){t.d(n,{A:function(){return s}});t(44114);var i=t(25507),a=t(16915);let o=!1;async function s(e,n={}){n.credentials="include",n.headers={...n.headers};const t=await fetch(e,n);return 401!==t.status||o||(o=!0,i.A.commit("setAdminLoggedIn",!1),a.A.push("/adminLogin").finally(()=>{o=!1})),t}},77128:function(e,n,t){t(85331),t(4318)},78450:function(e,n,t){t(85331)},85970:function(e,n,t){t(85331)},91570:function(e,n,t){t.d(n,{A:function(){return O}});var i=t(54047),a=t(56768),o=t(45130),s=t(24232);const l={id:"themeMaskAdmin"},r=["cx","cy","r"],c=["r"],u=["opacity"];function h(e,n,t,i,h,d){const g=(0,a.g2)("font-awesome-icon");return(0,a.uX)(),(0,a.CE)("div",{id:"themeToggle",onClick:n[0]||(n[0]=(...e)=>d.handleToggleClick&&d.handleToggleClick(...e))},[(0,a.bF)(o.eB,{name:"icon-fade",mode:"out-in"},{default:(0,a.k6)(()=>[h.isAuto?((0,a.uX)(),(0,a.Wv)(g,{key:"auto-mode",icon:"circle-half-stroke",class:"auto-icon",style:{"font-size":"1.3em",color:"var(--admin-theme-toggle-color)"}})):((0,a.uX)(),(0,a.CE)("svg",{key:"sun-moon",class:(0,s.C4)(["theme_toggle_svg",{dark:h.isDark}]),width:"1.3em",height:"1.3em",viewBox:"0 0 24 24",fill:"none","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",stroke:"currentColor"},[(0,a.Lk)("mask",l,[n[1]||(n[1]=(0,a.Lk)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"},null,-1)),(0,a.Lk)("circle",{class:"theme_toggle_circle1",fill:"black",cx:h.isDark?"50%":"100%",cy:h.isDark?"23%":"0%",r:h.isDark?"9":"5"},null,8,r)]),(0,a.Lk)("circle",{class:"theme_toggle_circle2",cx:"12",cy:"12",r:h.isDark?"9":"5",mask:"url(#themeMaskAdmin)"},null,8,c),(0,a.Lk)("g",{class:"theme_toggle_g",stroke:"currentColor",opacity:h.isDark?0:1},[...n[2]||(n[2]=[(0,a.Lk)("line",{x1:"12",y1:"1",x2:"12",y2:"3"},null,-1),(0,a.Lk)("line",{x1:"12",y1:"21",x2:"12",y2:"23"},null,-1),(0,a.Lk)("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"},null,-1),(0,a.Lk)("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"},null,-1),(0,a.Lk)("line",{x1:"1",y1:"12",x2:"3",y2:"12"},null,-1),(0,a.Lk)("line",{x1:"21",y1:"12",x2:"23",y2:"12"},null,-1),(0,a.Lk)("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"},null,-1),(0,a.Lk)("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"},null,-1)])],8,u)],2))]),_:1})])}var d={name:"ToggleDark",data(){return{isDark:this.$store.getters.useDarkMode,isAuto:!this.$store.getters.cusDarkMode}},methods:{handleToggleClick(){this.isAuto?(this.isDark=!1,this.isAuto=!1,this.$store.commit("setCusDarkMode",!0),this.$store.commit("setUseDarkMode",!1)):this.isDark?(this.isAuto=!0,this.$store.commit("setCusDarkMode",!1)):(this.isDark=!0,this.$store.commit("setCusDarkMode",!0),this.$store.commit("setUseDarkMode",!0))}}},g=t(71241);const p=(0,g.A)(d,[["render",h],["__scopeId","data-v-5c149ed5"]]);var k=p;const m={class:"tabs"},v=["aria-expanded"],P={class:"page-switcher-title"},b=["onMouseenter","onClick"],f={class:"page-switcher-title"};function y(e,n,t,l,r,c){const u=(0,a.g2)("font-awesome-icon"),h=k,d=i.A;return(0,a.uX)(),(0,a.CE)("div",m,[(0,a.Lk)("div",{class:(0,s.C4)(["page-switcher",{"is-open":r.isPageMenuOpen}]),role:"navigation",onClick:n[3]||(n[3]=(0,o.D$)(()=>{},["stop"])),onPointerdown:n[4]||(n[4]=(0,o.D$)(()=>{},["stop"])),onMouseenter:n[5]||(n[5]=(...e)=>c.handlePageSwitcherEnter&&c.handlePageSwitcherEnter(...e)),onMouseleave:n[6]||(n[6]=(...e)=>c.handlePageSwitcherLeave&&c.handlePageSwitcherLeave(...e))},[(0,a.Lk)("div",{class:"page-switcher-sheet",role:"menu",onClick:n[2]||(n[2]=(0,o.D$)(()=>{},["stop"]))},[(0,a.Lk)("button",{class:"page-option is-current",type:"button",role:"menuitem","aria-current":"page","aria-expanded":r.isPageMenuOpen,onClick:n[0]||(n[0]=(0,o.D$)(e=>c.handlePageOptionClick(c.activePageOption.name),["stop"]))},[(0,a.bF)(u,{icon:c.activePageOption.icon,class:"page-option-icon"},null,8,["icon"]),(0,a.Lk)("span",P,(0,s.v_)(e.$t(c.activePageOption.label)),1),(0,a.bF)(u,{icon:"chevron-down",class:"page-switcher-arrow"})],8,v),(0,a.Lk)("div",{class:"page-option-list",onMouseleave:n[1]||(n[1]=(...e)=>c.clearHoveredPageOption&&c.clearHoveredPageOption(...e))},[(0,a.Lk)("span",{class:(0,s.C4)(["page-option-highlight",{"is-visible":null!==r.hoveredPageOptionIndex}]),style:(0,s.Tr)({"--hovered-option-index":null===r.hoveredPageOptionIndex?0:r.hoveredPageOptionIndex}),"aria-hidden":"true"},null,6),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(c.inactivePageOptions,(n,t)=>((0,a.uX)(),(0,a.CE)("button",{key:n.name,class:"page-option",type:"button",role:"menuitem",onMouseenter:e=>c.setHoveredPageOption(t),onClick:(0,o.D$)(e=>c.handlePageOptionClick(n.name),["stop"])},[(0,a.bF)(u,{icon:n.icon,class:"page-option-icon"},null,8,["icon"]),(0,a.Lk)("span",f,(0,s.v_)(e.$t(n.label)),1)],40,b))),128))],32)])],34),(0,a.bF)(h),(0,a.bF)(d,{class:"tabs-language-switcher"})])}t(44114),t(18111),t(22489),t(20116);var M={name:"DashboardTabs",props:{activeTab:{type:String,default:"dashboard"}},components:{AdminToggleDark:k,LanguageSwitcher:i.A},data(){return{isPageMenuOpen:!1,hoveredPageOptionIndex:null}},computed:{pageOptions(){return[{name:"dashboard",icon:"images",label:"dashboardTabs.fileManagement"},{name:"customerConfig",icon:"user-cog",label:"dashboardTabs.userManagement"},{name:"systemConfig",icon:"cogs",label:"dashboardTabs.systemSettings"},{name:"",icon:"upload",label:"dashboardTabs.fileUpload"}]},activePageOption(){return this.pageOptions.find(e=>e.name===this.activeTab)||this.pageOptions[0]},inactivePageOptions(){return this.pageOptions.filter(e=>e.name!==this.activePageOption.name)}},methods:{handleDocumentClick(e){this.$el?.contains(e.target)||this.closePageMenu()},refreshDashboard(){location.reload()},handleTabClick(e){this.closePageMenu(),e!==this.activeTab?this.$router.push(`/${e}`):this.refreshDashboard()},isTouchViewport(){return window.matchMedia("(hover: none), (pointer: coarse)").matches},handlePageOptionClick(e){!this.isTouchViewport()||this.isPageMenuOpen||e===this.activeTab?e!==this.activeTab?this.handleTabClick(e):this.isTouchViewport()?this.togglePageMenu():this.openPageMenu():this.openPageMenu()},handlePageSwitcherEnter(){this.isTouchViewport()||this.openPageMenu()},handlePageSwitcherLeave(){this.isTouchViewport()||this.closePageMenu()},setHoveredPageOption(e){this.hoveredPageOptionIndex=e},clearHoveredPageOption(){this.hoveredPageOptionIndex=null},openPageMenu(){this.isPageMenuOpen=!0},togglePageMenu(){this.isPageMenuOpen=!this.isPageMenuOpen},closePageMenu(){this.isPageMenuOpen=!1,this.clearHoveredPageOption()}},mounted(){document.addEventListener("click",this.handleDocumentClick)},beforeUnmount(){document.removeEventListener("click",this.handleDocumentClick)}};const C=(0,g.A)(M,[["render",y],["__scopeId","data-v-07e603fa"]]);var O=C},96808:function(e,n,t){t(85331),t(18785),t(67819),t(85970),t(19104)}}]);
|
|
//# sourceMappingURL=22.f752503c.js.map
|