@xcpcio/board-app 0.26.0 → 0.27.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/dist/assets/Board-88436e20.js +3 -0
- package/dist/assets/DataSourceInput.vue_vue_type_script_setup_true_lang-effb1be0.js +1 -0
- package/dist/assets/TheInput.vue_vue_type_script_setup_true_lang-2b1997a6.js +1 -0
- package/dist/assets/_...all_-bb67b33f.js +1 -0
- package/dist/assets/_name_-d0a3d653.js +1 -0
- package/dist/assets/{about-ed4e51a8.js → about-8e4f6558.js} +1 -1
- package/dist/assets/board-c38fef02.js +1 -0
- package/dist/assets/board-layout-2f8b4c8e.js +1 -0
- package/dist/assets/headless-04b3d2be.js +1 -0
- package/dist/assets/home-f7c22489.js +1 -0
- package/dist/assets/{index-00889800.css → index-522cf95a.css} +2 -2
- package/dist/assets/index-7955279c.js +205 -0
- package/dist/assets/index-e972e718.js +1 -0
- package/dist/assets/index-layout-f3e9e819.js +1 -0
- package/dist/assets/test-94bf1ee1.js +1 -0
- package/dist/assets/useQueryBoardData-78fadedd.js +1 -0
- package/dist/assets/user-c31467e6.js +1 -0
- package/dist/assets/virtual_pwa-register-d035b16b.js +1 -0
- package/dist/index.html +122 -1
- package/dist/sw.js +1 -1
- package/package.json +4 -4
- package/src/components/ContestIndexUI.vue +18 -12
- package/src/components/Footer.vue +44 -40
- package/src/components/board/BoardTab.vue +2 -2
- package/src/components/flowbite/Tooltip.css +172 -0
- package/src/components/flowbite/Tooltip.vue +62 -0
- package/src/components.d.ts +1 -0
- package/src/pages/[...all].vue +0 -10
- package/src/pages/board.vue +8 -0
- package/src/pages/index.vue +2 -1
- package/uno.config.ts +5 -0
- package/dist/about.html +0 -11
- package/dist/assets/DataSourceInput.vue_vue_type_script_setup_true_lang-b63d8c0a.js +0 -1
- package/dist/assets/TheInput.vue_vue_type_script_setup_true_lang-01db0210.js +0 -1
- package/dist/assets/_...all_-ccdf65e0.js +0 -3
- package/dist/assets/_name_-41975e46.js +0 -1
- package/dist/assets/app-229ad629.js +0 -205
- package/dist/assets/board-layout-22e4dc7d.js +0 -1
- package/dist/assets/headless-254ddfda.js +0 -1
- package/dist/assets/home-ff1bf49b.js +0 -1
- package/dist/assets/index-4ec61f53.js +0 -1
- package/dist/assets/index-layout-d88ea34a.js +0 -1
- package/dist/assets/test-0bd7427d.js +0 -1
- package/dist/assets/user-b4f3ed5d.js +0 -1
- package/dist/assets/virtual_pwa-register-123217d5.js +0 -1
- package/dist/balloon.html +0 -1
- package/dist/robots.txt +0 -4
- package/dist/sitemap.xml +0 -1
- package/dist/ssr-manifest.json +0 -834
- package/dist/test.html +0 -1
- /package/dist/assets/{_...all_-f6dd53aa.css → Board-f6dd53aa.css} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as C,h as w,i as u,u as V,o,c as n,j as t,n as E,d as s,k as S,t as p,l as g,m as F,p as R,B as I,q as A,w as O,s as q,v as M,x as Q,y as X,F as N,z as G,A as H,R as J,b as $,a as K,C as j}from"./index-7955279c.js";import{u as P}from"./useQueryBoardData-78fadedd.js";import{g as W,_ as Y}from"./DataSourceInput.vue_vue_type_script_setup_true_lang-effb1be0.js";import"./TheInput.vue_vue_type_script_setup_true_lang-2b1997a6.js";const Z={flex:"","flex-1":"","flex-col":"","justify-center":"","items-start":""},ee={class:"resolver-team-name",truncate:"","overflow-hidden":""},te=s("div",{flex:"","flex-row":"","text-sm":"","items-start":"","gap-x-2":""},null,-1),oe={"w-32":"",flex:"","flex-shrink-0":"","flex-row":"","justify-start":"","items-center":""},ne=C({__name:"BalloonBlock",props:{index:null,balloon:null},setup(f){const a=f,_=w(()=>a.index),r=w(()=>a.balloon),c=u(null),i=V(c);function x(e){return[e.location,e.organization,e.name].filter(d=>d).join(" - ")}function v(e){return typeof e=="string"?e:F&&(e!=null&&e.dark)?e.dark:e.light}return(e,b)=>{var d,l,h,k;return o(),n("div",{ref_key:"el",ref:c,"h-24":""},[t(i)?(o(),n("div",{key:0,"h-24":"",flex:"","flex-row":"","gap-x-4":"","font-mono":"","text-4xl":"",class:E([t(_)%2===0?"bg-resolver-bg-zero":"bg-resolver-bg-one"])},[s("div",{"w-20":"",flex:"","flex-shrink-0":"","justify-center":"","items-center":"",style:S({backgroundColor:v(((l=(d=t(r).problem)==null?void 0:d.balloonColor)==null?void 0:l.background_color)??"rgba(0, 0, 0, 0.5)")})},[s("div",{style:S({color:v(((k=(h=t(r).problem)==null?void 0:h.balloonColor)==null?void 0:k.color)??"#fff")})},p(t(r).problem.label),5)],4),s("div",Z,[s("div",ee,p(x(t(r).team)),1),te]),s("div",oe,p(t(r).submission.timestampToMinute),1)],2)):g("",!0)],512)}}}),se={class:"bg-[#323443]","text-gray-200":""},ae={key:0},le={flex:"","flex-col":"","justify-center":"","items-center":"","w-screen":"","h-screen":"","text-xl":"",italic:""},re={key:0},ce={key:1},ie={flex:"","flex-col":"","justify-between":""},ue=C({__name:"Balloon",props:{dataSourceUrl:null},setup(f){const a=f,_=R(I),{t:r}=A(),c=u(!1),i=u({}),x=u([]),v=u([]),e=u({}),b=u(new Date);function d(){const m=new J(i.value,x.value,v.value);m.buildBalloons(),e.value=m}const{data:l,isError:h,error:k}=P(a.dataSourceUrl,b);O(l,async()=>{var m,B,y;l.value===null||l.value===void 0||(i.value=q((m=l.value)==null?void 0:m.contest),_.value=`${i.value.name} | ${I}`,x.value=M((B=l.value)==null?void 0:B.teams),v.value=Q((y=l.value)==null?void 0:y.submissions),d(),c.value=!0)});const U=w(()=>e.value.balloons),z=setInterval(()=>{b.value=new Date},1e3);return X(()=>{clearInterval(z)}),(m,B)=>{const y=ne;return o(),n("div",se,[t(c)?(o(),n("div",ce,[s("div",ie,[(o(!0),n(N,null,G(t(U),(D,L)=>(o(),H(y,{key:D.key,index:L,balloon:D},null,8,["index","balloon"]))),128))])])):(o(),n("div",ae,[s("div",le,[s("div",null,p(t(r)("common.loading"))+"... ",1),t(h)?(o(),n("div",re,p(t(k)),1)):g("",!0)])]))])}}}),_e={key:0},de={"mt-20":""},me={key:1},fe=C({__name:"CustomBalloon",setup(f){const a=W();return(_,r)=>{const c=Y,i=ue;return o(),n(N,null,[t(a).length===0?(o(),n("div",_e,[s("div",de,[$(c)])])):g("",!0),t(a).length>0?(o(),n("div",me,[$(i,{"data-source-url":t(a)},null,8,["data-source-url"])])):g("",!0)],64)}}}),T={};function ve(f,a){const _=fe;return o(),n("div",null,[$(_)])}typeof j=="function"&&j(T);const ke=K(T,[["render",ve]]);export{ke as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s,r as a,o as c,c as r,b as e,d as _,F as m,e as p,f as l}from"./index-7955279c.js";const i={},d={class:"lg:mt-[-52px]","py-2":"","text-gray-700":"","dark:text-gray-200":""};function u(x,f){const o=p,t=a("RouterView"),n=l;return c(),r(m,null,[e(o,{width:"sm:w-[1024px] lg:w-screen"}),_("main",d,[e(t),e(n,{class:"sm:w-[1024px] lg:w-screen"})])],64)}const w=s(i,[["render",u]]);export{w as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as m}from"./TheInput.vue_vue_type_script_setup_true_lang-2b1997a6.js";import{g as _,i as p,D as f,q as h,o as b,c as v,d as e,t as n,j as o,b as y,E as x,G as g,C as l}from"./index-7955279c.js";import{u as w}from"./user-c31467e6.js";const V={flex:"","flex-col":"","justify-center":"","items-center":""},k=e("div",{"text-4xl":""},[e("div",{"i-carbon-campsite":""})],-1),C=e("p",null,[e("a",{rel:"noreferrer",href:"https://github.com/antfu/vitesse",target:"_blank"}," Vitesse ")],-1),I={"text-sm":"","opacity-75":""},B=e("div",{"py-4":""},null,-1),K={"w-48":""},N={class:"hidden",for:"input"},R=["disabled"],U=_({name:"IndexPage",__name:"test",setup(j){const r=w(),t=p(r.savedName),c=f();function a(){t.value&&c.push(`/hi/${encodeURIComponent(t.value)}`)}const{t:s}=h();return(D,i)=>{const d=m;return b(),v("div",V,[k,C,e("p",null,[e("em",I,n(o(s)("intro.desc")),1)]),B,e("div",K,[y(d,{modelValue:o(t),"onUpdate:modelValue":i[0]||(i[0]=u=>x(t)?t.value=u:null),placeholder:o(s)("intro.whats-your-name"),autocomplete:"false",onKeydown:g(a,["enter"])},null,8,["modelValue","placeholder","onKeydown"]),e("label",N,n(o(s)("intro.whats-your-name")),1)]),e("div",null,[e("button",{"m-3":"","text-sm":"",btn:"",disabled:!o(t),onClick:a},n(o(s)("button.go")),9,R)])])}}});typeof l=="function"&&l(U);export{U as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ak as M,al as S,am as K,an as U,ao as D,ap as B,aq as W,ar as V,as as A,at as z,au as N,av as H,aw as Y,ax as _,h as P,ay as $,w as b,az as x,aA as G,aB as J,aC as X,aD as Z,j as C,aE as ee,aF as te}from"./index-7955279c.js";class se extends M{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),k(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return E(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return E(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){const s=this.options,u=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),S(s,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();const i=this.hasListeners();i&&j(this.currentQuery,u,this.options,s)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==u||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();const n=this.computeRefetchInterval();i&&(this.currentQuery!==u||this.options.enabled!==s.enabled||n!==this.currentRefetchInterval)&&this.updateRefetchInterval(n)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e),s=this.createResult(t,e);return ie(this,s,e)&&(this.currentResult=s,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),s}getCurrentResult(){return this.currentResult}trackResult(e){const t={};return Object.keys(e).forEach(s=>{Object.defineProperty(t,s,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(s),e[s])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){const t=this.client.defaultQueryOptions(e),s=this.client.getQueryCache().build(this.client,t);return s.isFetchingOptimistic=!0,s.fetch().then(()=>this.createResult(s,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:(t=e.cancelRefetch)!=null?t:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(K)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),U||this.currentResult.isStale||!D(this.options.staleTime))return;const t=B(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(U||this.options.enabled===!1||!D(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||W.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){const s=this.currentQuery,u=this.options,i=this.currentResult,n=this.currentResultState,a=this.currentResultOptions,l=e!==s,h=l?e.state:this.currentQueryInitialState,o=l?this.currentResult:this.previousQueryResult,{state:c}=e;let{dataUpdatedAt:d,error:R,errorUpdatedAt:m,fetchStatus:v,status:f}=c,w=!1,F=!1,y;if(t._optimisticResults){const p=this.hasListeners(),O=!p&&k(e,t),L=p&&j(e,s,t,u);(O||L)&&(v=V(e.options.networkMode)?"fetching":"paused",d||(f="loading")),t._optimisticResults==="isRestoring"&&(v="idle")}if(t.keepPreviousData&&!c.dataUpdatedAt&&o!=null&&o.isSuccess&&f!=="error")y=o.data,d=o.dataUpdatedAt,f=o.status,w=!0;else if(t.select&&typeof c.data<"u")if(i&&c.data===(n==null?void 0:n.data)&&t.select===this.selectFn)y=this.selectResult;else try{this.selectFn=t.select,y=t.select(c.data),y=A(i==null?void 0:i.data,y,t),this.selectResult=y,this.selectError=null}catch(p){this.selectError=p}else y=c.data;if(typeof t.placeholderData<"u"&&typeof y>"u"&&f==="loading"){let p;if(i!=null&&i.isPlaceholderData&&t.placeholderData===(a==null?void 0:a.placeholderData))p=i.data;else if(p=typeof t.placeholderData=="function"?t.placeholderData():t.placeholderData,t.select&&typeof p<"u")try{p=t.select(p),this.selectError=null}catch(O){this.selectError=O}typeof p<"u"&&(f="success",y=A(i==null?void 0:i.data,p,t),F=!0)}this.selectError&&(R=this.selectError,y=this.selectResult,m=Date.now(),f="error");const Q=v==="fetching",g=f==="loading",I=f==="error";return{status:f,fetchStatus:v,isLoading:g,isSuccess:f==="success",isError:I,isInitialLoading:g&&Q,data:y,dataUpdatedAt:d,error:R,errorUpdatedAt:m,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>h.dataUpdateCount||c.errorUpdateCount>h.errorUpdateCount,isFetching:Q,isRefetching:Q&&!g,isLoadingError:I&&c.dataUpdatedAt===0,isPaused:v==="paused",isPlaceholderData:F,isPreviousData:w,isRefetchError:I&&c.dataUpdatedAt!==0,isStale:T(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){const t=this.currentResult,s=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,S(s,t))return;this.currentResult=s;const u={cache:!0},i=()=>{if(!t)return!0;const{notifyOnChangeProps:n}=this.options,a=typeof n=="function"?n():n;if(a==="all"||!a&&!this.trackedProps.size)return!0;const l=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(h=>{const o=h;return this.currentResult[o]!==t[o]&&l.has(o)})};(e==null?void 0:e.listeners)!==!1&&i()&&(u.listeners=!0),this.notify({...u,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const t={};e.type==="success"?t.onSuccess=!e.manual:e.type==="error"&&!z(e.error)&&(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){N.batch(()=>{if(e.onSuccess){var t,s,u,i;(t=(s=this.options).onSuccess)==null||t.call(s,this.currentResult.data),(u=(i=this.options).onSettled)==null||u.call(i,this.currentResult.data,null)}else if(e.onError){var n,a,l,h;(n=(a=this.options).onError)==null||n.call(a,this.currentResult.error),(l=(h=this.options).onSettled)==null||l.call(h,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:o})=>{o(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function re(r,e){return e.enabled!==!1&&!r.state.dataUpdatedAt&&!(r.state.status==="error"&&e.retryOnMount===!1)}function k(r,e){return re(r,e)||r.state.dataUpdatedAt>0&&E(r,e,e.refetchOnMount)}function E(r,e,t){if(e.enabled!==!1){const s=typeof t=="function"?t(r):t;return s==="always"||s!==!1&&T(r,e)}return!1}function j(r,e,t,s){return t.enabled!==!1&&(r!==e||s.enabled===!1)&&(!t.suspense||r.state.status!=="error")&&T(r,t)}function T(r,e){return r.isStaleByTime(e.staleTime)}function ie(r,e,t){return t.keepPreviousData?!1:t.placeholderData!==void 0?e.isPlaceholderData:!S(r.getCurrentResult(),e)}function ne(r=""){var e;if(!((e=H())==null?void 0:e.proxy))throw new Error("vue-query hooks can only be used inside setup() function.");const s=_(r),u=Y(s);if(!u)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return u}function ue(r,e,t={},s={}){var u;const i=P(()=>ae(e,t,s)),n=(u=i.value.queryClient)!=null?u:ne(i.value.queryClientKey),a=P(()=>{const d=n.defaultQueryOptions(i.value);return d._optimisticResults=n.isRestoring.value?"isRestoring":"optimistic",d}),l=new r(n,a.value),h=$(l.getCurrentResult());let o=()=>{};b(n.isRestoring,d=>{d||(o(),o=l.subscribe(R=>{x(h,R)}))},{immediate:!0}),b(a,()=>{l.setOptions(a.value),x(h,l.getCurrentResult())}),G(()=>{o()});const c=()=>new Promise((d,R)=>{let m=()=>{};const v=()=>{if(a.value.enabled!==!1){const f=l.getOptimisticResult(a.value);f.isStale?(m(),l.fetchOptimistic(a.value).then(d,R)):(m(),d(f))}};v(),m=b(a,v,{deep:!0})});return b(()=>h.error,d=>{if(h.isError&&!h.isFetching&&J(a.value.useErrorBoundary,[d,l.getCurrentQuery()]))throw d}),{...X(Z(h)),suspense:c}}function ae(r,e={},t={}){const s=C(r),u=C(e),i=C(t);let n=s;return ee(s)?typeof u=="function"?n={...i,queryKey:s,queryFn:u}:n={...u,queryKey:s}:n=s,te(n)}function le(r,e,t){const s=ue(se,r,e,t);return{...s,refetch:s.refetch.value,remove:s.remove.value}}const ce=3,q=30*1e3;async function oe(r,e){const t=r.startsWith("/")?r.slice(1):r;let s=`${window.DATA_HOST}${t}`;r.startsWith("http")&&(s=r),s.endsWith("/")&&(s=s.slice(0,-1));const u=await fetch(`${s}/config.json?t=${e??0}`),i=await fetch(`${s}/team.json?t=${e??0}`),n=await fetch(`${s}/run.json?t=${e??0}`);return Promise.all([u.json(),i.json(),n.json()]).then(l=>({contest:l[0],teams:l[1],submissions:l[2]}))}function fe(r,e){return le({queryKey:[r,e.value.getTime()],queryFn:()=>oe(r,e.value.getTime()),retry:ce,staleTime:q,refetchInterval:q})}export{fe as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aH as m,i as r,h as t}from"./index-7955279c.js";const l=m("user",()=>{const e=r(""),s=r(new Set),o=t(()=>Array.from(s.value)),u=t(()=>o.value.filter(a=>a!==e.value));function n(a){e.value&&s.value.add(e.value),e.value=a}return{setNewName:n,otherNames:u,savedName:e}});export{l as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as u}from"./index-7955279c.js";function p(d={}){const{immediate:l=!1,onNeedRefresh:v,onOfflineReady:t,onRegistered:r,onRegisteredSW:o,onRegisterError:s}=d;let i,n;const c=async(a=!0)=>{await n};async function f(){if("serviceWorker"in navigator){const{Workbox:a}=await u(()=>import("./workbox-window.prod.es5-a7b12eab.js"),[],import.meta.url);i=new a("/sw.js",{scope:"/",type:"classic"}),i.addEventListener("activated",e=>{(e.isUpdate||e.isExternal)&&window.location.reload()}),i.addEventListener("installed",e=>{e.isUpdate||t==null||t()}),i.register({immediate:l}).then(e=>{o?o("/sw.js",e):r==null||r(e)}).catch(e=>{s==null||s(e)})}}return n=f(),c}export{p as registerSW};
|
package/dist/index.html
CHANGED
|
@@ -1 +1,122 @@
|
|
|
1
|
-
<!DOCTYPE html
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> -->
|
|
6
|
+
<link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.27.0/dist/balloon-192x192.png">
|
|
7
|
+
<link rel="mask-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.27.0/dist/balloon-512x512.svg" color="#00aba9">
|
|
8
|
+
<meta name="msapplication-TileColor" content="#00aba9">
|
|
9
|
+
<script>
|
|
10
|
+
function normalizePath(path) {
|
|
11
|
+
while (path.endsWith("/")) {
|
|
12
|
+
path = path.slice(0, -1);
|
|
13
|
+
}
|
|
14
|
+
return `${path}/`;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
{
|
|
18
|
+
let CDN_HOST = "__CDN_HOST__";
|
|
19
|
+
CDN_HOST = normalizePath(CDN_HOST);
|
|
20
|
+
window.CDN_HOST = CDN_HOST;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
let DATA_HOST = __DATA_HOST__;
|
|
25
|
+
DATA_HOST = normalizePath(DATA_HOST);
|
|
26
|
+
window.DATA_HOST = DATA_HOST;
|
|
27
|
+
} catch (e) {
|
|
28
|
+
window.DATA_HOST = "/data/";
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
let DATA_REGION = __DATA_REGION__;
|
|
33
|
+
window.DATA_REGION = DATA_REGION;
|
|
34
|
+
} catch (e) {
|
|
35
|
+
window.DATA_REGION = "CN";
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
38
|
+
<script>
|
|
39
|
+
(function () {
|
|
40
|
+
const prefersDark = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
41
|
+
const setting = localStorage.getItem("vueuse-color-scheme") || "auto";
|
|
42
|
+
if (setting === "dark" || (prefersDark && setting !== "light")) {
|
|
43
|
+
document.documentElement.classList.toggle("dark", true);
|
|
44
|
+
}
|
|
45
|
+
})();
|
|
46
|
+
</script>
|
|
47
|
+
<script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.27.0/dist/assets/index-7955279c.js"></script>
|
|
48
|
+
<link rel="manifest" href="/manifest.webmanifest"><style></style></head>
|
|
49
|
+
<body class="font-sans">
|
|
50
|
+
<div id="app"></div>
|
|
51
|
+
|
|
52
|
+
<noscript>This website requires JavaScript to function properly. Please enable JavaScript to continue.</noscript>
|
|
53
|
+
<script>
|
|
54
|
+
try {
|
|
55
|
+
var umamiJSUrl = __UMAMI_JS_URL__;
|
|
56
|
+
var umamiWebsiteId = __UMAMI_WEBSITE_ID__;
|
|
57
|
+
(function () {
|
|
58
|
+
var script = document.createElement("script");
|
|
59
|
+
script.src = umamiJSUrl;
|
|
60
|
+
script.defer = true;
|
|
61
|
+
script.setAttribute("data-website-id", umamiWebsiteId);
|
|
62
|
+
var s = document.getElementsByTagName("script")[0];
|
|
63
|
+
s.parentNode.insertBefore(script, s);
|
|
64
|
+
})();
|
|
65
|
+
} catch (e) {}
|
|
66
|
+
|
|
67
|
+
try {
|
|
68
|
+
var plausibleJSUrl = __PLAUSIBLE_JS_URL__;
|
|
69
|
+
var plausibleDataDomain = __PLAUSIBLE_DATA_DOMAIN__;
|
|
70
|
+
(function () {
|
|
71
|
+
var script = document.createElement("script");
|
|
72
|
+
script.src = plausibleJSUrl;
|
|
73
|
+
script.defer = true;
|
|
74
|
+
script.setAttribute("data-domain", plausibleDataDomain);
|
|
75
|
+
var s = document.getElementsByTagName("script")[0];
|
|
76
|
+
s.parentNode.insertBefore(script, s);
|
|
77
|
+
})();
|
|
78
|
+
} catch (e) {}
|
|
79
|
+
|
|
80
|
+
try {
|
|
81
|
+
var baiduAnalyticsId = __BAIDU_ANALYTICS_ID__;
|
|
82
|
+
var _hmt = _hmt || [];
|
|
83
|
+
(function () {
|
|
84
|
+
var hm = document.createElement("script");
|
|
85
|
+
hm.src = `https://hm.baidu.com/hm.js?${baiduAnalyticsId}`;
|
|
86
|
+
var s = document.getElementsByTagName("script")[0];
|
|
87
|
+
s.parentNode.insertBefore(hm, s);
|
|
88
|
+
})();
|
|
89
|
+
} catch (e) {}
|
|
90
|
+
|
|
91
|
+
try {
|
|
92
|
+
var googleAnalyticsId = __GOOGLE_ANALYTICS_ID__;
|
|
93
|
+
(function () {
|
|
94
|
+
if (!location.port) {
|
|
95
|
+
(function (i, s, o, g, r, a, m) {
|
|
96
|
+
i["GoogleAnalyticsObject"] = r;
|
|
97
|
+
(i[r] =
|
|
98
|
+
i[r] ||
|
|
99
|
+
function () {
|
|
100
|
+
(i[r].q = i[r].q || []).push(arguments);
|
|
101
|
+
}),
|
|
102
|
+
(i[r].l = 1 * new Date());
|
|
103
|
+
(a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);
|
|
104
|
+
a.async = 1;
|
|
105
|
+
a.src = g;
|
|
106
|
+
m.parentNode.insertBefore(a, m);
|
|
107
|
+
})(
|
|
108
|
+
window,
|
|
109
|
+
document,
|
|
110
|
+
"script",
|
|
111
|
+
"//www.google-analytics.com/analytics.js",
|
|
112
|
+
"ga"
|
|
113
|
+
);
|
|
114
|
+
ga("create", `${googleAnalyticsId}`, "auto");
|
|
115
|
+
ga("send", "pageview");
|
|
116
|
+
}
|
|
117
|
+
})();
|
|
118
|
+
} catch (e) {}
|
|
119
|
+
</script>
|
|
120
|
+
|
|
121
|
+
</body>
|
|
122
|
+
</html>
|
package/dist/sw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
if(!self.define){let e
|
|
1
|
+
if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(r,n)=>{const i=s||("document"in self?document.currentScript.src:"")||location.href;if(e[i])return;let u={};const t=s=>l(s,i),a={module:{uri:i},exports:u,require:t};e[i]=Promise.all(r.map((s=>a[s]||t(s)))).then((s=>(n(...s),u)))}}define(["./workbox-b8d87ee1"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/_...all_-bb67b33f.js",revision:null},{url:"assets/_name_-d0a3d653.js",revision:null},{url:"assets/about-8e4f6558.js",revision:null},{url:"assets/Board-88436e20.js",revision:null},{url:"assets/board-c38fef02.js",revision:null},{url:"assets/Board-f6dd53aa.css",revision:null},{url:"assets/board-layout-2f8b4c8e.js",revision:null},{url:"assets/DataSourceInput.vue_vue_type_script_setup_true_lang-effb1be0.js",revision:null},{url:"assets/en-644e039f.js",revision:null},{url:"assets/headless-04b3d2be.js",revision:null},{url:"assets/home-f7c22489.js",revision:null},{url:"assets/index-522cf95a.css",revision:null},{url:"assets/index-7955279c.js",revision:null},{url:"assets/index-e972e718.js",revision:null},{url:"assets/index-layout-f3e9e819.js",revision:null},{url:"assets/test-94bf1ee1.js",revision:null},{url:"assets/TheInput.vue_vue_type_script_setup_true_lang-2b1997a6.js",revision:null},{url:"assets/useQueryBoardData-78fadedd.js",revision:null},{url:"assets/user-c31467e6.js",revision:null},{url:"assets/virtual_pwa-register-d035b16b.js",revision:null},{url:"assets/workbox-window.prod.es5-a7b12eab.js",revision:null},{url:"assets/zh-CN-44b801f0.js",revision:null},{url:"index.html",revision:"d6c322c4d573a247a7102037db2cd17c"},{url:"favicon.svg",revision:"5a744f4ccbb122d4a0575be779ddcd43"},{url:"safari-pinned-tab.svg",revision:"5eaf74d1c43d30e0af743b68a3f48504"},{url:"balloon2-192x192.png",revision:"c857ae6d9dfae118ab4397d4358422bd"},{url:"balloon2-512x512.png",revision:"065594f4f743fe3884793c03d3fe7d9e"},{url:"manifest.webmanifest",revision:"3082e8d8ebc9619c6c1055ff243a02a8"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xcpcio/board-app",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.27.0",
|
|
5
5
|
"description": "XCPCIO Board App",
|
|
6
6
|
"author": "Dup4 <lyuzhi.pan@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"vue-router": "^4.2.4",
|
|
54
54
|
"vue-search-select": "^3.1.2",
|
|
55
55
|
"vue-toast-notification": "^3",
|
|
56
|
-
"@xcpcio/core": "0.
|
|
57
|
-
"@xcpcio/types": "0.
|
|
56
|
+
"@xcpcio/core": "0.27.0",
|
|
57
|
+
"@xcpcio/types": "0.27.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@antfu/eslint-config": "^0.39.8",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"workbox-window": "^7.0.0"
|
|
105
105
|
},
|
|
106
106
|
"scripts": {
|
|
107
|
-
"build": "vite
|
|
107
|
+
"build": "vite build",
|
|
108
108
|
"dev": "vite --port 3333",
|
|
109
109
|
"lint": "eslint .",
|
|
110
110
|
"lint:fix": "eslint --fix .",
|
|
@@ -61,21 +61,27 @@ onUnmounted(() => {
|
|
|
61
61
|
>
|
|
62
62
|
</div>
|
|
63
63
|
|
|
64
|
-
<
|
|
64
|
+
<div
|
|
65
|
+
class="title"
|
|
65
66
|
w-inherit
|
|
66
67
|
>
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
<Tooltip>
|
|
69
|
+
<div
|
|
70
|
+
overflow-hidden
|
|
71
|
+
text-2xl truncate
|
|
72
|
+
>
|
|
73
|
+
{{ contest.name }}
|
|
74
|
+
</div>
|
|
74
75
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
<template #popper>
|
|
77
|
+
<div
|
|
78
|
+
text-lg
|
|
79
|
+
>
|
|
80
|
+
{{ contest.name }}
|
|
81
|
+
</div>
|
|
82
|
+
</template>
|
|
83
|
+
</Tooltip>
|
|
84
|
+
</div>
|
|
79
85
|
</div>
|
|
80
86
|
|
|
81
87
|
<div flex items-end>
|
|
@@ -73,53 +73,57 @@ const dataRegion = computed(() => {
|
|
|
73
73
|
</li>
|
|
74
74
|
|
|
75
75
|
<li>
|
|
76
|
-
<
|
|
77
|
-
|
|
76
|
+
<div
|
|
77
|
+
mr-4 md:mr-6
|
|
78
78
|
>
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
GitHub
|
|
87
|
-
</a>
|
|
88
|
-
|
|
89
|
-
<template #popper>
|
|
90
|
-
<div
|
|
91
|
-
flex justify-center
|
|
92
|
-
flex-col
|
|
79
|
+
<Tooltip>
|
|
80
|
+
<a
|
|
81
|
+
:href="GITHUB_URL"
|
|
82
|
+
hover:underline
|
|
83
|
+
rel="noreferrer"
|
|
84
|
+
target="_blank"
|
|
85
|
+
title="GitHub"
|
|
93
86
|
>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
87
|
+
GitHub
|
|
88
|
+
</a>
|
|
89
|
+
|
|
90
|
+
<template #popper>
|
|
91
|
+
<div
|
|
92
|
+
flex justify-center items-start
|
|
93
|
+
flex-col
|
|
94
|
+
>
|
|
95
|
+
<div>Tag: {{ VERSION }}</div>
|
|
96
|
+
<div>Sha: {{ GITHUB_SHA }}</div>
|
|
97
|
+
</div>
|
|
98
|
+
</template>
|
|
99
|
+
</Tooltip>
|
|
100
|
+
</div>
|
|
99
101
|
</li>
|
|
100
102
|
|
|
101
103
|
<li>
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
+
<div
|
|
105
|
+
mr-4 md:mr-6
|
|
104
106
|
>
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
Contact
|
|
110
|
-
</a>
|
|
111
|
-
|
|
112
|
-
<template #popper>
|
|
113
|
-
<div
|
|
114
|
-
flex justify-center
|
|
115
|
-
flex-col
|
|
107
|
+
<Tooltip>
|
|
108
|
+
<a
|
|
109
|
+
href="mailto:hi@dup4.com"
|
|
110
|
+
hover:underline
|
|
116
111
|
>
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
112
|
+
Contact
|
|
113
|
+
</a>
|
|
114
|
+
|
|
115
|
+
<template #popper>
|
|
116
|
+
<div
|
|
117
|
+
flex justify-center items-start
|
|
118
|
+
flex-col
|
|
119
|
+
>
|
|
120
|
+
<div>CDN Host: {{ cdnHost }}</div>
|
|
121
|
+
<div>DATA Host: {{ dataHost }}</div>
|
|
122
|
+
<div>Data Region: {{ dataRegion }}</div>
|
|
123
|
+
</div>
|
|
124
|
+
</template>
|
|
125
|
+
</Tooltip>
|
|
126
|
+
</div>
|
|
123
127
|
</li>
|
|
124
128
|
</ul>
|
|
125
129
|
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
.tooltip-arrow,.tooltip-arrow:before {
|
|
2
|
+
position: absolute;
|
|
3
|
+
width: 8px;
|
|
4
|
+
height: 8px;
|
|
5
|
+
background: inherit;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.tooltip-arrow {
|
|
9
|
+
visibility: hidden;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.tooltip-arrow:before {
|
|
13
|
+
content: "";
|
|
14
|
+
visibility: visible;
|
|
15
|
+
transform: rotate(45deg);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
[data-tooltip-style^='light'] + .tooltip > .tooltip-arrow:before {
|
|
19
|
+
border-style: solid;
|
|
20
|
+
border-color: #e5e7eb;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='top'] > .tooltip-arrow:before {
|
|
24
|
+
border-bottom-width: 1px;
|
|
25
|
+
border-right-width: 1px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='right'] > .tooltip-arrow:before {
|
|
29
|
+
border-bottom-width: 1px;
|
|
30
|
+
border-left-width: 1px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='bottom'] > .tooltip-arrow:before {
|
|
34
|
+
border-top-width: 1px;
|
|
35
|
+
border-left-width: 1px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='left'] > .tooltip-arrow:before {
|
|
39
|
+
border-top-width: 1px;
|
|
40
|
+
border-right-width: 1px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.tooltip[data-popper-placement^='top'] > .tooltip-arrow {
|
|
44
|
+
bottom: -4px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.tooltip[data-popper-placement^='bottom'] > .tooltip-arrow {
|
|
48
|
+
top: -4px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.tooltip[data-popper-placement^='left'] > .tooltip-arrow {
|
|
52
|
+
right: -4px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.tooltip[data-popper-placement^='right'] > .tooltip-arrow {
|
|
56
|
+
left: -4px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.tooltip.invisible > .tooltip-arrow:before {
|
|
60
|
+
visibility: hidden;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[data-popper-arrow],[data-popper-arrow]:before {
|
|
64
|
+
position: absolute;
|
|
65
|
+
width: 8px;
|
|
66
|
+
height: 8px;
|
|
67
|
+
background: inherit;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
[data-popper-arrow] {
|
|
71
|
+
visibility: hidden;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
[data-popper-arrow]:before {
|
|
75
|
+
content: "";
|
|
76
|
+
visibility: visible;
|
|
77
|
+
transform: rotate(45deg);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[data-popper-arrow]:after {
|
|
81
|
+
content: "";
|
|
82
|
+
visibility: visible;
|
|
83
|
+
transform: rotate(45deg);
|
|
84
|
+
position: absolute;
|
|
85
|
+
width: 9px;
|
|
86
|
+
height: 9px;
|
|
87
|
+
background: inherit;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
[role="tooltip"] > [data-popper-arrow]:before {
|
|
91
|
+
border-style: solid;
|
|
92
|
+
border-color: #e5e7eb;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.dark [role="tooltip"] > [data-popper-arrow]:before {
|
|
96
|
+
border-style: solid;
|
|
97
|
+
border-color: #4b5563;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[role="tooltip"] > [data-popper-arrow]:after {
|
|
101
|
+
border-style: solid;
|
|
102
|
+
border-color: #e5e7eb;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.dark [role="tooltip"] > [data-popper-arrow]:after {
|
|
106
|
+
border-style: solid;
|
|
107
|
+
border-color: #4b5563;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]:before {
|
|
111
|
+
border-bottom-width: 1px;
|
|
112
|
+
border-right-width: 1px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]:after {
|
|
116
|
+
border-bottom-width: 1px;
|
|
117
|
+
border-right-width: 1px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]:before {
|
|
121
|
+
border-bottom-width: 1px;
|
|
122
|
+
border-left-width: 1px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]:after {
|
|
126
|
+
border-bottom-width: 1px;
|
|
127
|
+
border-left-width: 1px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]:before {
|
|
131
|
+
border-top-width: 1px;
|
|
132
|
+
border-left-width: 1px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]:after {
|
|
136
|
+
border-top-width: 1px;
|
|
137
|
+
border-left-width: 1px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]:before {
|
|
141
|
+
border-top-width: 1px;
|
|
142
|
+
border-right-width: 1px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]:after {
|
|
146
|
+
border-top-width: 1px;
|
|
147
|
+
border-right-width: 1px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow] {
|
|
151
|
+
bottom: -5px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow] {
|
|
155
|
+
top: -5px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow] {
|
|
159
|
+
right: -5px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow] {
|
|
163
|
+
left: -5px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
[role="tooltip"].invisible > [data-popper-arrow]:before {
|
|
167
|
+
visibility: hidden;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
[role="tooltip"].invisible > [data-popper-arrow]:after {
|
|
171
|
+
visibility: hidden;
|
|
172
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Tooltip } from "flowbite";
|
|
3
|
+
import type { TooltipInterface, TooltipOptions } from "flowbite";
|
|
4
|
+
|
|
5
|
+
import "./Tooltip.css";
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
placement?: "left" | "right" | "top" | "bottom",
|
|
9
|
+
}>();
|
|
10
|
+
|
|
11
|
+
const tooltipTargetEl = ref(null);
|
|
12
|
+
const tooltipTriggerEl = ref(null);
|
|
13
|
+
|
|
14
|
+
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
15
|
+
let tooltip: TooltipInterface | null = null;
|
|
16
|
+
|
|
17
|
+
const placement = computed(() => {
|
|
18
|
+
return props.placement ?? "top";
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
onMounted(() => {
|
|
22
|
+
if (tooltipTargetEl.value && tooltipTriggerEl.value) {
|
|
23
|
+
const options: TooltipOptions = {
|
|
24
|
+
placement: placement.value as unknown as undefined,
|
|
25
|
+
triggerType: "hover",
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
tooltip = new Tooltip(tooltipTargetEl.value, tooltipTriggerEl.value, options);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<div>
|
|
35
|
+
<div
|
|
36
|
+
ref="tooltipTriggerEl"
|
|
37
|
+
>
|
|
38
|
+
<slot />
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div
|
|
42
|
+
ref="tooltipTargetEl"
|
|
43
|
+
role="tooltip"
|
|
44
|
+
class="tooltip inline-block absolute invisible px-3 py-2 transition-opacity duration-300 shadow-sm opacity-0"
|
|
45
|
+
z-9999
|
|
46
|
+
rounded
|
|
47
|
+
text-base text-white font-medium
|
|
48
|
+
bg-gray-900 dark:bg-gray-700
|
|
49
|
+
>
|
|
50
|
+
<div>
|
|
51
|
+
<slot
|
|
52
|
+
name="popper"
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div
|
|
57
|
+
class="tooltip-arrow"
|
|
58
|
+
data-popper-arrow
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
package/src/components.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare module 'vue' {
|
|
|
45
45
|
TeamUI: typeof import('./components/board/TeamUI.vue')['default']
|
|
46
46
|
TheCounter: typeof import('./components/TheCounter.vue')['default']
|
|
47
47
|
TheInput: typeof import('./components/TheInput.vue')['default']
|
|
48
|
+
Tooltip: typeof import('./components/flowbite/Tooltip.vue')['default']
|
|
48
49
|
Utility: typeof import('./components/board/Utility.vue')['default']
|
|
49
50
|
}
|
|
50
51
|
}
|