my-header-yichong 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/my-header.js +1 -1
- package/my-header.umd.cjs +1 -1
- package/package.json +1 -1
package/my-header.js
CHANGED
|
@@ -4720,7 +4720,7 @@ const Ie = (e) => (nt("data-v-c970699f"), e = e(), rt(), e), cc = {
|
|
|
4720
4720
|
background: "rgba(0, 0, 0, 0.7)"
|
|
4721
4721
|
});
|
|
4722
4722
|
try {
|
|
4723
|
-
await n.userStore.getUser(), t("loginSuccess");
|
|
4723
|
+
n.userStore && await n.userStore.getUser(), t("loginSuccess");
|
|
4724
4724
|
} catch {
|
|
4725
4725
|
} finally {
|
|
4726
4726
|
A.close();
|
package/my-header.umd.cjs
CHANGED
|
@@ -23,4 +23,4 @@ This will fail in production.`);l=Fe,l._s.has(o)||(a?Kt(o,t,s,l):jo(o,s,l),proce
|
|
|
23
23
|
<span id="free_cnt">My Credit: {{user.free_cnt}}</span>
|
|
24
24
|
</div>
|
|
25
25
|
<div class="user-upgrade user-buy-credit"><span>Buy credit</span></div>
|
|
26
|
-
</div> `),r.createElementVNode("div",{class:"user-item flew-row-v-center space-between",onClick:t[0]||(t[0]=(...i)=>a.handlePay&&a.handlePay(...i))},[r.createElementVNode("div",Hl,[n.user.is_subscribed?(r.openBlock(),r.createElementBlock("svg",zl,ql)):(r.openBlock(),r.createElementBlock("svg",Gl,Wl)),r.createElementVNode("span",null,"My Plan: "+r.toDisplayString(n.user.is_subscribed?"Premium Plan":"free"),1)]),!n.user.is_subscribed&&n.from=="addon"?(r.openBlock(),r.createElementBlock("div",Jl,Kl)):r.createCommentVNode("v-if",!0)]),n.from!="addon"?(r.openBlock(),r.createElementBlock("a",{key:0,rel:"nofollow",href:s.path+"/user/logout"},Xl,8,Yl)):r.createCommentVNode("v-if",!0)])}const Io=De(Vl,[["render",Zl],["__scopeId","data-v-8580ad75"],["__file","/Users/hodohimehime/Desktop/test/xiaochengxu/liusenlin_project/Translation_Video/src/components/PersonalCenter.vue"]]),Xc="",Ql={props:["content","top"]},ec=(e=>(r.pushScopeId("data-v-7b6def48"),e=e(),r.popScopeId(),e))(()=>r.createElementVNode("svg",{t:"1637907583780",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2289",width:"32",height:"32"},[r.createElementVNode("path",{d:"M512 1024C229.248 1024 0 794.752 0 512S229.248 0 512 0s512 229.248 512 512-229.248 512-512 512z m-114.176-310.954667a53.333333 53.333333 0 0 0 75.434667 0l323.328-323.328a53.333333 53.333333 0 1 0-75.434667-75.434666l-287.914667 283.306666-128.853333-128.853333a53.333333 53.333333 0 1 0-75.434667 75.434667l168.874667 168.874666z",fill:"#ffffff","p-id":"2290"})],-1));function tc(e,t,n,o,s,a){return r.openBlock(),r.createElementBlock("div",{class:"toast-wrapper",style:r.normalizeStyle({top:n.top||"60PX"})},[ec,r.createElementVNode("span",null,"Congratulations! you have successfully "+r.toDisplayString(n.content)+".",1)],4)}const nc=De(Ql,[["render",tc],["__scopeId","data-v-7b6def48"],["__file","/Users/hodohimehime/Desktop/test/xiaochengxu/liusenlin_project/Translation_Video/src/components/Toast.vue"]]);function oc(e,t){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[r.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z","clip-rule":"evenodd"})])}const Qc="",Ee=e=>(r.pushScopeId("data-v-c970699f"),e=e(),r.popScopeId(),e),rc={class:"flex items-center justify-between py-6 lg:px-0 px-6","aria-label":"Global"},sc={class:"flex lg:flex-1"},ac=["href"],ic=["src","alt"],lc={class:"pl-2 text-xl"},cc={class:"flex lg:hidden"},uc=Ee(()=>r.createElementVNode("span",{class:"sr-only"},"Open main menu",-1)),dc={class:"hidden lg:flex lg:gap-x-12"},fc=Ee(()=>r.createElementVNode("span",null,"Apps",-1)),pc={class:"w-56 shrink rounded-xl bg-white p-4 text-sm font-semibold leading-6 text-gray-900 shadow-lg ring-1 ring-gray-900/5"},mc=["href"],hc=["href","target"],gc={key:0,class:"hidden lg:flex lg:flex-1 lg:justify-end"},yc={key:1,class:"hidden lg:flex lg:flex-1 lg:justify-end"},bc=Ee(()=>r.createElementVNode("span",{"aria-hidden":"true"},null,-1)),wc={key:2,class:"hidden lg:flex lg:flex-1 lg:justify-end text-sm font-semibold leading-6 text-gray-900 items-center"},Ec={class:"pr-4"},_c=["src"],vc=Ee(()=>r.createElementVNode("div",{class:"open-icon"},null,-1)),Sc={class:"user-center-dialog shadow-xl"},xc=Ee(()=>r.createElementVNode("div",{class:"fixed inset-0 z-50"},null,-1)),Nc={class:"flex items-center justify-between"},Pc=["href"],Oc={class:"sr-only"},Cc=["src","alt"],kc=Ee(()=>r.createElementVNode("span",{class:"sr-only"},"Close menu",-1)),Tc={class:"mt-6 flow-root"},Ac={class:"-my-6 divide-y divide-gray-500/10"},Lc={class:"space-y-2 py-6"},$c={key:0,target:"_blank",href:"https://www.livepolls.app/apps",class:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50"},Rc=["href","target"],Dc={key:0,class:"py-6"},Fc=De({__name:"Header",props:{isShenHe:{type:Boolean,default:!1},userInfo:{type:Object,default:()=>null},userStore:{type:Object,default:()=>null},from:{type:String,default:""},className:{type:String,default:"max-w-7xl"}},emits:["loginSuccess","initUserCallback"],setup(e,{emit:t}){const n=e;let o={logo:"https://lh3.googleusercontent.com/-Rt2iBOrXu0M/ZKvVIrKS3aI/AAAAAAAAADU/H-qh2KKs4E84IsfLcxAru0j5aN_rdITjwCNcBGAsYHQ/s400/ff.png",name:"Video Translator"};typeof app_config=="object"&&app_config&&Object.keys(app_config).length>0&&(o=app_config),console.log("appInfo",o);const s=r.ref(o),a=rt(),i=[{name:"Live Poll Maker for Slides",href:"https://workspace.google.com/marketplace/app/live_polls_maker/964324417500"},{name:"Geocode for Sheets",href:"https://workspace.google.com/marketplace/app/geocode_for_sheets/1083994590944"},{name:"Slides Translator",href:"https://workspace.google.com/marketplace/app/translate_slides_slides_translator/552662411825"},{name:"Screen&Audio Recorder",href:"https://workspace.google.com/marketplace/app/screenaudio_recorder/659492711995"},{name:"ChatGPT Slides Maker",href:"https://workspace.google.com/marketplace/app/chatgpt_slides_maker/715931934006"},{name:"More Apps >",href:"https://www.livepolls.app/apps"}],l=r.ref(n.isShenHe?[{name:"Privacy Policy",href:a+"/privacy",target:"_blank"}]:[{name:"Pricing",href:a+"/pricing",target:"_self"}]),f=r.ref(a||"/"),c=r.ref(!1),d=r.computed(()=>n.userInfo||n.userStore&&n.userStore.user),u=()=>{n.userStore&&n.userStore.showLogin(!0)},p=r.ref(!1);r.onMounted(()=>{!n.userInfo&&n.userStore.getUser().then(({profile:C})=>{t("initUserCallback",C),console.log("login",C),!C&&n.from!="login"&&!n.isShenHe&&O()},()=>{})});async function y(){g();const C=Te.service({text:"logining...",background:"rgba(0, 0, 0, 0.7)"});try{await n.userStore.getUser(),t("loginSuccess")}catch{}finally{C.close()}}function g(){n.userStore.showLogin(!1)}function h(){c.value=!0}function b(){c.value=!1}function S(){c.value=!c.value}function O(C){console.log("addGoogleAccountsScript:before"),typeof google<"u"&&(google.accounts.id.initialize({client_id:"704677828444-ihbv6faprun043f3iuponnrctutdssgj.apps.googleusercontent.com",callback:P}),google.accounts.id.prompt())}function P(C){!C||!C.credential||so(C.credential).then(v=>{console.log("fetch_success",v),n.userStore?n.userStore.getUser():location.href=location.pathname},v=>{console.log("fetch_fail",v)})}return(C,v)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("header",{class:r.normalizeClass(["absolute inset-x-0 px-1 top-0 z-30 mx-auto",[e.className]])},[r.createElementVNode("nav",rc,[r.createElementVNode("div",sc,[r.createElementVNode("a",{href:f.value,class:"-m-1.5 p-1.5 flex items-center"},[r.createElementVNode("img",{class:"h-8 w-auto",src:s.value.logo,alt:s.value.name},null,8,ic),r.createElementVNode("span",lc,r.toDisplayString(s.value.name),1)],8,ac)]),r.createElementVNode("div",cc,[r.createElementVNode("button",{type:"button",class:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700",onClick:v[0]||(v[0]=N=>p.value=!0)},[uc,r.createVNode(r.unref(Yi),{class:"h-6 w-6","aria-hidden":"true"})])]),r.createElementVNode("div",dc,[e.isShenHe?r.createCommentVNode("v-if",!0):(r.openBlock(),r.createBlock(r.unref($o),{key:0,class:"relative"},{default:r.withCtx(()=>[r.createVNode(r.unref(Ji),{class:"inline-flex items-center gap-x-1 text-sm font-semibold h-7 leading-7 text-gray-900"},{default:r.withCtx(()=>[fc,r.createVNode(r.unref(oc),{class:"h-5 w-5","aria-hidden":"true"})]),_:1}),r.createVNode(r.Transition,{"enter-active-class":"transition ease-out duration-200","enter-from-class":"opacity-0 translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"transition ease-in duration-150","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 translate-y-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(Ki),{class:"absolute left-1/2 z-10 mt-5 flex w-screen max-w-min -translate-x-1/2 px-4"},{default:r.withCtx(()=>[r.createElementVNode("div",pc,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(i,N=>r.createElementVNode("a",{key:N.name,href:N.href,class:"block p-2 hover:text-indigo-600",target:"_blank"},r.toDisplayString(N.name),9,mc)),64))])]),_:1})]),_:1})]),_:1})),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,N=>(r.openBlock(),r.createElementBlock("a",{key:N.name,href:N.href,target:N.target,class:"text-sm h-7 leading-7 font-semibold text-gray-900"},r.toDisplayString(N.name),9,hc))),128))]),e.isShenHe?(r.openBlock(),r.createElementBlock("div",gc)):d.value?(r.openBlock(),r.createElementBlock("div",wc,[r.createElementVNode("div",{class:"cursor-pointer flex items-center",onMouseenter:h,onMouseleave:b},[r.createElementVNode("div",Ec,[r.createElementVNode("span",null,r.toDisplayString(d.value.username),1)]),r.createElementVNode("img",{class:"user-avatar h-10 rounded-full",src:d.value.avatar||"https://statics.imgkits.com/images/default_user_avatar_black.png",alt:"user avatar"},null,8,_c),vc,r.withDirectives(r.createElementVNode("div",null,[r.createElementVNode("div",Sc,[d.value?(r.openBlock(),r.createBlock(Io,{key:0,user:d.value},null,8,["user"])):r.createCommentVNode("v-if",!0)])],512),[[r.vShow,c.value]])],32)])):(r.openBlock(),r.createElementBlock("div",yc,[r.createElementVNode("a",{onClick:u,href:"javscript:void(0)",class:"text-sm leading-6 rounded-3xl bg-indigo-600 px-8 py-1.5 font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"},[r.createTextVNode("Log in"),bc])]))]),r.createVNode(r.unref(zi),{as:"div",class:"lg:hidden",onClose:v[2]||(v[2]=N=>p.value=!1),open:p.value},{default:r.withCtx(()=>[xc,r.createVNode(r.unref(qi),{class:"fixed inset-y-0 right-0 z-50 w-full overflow-y-auto bg-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10"},{default:r.withCtx(()=>[r.createElementVNode("div",Nc,[r.createElementVNode("a",{href:f.value,class:"-m-1.5 p-1.5"},[r.createElementVNode("span",Oc,r.toDisplayString(s.value.name),1),r.createElementVNode("img",{class:"h-8 w-auto",src:s.value.logo,alt:s.value.name},null,8,Cc)],8,Pc),r.createElementVNode("button",{type:"button",class:"-m-2.5 rounded-md p-2.5 text-gray-700",onClick:v[1]||(v[1]=N=>p.value=!1)},[kc,r.createVNode(r.unref(Xi),{class:"h-6 w-6","aria-hidden":"true"})])]),r.createElementVNode("div",Tc,[r.createElementVNode("div",Ac,[r.createElementVNode("div",Lc,[e.isShenHe?r.createCommentVNode("v-if",!0):(r.openBlock(),r.createElementBlock("a",$c,"More Extensions")),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,N=>(r.openBlock(),r.createElementBlock("a",{key:N.name,href:N.href,target:N.target,class:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50"},r.toDisplayString(N.name),9,Rc))),128))]),d.value?(r.openBlock(),r.createElementBlock("div",{key:1,class:"relative sm-user-center-dialog py-6 right flew-center",onClick:S},[d.value?(r.openBlock(),r.createBlock(Io,{key:0,user:d.value},null,8,["user"])):r.createCommentVNode("v-if",!0)])):(r.openBlock(),r.createElementBlock("div",Dc,[r.createElementVNode("a",{href:"#",onClick:u,class:"-mx-3 block rounded-lg px-3 py-2.5 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50"},"Log in")]))])])]),_:1})]),_:1},8,["open"])],2),r.createCommentVNode(" 引入登录 "),e.userStore&&e.userStore.isShowLogin?(r.openBlock(),r.createBlock(kl,{key:0,onSuccess:y,onClose:g})):r.createCommentVNode("v-if",!0),e.userStore&&e.userStore.isShowToast?(r.openBlock(),r.createBlock(nc,{key:1,content:e.userStore&&e.userStore.toastContent},null,8,["content"])):r.createCommentVNode("v-if",!0)],64))}},[["__scopeId","data-v-c970699f"],["__file","/Users/hodohimehime/Desktop/test/xiaochengxu/liusenlin_project/Translation_Video/src/components/Header.vue"]]);return{install(e){e.component("my-header",Fc)}}});
|
|
26
|
+
</div> `),r.createElementVNode("div",{class:"user-item flew-row-v-center space-between",onClick:t[0]||(t[0]=(...i)=>a.handlePay&&a.handlePay(...i))},[r.createElementVNode("div",Hl,[n.user.is_subscribed?(r.openBlock(),r.createElementBlock("svg",zl,ql)):(r.openBlock(),r.createElementBlock("svg",Gl,Wl)),r.createElementVNode("span",null,"My Plan: "+r.toDisplayString(n.user.is_subscribed?"Premium Plan":"free"),1)]),!n.user.is_subscribed&&n.from=="addon"?(r.openBlock(),r.createElementBlock("div",Jl,Kl)):r.createCommentVNode("v-if",!0)]),n.from!="addon"?(r.openBlock(),r.createElementBlock("a",{key:0,rel:"nofollow",href:s.path+"/user/logout"},Xl,8,Yl)):r.createCommentVNode("v-if",!0)])}const Io=De(Vl,[["render",Zl],["__scopeId","data-v-8580ad75"],["__file","/Users/hodohimehime/Desktop/test/xiaochengxu/liusenlin_project/Translation_Video/src/components/PersonalCenter.vue"]]),Xc="",Ql={props:["content","top"]},ec=(e=>(r.pushScopeId("data-v-7b6def48"),e=e(),r.popScopeId(),e))(()=>r.createElementVNode("svg",{t:"1637907583780",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2289",width:"32",height:"32"},[r.createElementVNode("path",{d:"M512 1024C229.248 1024 0 794.752 0 512S229.248 0 512 0s512 229.248 512 512-229.248 512-512 512z m-114.176-310.954667a53.333333 53.333333 0 0 0 75.434667 0l323.328-323.328a53.333333 53.333333 0 1 0-75.434667-75.434666l-287.914667 283.306666-128.853333-128.853333a53.333333 53.333333 0 1 0-75.434667 75.434667l168.874667 168.874666z",fill:"#ffffff","p-id":"2290"})],-1));function tc(e,t,n,o,s,a){return r.openBlock(),r.createElementBlock("div",{class:"toast-wrapper",style:r.normalizeStyle({top:n.top||"60PX"})},[ec,r.createElementVNode("span",null,"Congratulations! you have successfully "+r.toDisplayString(n.content)+".",1)],4)}const nc=De(Ql,[["render",tc],["__scopeId","data-v-7b6def48"],["__file","/Users/hodohimehime/Desktop/test/xiaochengxu/liusenlin_project/Translation_Video/src/components/Toast.vue"]]);function oc(e,t){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[r.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z","clip-rule":"evenodd"})])}const Qc="",Ee=e=>(r.pushScopeId("data-v-c970699f"),e=e(),r.popScopeId(),e),rc={class:"flex items-center justify-between py-6 lg:px-0 px-6","aria-label":"Global"},sc={class:"flex lg:flex-1"},ac=["href"],ic=["src","alt"],lc={class:"pl-2 text-xl"},cc={class:"flex lg:hidden"},uc=Ee(()=>r.createElementVNode("span",{class:"sr-only"},"Open main menu",-1)),dc={class:"hidden lg:flex lg:gap-x-12"},fc=Ee(()=>r.createElementVNode("span",null,"Apps",-1)),pc={class:"w-56 shrink rounded-xl bg-white p-4 text-sm font-semibold leading-6 text-gray-900 shadow-lg ring-1 ring-gray-900/5"},mc=["href"],hc=["href","target"],gc={key:0,class:"hidden lg:flex lg:flex-1 lg:justify-end"},yc={key:1,class:"hidden lg:flex lg:flex-1 lg:justify-end"},bc=Ee(()=>r.createElementVNode("span",{"aria-hidden":"true"},null,-1)),wc={key:2,class:"hidden lg:flex lg:flex-1 lg:justify-end text-sm font-semibold leading-6 text-gray-900 items-center"},Ec={class:"pr-4"},_c=["src"],vc=Ee(()=>r.createElementVNode("div",{class:"open-icon"},null,-1)),Sc={class:"user-center-dialog shadow-xl"},xc=Ee(()=>r.createElementVNode("div",{class:"fixed inset-0 z-50"},null,-1)),Nc={class:"flex items-center justify-between"},Pc=["href"],Oc={class:"sr-only"},Cc=["src","alt"],kc=Ee(()=>r.createElementVNode("span",{class:"sr-only"},"Close menu",-1)),Tc={class:"mt-6 flow-root"},Ac={class:"-my-6 divide-y divide-gray-500/10"},Lc={class:"space-y-2 py-6"},$c={key:0,target:"_blank",href:"https://www.livepolls.app/apps",class:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50"},Rc=["href","target"],Dc={key:0,class:"py-6"},Fc=De({__name:"Header",props:{isShenHe:{type:Boolean,default:!1},userInfo:{type:Object,default:()=>null},userStore:{type:Object,default:()=>null},from:{type:String,default:""},className:{type:String,default:"max-w-7xl"}},emits:["loginSuccess","initUserCallback"],setup(e,{emit:t}){const n=e;let o={logo:"https://lh3.googleusercontent.com/-Rt2iBOrXu0M/ZKvVIrKS3aI/AAAAAAAAADU/H-qh2KKs4E84IsfLcxAru0j5aN_rdITjwCNcBGAsYHQ/s400/ff.png",name:"Video Translator"};typeof app_config=="object"&&app_config&&Object.keys(app_config).length>0&&(o=app_config),console.log("appInfo",o);const s=r.ref(o),a=rt(),i=[{name:"Live Poll Maker for Slides",href:"https://workspace.google.com/marketplace/app/live_polls_maker/964324417500"},{name:"Geocode for Sheets",href:"https://workspace.google.com/marketplace/app/geocode_for_sheets/1083994590944"},{name:"Slides Translator",href:"https://workspace.google.com/marketplace/app/translate_slides_slides_translator/552662411825"},{name:"Screen&Audio Recorder",href:"https://workspace.google.com/marketplace/app/screenaudio_recorder/659492711995"},{name:"ChatGPT Slides Maker",href:"https://workspace.google.com/marketplace/app/chatgpt_slides_maker/715931934006"},{name:"More Apps >",href:"https://www.livepolls.app/apps"}],l=r.ref(n.isShenHe?[{name:"Privacy Policy",href:a+"/privacy",target:"_blank"}]:[{name:"Pricing",href:a+"/pricing",target:"_self"}]),f=r.ref(a||"/"),c=r.ref(!1),d=r.computed(()=>n.userInfo||n.userStore&&n.userStore.user),u=()=>{n.userStore&&n.userStore.showLogin(!0)},p=r.ref(!1);r.onMounted(()=>{!n.userInfo&&n.userStore.getUser().then(({profile:C})=>{t("initUserCallback",C),console.log("login",C),!C&&n.from!="login"&&!n.isShenHe&&O()},()=>{})});async function y(){g();const C=Te.service({text:"logining...",background:"rgba(0, 0, 0, 0.7)"});try{n.userStore&&await n.userStore.getUser(),t("loginSuccess")}catch{}finally{C.close()}}function g(){n.userStore.showLogin(!1)}function h(){c.value=!0}function b(){c.value=!1}function S(){c.value=!c.value}function O(C){console.log("addGoogleAccountsScript:before"),typeof google<"u"&&(google.accounts.id.initialize({client_id:"704677828444-ihbv6faprun043f3iuponnrctutdssgj.apps.googleusercontent.com",callback:P}),google.accounts.id.prompt())}function P(C){!C||!C.credential||so(C.credential).then(v=>{console.log("fetch_success",v),n.userStore?n.userStore.getUser():location.href=location.pathname},v=>{console.log("fetch_fail",v)})}return(C,v)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("header",{class:r.normalizeClass(["absolute inset-x-0 px-1 top-0 z-30 mx-auto",[e.className]])},[r.createElementVNode("nav",rc,[r.createElementVNode("div",sc,[r.createElementVNode("a",{href:f.value,class:"-m-1.5 p-1.5 flex items-center"},[r.createElementVNode("img",{class:"h-8 w-auto",src:s.value.logo,alt:s.value.name},null,8,ic),r.createElementVNode("span",lc,r.toDisplayString(s.value.name),1)],8,ac)]),r.createElementVNode("div",cc,[r.createElementVNode("button",{type:"button",class:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700",onClick:v[0]||(v[0]=N=>p.value=!0)},[uc,r.createVNode(r.unref(Yi),{class:"h-6 w-6","aria-hidden":"true"})])]),r.createElementVNode("div",dc,[e.isShenHe?r.createCommentVNode("v-if",!0):(r.openBlock(),r.createBlock(r.unref($o),{key:0,class:"relative"},{default:r.withCtx(()=>[r.createVNode(r.unref(Ji),{class:"inline-flex items-center gap-x-1 text-sm font-semibold h-7 leading-7 text-gray-900"},{default:r.withCtx(()=>[fc,r.createVNode(r.unref(oc),{class:"h-5 w-5","aria-hidden":"true"})]),_:1}),r.createVNode(r.Transition,{"enter-active-class":"transition ease-out duration-200","enter-from-class":"opacity-0 translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"transition ease-in duration-150","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 translate-y-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(Ki),{class:"absolute left-1/2 z-10 mt-5 flex w-screen max-w-min -translate-x-1/2 px-4"},{default:r.withCtx(()=>[r.createElementVNode("div",pc,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(i,N=>r.createElementVNode("a",{key:N.name,href:N.href,class:"block p-2 hover:text-indigo-600",target:"_blank"},r.toDisplayString(N.name),9,mc)),64))])]),_:1})]),_:1})]),_:1})),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,N=>(r.openBlock(),r.createElementBlock("a",{key:N.name,href:N.href,target:N.target,class:"text-sm h-7 leading-7 font-semibold text-gray-900"},r.toDisplayString(N.name),9,hc))),128))]),e.isShenHe?(r.openBlock(),r.createElementBlock("div",gc)):d.value?(r.openBlock(),r.createElementBlock("div",wc,[r.createElementVNode("div",{class:"cursor-pointer flex items-center",onMouseenter:h,onMouseleave:b},[r.createElementVNode("div",Ec,[r.createElementVNode("span",null,r.toDisplayString(d.value.username),1)]),r.createElementVNode("img",{class:"user-avatar h-10 rounded-full",src:d.value.avatar||"https://statics.imgkits.com/images/default_user_avatar_black.png",alt:"user avatar"},null,8,_c),vc,r.withDirectives(r.createElementVNode("div",null,[r.createElementVNode("div",Sc,[d.value?(r.openBlock(),r.createBlock(Io,{key:0,user:d.value},null,8,["user"])):r.createCommentVNode("v-if",!0)])],512),[[r.vShow,c.value]])],32)])):(r.openBlock(),r.createElementBlock("div",yc,[r.createElementVNode("a",{onClick:u,href:"javscript:void(0)",class:"text-sm leading-6 rounded-3xl bg-indigo-600 px-8 py-1.5 font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"},[r.createTextVNode("Log in"),bc])]))]),r.createVNode(r.unref(zi),{as:"div",class:"lg:hidden",onClose:v[2]||(v[2]=N=>p.value=!1),open:p.value},{default:r.withCtx(()=>[xc,r.createVNode(r.unref(qi),{class:"fixed inset-y-0 right-0 z-50 w-full overflow-y-auto bg-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10"},{default:r.withCtx(()=>[r.createElementVNode("div",Nc,[r.createElementVNode("a",{href:f.value,class:"-m-1.5 p-1.5"},[r.createElementVNode("span",Oc,r.toDisplayString(s.value.name),1),r.createElementVNode("img",{class:"h-8 w-auto",src:s.value.logo,alt:s.value.name},null,8,Cc)],8,Pc),r.createElementVNode("button",{type:"button",class:"-m-2.5 rounded-md p-2.5 text-gray-700",onClick:v[1]||(v[1]=N=>p.value=!1)},[kc,r.createVNode(r.unref(Xi),{class:"h-6 w-6","aria-hidden":"true"})])]),r.createElementVNode("div",Tc,[r.createElementVNode("div",Ac,[r.createElementVNode("div",Lc,[e.isShenHe?r.createCommentVNode("v-if",!0):(r.openBlock(),r.createElementBlock("a",$c,"More Extensions")),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,N=>(r.openBlock(),r.createElementBlock("a",{key:N.name,href:N.href,target:N.target,class:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50"},r.toDisplayString(N.name),9,Rc))),128))]),d.value?(r.openBlock(),r.createElementBlock("div",{key:1,class:"relative sm-user-center-dialog py-6 right flew-center",onClick:S},[d.value?(r.openBlock(),r.createBlock(Io,{key:0,user:d.value},null,8,["user"])):r.createCommentVNode("v-if",!0)])):(r.openBlock(),r.createElementBlock("div",Dc,[r.createElementVNode("a",{href:"#",onClick:u,class:"-mx-3 block rounded-lg px-3 py-2.5 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50"},"Log in")]))])])]),_:1})]),_:1},8,["open"])],2),r.createCommentVNode(" 引入登录 "),e.userStore&&e.userStore.isShowLogin?(r.openBlock(),r.createBlock(kl,{key:0,onSuccess:y,onClose:g})):r.createCommentVNode("v-if",!0),e.userStore&&e.userStore.isShowToast?(r.openBlock(),r.createBlock(nc,{key:1,content:e.userStore&&e.userStore.toastContent},null,8,["content"])):r.createCommentVNode("v-if",!0)],64))}},[["__scopeId","data-v-c970699f"],["__file","/Users/hodohimehime/Desktop/test/xiaochengxu/liusenlin_project/Translation_Video/src/components/Header.vue"]]);return{install(e){e.component("my-header",Fc)}}});
|