1import{G as h}from"./GamesTable-BXLrA_Rh.js";import{d as w,j as v,S as y,b as s,o as G,E as k,e as t,f as E,h as P}from"./index-Adm6FAxU.js";import"./index-aJelQ16L.js";import"./index-R8O7OWid.js";import"./index-BWekdIcT.js";import"./index-BBE5E5x9.js";const B=w({__name:"GamesView",props:{username:{}},setup(n){const d=v(y),i=n,r=s(!1),l=s(0),u=s([]);G(()=>{o(0,10,"created",-1)});function p(e){t.push({name:"Game",query:{gameID:e.id,nPlayers:e.nPlayers},params:{locale:t.currentRoute.value.params.locale}})}function f(e){o(e.first,e.rows,e.sortField,e.sortOrder)}function m(e){o(e.first,e.rows,e.sortField,e.sortOrder)}async function o(e,c,g,S){try{r.value=!0;const a=await d.emitWithAck(5e3,"games:getTableData",{first:e,limit:c,sortField:g,sortOrder:S,username:i.username===k.value?void 0:i.username});if(a.data===void 0)throw new Error("Server Side Error");u.value=a.data.games,l.value=a.data.nEntries,r.value=!1}catch(a){console.log(a),t.push({name:"Landing"})}}return(e,c)=>(P(),E(h,{loading:r.value,"n-entries":l.value,games:u.value,username:n.username,paginator:!0,onPage:m,onSort:m,onRowSelect:p,onReload:f},null,8,["loading","n-entries","games","username"]))}});export{B as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.