my-header-yichong 2.0.9 → 2.1.0
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 +5 -5
- package/my-header.umd.cjs +2 -2
- package/package.json +1 -2
package/my-header.js
CHANGED
|
@@ -3929,7 +3929,7 @@ function wu(e, t, n, r, o, s) {
|
|
|
3929
3929
|
</div> `)
|
|
3930
3930
|
]);
|
|
3931
3931
|
}
|
|
3932
|
-
const _u = /* @__PURE__ */ it(Yl, [["render", wu], ["__scopeId", "data-v-4682235c"], ["__file", "/Users/
|
|
3932
|
+
const _u = /* @__PURE__ */ it(Yl, [["render", wu], ["__scopeId", "data-v-4682235c"], ["__file", "/Users/yinheng/Desktop/code/xiaochengxu/liusenlin_project/Translation_Video/src/components/Login1.vue"]]);
|
|
3933
3933
|
const Eu = {
|
|
3934
3934
|
data() {
|
|
3935
3935
|
return {};
|
|
@@ -3985,7 +3985,7 @@ function Cu(e, t, n, r, o, s) {
|
|
|
3985
3985
|
])
|
|
3986
3986
|
]);
|
|
3987
3987
|
}
|
|
3988
|
-
const Nu = /* @__PURE__ */ it(Eu, [["render", Cu], ["__scopeId", "data-v-47199182"], ["__file", "/Users/
|
|
3988
|
+
const Nu = /* @__PURE__ */ it(Eu, [["render", Cu], ["__scopeId", "data-v-47199182"], ["__file", "/Users/yinheng/Desktop/code/xiaochengxu/liusenlin_project/Translation_Video/src/components/Login.vue"]]);
|
|
3989
3989
|
/*!
|
|
3990
3990
|
* pinia v2.1.4
|
|
3991
3991
|
* (c) 2023 Eduardo San Martin Morote
|
|
@@ -4542,7 +4542,7 @@ function rc(e, t, n, r, o, s) {
|
|
|
4542
4542
|
}, nc, 8, ec)) : B("v-if", !0)
|
|
4543
4543
|
]);
|
|
4544
4544
|
}
|
|
4545
|
-
const cr = /* @__PURE__ */ it(ju, [["render", rc], ["__scopeId", "data-v-8580ad75"], ["__file", "/Users/
|
|
4545
|
+
const cr = /* @__PURE__ */ it(ju, [["render", rc], ["__scopeId", "data-v-8580ad75"], ["__file", "/Users/yinheng/Desktop/code/xiaochengxu/liusenlin_project/Translation_Video/src/components/PersonalCenter.vue"]]);
|
|
4546
4546
|
const oc = {
|
|
4547
4547
|
props: ["content", "top"]
|
|
4548
4548
|
}, sc = (e) => (nt("data-v-7b6def48"), e = e(), rt(), e), ac = /* @__PURE__ */ sc(() => /* @__PURE__ */ g(
|
|
@@ -4587,7 +4587,7 @@ function ic(e, t, n, r, o, s) {
|
|
|
4587
4587
|
/* STYLE */
|
|
4588
4588
|
);
|
|
4589
4589
|
}
|
|
4590
|
-
const lc = /* @__PURE__ */ it(oc, [["render", ic], ["__scopeId", "data-v-7b6def48"], ["__file", "/Users/
|
|
4590
|
+
const lc = /* @__PURE__ */ it(oc, [["render", ic], ["__scopeId", "data-v-7b6def48"], ["__file", "/Users/yinheng/Desktop/code/xiaochengxu/liusenlin_project/Translation_Video/src/components/Toast.vue"]]);
|
|
4591
4591
|
function uc(e, t) {
|
|
4592
4592
|
return k(), $("svg", {
|
|
4593
4593
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5029,7 +5029,7 @@ const Ne = (e) => (nt("data-v-c970699f"), e = e(), rt(), e), cc = {
|
|
|
5029
5029
|
/* STABLE_FRAGMENT */
|
|
5030
5030
|
));
|
|
5031
5031
|
}
|
|
5032
|
-
}, qc = /* @__PURE__ */ it(zc, [["__scopeId", "data-v-c970699f"], ["__file", "/Users/
|
|
5032
|
+
}, qc = /* @__PURE__ */ it(zc, [["__scopeId", "data-v-c970699f"], ["__file", "/Users/yinheng/Desktop/code/xiaochengxu/liusenlin_project/Translation_Video/src/components/Header.vue"]]), Wc = {
|
|
5033
5033
|
install(e) {
|
|
5034
5034
|
e.component("my-header", qc);
|
|
5035
5035
|
}
|
package/my-header.umd.cjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</div> `),ol,r.createElementVNode("div",{class:"account flew-row-v-center",style:{padding:"0 12px","border-radius":"4px"},onClick:t[2]||(t[2]=(...i)=>a.handleFbLogin&&a.handleFbLogin(...i))},[r.createCommentVNode(` <img class="img" src="https://statics.imgkits.com/images/facebook_logo.png" alt="facebook logo" width="24" height="24" style="width: 24pxheight: 24px;margin: 8px 8px 8px 12px;">
|
|
9
9
|
<div style="flex: 1;margin-right: 12px;color: #fff;font-size: 16px;text-align: center;font-weight: bold;">Log in With Facebook</div> `),rl,sl])]),al,r.createElementVNode("div",null,[r.createElementVNode("div",il,[ll,r.withDirectives(r.createElementVNode("input",{id:"user_email",type:"email","onUpdate:modelValue":t[3]||(t[3]=i=>s.email=i),onInput:t[4]||(t[4]=(...i)=>a.handleInput&&a.handleInput(...i)),onBlur:t[5]||(t[5]=(...i)=>a.handleInputBlur&&a.handleInputBlur(...i))},null,544),[[r.vModelText,s.email]]),s.emailErrorHelp?(r.openBlock(),r.createElementBlock("p",cl,r.toDisplayString(s.emailErrorHelp),1)):r.createCommentVNode("v-if",!0)]),s.isSignup?(r.openBlock(),r.createElementBlock("div",ul,[dl,r.withDirectives(r.createElementVNode("input",{id:"user_name",type:"text","onUpdate:modelValue":t[6]||(t[6]=i=>s.name=i)},null,512),[[r.vModelText,s.name]])])):r.createCommentVNode("v-if",!0),r.createElementVNode("div",fl,[pl,r.withDirectives(r.createElementVNode("input",{id:"user_password",type:"password","onUpdate:modelValue":t[7]||(t[7]=i=>s.password=i),onInput:t[8]||(t[8]=(...i)=>a.handleInput&&a.handleInput(...i))},null,544),[[r.vModelText,s.password]]),s.passwordErrorHelp?(r.openBlock(),r.createElementBlock("p",ml,[r.createTextVNode(r.toDisplayString(s.passwordErrorHelp)+" ",1),s.errCode==2?(r.openBlock(),r.createElementBlock("span",hl,gl)):r.createCommentVNode("v-if",!0)])):r.createCommentVNode("v-if",!0)]),s.isSignup?(r.openBlock(),r.createElementBlock("button",{key:1,class:"form-button",disabled:s.disabled,onClick:t[9]||(t[9]=(...i)=>a.handleSignup&&a.handleSignup(...i))},"Create Your Account",8,yl)):(r.openBlock(),r.createElementBlock("button",{key:2,class:"form-button",disabled:s.disabled,onClick:t[10]||(t[10]=(...i)=>a.handleLogin&&a.handleLogin(...i))},"Login",8,bl))]),s.isSignup?r.createCommentVNode("v-if",!0):(r.openBlock(),r.createElementBlock("div",wl,[_l,r.createCommentVNode(' <a href="/user/resend-verification-email"> Need new verification email?</a> ')])),r.createCommentVNode(` <div class="link">
|
|
10
10
|
By creating an account you agree to our <a href="/site/terms" style="color: #1778f2;">Terms of Use</a>
|
|
11
|
-
</div> `)])}const vl=De(Zi,[["render",El],["__scopeId","data-v-4682235c"],["__file","/Users/
|
|
11
|
+
</div> `)])}const vl=De(Zi,[["render",El],["__scopeId","data-v-4682235c"],["__file","/Users/yinheng/Desktop/code/xiaochengxu/liusenlin_project/Translation_Video/src/components/Login1.vue"]]),qc="",Sl={data(){return{}},components:{Login1:vl},mounted(){},methods:{handleLoginSuccess(){this.$emit("success");const e=localStorage.getItem("cache_passport");e&&(ri(e),localStorage.removeItem("cache_passport"),oo({passport:e},"active_passport_success"))},handleClose(){this.$emit("close")}}},xl=e=>(r.pushScopeId("data-v-47199182"),e=e(),r.popScopeId(),e),Nl={class:"background-cover"},Pl={class:"login-content"},Ol=[xl(()=>r.createElementVNode("svg",{t:"1641536858080",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1477",width:"32",height:"32"},[r.createElementVNode("path",{d:"M512 455.431L794.843 172.59a8 8 0 0 1 11.313 0l45.255 45.255a8 8 0 0 1 0 11.313L568.57 512 851.41 794.843a8 8 0 0 1 0 11.313l-45.255 45.255a8 8 0 0 1-11.313 0L512 568.57 229.157 851.41a8 8 0 0 1-11.313 0l-45.255-45.255a8 8 0 0 1 0-11.313L455.43 512 172.59 229.157a8 8 0 0 1 0-11.313l45.255-45.255a8 8 0 0 1 11.313 0L512 455.43z","p-id":"1478",fill:"#2c2c2c"})],-1))];function Cl(e,t,n,o,s,a){const i=r.resolveComponent("Login1");return r.openBlock(),r.createElementBlock("div",Nl,[r.createElementVNode("div",Pl,[r.createVNode(i,{onSuccess:a.handleLoginSuccess},null,8,["onSuccess"]),r.createElementVNode("div",{class:"cancel",onClick:t[0]||(t[0]=(...l)=>a.handleClose&&a.handleClose(...l))},Ol)])])}const kl=De(Sl,[["render",Cl],["__scopeId","data-v-47199182"],["__file","/Users/yinheng/Desktop/code/xiaochengxu/liusenlin_project/Translation_Video/src/components/Login.vue"]]);/*!
|
|
12
12
|
* pinia v2.1.4
|
|
13
13
|
* (c) 2023 Eduardo San Martin Morote
|
|
14
14
|
* @license MIT
|
|
@@ -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 Mo=De(Vl,[["render",Zl],["__scopeId","data-v-8580ad75"],["__file","/Users/hodohimehime/Desktop/test/xiaochengxu/liusenlin_project/Translation_Video/src/components/PersonalCenter.vue"]]),Qc="",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 tu="",nu="",ue=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=ue(()=>r.createElementVNode("span",{class:"hidden items-center gap-x-1 text-sm font-semibold h-7 leading-7 text-gray-900"},null,-1)),ic=["href"],lc=["src","alt"],cc={class:"pl-2 text-xl"},uc={class:"flex lg:hidden"},dc=ue(()=>r.createElementVNode("span",{class:"sr-only"},"Open main menu",-1)),fc={class:"hidden lg:flex lg:gap-x-12"},pc={class:"navigation-item inline-flex items-center gap-x-1 text-sm font-semibold h-7 leading-7 text-gray-900"},mc=ue(()=>r.createElementVNode("span",null,"Apps",-1)),hc={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"},gc=["href"],yc=["href","target"],bc={key:0,class:"hidden lg:flex lg:flex-1 lg:justify-end"},wc={key:1,class:"hidden lg:flex lg:flex-1 lg:justify-end"},_c=ue(()=>r.createElementVNode("span",{"aria-hidden":"true"},null,-1)),Ec={key:2,class:"hidden lg:flex lg:flex-1 lg:justify-end text-sm font-semibold leading-6 text-gray-900 items-center"},vc={class:"pr-4"},Sc=["src"],xc=ue(()=>r.createElementVNode("div",{class:"open-icon"},null,-1)),Nc={class:"user-center-dialog shadow-xl"},Pc=ue(()=>r.createElementVNode("div",{class:"fixed inset-0 z-50"},null,-1)),Oc={class:"flex items-center justify-between"},Cc=["href"],kc={class:"sr-only"},Tc=["src","alt"],Ac=ue(()=>r.createElementVNode("span",{class:"sr-only"},"Close menu",-1)),Lc={class:"mt-6 flow-root"},$c={class:"-my-6 divide-y divide-gray-500/10"},Rc={class:"space-y-2 py-6"},Dc={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"},Fc=["href","target"],Vc={key:0,class:"py-6"},Bc=De({__name:"Header",props:{isShenHe:{type:Boolean,default:!1},userStore:{type:Object,default:()=>{}},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.userStore.user),u=()=>{n.userStore.showLogin(!0)},p=r.ref(!1);r.onMounted(()=>{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||ao(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,[ac,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,lc),r.createElementVNode("span",cc,r.toDisplayString(s.value.name),1)],8,ic)]),r.createElementVNode("div",uc,[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)},[dc,r.createVNode(r.unref(Yi),{class:"h-6 w-6","aria-hidden":"true"})])]),r.createElementVNode("div",fc,[e.isShenHe?r.createCommentVNode("v-if",!0):(r.openBlock(),r.createBlock(r.unref(Ro),{key:0,class:"relative"},{default:r.withCtx(()=>[r.createVNode(r.unref(Ji),null,{default:r.withCtx(()=>[r.createElementVNode("div",pc,[mc,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",hc,[(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,gc)),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:"navigation-item inline-flex items-center text-sm h-7 leading-7 font-semibold text-gray-900"},r.toDisplayString(N.name),9,yc))),128))]),e.isShenHe?(r.openBlock(),r.createElementBlock("div",bc)):d.value?(r.openBlock(),r.createElementBlock("div",Ec,[r.createElementVNode("div",{class:"cursor-pointer flex items-center",onMouseenter:h,onMouseleave:b},[r.createElementVNode("div",vc,[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,Sc),xc,r.withDirectives(r.createElementVNode("div",null,[r.createElementVNode("div",Nc,[d.value?(r.openBlock(),r.createBlock(Mo,{key:0,user:d.value},null,8,["user"])):r.createCommentVNode("v-if",!0)])],512),[[r.vShow,c.value]])],32)])):(r.openBlock(),r.createElementBlock("div",wc,[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"),_c])]))]),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(()=>[Pc,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",Oc,[r.createElementVNode("a",{href:f.value,class:"-m-1.5 p-1.5"},[r.createElementVNode("span",kc,r.toDisplayString(s.value.name),1),r.createElementVNode("img",{class:"h-8 w-auto",src:s.value.logo,alt:s.value.name},null,8,Tc)],8,Cc),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)},[Ac,r.createVNode(r.unref(Xi),{class:"h-6 w-6","aria-hidden":"true"})])]),r.createElementVNode("div",Lc,[r.createElementVNode("div",$c,[r.createElementVNode("div",Rc,[e.isShenHe?r.createCommentVNode("v-if",!0):(r.openBlock(),r.createElementBlock("a",Dc,"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,Fc))),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(Mo,{key:0,user:d.value},null,8,["user"])):r.createCommentVNode("v-if",!0)])):(r.openBlock(),r.createElementBlock("div",Vc,[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.isShowLogin?(r.openBlock(),r.createBlock(kl,{key:0,onSuccess:y,onClose:g})):r.createCommentVNode("v-if",!0),e.userStore.isShowToast?(r.openBlock(),r.createBlock(nc,{key:1,content: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",Bc)}}});
|
|
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 Mo=De(Vl,[["render",Zl],["__scopeId","data-v-8580ad75"],["__file","/Users/yinheng/Desktop/code/xiaochengxu/liusenlin_project/Translation_Video/src/components/PersonalCenter.vue"]]),Qc="",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/yinheng/Desktop/code/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 tu="",nu="",ue=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=ue(()=>r.createElementVNode("span",{class:"hidden items-center gap-x-1 text-sm font-semibold h-7 leading-7 text-gray-900"},null,-1)),ic=["href"],lc=["src","alt"],cc={class:"pl-2 text-xl"},uc={class:"flex lg:hidden"},dc=ue(()=>r.createElementVNode("span",{class:"sr-only"},"Open main menu",-1)),fc={class:"hidden lg:flex lg:gap-x-12"},pc={class:"navigation-item inline-flex items-center gap-x-1 text-sm font-semibold h-7 leading-7 text-gray-900"},mc=ue(()=>r.createElementVNode("span",null,"Apps",-1)),hc={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"},gc=["href"],yc=["href","target"],bc={key:0,class:"hidden lg:flex lg:flex-1 lg:justify-end"},wc={key:1,class:"hidden lg:flex lg:flex-1 lg:justify-end"},_c=ue(()=>r.createElementVNode("span",{"aria-hidden":"true"},null,-1)),Ec={key:2,class:"hidden lg:flex lg:flex-1 lg:justify-end text-sm font-semibold leading-6 text-gray-900 items-center"},vc={class:"pr-4"},Sc=["src"],xc=ue(()=>r.createElementVNode("div",{class:"open-icon"},null,-1)),Nc={class:"user-center-dialog shadow-xl"},Pc=ue(()=>r.createElementVNode("div",{class:"fixed inset-0 z-50"},null,-1)),Oc={class:"flex items-center justify-between"},Cc=["href"],kc={class:"sr-only"},Tc=["src","alt"],Ac=ue(()=>r.createElementVNode("span",{class:"sr-only"},"Close menu",-1)),Lc={class:"mt-6 flow-root"},$c={class:"-my-6 divide-y divide-gray-500/10"},Rc={class:"space-y-2 py-6"},Dc={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"},Fc=["href","target"],Vc={key:0,class:"py-6"},Bc=De({__name:"Header",props:{isShenHe:{type:Boolean,default:!1},userStore:{type:Object,default:()=>{}},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.userStore.user),u=()=>{n.userStore.showLogin(!0)},p=r.ref(!1);r.onMounted(()=>{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||ao(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,[ac,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,lc),r.createElementVNode("span",cc,r.toDisplayString(s.value.name),1)],8,ic)]),r.createElementVNode("div",uc,[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)},[dc,r.createVNode(r.unref(Yi),{class:"h-6 w-6","aria-hidden":"true"})])]),r.createElementVNode("div",fc,[e.isShenHe?r.createCommentVNode("v-if",!0):(r.openBlock(),r.createBlock(r.unref(Ro),{key:0,class:"relative"},{default:r.withCtx(()=>[r.createVNode(r.unref(Ji),null,{default:r.withCtx(()=>[r.createElementVNode("div",pc,[mc,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",hc,[(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,gc)),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:"navigation-item inline-flex items-center text-sm h-7 leading-7 font-semibold text-gray-900"},r.toDisplayString(N.name),9,yc))),128))]),e.isShenHe?(r.openBlock(),r.createElementBlock("div",bc)):d.value?(r.openBlock(),r.createElementBlock("div",Ec,[r.createElementVNode("div",{class:"cursor-pointer flex items-center",onMouseenter:h,onMouseleave:b},[r.createElementVNode("div",vc,[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,Sc),xc,r.withDirectives(r.createElementVNode("div",null,[r.createElementVNode("div",Nc,[d.value?(r.openBlock(),r.createBlock(Mo,{key:0,user:d.value},null,8,["user"])):r.createCommentVNode("v-if",!0)])],512),[[r.vShow,c.value]])],32)])):(r.openBlock(),r.createElementBlock("div",wc,[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"),_c])]))]),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(()=>[Pc,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",Oc,[r.createElementVNode("a",{href:f.value,class:"-m-1.5 p-1.5"},[r.createElementVNode("span",kc,r.toDisplayString(s.value.name),1),r.createElementVNode("img",{class:"h-8 w-auto",src:s.value.logo,alt:s.value.name},null,8,Tc)],8,Cc),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)},[Ac,r.createVNode(r.unref(Xi),{class:"h-6 w-6","aria-hidden":"true"})])]),r.createElementVNode("div",Lc,[r.createElementVNode("div",$c,[r.createElementVNode("div",Rc,[e.isShenHe?r.createCommentVNode("v-if",!0):(r.openBlock(),r.createElementBlock("a",Dc,"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,Fc))),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(Mo,{key:0,user:d.value},null,8,["user"])):r.createCommentVNode("v-if",!0)])):(r.openBlock(),r.createElementBlock("div",Vc,[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.isShowLogin?(r.openBlock(),r.createBlock(kl,{key:0,onSuccess:y,onClose:g})):r.createCommentVNode("v-if",!0),e.userStore.isShowToast?(r.openBlock(),r.createBlock(nc,{key:1,content:e.userStore.toastContent},null,8,["content"])):r.createCommentVNode("v-if",!0)],64))}},[["__scopeId","data-v-c970699f"],["__file","/Users/yinheng/Desktop/code/xiaochengxu/liusenlin_project/Translation_Video/src/components/Header.vue"]]);return{install(e){e.component("my-header",Bc)}}});
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "my-header-yichong",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "my-header.umd.cjs",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
8
|
},
|
|
9
|
-
"keywords": [],
|
|
10
9
|
"author": "",
|
|
11
10
|
"license": "ISC"
|
|
12
11
|
}
|