@xcpcio/board-app 0.46.2 → 0.47.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/404.html +1 -1
- package/dist/assets/Board-8cb099e8.js +1 -0
- package/dist/assets/DataSourceInput.vue_vue_type_script_setup_true_lang-669bf7c0.js +1 -0
- package/dist/assets/{TheInput.vue_vue_type_script_setup_true_lang-859ce89a.js → TheInput.vue_vue_type_script_setup_true_lang-ce96e373.js} +1 -1
- package/dist/assets/_...all_-729d96d7.js +6 -0
- package/dist/assets/_...all_-c60acc8c.css +1 -0
- package/dist/assets/_...all_-f3d30859.js +1 -0
- package/dist/assets/{_name_-07451050.js → _name_-fa12f56d.js} +1 -1
- package/dist/assets/{about-ccab3fef.js → about-6e5a2f3e.js} +1 -1
- package/dist/assets/board-6c9ef349.js +1 -0
- package/dist/assets/{board-layout-9f205eef.js → board-layout-1ad47386.js} +1 -1
- package/dist/assets/{headless-84b0ba2a.js → headless-cbd40573.js} +1 -1
- package/dist/assets/{home-51ee0a78.js → home-eb990606.js} +1 -1
- package/dist/assets/index-241beb5a.css +1 -0
- package/dist/assets/index-42e1a002.js +1 -0
- package/dist/assets/{index-ea1c658f.css → index-53dc9c92.css} +2 -2
- package/dist/assets/index-5e6a6648.js +1 -0
- package/dist/assets/{index-b8520a7a.js → index-d70fb8f0.js} +78 -78
- package/dist/assets/index-fd9c106b.js +1 -0
- package/dist/assets/{index-layout-69d341e2.js → index-layout-7a27b184.js} +1 -1
- package/dist/assets/pagination-fe331a94.js +3 -0
- package/dist/assets/{query-f9ac0577.js → query-ce1fd4de.js} +1 -1
- package/dist/assets/test-544e70d8.js +1 -0
- package/dist/assets/{user-c860815d.js → user-449d45cf.js} +1 -1
- package/dist/assets/{virtual_pwa-register-6184380c.js → virtual_pwa-register-c3a257bf.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +3 -3
- package/src/auto-imports.d.ts +9 -0
- package/src/components/NavBar.vue +10 -1
- package/src/components/rating/Rating.vue +82 -0
- package/src/components/rating/RatingBadge.vue +32 -0
- package/src/components/rating/RatingIndexUI.vue +173 -0
- package/src/components/rating/RatingInfoModal.vue +112 -0
- package/src/components/rating/RatingTable.vue +270 -0
- package/src/components/rating/RatingUserUI.vue +74 -0
- package/src/components/rating/rating.less +68 -0
- package/src/components.d.ts +6 -0
- package/src/composables/constant.ts +6 -0
- package/src/composables/rating.ts +217 -0
- package/src/pages/rating/[...all].vue +13 -0
- package/src/pages/rating/index.vue +86 -0
- package/vite.config.ts +8 -5
- package/dist/assets/Board-5a18de8e.js +0 -3
- package/dist/assets/DataSourceInput.vue_vue_type_script_setup_true_lang-3f2e71b7.js +0 -1
- package/dist/assets/_...all_-8b9261ff.js +0 -1
- package/dist/assets/board-fd754235.js +0 -1
- package/dist/assets/index-ae87348c.js +0 -1
- package/dist/assets/index-f9b2eb26.js +0 -1
- package/dist/assets/test-1cc6e80d.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{av as K,aw as T,ax as L,ay as D,az as A,aA as B,aB as N,aC as W,aD as P,aE as z,aF as V,aG as G,aH as $,aI as H,s as Q,aJ as J,w as b,aK as x,aL as Y,aM as _,aN as X,aO as Z,l as S,aP as ee,aQ as te,aR as se,ai as j}from"./index-b8520a7a.js";class re extends K{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),M(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,n=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),T(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&&k(this.currentQuery,n,this.options,s)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==n||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();const u=this.computeRefetchInterval();i&&(this.currentQuery!==n||this.options.enabled!==s.enabled||u!==this.currentRefetchInterval)&&this.updateRefetchInterval(u)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e),s=this.createResult(t,e);return ne(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(L)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),D||this.currentResult.isStale||!A(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,!(D||this.options.enabled===!1||!A(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||N.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,n=this.options,i=this.currentResult,u=this.currentResultState,a=this.currentResultOptions,c=e!==s,h=c?e.state:this.currentQueryInitialState,l=c?this.currentResult:this.previousQueryResult,{state:o}=e;let{dataUpdatedAt:d,error:R,errorUpdatedAt:m,fetchStatus:v,status:f}=o,F=!1,U=!1,y;if(t._optimisticResults){const p=this.hasListeners(),C=!p&&M(e,t),q=p&&k(e,s,t,n);(C||q)&&(v=W(e.options.networkMode)?"fetching":"paused",d||(f="loading")),t._optimisticResults==="isRestoring"&&(v="idle")}if(t.keepPreviousData&&!o.dataUpdatedAt&&l!=null&&l.isSuccess&&f!=="error")y=l.data,d=l.dataUpdatedAt,f=l.status,F=!0;else if(t.select&&typeof o.data<"u")if(i&&o.data===(u==null?void 0:u.data)&&t.select===this.selectFn)y=this.selectResult;else try{this.selectFn=t.select,y=t.select(o.data),y=P(i==null?void 0:i.data,y,t),this.selectResult=y,this.selectError=null}catch(p){this.selectError=p}else y=o.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(C){this.selectError=C}typeof p<"u"&&(f="success",y=P(i==null?void 0:i.data,p,t),U=!0)}this.selectError&&(R=this.selectError,y=this.selectResult,m=Date.now(),f="error");const g=v==="fetching",I=f==="loading",O=f==="error";return{status:f,fetchStatus:v,isLoading:I,isSuccess:f==="success",isError:O,isInitialLoading:I&&g,data:y,dataUpdatedAt:d,error:R,errorUpdatedAt:m,failureCount:o.fetchFailureCount,failureReason:o.fetchFailureReason,errorUpdateCount:o.errorUpdateCount,isFetched:o.dataUpdateCount>0||o.errorUpdateCount>0,isFetchedAfterMount:o.dataUpdateCount>h.dataUpdateCount||o.errorUpdateCount>h.errorUpdateCount,isFetching:g,isRefetching:g&&!I,isLoadingError:O&&o.dataUpdatedAt===0,isPaused:v==="paused",isPlaceholderData:U,isPreviousData:F,isRefetchError:O&&o.dataUpdatedAt!==0,isStale:w(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,T(s,t))return;this.currentResult=s;const n={cache:!0},i=()=>{if(!t)return!0;const{notifyOnChangeProps:u}=this.options,a=typeof u=="function"?u():u;if(a==="all"||!a&&!this.trackedProps.size)return!0;const c=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&c.add("error"),Object.keys(this.currentResult).some(h=>{const l=h;return this.currentResult[l]!==t[l]&&c.has(l)})};(e==null?void 0:e.listeners)!==!1&&i()&&(n.listeners=!0),this.notify({...n,...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){V.batch(()=>{if(e.onSuccess){var t,s,n,i;(t=(s=this.options).onSuccess)==null||t.call(s,this.currentResult.data),(n=(i=this.options).onSettled)==null||n.call(i,this.currentResult.data,null)}else if(e.onError){var u,a,c,h;(u=(a=this.options).onError)==null||u.call(a,this.currentResult.error),(c=(h=this.options).onSettled)==null||c.call(h,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:l})=>{l(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function ie(r,e){return e.enabled!==!1&&!r.state.dataUpdatedAt&&!(r.state.status==="error"&&e.retryOnMount===!1)}function M(r,e){return ie(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&&w(r,e)}return!1}function k(r,e,t,s){return t.enabled!==!1&&(r!==e||s.enabled===!1)&&(!t.suspense||r.state.status!=="error")&&w(r,t)}function w(r,e){return r.isStaleByTime(e.staleTime)}function ne(r,e,t){return t.keepPreviousData?!1:t.placeholderData!==void 0?e.isPlaceholderData:!T(r.getCurrentResult(),e)}function ue(r=""){var e;if(!((e=G())==null?void 0:e.proxy))throw new Error("vue-query hooks can only be used inside setup() function.");const s=H(r),n=$(s);if(!n)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return n}function ae(r,e,t={},s={}){var n;const i=Q(()=>le(e,t,s)),u=(n=i.value.queryClient)!=null?n:ue(i.value.queryClientKey),a=Q(()=>{const d=u.defaultQueryOptions(i.value);return d._optimisticResults=u.isRestoring.value?"isRestoring":"optimistic",d}),c=new r(u,a.value),h=J(c.getCurrentResult());let l=()=>{};b(u.isRestoring,d=>{d||(l(),l=c.subscribe(R=>{x(h,R)}))},{immediate:!0}),b(a,()=>{c.setOptions(a.value),x(h,c.getCurrentResult())}),Y(()=>{l()});const o=()=>new Promise((d,R)=>{let m=()=>{};const v=()=>{if(a.value.enabled!==!1){const f=c.getOptimisticResult(a.value);f.isStale?(m(),c.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&&_(a.value.useErrorBoundary,[d,c.getCurrentQuery()]))throw d}),{...X(Z(h)),suspense:o}}function le(r,e={},t={}){const s=S(r),n=S(e),i=S(t);let u=s;return ee(s)?typeof n=="function"?u={...i,queryKey:s,queryFn:n}:u={...n,queryKey:s}:u=s,te(u)}function ce(r,e,t){const s=ae(re,r,e,t);return{...s,refetch:s.refetch.value,remove:s.remove.value}}const oe=3;async function he(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 n=await fetch(`${s}/config.json?t=${e??0}`),i=await fetch(`${s}/team.json?t=${e??0}`),u=await fetch(`${s}/run.json?t=${e??0}`),{status:a,statusText:c}=n;if(a>=300||a<200)throw new Error(`fetch data failed. [status=${a}] [statusText=${c}]`);return Promise.all([n.json(),i.json(),u.json()]).then(l=>({contest:l[0],teams:l[1],submissions:l[2]}))}function pe(r,e){let t=3e4,s=Q(()=>Math.floor(e.value.getTime()/1e3/10));return se.value==="I18N"&&(t=10*1e3,s=Q(()=>Math.floor(e.value.getTime()/1e3))),ce({queryKey:[r,s.value],queryFn:()=>he(r,s.value),retry:oe,staleTime:t,refetchInterval:t})}function ye(){return j("data-source","",{transform:String})}function ve(){return j("battle-of-giants","",{transform:String})}export{ve as a,ye as g,pe as u};
|
|
1
|
+
import{av as K,aw as T,ax as L,ay as D,az as A,aA as B,aB as N,aC as W,aD as P,aE as z,aF as V,aG as G,aH as $,aI as H,h as Q,aJ as J,A as b,aK as x,aL as Y,aM as _,aN as X,aO as Z,j as S,aP as ee,aQ as te,aR as se,ai as k}from"./index-d70fb8f0.js";class re extends K{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),M(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,n=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),T(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,n,this.options,s)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==n||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();const u=this.computeRefetchInterval();i&&(this.currentQuery!==n||this.options.enabled!==s.enabled||u!==this.currentRefetchInterval)&&this.updateRefetchInterval(u)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e),s=this.createResult(t,e);return ne(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(L)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),D||this.currentResult.isStale||!A(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,!(D||this.options.enabled===!1||!A(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||N.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,n=this.options,i=this.currentResult,u=this.currentResultState,a=this.currentResultOptions,c=e!==s,h=c?e.state:this.currentQueryInitialState,l=c?this.currentResult:this.previousQueryResult,{state:o}=e;let{dataUpdatedAt:d,error:R,errorUpdatedAt:m,fetchStatus:v,status:f}=o,F=!1,U=!1,y;if(t._optimisticResults){const p=this.hasListeners(),C=!p&&M(e,t),q=p&&j(e,s,t,n);(C||q)&&(v=W(e.options.networkMode)?"fetching":"paused",d||(f="loading")),t._optimisticResults==="isRestoring"&&(v="idle")}if(t.keepPreviousData&&!o.dataUpdatedAt&&l!=null&&l.isSuccess&&f!=="error")y=l.data,d=l.dataUpdatedAt,f=l.status,F=!0;else if(t.select&&typeof o.data<"u")if(i&&o.data===(u==null?void 0:u.data)&&t.select===this.selectFn)y=this.selectResult;else try{this.selectFn=t.select,y=t.select(o.data),y=P(i==null?void 0:i.data,y,t),this.selectResult=y,this.selectError=null}catch(p){this.selectError=p}else y=o.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(C){this.selectError=C}typeof p<"u"&&(f="success",y=P(i==null?void 0:i.data,p,t),U=!0)}this.selectError&&(R=this.selectError,y=this.selectResult,m=Date.now(),f="error");const g=v==="fetching",I=f==="loading",O=f==="error";return{status:f,fetchStatus:v,isLoading:I,isSuccess:f==="success",isError:O,isInitialLoading:I&&g,data:y,dataUpdatedAt:d,error:R,errorUpdatedAt:m,failureCount:o.fetchFailureCount,failureReason:o.fetchFailureReason,errorUpdateCount:o.errorUpdateCount,isFetched:o.dataUpdateCount>0||o.errorUpdateCount>0,isFetchedAfterMount:o.dataUpdateCount>h.dataUpdateCount||o.errorUpdateCount>h.errorUpdateCount,isFetching:g,isRefetching:g&&!I,isLoadingError:O&&o.dataUpdatedAt===0,isPaused:v==="paused",isPlaceholderData:U,isPreviousData:F,isRefetchError:O&&o.dataUpdatedAt!==0,isStale:w(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,T(s,t))return;this.currentResult=s;const n={cache:!0},i=()=>{if(!t)return!0;const{notifyOnChangeProps:u}=this.options,a=typeof u=="function"?u():u;if(a==="all"||!a&&!this.trackedProps.size)return!0;const c=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&c.add("error"),Object.keys(this.currentResult).some(h=>{const l=h;return this.currentResult[l]!==t[l]&&c.has(l)})};(e==null?void 0:e.listeners)!==!1&&i()&&(n.listeners=!0),this.notify({...n,...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){V.batch(()=>{if(e.onSuccess){var t,s,n,i;(t=(s=this.options).onSuccess)==null||t.call(s,this.currentResult.data),(n=(i=this.options).onSettled)==null||n.call(i,this.currentResult.data,null)}else if(e.onError){var u,a,c,h;(u=(a=this.options).onError)==null||u.call(a,this.currentResult.error),(c=(h=this.options).onSettled)==null||c.call(h,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:l})=>{l(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function ie(r,e){return e.enabled!==!1&&!r.state.dataUpdatedAt&&!(r.state.status==="error"&&e.retryOnMount===!1)}function M(r,e){return ie(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&&w(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")&&w(r,t)}function w(r,e){return r.isStaleByTime(e.staleTime)}function ne(r,e,t){return t.keepPreviousData?!1:t.placeholderData!==void 0?e.isPlaceholderData:!T(r.getCurrentResult(),e)}function ue(r=""){var e;if(!((e=G())==null?void 0:e.proxy))throw new Error("vue-query hooks can only be used inside setup() function.");const s=H(r),n=$(s);if(!n)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return n}function ae(r,e,t={},s={}){var n;const i=Q(()=>le(e,t,s)),u=(n=i.value.queryClient)!=null?n:ue(i.value.queryClientKey),a=Q(()=>{const d=u.defaultQueryOptions(i.value);return d._optimisticResults=u.isRestoring.value?"isRestoring":"optimistic",d}),c=new r(u,a.value),h=J(c.getCurrentResult());let l=()=>{};b(u.isRestoring,d=>{d||(l(),l=c.subscribe(R=>{x(h,R)}))},{immediate:!0}),b(a,()=>{c.setOptions(a.value),x(h,c.getCurrentResult())}),Y(()=>{l()});const o=()=>new Promise((d,R)=>{let m=()=>{};const v=()=>{if(a.value.enabled!==!1){const f=c.getOptimisticResult(a.value);f.isStale?(m(),c.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&&_(a.value.useErrorBoundary,[d,c.getCurrentQuery()]))throw d}),{...X(Z(h)),suspense:o}}function le(r,e={},t={}){const s=S(r),n=S(e),i=S(t);let u=s;return ee(s)?typeof n=="function"?u={...i,queryKey:s,queryFn:n}:u={...n,queryKey:s}:u=s,te(u)}function ce(r,e,t){const s=ae(re,r,e,t);return{...s,refetch:s.refetch.value,remove:s.remove.value}}const oe=3;async function he(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 n=await fetch(`${s}/config.json?t=${e??0}`),i=await fetch(`${s}/team.json?t=${e??0}`),u=await fetch(`${s}/run.json?t=${e??0}`),{status:a,statusText:c}=n;if(a>=300||a<200)throw new Error(`fetch data failed. [status=${a}] [statusText=${c}]`);return Promise.all([n.json(),i.json(),u.json()]).then(l=>({contest:l[0],teams:l[1],submissions:l[2]}))}function pe(r,e){let t=3e4,s=Q(()=>Math.floor(e.value.getTime()/1e3/10));return se.value==="I18N"&&(t=10*1e3,s=Q(()=>Math.floor(e.value.getTime()/1e3))),ce({queryKey:[r,s.value],queryFn:()=>he(r,s.value),retry:oe,staleTime:t,refetchInterval:t})}function ye(){return k("data-source","",{transform:String})}function ve(){return k("battle-of-giants","",{transform:String})}export{ve as a,ye as g,pe as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as m}from"./TheInput.vue_vue_type_script_setup_true_lang-ce96e373.js";import{g as _,i as p,M as f,n as h,o as b,c as v,d as e,t as n,j as o,b as y,N as x,O as g,y as l}from"./index-d70fb8f0.js";import{u as w}from"./user-449d45cf.js";const V={flex:"","flex-col":"","justify-center":"","items-center":""},k=e("div",{"text-4xl":""},[e("div",{"i-carbon-campsite":""})],-1),I=e("p",null,[e("a",{rel:"noreferrer",href:"https://github.com/antfu/vitesse",target:"_blank"}," Vitesse ")],-1),N={"text-sm":"","opacity-75":""},B=e("div",{"py-4":""},null,-1),C={"w-48":""},K={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(S,i)=>{const d=m;return b(),v("div",V,[k,I,e("p",null,[e("em",N,n(o(s)("intro.desc")),1)]),B,e("div",C,[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",K,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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aV as m,
|
|
1
|
+
import{aV as m,i as r,h as t}from"./index-d70fb8f0.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as u}from"./index-
|
|
1
|
+
import{_ as u}from"./index-d70fb8f0.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 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="UTF-8"><link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="UTF-8"><link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.47.0/dist/balloon-192x192.png"><link rel="mask-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.47.0/dist/balloon-512x512.svg" color="#00aba9"><meta name="msapplication-TileColor" content="#00aba9"><script>function normalizePath(_){for(;_.endsWith("/");)_=_.slice(0,-1);return`${_}/`}{let _="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.47.0/dist";_=normalizePath(_),window.CDN_HOST=_}try{let _=__DATA_HOST__;_=normalizePath(_),window.DATA_HOST=_}catch(_){window.DATA_HOST="/data/"}try{let _=__DATA_REGION__;window.DATA_REGION=_}catch(_){window.DATA_REGION="CN"}try{let _=__DEFAULT_LANG__;window.DEFAULT_LANG=_}catch(_){window.DEFAULT_LANG="en"}</script><script>!function(){localStorage.getItem("vueuse-color-scheme")||localStorage.setItem("vueuse-color-scheme","light");const e=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,o=localStorage.getItem("vueuse-color-scheme")||"auto";("dark"===o||e&&"light"!==o)&&document.documentElement.classList.toggle("dark",!0)}()</script><script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.47.0/dist/assets/index-d70fb8f0.js"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.47.0/dist/assets/index-53dc9c92.css"><link rel="manifest" href="/manifest.webmanifest"><style></style></head><body class="font-sans"><div id="app"></div><noscript>This website requires JavaScript to function properly. Please enable JavaScript to continue.</noscript><script>try{var umamiJSUrl=__UMAMI_JS_URL__,umamiWebsiteId=__UMAMI_WEBSITE_ID__;!function(){var e=document.createElement("script");e.src=umamiJSUrl,e.defer=!0,e.setAttribute("data-website-id",umamiWebsiteId);var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}catch(e){}try{var plausibleJSUrl=__PLAUSIBLE_JS_URL__,plausibleDataDomain=__PLAUSIBLE_DATA_DOMAIN__;!function(){var e=document.createElement("script");e.src=plausibleJSUrl,e.defer=!0,e.setAttribute("data-domain",plausibleDataDomain);var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}catch(e){}try{var baiduAnalyticsId=__BAIDU_ANALYTICS_ID__,_hmt=_hmt||[];!function(){var e=document.createElement("script");e.src=`https://hm.baidu.com/hm.js?${baiduAnalyticsId}`;var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}catch(e){}try{var googleAnalyticsId=__GOOGLE_ANALYTICS_ID__;!function(){var e,t,a,r,c,n;location.port||(e=window,t=document,a="script",r="ga",e.GoogleAnalyticsObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,c=t.createElement(a),n=t.getElementsByTagName(a)[0],c.async=1,c.src="//www.google-analytics.com/analytics.js",n.parentNode.insertBefore(c,n),ga("create",`${googleAnalyticsId}`,"auto"),ga("send","pageview"))}()}catch(e){}</script></body></html>
|
package/dist/sw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
if(!self.define){let s,e={};const l=(l,n)=>(l=new URL(l+".js",n).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=(n,i)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let u={};const a=s=>l(s,r),t={module:{uri:r},exports:u,require:a};e[r]=Promise.all(n.map((s=>t[s]||a(s)))).then((s=>(i(...s),u)))}}define(["./workbox-b8d87ee1"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/_...all_-
|
|
1
|
+
if(!self.define){let s,e={};const l=(l,n)=>(l=new URL(l+".js",n).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=(n,i)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let u={};const a=s=>l(s,r),t={module:{uri:r},exports:u,require:a};e[r]=Promise.all(n.map((s=>t[s]||a(s)))).then((s=>(i(...s),u)))}}define(["./workbox-b8d87ee1"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/_...all_-729d96d7.js",revision:null},{url:"assets/_...all_-c60acc8c.css",revision:null},{url:"assets/_...all_-f3d30859.js",revision:null},{url:"assets/_name_-fa12f56d.js",revision:null},{url:"assets/about-6e5a2f3e.js",revision:null},{url:"assets/Board-24564942.css",revision:null},{url:"assets/board-6c9ef349.js",revision:null},{url:"assets/Board-8cb099e8.js",revision:null},{url:"assets/board-layout-1ad47386.js",revision:null},{url:"assets/DataSourceInput.vue_vue_type_script_setup_true_lang-669bf7c0.js",revision:null},{url:"assets/en-c9a8dbb5.js",revision:null},{url:"assets/headless-cbd40573.js",revision:null},{url:"assets/home-eb990606.js",revision:null},{url:"assets/index-241beb5a.css",revision:null},{url:"assets/index-42e1a002.js",revision:null},{url:"assets/index-53dc9c92.css",revision:null},{url:"assets/index-5e6a6648.js",revision:null},{url:"assets/index-67b2a8c5.css",revision:null},{url:"assets/index-d70fb8f0.js",revision:null},{url:"assets/index-fd9c106b.js",revision:null},{url:"assets/index-layout-7a27b184.js",revision:null},{url:"assets/pagination-fe331a94.js",revision:null},{url:"assets/query-ce1fd4de.js",revision:null},{url:"assets/test-544e70d8.js",revision:null},{url:"assets/TheInput.vue_vue_type_script_setup_true_lang-ce96e373.js",revision:null},{url:"assets/user-449d45cf.js",revision:null},{url:"assets/virtual_pwa-register-c3a257bf.js",revision:null},{url:"assets/workbox-window.prod.es5-a7b12eab.js",revision:null},{url:"assets/zh-CN-8e545f66.js",revision:null},{url:"index.html",revision:"a72c28553538eb092b8c9bfd6785f101"},{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.47.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.47.0",
|
|
57
|
+
"@xcpcio/types": "0.47.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@antfu/eslint-config": "^0.39.8",
|
package/src/auto-imports.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ declare global {
|
|
|
13
13
|
const EffectScope: typeof import('vue')['EffectScope']
|
|
14
14
|
const LastBlockDisplayType: typeof import('./composables/type')['LastBlockDisplayType']
|
|
15
15
|
const Pagination: typeof import('./composables/pagination')['Pagination']
|
|
16
|
+
const RATING_DATA_HOST: typeof import('./composables/constant')['RATING_DATA_HOST']
|
|
17
|
+
const RATING_TITLE_SUFFIX: typeof import('./composables/constant')['RATING_TITLE_SUFFIX']
|
|
16
18
|
const RESOLVER_TITLE_SUFFIX: typeof import('./composables/constant')['RESOLVER_TITLE_SUFFIX']
|
|
17
19
|
const TITLE_SUFFIX: typeof import('./composables/constant')['TITLE_SUFFIX']
|
|
18
20
|
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
|
|
@@ -52,6 +54,7 @@ declare global {
|
|
|
52
54
|
const getLocalStorageKeyForFilterTeams: typeof import('./composables/useLocalStorage')['getLocalStorageKeyForFilterTeams']
|
|
53
55
|
const getMedalColor: typeof import('./composables/color')['getMedalColor']
|
|
54
56
|
const getProblemChart: typeof import('./composables/statistics')['getProblemChart']
|
|
57
|
+
const getRatingGraphOptions: typeof import('./composables/rating')['getRatingGraphOptions']
|
|
55
58
|
const getStandingsStatusColor: typeof import('./composables/color')['getStandingsStatusColor']
|
|
56
59
|
const getSubmitChart: typeof import('./composables/statistics')['getSubmitChart']
|
|
57
60
|
const getTeamChart: typeof import('./composables/statistics')['getTeamChart']
|
|
@@ -335,6 +338,8 @@ declare module 'vue' {
|
|
|
335
338
|
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
|
336
339
|
readonly LastBlockDisplayType: UnwrapRef<typeof import('./composables/type')['LastBlockDisplayType']>
|
|
337
340
|
readonly Pagination: UnwrapRef<typeof import('./composables/pagination')['Pagination']>
|
|
341
|
+
readonly RATING_DATA_HOST: UnwrapRef<typeof import('./composables/constant')['RATING_DATA_HOST']>
|
|
342
|
+
readonly RATING_TITLE_SUFFIX: UnwrapRef<typeof import('./composables/constant')['RATING_TITLE_SUFFIX']>
|
|
338
343
|
readonly RESOLVER_TITLE_SUFFIX: UnwrapRef<typeof import('./composables/constant')['RESOLVER_TITLE_SUFFIX']>
|
|
339
344
|
readonly TITLE_SUFFIX: UnwrapRef<typeof import('./composables/constant')['TITLE_SUFFIX']>
|
|
340
345
|
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
|
|
@@ -370,6 +375,7 @@ declare module 'vue' {
|
|
|
370
375
|
readonly getLocalStorageKeyForFilterTeams: UnwrapRef<typeof import('./composables/useLocalStorage')['getLocalStorageKeyForFilterTeams']>
|
|
371
376
|
readonly getMedalColor: UnwrapRef<typeof import('./composables/color')['getMedalColor']>
|
|
372
377
|
readonly getProblemChart: UnwrapRef<typeof import('./composables/statistics')['getProblemChart']>
|
|
378
|
+
readonly getRatingGraphOptions: UnwrapRef<typeof import('./composables/rating')['getRatingGraphOptions']>
|
|
373
379
|
readonly getStandingsStatusColor: UnwrapRef<typeof import('./composables/color')['getStandingsStatusColor']>
|
|
374
380
|
readonly getSubmitChart: UnwrapRef<typeof import('./composables/statistics')['getSubmitChart']>
|
|
375
381
|
readonly getTeamChart: UnwrapRef<typeof import('./composables/statistics')['getTeamChart']>
|
|
@@ -643,6 +649,8 @@ declare module '@vue/runtime-core' {
|
|
|
643
649
|
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
|
644
650
|
readonly LastBlockDisplayType: UnwrapRef<typeof import('./composables/type')['LastBlockDisplayType']>
|
|
645
651
|
readonly Pagination: UnwrapRef<typeof import('./composables/pagination')['Pagination']>
|
|
652
|
+
readonly RATING_DATA_HOST: UnwrapRef<typeof import('./composables/constant')['RATING_DATA_HOST']>
|
|
653
|
+
readonly RATING_TITLE_SUFFIX: UnwrapRef<typeof import('./composables/constant')['RATING_TITLE_SUFFIX']>
|
|
646
654
|
readonly RESOLVER_TITLE_SUFFIX: UnwrapRef<typeof import('./composables/constant')['RESOLVER_TITLE_SUFFIX']>
|
|
647
655
|
readonly TITLE_SUFFIX: UnwrapRef<typeof import('./composables/constant')['TITLE_SUFFIX']>
|
|
648
656
|
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
|
|
@@ -678,6 +686,7 @@ declare module '@vue/runtime-core' {
|
|
|
678
686
|
readonly getLocalStorageKeyForFilterTeams: UnwrapRef<typeof import('./composables/useLocalStorage')['getLocalStorageKeyForFilterTeams']>
|
|
679
687
|
readonly getMedalColor: UnwrapRef<typeof import('./composables/color')['getMedalColor']>
|
|
680
688
|
readonly getProblemChart: UnwrapRef<typeof import('./composables/statistics')['getProblemChart']>
|
|
689
|
+
readonly getRatingGraphOptions: UnwrapRef<typeof import('./composables/rating')['getRatingGraphOptions']>
|
|
681
690
|
readonly getStandingsStatusColor: UnwrapRef<typeof import('./composables/color')['getStandingsStatusColor']>
|
|
682
691
|
readonly getSubmitChart: UnwrapRef<typeof import('./composables/statistics')['getSubmitChart']>
|
|
683
692
|
readonly getTeamChart: UnwrapRef<typeof import('./composables/statistics')['getTeamChart']>
|
|
@@ -8,6 +8,7 @@ const props = defineProps<{
|
|
|
8
8
|
|
|
9
9
|
const { t, locale } = useI18n();
|
|
10
10
|
const { y: scroll } = useWindowScroll();
|
|
11
|
+
const route = useRoute();
|
|
11
12
|
|
|
12
13
|
function toTop() {
|
|
13
14
|
window.scrollTo({
|
|
@@ -22,6 +23,14 @@ async function toggleLocales() {
|
|
|
22
23
|
await loadLanguageAsync(newLocale);
|
|
23
24
|
locale.value = newLocale;
|
|
24
25
|
}
|
|
26
|
+
|
|
27
|
+
const homeLink = computed(() => {
|
|
28
|
+
if (route.fullPath.startsWith("/rating")) {
|
|
29
|
+
return "/rating";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return "/";
|
|
33
|
+
});
|
|
25
34
|
</script>
|
|
26
35
|
|
|
27
36
|
<template>
|
|
@@ -63,7 +72,7 @@ async function toggleLocales() {
|
|
|
63
72
|
<RouterLink
|
|
64
73
|
icon-btn
|
|
65
74
|
:title="t('button.home')"
|
|
66
|
-
to="
|
|
75
|
+
:to="homeLink"
|
|
67
76
|
focusable="false"
|
|
68
77
|
>
|
|
69
78
|
<div i-ion-balloon-sharp />
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useFetch } from "@vueuse/core";
|
|
3
|
+
import { Rating } from "@xcpcio/core";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
id: string
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const id = computed(() => props.id);
|
|
10
|
+
|
|
11
|
+
function genURL() {
|
|
12
|
+
return `${RATING_DATA_HOST.value}${id.value}/rating.json`;
|
|
13
|
+
}
|
|
14
|
+
const url = ref(genURL());
|
|
15
|
+
const rating = ref({} as Rating);
|
|
16
|
+
|
|
17
|
+
const { t } = useI18n();
|
|
18
|
+
useTitle(RATING_TITLE_SUFFIX);
|
|
19
|
+
|
|
20
|
+
const {
|
|
21
|
+
error,
|
|
22
|
+
isFetching,
|
|
23
|
+
isFinished,
|
|
24
|
+
} = useFetch(url, {
|
|
25
|
+
refetch: true,
|
|
26
|
+
afterFetch: (ctx) => {
|
|
27
|
+
rating.value = Rating.fromJSON(ctx.data);
|
|
28
|
+
useTitle(`${rating.value.name} | ${RATING_TITLE_SUFFIX}`);
|
|
29
|
+
return ctx;
|
|
30
|
+
},
|
|
31
|
+
}).get();
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<div
|
|
36
|
+
class="sm:w-[1024px] lg:w-screen"
|
|
37
|
+
lg:of-x-hidden
|
|
38
|
+
flex flex-col justify-center items-center
|
|
39
|
+
>
|
|
40
|
+
<div>
|
|
41
|
+
<div
|
|
42
|
+
v-if="isFetching || error"
|
|
43
|
+
mt-4 mb-4
|
|
44
|
+
class="sm:w-[1000px] lg:w-screen"
|
|
45
|
+
flex justify-center items-center
|
|
46
|
+
>
|
|
47
|
+
<div
|
|
48
|
+
v-if="isFetching"
|
|
49
|
+
>
|
|
50
|
+
{{ t("common.loading") }}...
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<div
|
|
54
|
+
v-if="error"
|
|
55
|
+
>
|
|
56
|
+
{{ error }}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<div
|
|
61
|
+
v-if="isFinished"
|
|
62
|
+
flex flex-col justify-center items-center
|
|
63
|
+
>
|
|
64
|
+
<div
|
|
65
|
+
text-4xl
|
|
66
|
+
font-medium font-serif
|
|
67
|
+
>
|
|
68
|
+
{{ rating.name }}
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<div
|
|
72
|
+
mt-4
|
|
73
|
+
>
|
|
74
|
+
<RatingTable
|
|
75
|
+
:rating="rating"
|
|
76
|
+
:remove-border="true"
|
|
77
|
+
/>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { RatingLevelToString, RatingUtility } from "@xcpcio/core";
|
|
3
|
+
|
|
4
|
+
import "./rating.less";
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
rating: number
|
|
8
|
+
}>();
|
|
9
|
+
|
|
10
|
+
const rating = computed(() => props.rating);
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div>
|
|
15
|
+
<Tooltip>
|
|
16
|
+
<div
|
|
17
|
+
font-mono font-bold
|
|
18
|
+
:class="RatingUtility.getRatingLevelClass(rating)"
|
|
19
|
+
>
|
|
20
|
+
{{ rating }}
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<template #popper>
|
|
24
|
+
<div
|
|
25
|
+
text-md
|
|
26
|
+
>
|
|
27
|
+
{{ RatingLevelToString[RatingUtility.getRatingLevel(rating)] }}
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
</Tooltip>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useElementVisibility } from "@vueuse/core";
|
|
3
|
+
|
|
4
|
+
import type { IRatingIndex } from "@xcpcio/types/index";
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
ratingIndex: IRatingIndex
|
|
8
|
+
}>();
|
|
9
|
+
|
|
10
|
+
const ratingIndex = computed(() => props.ratingIndex);
|
|
11
|
+
|
|
12
|
+
const el = ref(null);
|
|
13
|
+
const isVisible = useElementVisibility(el);
|
|
14
|
+
|
|
15
|
+
const link = computed(() => {
|
|
16
|
+
return `/rating/${ratingIndex.value.id}`;
|
|
17
|
+
});
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div ref="el">
|
|
22
|
+
<div h-22>
|
|
23
|
+
<div
|
|
24
|
+
v-if="isVisible"
|
|
25
|
+
>
|
|
26
|
+
<div
|
|
27
|
+
w-238
|
|
28
|
+
flex flex-col justify-center
|
|
29
|
+
font-serif pb-2
|
|
30
|
+
border="b-2 gray-200 dark:gray-700"
|
|
31
|
+
>
|
|
32
|
+
<div
|
|
33
|
+
w-full flex
|
|
34
|
+
>
|
|
35
|
+
<div
|
|
36
|
+
class="title"
|
|
37
|
+
w-inherit
|
|
38
|
+
>
|
|
39
|
+
<Tooltip>
|
|
40
|
+
<div
|
|
41
|
+
overflow-hidden
|
|
42
|
+
text-2xl truncate
|
|
43
|
+
>
|
|
44
|
+
{{ ratingIndex.name }}
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<template #popper>
|
|
48
|
+
<div
|
|
49
|
+
text-lg
|
|
50
|
+
>
|
|
51
|
+
{{ ratingIndex.name }}
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
54
|
+
</Tooltip>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div float-right>
|
|
58
|
+
<RouterLink
|
|
59
|
+
class="go MuiIconButton-root"
|
|
60
|
+
:to="link"
|
|
61
|
+
>
|
|
62
|
+
<span class="MuiIconButton-label">
|
|
63
|
+
<RightArrowIcon />
|
|
64
|
+
</span>
|
|
65
|
+
</RouterLink>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</template>
|
|
73
|
+
|
|
74
|
+
<style scoped>
|
|
75
|
+
.logo {
|
|
76
|
+
float: left;
|
|
77
|
+
text-align: left;
|
|
78
|
+
font-size: 16px;
|
|
79
|
+
padding-top: 12px;
|
|
80
|
+
padding-right: 8px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.title {
|
|
84
|
+
--scroll-bar: 0;
|
|
85
|
+
font-variant: tabular-nums;
|
|
86
|
+
line-height: 1.5715;
|
|
87
|
+
box-sizing: border-box;
|
|
88
|
+
position: relative;
|
|
89
|
+
text-align: left;
|
|
90
|
+
font-weight: 400;
|
|
91
|
+
padding-left: 0px;
|
|
92
|
+
padding-right: 16px;
|
|
93
|
+
padding-top: 12px;
|
|
94
|
+
padding-bottom: 12px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.MuiIconButton-root {
|
|
98
|
+
-webkit-font-smoothing: antialiased;
|
|
99
|
+
font-weight: 400;
|
|
100
|
+
line-height: 1.43;
|
|
101
|
+
letter-spacing: 0.01071em;
|
|
102
|
+
box-sizing: inherit;
|
|
103
|
+
border: 0;
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
margin: 0;
|
|
106
|
+
display: inline-flex;
|
|
107
|
+
outline: 0;
|
|
108
|
+
position: relative;
|
|
109
|
+
align-items: center;
|
|
110
|
+
user-select: none;
|
|
111
|
+
vertical-align: middle;
|
|
112
|
+
justify-content: center;
|
|
113
|
+
text-decoration: none;
|
|
114
|
+
background-color: transparent;
|
|
115
|
+
-webkit-tap-highlight-color: transparent;
|
|
116
|
+
flex: 0 0 auto;
|
|
117
|
+
color: rgba(0, 0, 0, 0.54);
|
|
118
|
+
padding: 12px;
|
|
119
|
+
overflow: visible;
|
|
120
|
+
font-size: 1.5rem;
|
|
121
|
+
text-align: center;
|
|
122
|
+
transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
123
|
+
border-radius: 50%;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.MuiIconButton-label {
|
|
127
|
+
-webkit-font-smoothing: antialiased;
|
|
128
|
+
font-family: "Roboto", "Helvetica", "Arial", sans-serif;
|
|
129
|
+
font-weight: 400;
|
|
130
|
+
line-height: 1.43;
|
|
131
|
+
letter-spacing: 0.01071em;
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
user-select: none;
|
|
134
|
+
-webkit-tap-highlight-color: transparent;
|
|
135
|
+
color: rgba(0, 0, 0, 0.54);
|
|
136
|
+
font-size: 1.5rem;
|
|
137
|
+
text-align: center;
|
|
138
|
+
box-sizing: inherit;
|
|
139
|
+
width: 100%;
|
|
140
|
+
display: flex;
|
|
141
|
+
align-items: inherit;
|
|
142
|
+
justify-content: inherit;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.go {
|
|
146
|
+
text-decoration: none;
|
|
147
|
+
color: #121314;
|
|
148
|
+
position: relative;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.go:after {
|
|
152
|
+
content: "";
|
|
153
|
+
position: absolute;
|
|
154
|
+
z-index: -1;
|
|
155
|
+
top: 60%;
|
|
156
|
+
left: -0.1em;
|
|
157
|
+
right: -0.1em;
|
|
158
|
+
bottom: 0;
|
|
159
|
+
transition: top 200ms cubic-bezier(0, 0.8, 0.13, 1);
|
|
160
|
+
background-color: #91d5ff;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.go:hover:after {
|
|
164
|
+
top: 0%;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.loading {
|
|
168
|
+
height: calc(100vh);
|
|
169
|
+
display: flex;
|
|
170
|
+
justify-content: center;
|
|
171
|
+
align-items: center;
|
|
172
|
+
}
|
|
173
|
+
</style>
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Chart } from "highcharts-vue";
|
|
3
|
+
|
|
4
|
+
import type { RatingUser } from "@xcpcio/core";
|
|
5
|
+
|
|
6
|
+
import "./rating.less";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<{
|
|
9
|
+
isHidden: boolean,
|
|
10
|
+
|
|
11
|
+
ratingUser: RatingUser,
|
|
12
|
+
}>();
|
|
13
|
+
|
|
14
|
+
const emit = defineEmits(["update:isHidden"]);
|
|
15
|
+
|
|
16
|
+
const isHidden = computed({
|
|
17
|
+
get() {
|
|
18
|
+
return props.isHidden;
|
|
19
|
+
},
|
|
20
|
+
set(value) {
|
|
21
|
+
emit("update:isHidden", value);
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const ratingUser = computed(() => props.ratingUser);
|
|
26
|
+
|
|
27
|
+
const headerTitle = computed(() => {
|
|
28
|
+
let res = "";
|
|
29
|
+
|
|
30
|
+
if (ratingUser.value.organization.length > 0) {
|
|
31
|
+
res += `${ratingUser.value.organization} - `;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
res += `${ratingUser.value.name}`;
|
|
35
|
+
|
|
36
|
+
if (ratingUser.value.members.length > 0) {
|
|
37
|
+
res += ` - ${ratingUser.value.members.map(m => m.name).join(",")}`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (ratingUser.value.coaches.length > 0) {
|
|
41
|
+
res += ` - ${ratingUser.value.coaches.map(c => c.name).join(",")}(coach)`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return res;
|
|
45
|
+
});
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<template>
|
|
49
|
+
<Modal
|
|
50
|
+
v-model:isHidden="isHidden"
|
|
51
|
+
width="w-278"
|
|
52
|
+
>
|
|
53
|
+
<template #header>
|
|
54
|
+
<div
|
|
55
|
+
w-full max-w-screen-xl
|
|
56
|
+
mx-auto
|
|
57
|
+
px-4 lg:px-8
|
|
58
|
+
>
|
|
59
|
+
<div
|
|
60
|
+
relative overflow-hidden
|
|
61
|
+
bg-white dark:bg-gray-800
|
|
62
|
+
>
|
|
63
|
+
<div
|
|
64
|
+
flex flex-col items-center justify-between
|
|
65
|
+
md:flex-row
|
|
66
|
+
space-y-3 md:space-y-0
|
|
67
|
+
>
|
|
68
|
+
<div
|
|
69
|
+
flex flex-row
|
|
70
|
+
space-x-3
|
|
71
|
+
>
|
|
72
|
+
<Tooltip>
|
|
73
|
+
<h3
|
|
74
|
+
text-gray-900 dark:text-white
|
|
75
|
+
text-2xl
|
|
76
|
+
font-sans font-semibold italic
|
|
77
|
+
>
|
|
78
|
+
{{ headerTitle }}
|
|
79
|
+
</h3>
|
|
80
|
+
|
|
81
|
+
<template #popper>
|
|
82
|
+
<div
|
|
83
|
+
flex flex-col
|
|
84
|
+
justify-start items-start
|
|
85
|
+
>
|
|
86
|
+
<div>
|
|
87
|
+
TeamID: {{ ratingUser.id }}
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</template>
|
|
91
|
+
</Tooltip>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</template>
|
|
97
|
+
|
|
98
|
+
<div
|
|
99
|
+
w-full
|
|
100
|
+
font-bold font-mono
|
|
101
|
+
flex items-center justify-center
|
|
102
|
+
>
|
|
103
|
+
<div
|
|
104
|
+
w-full
|
|
105
|
+
>
|
|
106
|
+
<Chart
|
|
107
|
+
:options="getRatingGraphOptions(ratingUser)"
|
|
108
|
+
/>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</Modal>
|
|
112
|
+
</template>
|