@minecraft-docker/mcctl-console 2.6.1 → 2.8.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/.next/standalone/platform/services/mcctl-console/.next/BUILD_ID +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/app-build-manifest.json +122 -134
- package/.next/standalone/platform/services/mcctl-console/.next/app-path-routes-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/build-manifest.json +5 -5
- package/.next/standalone/platform/services/mcctl-console/.next/prerender-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page.js +5 -5
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page.js +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js +54 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js +54 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.rsc +5 -5
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.rsc +7 -7
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.rsc +7 -7
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.rsc +7 -7
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.rsc +5 -5
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.rsc +6 -6
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.rsc +7 -7
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.rsc +7 -7
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.rsc +7 -7
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.rsc +7 -7
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.rsc +6 -6
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.rsc +7 -7
- package/.next/standalone/platform/services/mcctl-console/.next/server/app-paths-manifest.json +22 -22
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/354.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/3633.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/5843.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/6175.js +57 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/6591.js +2 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8091.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8847.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/9023.js +51 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/pages/404.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/pages/500.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1099-fa64c7b90813b0a5.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2701-385dbd7376f5851d.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2724-6be0c6be94353443.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5004-6ecca3df16643209.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5123-bc0af955f93964c7.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5787-bea4ee84b4bf2dea.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/674-096e0376c367d751.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7296-063cc1cf1200429d.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7436-dc5c09a9f287522b.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7965-e1d52a92f5303aca.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8738-25eee78e0dfd0adf.js +1 -0
- package/.next/{static/chunks/app/(main)/admin/users/page-b4483a2e5c12dce7.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/admin/users/page-3cc240ec265dc135.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/page-c52171f3de12db63.js +1 -0
- package/.next/{static/chunks/app/(main)/backups/page-76da68ecfd3fd38f.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/backups/page-47c96f8f36c1c1a3.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/dashboard/page-fba60ccdbc06c136.js +1 -0
- package/.next/{static/chunks/app/(main)/layout-e6d8aef242d7e516.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/layout-22d4db17be3f8c25.js} +1 -1
- package/.next/{static/chunks/app/(main)/players/page-4a3f72a092662e75.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/page-fef43a34b56c2fcf.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/routing/{page-29d4216d11c4d426.js → page-0fbdeec8fee218ef.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/console/{page-4e811ac018a2a049.js → page-1287129ad47a4440.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-1becd4dc3adb9b97.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/page-bebe3d652d7cf3fb.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/settings/{page-12a46542ea952feb.js → page-94ebb6f110d7cba4.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/worlds/{page-7f194148444c39f3.js → page-e78b9914366748cf.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/layout-37a5eb78e96aa17e.js +1 -0
- package/.next/{static/chunks/app/login/page-ff4d395f77e036b5.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-55283ea041e00fc0.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/signup/{page-861124fab907567f.js → page-d3f96f0e775636fd.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{webpack-c5f126aae1eac753.js → webpack-198a420ca2ddb7de.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/css/2579b9365591037f.css +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/0ea4f4df910e6120-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/1f160ec2cb9962ef-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/739c2d8941231bb4-s.p.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/ad8a7e2c3c2c120b-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/cde148027b808b99-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/e61ae719f7cc4155-s.woff2 +0 -0
- package/.next/static/chunks/1099-fa64c7b90813b0a5.js +1 -0
- package/.next/static/chunks/2701-385dbd7376f5851d.js +1 -0
- package/.next/static/chunks/2724-6be0c6be94353443.js +1 -0
- package/.next/static/chunks/5004-6ecca3df16643209.js +1 -0
- package/.next/static/chunks/5123-bc0af955f93964c7.js +1 -0
- package/.next/static/chunks/5787-bea4ee84b4bf2dea.js +1 -0
- package/.next/static/chunks/674-096e0376c367d751.js +1 -0
- package/.next/static/chunks/7296-063cc1cf1200429d.js +1 -0
- package/.next/static/chunks/7436-dc5c09a9f287522b.js +1 -0
- package/.next/static/chunks/7965-e1d52a92f5303aca.js +1 -0
- package/.next/static/chunks/8738-25eee78e0dfd0adf.js +1 -0
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/admin/users/page-b4483a2e5c12dce7.js → static/chunks/app/(main)/admin/users/page-3cc240ec265dc135.js} +1 -1
- package/.next/static/chunks/app/(main)/audit-logs/page-c52171f3de12db63.js +1 -0
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/backups/page-76da68ecfd3fd38f.js → static/chunks/app/(main)/backups/page-47c96f8f36c1c1a3.js} +1 -1
- package/.next/static/chunks/app/(main)/dashboard/page-fba60ccdbc06c136.js +1 -0
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/layout-e6d8aef242d7e516.js → static/chunks/app/(main)/layout-22d4db17be3f8c25.js} +1 -1
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/page-4a3f72a092662e75.js → static/chunks/app/(main)/players/page-fef43a34b56c2fcf.js} +1 -1
- package/.next/static/chunks/app/(main)/routing/{page-29d4216d11c4d426.js → page-0fbdeec8fee218ef.js} +1 -1
- package/.next/static/chunks/app/(main)/servers/[name]/console/{page-4e811ac018a2a049.js → page-1287129ad47a4440.js} +1 -1
- package/.next/static/chunks/app/(main)/servers/[name]/page-1becd4dc3adb9b97.js +1 -0
- package/.next/static/chunks/app/(main)/servers/page-bebe3d652d7cf3fb.js +1 -0
- package/.next/static/chunks/app/(main)/settings/{page-12a46542ea952feb.js → page-94ebb6f110d7cba4.js} +1 -1
- package/.next/static/chunks/app/(main)/worlds/{page-7f194148444c39f3.js → page-e78b9914366748cf.js} +1 -1
- package/.next/static/chunks/app/layout-37a5eb78e96aa17e.js +1 -0
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-ff4d395f77e036b5.js → static/chunks/app/login/page-55283ea041e00fc0.js} +1 -1
- package/.next/static/chunks/app/signup/{page-861124fab907567f.js → page-d3f96f0e775636fd.js} +1 -1
- package/.next/static/chunks/{webpack-c5f126aae1eac753.js → webpack-198a420ca2ddb7de.js} +1 -1
- package/.next/static/css/2579b9365591037f.css +1 -0
- package/.next/static/media/0ea4f4df910e6120-s.woff2 +0 -0
- package/.next/static/media/1f160ec2cb9962ef-s.woff2 +0 -0
- package/.next/static/media/739c2d8941231bb4-s.p.woff2 +0 -0
- package/.next/static/media/ad8a7e2c3c2c120b-s.woff2 +0 -0
- package/.next/static/media/cde148027b808b99-s.woff2 +0 -0
- package/.next/static/media/e61ae719f7cc4155-s.woff2 +0 -0
- package/package.json +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/2743.js +0 -54
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/4533.js +0 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/613.js +0 -57
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/6509.js +0 -51
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8055.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1668-c41281dc3163e1c2.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2535-54681cf49f7f39e8.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/3945-7c1c5f7e488ff042.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5645-d306bb768b5907c8.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5787-3387a2b82bbb1e66.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6758-d0a2d1008691eff1.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/680-61e3cda59bad5959.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7082-a03865af2ed57a67.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7436-44378c85b24787cc.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7965-51dfb844f8b8584c.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8858-e009f69745d12205.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/page-90479d797d04efdb.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/dashboard/page-aa8e2d7970450b2a.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-2ec271596e09c5f1.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/page-4324a833564ed326.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/layout-e0e626ece42c56d9.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/css/4d6bfee1e91e393d.css +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/12a3e8885b69eb86-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/14d38ce06836ffee-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/19bbd60ccc95b5d0-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/23822ac40846484b-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/2fec16f4e3247070-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/33a864272e2b3e97-s.p.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/387866ce4a39ca39-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/3ecd40fce058ee61-s.p.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/4b1cfd3867993fed-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/64b603a0050c6c5e-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/70d2fd2b9078a5a3-s.p.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/77f5a85cac4ea515-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/854d2e4705543874-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/b188519314c42064-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/b22cdab1bc584ea3-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/b664222af7dcc13c-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/bda87828535b47a7-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/c99b890c5ded8d2e-s.p.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/cf66601165af2130-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/d39dd0fe2707b73f-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/dbd9849a8a735d72-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/e8773fdd4b7ad26f-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/eeeb642bd71d217b-s.woff2 +0 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/media/f882d86c499cfa5a-s.woff2 +0 -0
- package/.next/static/chunks/1668-c41281dc3163e1c2.js +0 -1
- package/.next/static/chunks/2535-54681cf49f7f39e8.js +0 -1
- package/.next/static/chunks/3945-7c1c5f7e488ff042.js +0 -1
- package/.next/static/chunks/5645-d306bb768b5907c8.js +0 -1
- package/.next/static/chunks/5787-3387a2b82bbb1e66.js +0 -1
- package/.next/static/chunks/6758-d0a2d1008691eff1.js +0 -1
- package/.next/static/chunks/680-61e3cda59bad5959.js +0 -1
- package/.next/static/chunks/7082-a03865af2ed57a67.js +0 -1
- package/.next/static/chunks/7436-44378c85b24787cc.js +0 -1
- package/.next/static/chunks/7965-51dfb844f8b8584c.js +0 -1
- package/.next/static/chunks/8858-e009f69745d12205.js +0 -1
- package/.next/static/chunks/app/(main)/audit-logs/page-90479d797d04efdb.js +0 -1
- package/.next/static/chunks/app/(main)/dashboard/page-aa8e2d7970450b2a.js +0 -1
- package/.next/static/chunks/app/(main)/servers/[name]/page-2ec271596e09c5f1.js +0 -1
- package/.next/static/chunks/app/(main)/servers/page-4324a833564ed326.js +0 -1
- package/.next/static/chunks/app/layout-e0e626ece42c56d9.js +0 -1
- package/.next/static/css/4d6bfee1e91e393d.css +0 -1
- package/.next/static/media/12a3e8885b69eb86-s.woff2 +0 -0
- package/.next/static/media/14d38ce06836ffee-s.woff2 +0 -0
- package/.next/static/media/19bbd60ccc95b5d0-s.woff2 +0 -0
- package/.next/static/media/23822ac40846484b-s.woff2 +0 -0
- package/.next/static/media/2fec16f4e3247070-s.woff2 +0 -0
- package/.next/static/media/33a864272e2b3e97-s.p.woff2 +0 -0
- package/.next/static/media/387866ce4a39ca39-s.woff2 +0 -0
- package/.next/static/media/3ecd40fce058ee61-s.p.woff2 +0 -0
- package/.next/static/media/4b1cfd3867993fed-s.woff2 +0 -0
- package/.next/static/media/64b603a0050c6c5e-s.woff2 +0 -0
- package/.next/static/media/70d2fd2b9078a5a3-s.p.woff2 +0 -0
- package/.next/static/media/77f5a85cac4ea515-s.woff2 +0 -0
- package/.next/static/media/854d2e4705543874-s.woff2 +0 -0
- package/.next/static/media/b188519314c42064-s.woff2 +0 -0
- package/.next/static/media/b22cdab1bc584ea3-s.woff2 +0 -0
- package/.next/static/media/b664222af7dcc13c-s.woff2 +0 -0
- package/.next/static/media/bda87828535b47a7-s.woff2 +0 -0
- package/.next/static/media/c99b890c5ded8d2e-s.p.woff2 +0 -0
- package/.next/static/media/cf66601165af2130-s.woff2 +0 -0
- package/.next/static/media/d39dd0fe2707b73f-s.woff2 +0 -0
- package/.next/static/media/dbd9849a8a735d72-s.woff2 +0 -0
- package/.next/static/media/e8773fdd4b7ad26f-s.woff2 +0 -0
- package/.next/static/media/eeeb642bd71d217b-s.woff2 +0 -0
- package/.next/static/media/f882d86c499cfa5a-s.woff2 +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/{vFi0GyYVE0v9zPFVmRQHq → 89Bssec70Vx75pcmzcDoG}/_buildManifest.js +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/{vFi0GyYVE0v9zPFVmRQHq → 89Bssec70Vx75pcmzcDoG}/_ssgManifest.js +0 -0
- /package/.next/static/{vFi0GyYVE0v9zPFVmRQHq → 89Bssec70Vx75pcmzcDoG}/_buildManifest.js +0 -0
- /package/.next/static/{vFi0GyYVE0v9zPFVmRQHq → 89Bssec70Vx75pcmzcDoG}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6302],{1366:function(e,s,n){Promise.resolve().then(n.bind(n,6643))},6643:function(e,s,n){"use strict";n.r(s),n.d(s,{default:function(){return N}});var t=n(94655),r=n(31317),i=n(7281),a=n(69899),o=n(70115),c=n(76492),l=n(91606),d=n(628),h=n(41565),x=n(25333),u=n(46207),j=n(43436),Z=n(92666);function m(){let{data:e,isLoading:s,error:n}=(0,Z.mj)();if(s)return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup Status"}),(0,t.jsx)(r.Z,{color:"text.secondary",children:"Loading..."})]})});if(n)return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup Status"}),(0,t.jsx)(r.Z,{color:"error",children:"Failed to load backup status"})]})});let{configured:a,lastBackup:o,repository:c}=e||{};return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,t.jsx)(r.Z,{variant:"h6",children:"Backup Status"}),(0,t.jsx)(x.Z,{icon:a?(0,t.jsx)(u.Z,{}):(0,t.jsx)(j.Z,{}),label:a?"Configured":"Not Configured",color:a?"success":"error",size:"small"})]}),a?(0,t.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c&&(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Repository"}),(0,t.jsx)(r.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:c})]}),o&&(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Last Backup"}),(0,t.jsx)(r.Z,{variant:"body2",children:function(e){let s=new Date,n=new Date(e),t=Math.floor((s.getTime()-n.getTime())/6e4),r=Math.floor(t/60);return t<1?"just now":t<60?"".concat(t," minutes ago"):r<24?"".concat(r," hours ago"):"".concat(Math.floor(r/24)," days ago")}(o)})]}),!o&&(0,t.jsx)(r.Z,{variant:"body2",color:"text.secondary",children:"No backups yet"})]}):(0,t.jsx)(r.Z,{variant:"body2",color:"text.secondary",children:"GitHub backup is not configured. Please configure BACKUP_REPO_URL in your environment."})]})})}var p=n(35106),g=n(21138),y=n(84811),b=n(47001),f=n(53281),v=n(11254),k=n(70366),C=n(79983),w=n(97731),B=n(30417),S=n(99770),F=n(76678),D=n(5682),I=n(65087),T=n(62508),R=n(81071),z=n(93017);function P(e){var s;let{open:n,commit:a,onClose:o}=e,{mutate:c,isPending:l}=(0,Z.s8)(),[d,h]=(0,p.useState)(""),[x,u]=(0,p.useState)(""),j=()=>{l||(h(""),u(""),o())};return(0,t.jsxs)(S.Z,{open:n,onClose:j,maxWidth:"sm",fullWidth:!0,children:[(0,t.jsx)(T.Z,{children:"Restore Backup"}),(0,t.jsxs)(D.Z,{children:[(0,t.jsx)(R.Z,{severity:"warning",sx:{mb:2},children:"This will restore all worlds from the selected backup. Current world data will be overwritten."}),d&&(0,t.jsx)(R.Z,{severity:"success",sx:{mb:2},children:d}),x&&(0,t.jsx)(R.Z,{severity:"error",sx:{mb:2},children:x}),(0,t.jsx)(I.Z,{sx:{mb:2},children:"Are you sure you want to restore from this backup?"}),(0,t.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Commit Hash"}),(0,t.jsx)(r.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:a.hash})]}),(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Date"}),(0,t.jsx)(r.Z,{variant:"body2",children:(s=a.date,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(s)))})]}),(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Message"}),(0,t.jsx)(r.Z,{variant:"body2",children:a.message})]}),(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Author"}),(0,t.jsx)(r.Z,{variant:"body2",children:a.author})]})]})]}),(0,t.jsxs)(F.Z,{children:[(0,t.jsx)(B.Z,{onClick:j,disabled:l,children:"Cancel"}),(0,t.jsx)(B.Z,{onClick:()=>{h(""),u(""),c(a.hash,{onSuccess:()=>{h("Backup restored successfully from ".concat(a.hash.substring(0,7))),setTimeout(()=>{o()},2e3)},onError:e=>{u("Failed to restore backup: ".concat(e.message))}})},variant:"contained",color:"warning",disabled:l,startIcon:l?(0,t.jsx)(z.Z,{size:16}):(0,t.jsx)(w.Z,{}),children:l?"Restoring...":"Restore"})]})]})}function _(){let{data:e,isLoading:s,error:n}=(0,Z.$t)(20),[i,a]=(0,p.useState)(null),o=e=>{a(e)};if(s)return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),(0,t.jsx)(r.Z,{color:"text.secondary",children:"Loading..."})]})});if(n)return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),(0,t.jsx)(r.Z,{color:"error",children:"Failed to load backup history"})]})});let c=(null==e?void 0:e.commits)||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),0===c.length?(0,t.jsx)(r.Z,{color:"text.secondary",children:"No backup history available"}):(0,t.jsx)(f.Z,{children:(0,t.jsxs)(g.Z,{children:[(0,t.jsx)(v.Z,{children:(0,t.jsxs)(k.Z,{children:[(0,t.jsx)(b.Z,{children:"Commit"}),(0,t.jsx)(b.Z,{children:"Date"}),(0,t.jsx)(b.Z,{children:"Message"}),(0,t.jsx)(b.Z,{children:"Author"}),(0,t.jsx)(b.Z,{align:"right",children:"Actions"})]})}),(0,t.jsx)(y.Z,{children:c.map(e=>{var s;return(0,t.jsxs)(k.Z,{children:[(0,t.jsx)(b.Z,{children:(0,t.jsx)(x.Z,{label:e.hash.substring(0,7),size:"small",variant:"outlined",sx:{fontFamily:"monospace"}})}),(0,t.jsx)(b.Z,{children:(0,t.jsx)(r.Z,{variant:"body2",children:(s=e.date,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(s)))})}),(0,t.jsx)(b.Z,{children:(0,t.jsx)(r.Z,{variant:"body2",children:e.message})}),(0,t.jsx)(b.Z,{children:(0,t.jsx)(r.Z,{variant:"body2",color:"text.secondary",children:e.author})}),(0,t.jsx)(b.Z,{align:"right",children:(0,t.jsx)(C.Z,{size:"small",color:"primary",onClick:()=>o(e),title:"Restore this backup",children:(0,t.jsx)(w.Z,{})})})]},e.hash)})})]})})]})}),i&&(0,t.jsx)(P,{open:!!i,commit:i,onClose:()=>{a(null)}})]})}var H=n(97436),M=n(34675);function E(e){let{disabled:s}=e,[n,r]=(0,p.useState)(!1),[i,a]=(0,p.useState)(""),[o,c]=(0,p.useState)(""),[l,d]=(0,p.useState)(""),{mutate:h,isPending:x}=(0,Z.c5)(),u=()=>{x||(r(!1),a(""),c(""),d(""))};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.Z,{variant:"contained",startIcon:(0,t.jsx)(M.Z,{}),onClick:()=>{r(!0),c(""),d(""),a("Backup ".concat(new Date().toISOString().split("T")[0]))},disabled:s||x,children:"Push Backup"}),(0,t.jsxs)(S.Z,{open:n,onClose:u,maxWidth:"sm",fullWidth:!0,children:[(0,t.jsx)(T.Z,{children:"Push Backup"}),(0,t.jsxs)(D.Z,{children:[o&&(0,t.jsx)(R.Z,{severity:"success",sx:{mb:2},children:o}),l&&(0,t.jsx)(R.Z,{severity:"error",sx:{mb:2},children:l}),(0,t.jsx)(H.Z,{autoFocus:!0,margin:"dense",label:"Commit Message",type:"text",fullWidth:!0,variant:"outlined",value:i,onChange:e=>a(e.target.value),disabled:x,helperText:"Optional message describing this backup"})]}),(0,t.jsxs)(F.Z,{children:[(0,t.jsx)(B.Z,{onClick:u,disabled:x,children:"Cancel"}),(0,t.jsx)(B.Z,{onClick:()=>{c(""),d(""),h({message:i||void 0},{onSuccess:e=>{c(e.commitHash?"Backup pushed successfully (".concat(e.commitHash.substring(0,7),")"):"Backup pushed successfully"),setTimeout(()=>{u()},2e3)},onError:e=>{d("Failed to push backup: ".concat(e.message))}})},variant:"contained",disabled:x,startIcon:x?(0,t.jsx)(z.Z,{size:16}):(0,t.jsx)(M.Z,{}),children:x?"Pushing...":"Push"})]})]})]})}function N(){var e;let{data:s}=(0,Z.mj)(),n=null!==(e=null==s?void 0:s.configured)&&void 0!==e&&e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(a.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,c.Fq)(e.palette.secondary.main,.1)," 0%, ").concat((0,c.Fq)(e.palette.info.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,c.Fq)(e.palette.secondary.main,.2)),display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,t.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"secondary.main",color:"secondary.contrastText"},children:(0,t.jsx)(l.Z,{sx:{fontSize:32}})}),(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Backups"}),(0,t.jsx)(r.Z,{variant:"body1",color:"text.secondary",children:"Manage world backups and restore points"})]})]}),(0,t.jsx)(E,{disabled:!n})]}),(0,t.jsxs)(o.Z,{spacing:3,children:[(0,t.jsx)(m,{}),n&&(0,t.jsx)(_,{})]})]})}}},function(e){e.O(0,[6812,9760,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6302],{1366:function(e,s,n){Promise.resolve().then(n.bind(n,6643))},6643:function(e,s,n){"use strict";n.r(s),n.d(s,{default:function(){return N}});var t=n(94655),r=n(31317),i=n(7281),a=n(69899),o=n(70115),c=n(76492),l=n(91606),d=n(628),h=n(41565),x=n(25333),u=n(46207),j=n(43436),Z=n(92666);function m(){let{data:e,isLoading:s,error:n}=(0,Z.mj)();if(s)return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup Status"}),(0,t.jsx)(r.Z,{color:"text.secondary",children:"Loading..."})]})});if(n)return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup Status"}),(0,t.jsx)(r.Z,{color:"error",children:"Failed to load backup status"})]})});let{configured:a,lastBackup:o,repository:c}=e||{};return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,t.jsx)(r.Z,{variant:"h6",children:"Backup Status"}),(0,t.jsx)(x.Z,{icon:a?(0,t.jsx)(u.Z,{}):(0,t.jsx)(j.Z,{}),label:a?"Configured":"Not Configured",color:a?"success":"error",size:"small"})]}),a?(0,t.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c&&(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Repository"}),(0,t.jsx)(r.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:c})]}),o&&(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Last Backup"}),(0,t.jsx)(r.Z,{variant:"body2",children:function(e){let s=new Date,n=new Date(e),t=Math.floor((s.getTime()-n.getTime())/6e4),r=Math.floor(t/60);return t<1?"just now":t<60?"".concat(t," minutes ago"):r<24?"".concat(r," hours ago"):"".concat(Math.floor(r/24)," days ago")}(o)})]}),!o&&(0,t.jsx)(r.Z,{variant:"body2",color:"text.secondary",children:"No backups yet"})]}):(0,t.jsx)(r.Z,{variant:"body2",color:"text.secondary",children:"GitHub backup is not configured. Please configure BACKUP_REPO_URL in your environment."})]})})}var p=n(35106),g=n(21138),y=n(84811),b=n(47001),f=n(53281),v=n(11254),k=n(70366),C=n(79983),w=n(97731),B=n(30417),S=n(99770),F=n(76678),D=n(5682),I=n(65087),T=n(62508),R=n(81071),z=n(93017);function P(e){var s;let{open:n,commit:a,onClose:o}=e,{mutate:c,isPending:l}=(0,Z.s8)(),[d,h]=(0,p.useState)(""),[x,u]=(0,p.useState)(""),j=()=>{l||(h(""),u(""),o())};return(0,t.jsxs)(S.Z,{open:n,onClose:j,maxWidth:"sm",fullWidth:!0,children:[(0,t.jsx)(T.Z,{children:"Restore Backup"}),(0,t.jsxs)(D.Z,{children:[(0,t.jsx)(R.Z,{severity:"warning",sx:{mb:2},children:"This will restore all worlds from the selected backup. Current world data will be overwritten."}),d&&(0,t.jsx)(R.Z,{severity:"success",sx:{mb:2},children:d}),x&&(0,t.jsx)(R.Z,{severity:"error",sx:{mb:2},children:x}),(0,t.jsx)(I.Z,{sx:{mb:2},children:"Are you sure you want to restore from this backup?"}),(0,t.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Commit Hash"}),(0,t.jsx)(r.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:a.hash})]}),(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Date"}),(0,t.jsx)(r.Z,{variant:"body2",children:(s=a.date,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(s)))})]}),(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Message"}),(0,t.jsx)(r.Z,{variant:"body2",children:a.message})]}),(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Author"}),(0,t.jsx)(r.Z,{variant:"body2",children:a.author})]})]})]}),(0,t.jsxs)(F.Z,{children:[(0,t.jsx)(B.Z,{onClick:j,disabled:l,children:"Cancel"}),(0,t.jsx)(B.Z,{onClick:()=>{h(""),u(""),c(a.hash,{onSuccess:()=>{h("Backup restored successfully from ".concat(a.hash.substring(0,7))),setTimeout(()=>{o()},2e3)},onError:e=>{u("Failed to restore backup: ".concat(e.message))}})},variant:"contained",color:"warning",disabled:l,startIcon:l?(0,t.jsx)(z.Z,{size:16}):(0,t.jsx)(w.Z,{}),children:l?"Restoring...":"Restore"})]})]})}function _(){let{data:e,isLoading:s,error:n}=(0,Z.$t)(20),[i,a]=(0,p.useState)(null),o=e=>{a(e)};if(s)return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),(0,t.jsx)(r.Z,{color:"text.secondary",children:"Loading..."})]})});if(n)return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),(0,t.jsx)(r.Z,{color:"error",children:"Failed to load backup history"})]})});let c=(null==e?void 0:e.commits)||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),0===c.length?(0,t.jsx)(r.Z,{color:"text.secondary",children:"No backup history available"}):(0,t.jsx)(f.Z,{children:(0,t.jsxs)(g.Z,{children:[(0,t.jsx)(v.Z,{children:(0,t.jsxs)(k.Z,{children:[(0,t.jsx)(b.Z,{children:"Commit"}),(0,t.jsx)(b.Z,{children:"Date"}),(0,t.jsx)(b.Z,{children:"Message"}),(0,t.jsx)(b.Z,{children:"Author"}),(0,t.jsx)(b.Z,{align:"right",children:"Actions"})]})}),(0,t.jsx)(y.Z,{children:c.map(e=>{var s;return(0,t.jsxs)(k.Z,{children:[(0,t.jsx)(b.Z,{children:(0,t.jsx)(x.Z,{label:e.hash.substring(0,7),size:"small",variant:"outlined",sx:{fontFamily:"monospace"}})}),(0,t.jsx)(b.Z,{children:(0,t.jsx)(r.Z,{variant:"body2",children:(s=e.date,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(s)))})}),(0,t.jsx)(b.Z,{children:(0,t.jsx)(r.Z,{variant:"body2",children:e.message})}),(0,t.jsx)(b.Z,{children:(0,t.jsx)(r.Z,{variant:"body2",color:"text.secondary",children:e.author})}),(0,t.jsx)(b.Z,{align:"right",children:(0,t.jsx)(C.Z,{size:"small",color:"primary",onClick:()=>o(e),title:"Restore this backup",children:(0,t.jsx)(w.Z,{})})})]},e.hash)})})]})})]})}),i&&(0,t.jsx)(P,{open:!!i,commit:i,onClose:()=>{a(null)}})]})}var H=n(97436),M=n(34675);function E(e){let{disabled:s}=e,[n,r]=(0,p.useState)(!1),[i,a]=(0,p.useState)(""),[o,c]=(0,p.useState)(""),[l,d]=(0,p.useState)(""),{mutate:h,isPending:x}=(0,Z.c5)(),u=()=>{x||(r(!1),a(""),c(""),d(""))};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.Z,{variant:"contained",startIcon:(0,t.jsx)(M.Z,{}),onClick:()=>{r(!0),c(""),d(""),a("Backup ".concat(new Date().toISOString().split("T")[0]))},disabled:s||x,children:"Push Backup"}),(0,t.jsxs)(S.Z,{open:n,onClose:u,maxWidth:"sm",fullWidth:!0,children:[(0,t.jsx)(T.Z,{children:"Push Backup"}),(0,t.jsxs)(D.Z,{children:[o&&(0,t.jsx)(R.Z,{severity:"success",sx:{mb:2},children:o}),l&&(0,t.jsx)(R.Z,{severity:"error",sx:{mb:2},children:l}),(0,t.jsx)(H.Z,{autoFocus:!0,margin:"dense",label:"Commit Message",type:"text",fullWidth:!0,variant:"outlined",value:i,onChange:e=>a(e.target.value),disabled:x,helperText:"Optional message describing this backup"})]}),(0,t.jsxs)(F.Z,{children:[(0,t.jsx)(B.Z,{onClick:u,disabled:x,children:"Cancel"}),(0,t.jsx)(B.Z,{onClick:()=>{c(""),d(""),h({message:i||void 0},{onSuccess:e=>{c(e.commitHash?"Backup pushed successfully (".concat(e.commitHash.substring(0,7),")"):"Backup pushed successfully"),setTimeout(()=>{u()},2e3)},onError:e=>{d("Failed to push backup: ".concat(e.message))}})},variant:"contained",disabled:x,startIcon:x?(0,t.jsx)(z.Z,{size:16}):(0,t.jsx)(M.Z,{}),children:x?"Pushing...":"Push"})]})]})]})}function N(){var e;let{data:s}=(0,Z.mj)(),n=null!==(e=null==s?void 0:s.configured)&&void 0!==e&&e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(a.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,c.Fq)(e.palette.secondary.main,.1)," 0%, ").concat((0,c.Fq)(e.palette.info.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,c.Fq)(e.palette.secondary.main,.2)),display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,t.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"secondary.main",color:"secondary.contrastText"},children:(0,t.jsx)(l.Z,{sx:{fontSize:32}})}),(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Backups"}),(0,t.jsx)(r.Z,{variant:"body1",color:"text.secondary",children:"Manage world backups and restore points"})]})]}),(0,t.jsx)(E,{disabled:!n})]}),(0,t.jsxs)(o.Z,{spacing:3,children:[(0,t.jsx)(m,{}),n&&(0,t.jsx)(_,{})]})]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,880,2844,8854,2666,3669,2757,1744],function(){return e(e.s=1366)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2248],{12121:function(e,t,r){Promise.resolve().then(r.bind(r,64924))},64924:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return B}});var n=r(94655),s=r(69899),i=r(76492),a=r(7281),l=r(31317),o=r(84840),c=r(628),d=r(41565),x=r(10721),h=r(25065),u=r(91179),p=r(11767),m=r(53832),j=r(30164),g=r(92666),f=r(59104);function Z(e){let{title:t,value:r,icon:s,color:i="primary",description:o}=e,x={primary:"#1bd96a",success:"#22c55e",info:"#3b82f6",secondary:"#7c3aed"};return(0,n.jsx)(c.Z,{"data-testid":"stat-card",sx:{height:"100%",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:"4px",background:x[i]}},children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{fontWeight:500},children:t}),s&&(0,n.jsx)(a.Z,{sx:{color:x[i],opacity:.8},children:s})]}),(0,n.jsx)(l.Z,{variant:"h3",component:"div",sx:{fontWeight:700,color:"text.primary",mb:o?1:0},children:r}),o&&(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:o})]})})}var v=r(98406),y=r(93017),b=r(25333),w=r(46725),S=r(8690),C=r(31358),z=r(97511);function I(e){let{servers:t,statusMap:r={},isLoading:s,maxItems:i,showViewAll:o=!1,onServerClick:x}=e,h=(0,C.x)(),u=i?t.slice(0,i):t,p=e=>{x?x(e):h.push("/servers/".concat(e))},m=e=>{switch(e){case"running":return"success";case"stopped":case"exited":return"error";case"created":return"warning";default:return"default"}},j=e=>{switch(e){case"healthy":return"success";case"unhealthy":return"error";case"starting":return"warning";default:return"default"}};return s?(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:"Servers"}),(0,n.jsx)(d.Z,{children:(0,n.jsx)(a.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,n.jsx)(y.Z,{})})})]}):0===t.length?(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:"Servers"}),(0,n.jsx)(d.Z,{children:(0,n.jsx)(l.Z,{color:"text.secondary",align:"center",children:"No servers found. Create your first server to get started."})})]}):(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:"Servers",action:o&&t.length>(i||0)?(0,n.jsxs)(w.default,{href:"/servers",onClick:()=>(0,S.Av)(),style:{textDecoration:"none",color:"inherit",fontSize:"0.875rem"},children:["View All (",t.length,")"]}):null}),(0,n.jsx)(d.Z,{children:(0,n.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:2},children:u.map(e=>{let t=r[e.name],s=(null==t?void 0:t.status)||e.status,i=(null==t?void 0:t.health)||e.health;return(0,n.jsx)(a.Z,{role:"button",onClick:()=>p(e.name),sx:{p:2,borderRadius:1,border:"1px solid",borderColor:"divider",cursor:"pointer",transition:"all 0.2s","&:hover":{borderColor:"primary.main",backgroundColor:"action.hover"}},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"subtitle1",fontWeight:600,children:e.name}),(0,n.jsx)(z.h,{hostname:e.hostname,fontSize:12})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1},children:[(0,n.jsx)(b.Z,{label:s,color:m(s),size:"small"}),"none"!==i&&(0,n.jsx)(b.Z,{label:i,color:j(i),size:"small",variant:"outlined"})]})]})},e.name)})})})]})}var k=r(35106),P=r(41261);function F(e){let{maxVersions:t=2,title:r="Recent Updates"}=e,[s,i]=(0,k.useState)([]),[o,h]=(0,k.useState)(!0),[u,p]=(0,k.useState)(null);return((0,k.useEffect)(()=>{(async function(){try{let e=await fetch("https://api.github.com/repos/smallmiro/minecraft-server-manager/contents/CHANGELOG.md",{headers:{Accept:"application/vnd.github.v3+json"}});if(!e.ok)throw Error("Failed to fetch changelog");let r=await e.json(),n=atob(r.content),s=function(e,t){let r=[],n=e.split("\n"),s=null,i="added";for(let e of n){let n=e.match(/^## \[([^\]]+)\] - (\d{4}-\d{2}-\d{2})/);if(n){if(s&&(r.push(s),r.length>=t))break;s={version:n[1],date:n[2],items:[]};continue}let a=e.match(/^### (Added|Fixed|Changed)/i);if(a){i=a[1].toLowerCase();continue}let l=e.match(/^- \*\*([^*]+)\*\*\s*[-–]?\s*(.*)$/);l&&s&&s.items.push({type:i,message:l[1].trim()})}return s&&r.length<t&&r.push(s),r}(n,t);i(s)}catch(e){p(e instanceof Error?e.message:"Unknown error")}finally{h(!1)}})()},[t]),o)?(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:r}),(0,n.jsxs)(d.Z,{children:[(0,n.jsx)(x.Z,{variant:"text",width:"60%",height:28}),(0,n.jsx)(x.Z,{variant:"text",width:"80%"}),(0,n.jsx)(x.Z,{variant:"text",width:"70%"}),(0,n.jsxs)(a.Z,{sx:{mt:2},children:[(0,n.jsx)(x.Z,{variant:"text",width:"60%",height:28}),(0,n.jsx)(x.Z,{variant:"text",width:"75%"})]})]})]}):u?(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:r}),(0,n.jsx)(d.Z,{children:(0,n.jsx)(l.Z,{color:"text.secondary",align:"center",children:"Unable to load updates"})})]}):(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:r,action:(0,n.jsx)(P.Z,{href:"https://github.com/smallmiro/minecraft-server-manager/blob/develop/CHANGELOG.md",target:"_blank",rel:"noopener",sx:{fontSize:13,mr:1},children:"View all"})}),(0,n.jsx)(d.Z,{sx:{pt:0},children:s.map((e,t)=>{let r=e.items.filter(e=>"added"===e.type),i=e.items.filter(e=>"fixed"===e.type),o=e.items.filter(e=>"changed"===e.type);return(0,n.jsxs)(a.Z,{sx:{mb:t<s.length-1?2.5:0,pb:t<s.length-1?2:0,borderBottom:t<s.length-1?"1px solid":"none",borderColor:"divider"},children:[(0,n.jsxs)(l.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"primary.main",mb:1},children:["[",e.version,"] - ",e.date]}),r.length>0&&(0,n.jsxs)(a.Z,{sx:{mb:1},children:[(0,n.jsx)(b.Z,{label:"Added",size:"small",sx:{bgcolor:"success.main",color:"success.contrastText",fontSize:11,height:20,mb:.5}}),r.map((e,t)=>(0,n.jsxs)(l.Z,{variant:"body2",sx:{color:"text.secondary",pl:1},children:["• ",e.message]},t))]}),i.length>0&&(0,n.jsxs)(a.Z,{sx:{mb:1},children:[(0,n.jsx)(b.Z,{label:"Fixed",size:"small",sx:{bgcolor:"warning.main",color:"warning.contrastText",fontSize:11,height:20,mb:.5}}),i.map((e,t)=>(0,n.jsxs)(l.Z,{variant:"body2",sx:{color:"text.secondary",pl:1},children:["• ",e.message]},t))]}),o.length>0&&(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(b.Z,{label:"Changed",size:"small",sx:{bgcolor:"info.main",color:"info.contrastText",fontSize:11,height:20,mb:.5}}),o.map((e,t)=>(0,n.jsxs)(l.Z,{variant:"body2",sx:{color:"text.secondary",pl:1},children:["• ",e.message]},t))]})]},e.version)})})]})}var T=r(30417),W=r(90158),A=r(58347),N=r(73424),q=r(95511),D=r(26577),L=r(56813),R=r(26892),E=r(84509);function O(e){var t;let{maxItems:r=5}=e,{data:s,isLoading:i,error:o}=(0,E.oL)(r),h=null!==(t=null==s?void 0:s.logs)&&void 0!==t?t:[];return(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:"Recent Activity",action:(0,n.jsx)(T.Z,{component:w.default,href:"/audit-logs",size:"small",endIcon:(0,n.jsx)(D.Z,{}),sx:{textTransform:"none"},children:"View All"})}),(0,n.jsx)(d.Z,{sx:{pt:0},children:i?(0,n.jsx)(W.Z,{sx:{py:0},children:[...Array(r)].map((e,t)=>(0,n.jsx)(A.ZP,{sx:{px:0,py:1.5},children:(0,n.jsx)(N.Z,{primary:(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1},children:[(0,n.jsx)(x.Z,{variant:"rounded",width:60,height:24}),(0,n.jsx)(x.Z,{variant:"text",width:80}),(0,n.jsx)(x.Z,{variant:"text",width:60})]}),secondary:(0,n.jsx)(x.Z,{variant:"text",width:50})})},t))}):o?(0,n.jsx)(l.Z,{color:"text.secondary",align:"center",children:"Failed to load recent activity"}):0===h.length?(0,n.jsx)(l.Z,{color:"text.secondary",align:"center",sx:{py:2},children:"No recent activity"}):(0,n.jsx)(W.Z,{sx:{py:0},children:h.map(e=>{var t;return(0,n.jsx)(A.ZP,{sx:{px:0,py:1.5,"&:not(:last-child)":{borderBottom:"1px solid",borderColor:"divider"}},children:(0,n.jsx)(N.Z,{primary:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[(0,n.jsx)(L.I,{action:e.action,size:"small"}),(0,n.jsx)(l.Z,{variant:"body2",sx:{fontWeight:500},children:e.targetName}),(0,n.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:["by ",e.actor.replace("api:","").replace("cli:","")]}),"failure"===e.status&&(0,n.jsx)(R.c,{status:e.status,size:"small"})]}),secondary:(0,n.jsx)(q.Z,{title:(t=e.timestamp,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(new Date(t))),arrow:!0,children:(0,n.jsx)(l.Z,{variant:"caption",component:"span",color:"text.disabled",children:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/6e4),s=Math.floor(n/60);return n<1?"just now":n<60?"".concat(n,"m ago"):s<24?"".concat(s,"h ago"):"".concat(Math.floor(s/24),"d ago")}(e.timestamp)})})})},e.id)})})})]})}var K=r(84974),M=r(37228);function U(){let{data:e,isLoading:t}=(0,M.UW)();if(t)return(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(x.Z,{variant:"circular",width:20,height:20}),(0,n.jsx)(x.Z,{variant:"text",width:120})]}),(0,n.jsx)(x.Z,{variant:"rounded",width:60,height:24})]}),(0,n.jsx)(x.Z,{variant:"text",width:"50%",height:32}),(0,n.jsx)(x.Z,{variant:"text",width:"70%"})]})});if(!(null==e?void 0:e.enabled))return(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(K.Z,{sx:{fontSize:20,color:"text.secondary"}}),(0,n.jsx)(l.Z,{variant:"body2",fontWeight:500,color:"text.secondary",children:"External Access"})]}),(0,n.jsx)(b.Z,{label:"Not configured",size:"small",variant:"outlined"})]}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"playit.gg is not configured"}),(0,n.jsx)(T.Z,{component:w.default,href:"/routing",size:"small",endIcon:(0,n.jsx)(D.Z,{}),sx:{fontSize:12},children:"Manage"})]})});let r=e.agentRunning&&"running"===e.containerStatus,s=e.servers.length,i=e.servers.filter(e=>e.playitDomain).length;return(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(K.Z,{sx:{fontSize:20,color:"primary.main"}}),(0,n.jsx)(l.Z,{variant:"body2",fontWeight:500,children:"External Access"})]}),(0,n.jsx)(b.Z,{label:r?"Running":"Stopped",size:"small",color:r?"success":"default",variant:"outlined"})]}),(0,n.jsxs)(l.Z,{variant:"h6",sx:{mb:.5},children:[i," / ",s," servers"]}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"With external domains"}),(0,n.jsx)(T.Z,{component:w.default,href:"/routing",size:"small",endIcon:(0,n.jsx)(D.Z,{}),sx:{fontSize:12},children:"Manage"})]})})}function B(){let{data:e,isLoading:t}=(0,g.x$)(),{data:r,isLoading:v}=(0,g.Sr)(),{statusMap:y}=(0,f.d)(),b=t||v,w=(null==e?void 0:e.total)||0,S=(null==e?void 0:e.servers.filter(e=>{let t=y[e.name];return"running"===((null==t?void 0:t.status)||e.status)}).length)||0,C=(null==r?void 0:r.total)||0;return b?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,i.Fq)(e.palette.secondary.main,.1)," 0%, ").concat((0,i.Fq)(e.palette.primary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,i.Fq)(e.palette.secondary.main,.2))},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"primary.main",color:"primary.contrastText"},children:(0,n.jsx)(h.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Dashboard"}),(0,n.jsx)(l.Z,{variant:"body1",color:"text.secondary",children:"Overview of your Minecraft server infrastructure"})]})]})}),(0,n.jsx)(o.ZP,{container:!0,spacing:3,sx:{mb:4},children:[0,1,2,3].map(e=>(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,md:3,children:(0,n.jsx)(c.Z,{sx:{height:"100%",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:"4px",background:"grey.300"}},children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsx)(x.Z,{variant:"text",width:"60%"}),(0,n.jsx)(x.Z,{variant:"circular",width:32,height:32})]}),(0,n.jsx)(x.Z,{variant:"text",width:"40%",height:48}),(0,n.jsx)(x.Z,{variant:"text",width:"70%"})]})})},e))}),(0,n.jsxs)(o.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(o.ZP,{item:!0,xs:12,lg:7,children:(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsx)(x.Z,{variant:"text",width:"30%",height:32,sx:{mb:2}}),[0,1,2,3,4].map(e=>(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2,py:1.5,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(x.Z,{variant:"circular",width:10,height:10}),(0,n.jsx)(x.Z,{variant:"text",width:"25%"}),(0,n.jsx)(x.Z,{variant:"rounded",width:60,height:24,sx:{ml:"auto"}})]},e))]})})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,lg:5,children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsx)(x.Z,{variant:"text",width:"40%",height:32,sx:{mb:2}}),[0,1,2,3].map(e=>(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1.5,py:1,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(x.Z,{variant:"circular",width:24,height:24}),(0,n.jsxs)(a.Z,{sx:{flex:1},children:[(0,n.jsx)(x.Z,{variant:"text",width:"80%"}),(0,n.jsx)(x.Z,{variant:"text",width:"50%"})]})]},e))]})}),(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsx)(x.Z,{variant:"text",width:"35%",height:32,sx:{mb:2}}),[0,1].map(e=>(0,n.jsxs)(a.Z,{sx:{py:1,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(x.Z,{variant:"text",width:"60%"}),(0,n.jsx)(x.Z,{variant:"text",width:"90%"})]},e))]})})]})})]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,i.Fq)(e.palette.secondary.main,.1)," 0%, ").concat((0,i.Fq)(e.palette.primary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,i.Fq)(e.palette.secondary.main,.2))},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"secondary.main",color:"secondary.contrastText"},children:(0,n.jsx)(h.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Dashboard"}),(0,n.jsx)(l.Z,{variant:"body1",color:"text.secondary",children:"Overview of your Minecraft server infrastructure"})]})]})}),(0,n.jsxs)(o.ZP,{container:!0,spacing:3,sx:{mb:4},children:[(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,md:3,children:(0,n.jsx)(Z,{title:"Total Servers",value:w,icon:(0,n.jsx)(u.Z,{fontSize:"large"}),color:"primary",description:"All configured servers"})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,md:3,children:(0,n.jsx)(Z,{title:"Online Servers",value:S,icon:(0,n.jsx)(p.Z,{fontSize:"large"}),color:"success",description:"Currently running"})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,md:3,children:(0,n.jsx)(Z,{title:"Total Players",value:0,icon:(0,n.jsx)(m.Z,{fontSize:"large"}),color:"info",description:"Across all servers"})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,md:3,children:(0,n.jsx)(Z,{title:"Total Worlds",value:C,icon:(0,n.jsx)(j.Z,{fontSize:"large"}),color:"secondary",description:"Available worlds"})})]}),(0,n.jsxs)(o.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(o.ZP,{item:!0,xs:12,lg:7,children:(0,n.jsx)(I,{servers:(null==e?void 0:e.servers)||[],statusMap:y,isLoading:t,maxItems:5,showViewAll:!0})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,lg:5,children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(U,{}),(0,n.jsx)(O,{maxItems:5}),(0,n.jsx)(F,{maxVersions:2})]})})]})]})}},56813:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(94655),s=r(25333),i=r(82925);function a(e){let{action:t,size:r="small"}=e,a=i.Lu[t]||"default",l=i.n3[t]||t;return(0,n.jsx)(s.Z,{label:l,color:a,size:r,variant:"filled",sx:{fontWeight:600,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},26892:function(e,t,r){"use strict";r.d(t,{c:function(){return l}});var n=r(94655),s=r(25333),i=r(46207),a=r(43436);function l(e){let{status:t,size:r="small"}=e;return(0,n.jsx)(s.Z,{icon:"success"===t?(0,n.jsx)(i.Z,{}):(0,n.jsx)(a.Z,{}),label:"success"===t?"OK":"Error",color:"success"===t?"success":"error",size:r,variant:"outlined",sx:{fontWeight:500,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},84509:function(e,t,r){"use strict";r.d(t,{DM:function(){return a},HZ:function(){return o},VM:function(){return l},hT:function(){return i},oL:function(){return c}});var n=r(5632),s=r(42936);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),void 0!==e.limit&&t.set("limit",String(e.limit)),void 0!==e.offset&&t.set("offset",String(e.offset)),e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(e);return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs".concat(r)),enabled:(null==t?void 0:t.enabled)!==!1})}function a(e){return(0,n.a)({queryKey:["audit-logs","stats"],queryFn:()=>(0,s.SC)("/api/audit-logs/stats"),enabled:(null==e?void 0:e.enabled)!==!1,refetchInterval:3e4})}function l(e,t){return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs/".concat(encodeURIComponent(e))),enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function o(e,t){var r;return i({targetType:"server",targetName:e,limit:null!==(r=null==t?void 0:t.limit)&&void 0!==r?r:20},{enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return i({limit:e,sort:"timestamp:desc"})}},37228:function(e,t,r){"use strict";r.d(t,{Bc:function(){return o},N$:function(){return c},UW:function(){return l}});var n=r(5632),s=r(58919),i=r(20367),a=r(42936);function l(){return(0,n.a)({queryKey:["playit-status"],queryFn:()=>(0,a.SC)("/api/playit/status"),refetchInterval:3e4})}function o(){let e=(0,s.NL)();return(0,i.D)({mutationFn:()=>(0,a.SC)("/api/playit/start",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}function c(){let e=(0,s.NL)();return(0,i.D)({mutationFn:()=>(0,a.SC)("/api/playit/stop",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}},82925:function(e,t,r){"use strict";r.d(t,{KK:function(){return l},Lu:function(){return n},Xn:function(){return a},n3:function(){return s},xg:function(){return i}});let n={"server.create":"success","server.delete":"error","server.start":"info","server.stop":"warning","server.restart":"secondary","player.whitelist.add":"success","player.whitelist.remove":"warning","player.ban":"error","player.unban":"success","player.op":"info","player.deop":"warning","player.kick":"error","audit.purge":"default"},s={"server.create":"Create","server.delete":"Delete","server.start":"Start","server.stop":"Stop","server.restart":"Restart","player.whitelist.add":"Whitelist Add","player.whitelist.remove":"Whitelist Remove","player.ban":"Ban","player.unban":"Unban","player.op":"Op","player.deop":"Deop","player.kick":"Kick","audit.purge":"Purge"},i=["server.create","server.delete","server.start","server.stop","server.restart","player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick","audit.purge"],a=["server.create","server.delete","server.start","server.stop","server.restart"],l=["player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick"]}},function(e){e.O(0,[6812,9760,5004,7296,540,4416,2538,5511,55,8347,5123,2666,2701,3669,2757,1744],function(){return e(e.s=12121)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4095],{16387:function(e,r,t){Promise.resolve().then(t.bind(t,6453))},6453:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return B}});var n=t(94655),i=t(35106),a=t(7281),s=t(74228),l=t(46725),o=t(56275),c=t(62108),d=t(79983),x=t(31317),h=t(62142),m=t(90158),u=t(58347),p=t(49954),f=t(17820),g=t(73424),b=t(61505),j=t(71185),y=t(76176),v=t(27171),Z=t(35847),w=t(29983),C=t(80620),k=t(84974),S=t(34675),P=t(85480),z=t(64779);function I(e){return(0,n.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[(0,n.jsx)("rect",{width:"32",height:"32",fill:"#5DA840"}),(0,n.jsx)("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(8690),A=t(6986);let D=[{label:"Dashboard",href:"/dashboard",icon:(0,n.jsx)(y.Z,{})},{label:"Servers",href:"/servers",icon:(0,n.jsx)(v.Z,{})},{label:"Worlds",href:"/worlds",icon:(0,n.jsx)(k.Z,{})},{label:"Players",href:"/players",icon:(0,n.jsx)(Z.Z,{})},{label:"Audit",href:"/audit-logs",icon:(0,n.jsx)(C.Z,{})},{label:"Backups",href:"/backups",icon:(0,n.jsx)(S.Z,{})},{label:"Routing",href:"/routing",icon:(0,n.jsx)(w.Z,{})}];function T(e){let{mobileOpen:r,onMenuToggle:t}=e,i=(0,s.usePathname)(),{data:y}=(0,A.kP)(),v=e=>"/dashboard"===e?"/dashboard"===i||"/"===i:i.startsWith(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,n.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[(0,n.jsx)(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:t,sx:{mr:2,display:{md:"none"}},children:(0,n.jsx)(b.Z,{})}),(0,n.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"common.white",letterSpacing:"0.05em",fontSize:"1.1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(a.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderRadius:2,color:r?"primary.main":"text.secondary",backgroundColor:r?"action.selected":"transparent",transition:"all 0.2s ease","&:hover":{backgroundColor:"action.hover",color:r?"primary.main":"text.primary"}},children:[(0,n.jsx)(a.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),(0,n.jsx)(x.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:(0,n.jsx)(P.Ie,{})})]})}),(0,n.jsx)(h.ZP,{variant:"temporary",anchor:"left",open:r,onClose:t,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"primary.main",letterSpacing:"0.05em",fontSize:"1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(d.Z,{onClick:t,"aria-label":"close menu",children:(0,n.jsx)(j.Z,{})})]}),(0,n.jsx)(m.Z,{sx:{flex:1,px:1,py:2},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(u.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,n.jsxs)(p.Z,{component:l.default,href:e.href,onClick:()=>{t(),r||(0,W.Av)()},"aria-current":r?"page":void 0,sx:{borderRadius:2,backgroundColor:r?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[(0,n.jsx)(f.Z,{sx:{color:r?"primary.main":"text.secondary",minWidth:40},children:e.icon}),(0,n.jsx)(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:r?600:400,color:r?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var _=t(67337),E=t(41261),q=t(69123),M=t(75845),L=t(43880);function R(e){return(0,n.jsx)(z.Z,{...e,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"})})}let U=[{title:"Resources",links:[{label:"Getting Started",href:"https://minecraft-server-manager.readthedocs.io/en/latest/getting-started/",external:!0},{label:"Configuration",href:"https://minecraft-server-manager.readthedocs.io/en/latest/configuration/",external:!0},{label:"Troubleshooting",href:"https://minecraft-server-manager.readthedocs.io/en/latest/troubleshooting/",external:!0}]},{title:"Documentation",links:[{label:"CLI Commands",href:"https://minecraft-server-manager.readthedocs.io/en/latest/cli/",external:!0},{label:"API Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/console/",external:!0},{label:"itzg Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/itzg-reference/",external:!0}]},{title:"Community",links:[{label:"GitHub",href:"https://github.com/smallmiro/minecraft-server-manager",external:!0},{label:"Issues",href:"https://github.com/smallmiro/minecraft-server-manager/issues",external:!0}]},{title:"About",links:[{label:"License",href:"https://github.com/smallmiro/minecraft-server-manager/blob/main/LICENSE",external:!0},{label:"Docker Hub",href:"https://hub.docker.com/r/itzg/minecraft-server",external:!0}]}];function H(){let e=new Date().getFullYear();return(0,n.jsx)(a.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,n.jsxs)(_.Z,{maxWidth:"lg",sx:{py:6},children:[(0,n.jsx)(a.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:U.map(e=>(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(x.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),(0,n.jsx)(a.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>(0,n.jsx)(a.Z,{component:"li",sx:{mb:1},children:(0,n.jsx)(E.Z,{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,underline:"hover",sx:{color:"text.secondary",fontSize:"0.875rem",transition:"color 0.2s ease","&:hover":{color:"primary.main"}},children:e.label})},e.label))})]},e.title))}),(0,n.jsx)(q.Z,{sx:{mb:3}}),(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,n.jsxs)(x.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer",underline:"hover",sx:{color:"primary.main"},children:"Minecraft Server Management Console"})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:2},children:[(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(M.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://minecraft-server-manager.readthedocs.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(L.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://hub.docker.com/r/itzg/minecraft-server",target:"_blank",rel:"noopener noreferrer","aria-label":"Docker Hub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(R,{fontSize:"small"})})]})]})]})})}function B(e){let{children:r}=e,[t,s]=(0,i.useState)(!1);return(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[(0,n.jsx)(T,{mobileOpen:t,onMenuToggle:()=>{s(!t)}}),(0,n.jsx)(a.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"".concat(88,"px"),sm:"".concat(96,"px")},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:r}),(0,n.jsx)(H,{})]})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return u},WS:function(){return p},Ie:function(){return I}});var n=t(94655),i=t(35106),a=t(7281),s=t(81071),l=t(97436),o=t(52082),c=t(79983),d=t(30417),x=t(36848),h=t(554),m=t(6986);function u(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(!1),[j,y]=(0,i.useState)({}),[v,Z]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),k=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),y(e),0===Object.keys(e).length},S=async e=>{if(e.preventDefault(),Z(null),k()){C(!0);try{let e=await m.cg.email({email:t,password:p});if(e.error){Z(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){Z("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:S,sx:{display:"flex",flexDirection:"column",gap:2},children:[v&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>Z(null),children:v}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>u(e.target.value),error:!!j.email,helperText:j.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!j.password,helperText:j.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!g)},edge:"end",children:g?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(""),[j,y]=(0,i.useState)(""),[v,Z]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),[k,S]=(0,i.useState)({}),[P,z]=(0,i.useState)(null),[I,W]=(0,i.useState)(!1),A=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",j?g!==j&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",S(e),0===Object.keys(e).length},D=async e=>{if(e.preventDefault(),z(null),A()){W(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){z(e.error.message||"Registration failed"),W(!1);return}r&&r()}catch(e){z("An unexpected error occurred. Please try again."),W(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:D,sx:{display:"flex",flexDirection:"column",gap:2},children:[P&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>z(null),children:P}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>u(e.target.value),error:!!k.name,helperText:k.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!k.email,helperText:k.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:v?"text":"password",value:g,onChange:e=>b(e.target.value),error:!!k.password,helperText:k.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!v)},edge:"end",children:v?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:j,onChange:e=>y(e.target.value),error:!!k.confirmPassword,helperText:k.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),b=t(86702),j=t(35694),y=t(31317),v=t(25333),Z=t(69123),w=t(7178),C=t(17820),k=t(73424),S=t(25169),P=t(41094),z=t(78319);function I(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[s,l]=(0,i.useState)(null),o=()=>{l(null)},x=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,u=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(b.Z,{sx:{bgcolor:"primary.main"},children:u})}),(0,n.jsxs)(j.Z,{anchorEl:s,open:!!s,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(a.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(y.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),(0,n.jsx)(y.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&(0,n.jsx)(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(Z.Z,{}),"admin"===h.role&&(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/admin/users")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(S.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Users"})]}),(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/settings")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(P.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Settings"})]}),(0,n.jsxs)(w.Z,{onClick:x,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(z.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Logout"})]})]})]})}},3454:function(e,r,t){"use strict";t.d(r,{LoadingProvider:function(){return o},startLoading:function(){return c},stopLoading:function(){return d}});var n=t(94655),i=t(35106),a=t(74228),s=t(31477),l=t.n(s);function o(e){let{children:r}=e,t=(0,a.usePathname)(),s=(0,a.useSearchParams)();return(0,i.useEffect)(()=>{l().done()},[t,s]),(0,n.jsx)(n.Fragment,{children:r})}function c(){l().start()}function d(){l().done()}l().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,r,t){"use strict";t.d(r,{Av:function(){return n.startLoading}});var n=t(3454)},6986:function(e,r,t){"use strict";t.d(r,{Cp:function(){return h},Nq:function(){return x},cg:function(){return l},kP:function(){return d},w7:function(){return o},y1:function(){return c},zB:function(){return m}});var n=t(77054),i=t(61648),a=t(35016);let s=(0,n.X)({baseURL:a.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,i.zB)()]}),{signIn:l,signOut:o,signUp:c,useSession:d,updateUser:x,changePassword:h}=s,m=s.admin}},function(e){e.O(0,[6812,9760,6758,680,1668,7436,1071,2542,55,7727,8347,9949,4240,212,3669,2757,1744],function(){return e(e.s=16387)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4095],{16387:function(e,r,t){Promise.resolve().then(t.bind(t,6453))},6453:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return B}});var n=t(94655),i=t(35106),a=t(7281),s=t(74228),l=t(46725),o=t(56275),c=t(62108),d=t(79983),x=t(31317),h=t(62142),m=t(90158),u=t(58347),p=t(49954),f=t(17820),g=t(73424),b=t(61505),j=t(71185),y=t(76176),v=t(27171),Z=t(35847),w=t(29983),C=t(80620),k=t(84974),S=t(34675),P=t(85480),z=t(64779);function I(e){return(0,n.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[(0,n.jsx)("rect",{width:"32",height:"32",fill:"#5DA840"}),(0,n.jsx)("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(8690),A=t(6986);let D=[{label:"Dashboard",href:"/dashboard",icon:(0,n.jsx)(y.Z,{})},{label:"Servers",href:"/servers",icon:(0,n.jsx)(v.Z,{})},{label:"Worlds",href:"/worlds",icon:(0,n.jsx)(k.Z,{})},{label:"Players",href:"/players",icon:(0,n.jsx)(Z.Z,{})},{label:"Audit",href:"/audit-logs",icon:(0,n.jsx)(C.Z,{})},{label:"Backups",href:"/backups",icon:(0,n.jsx)(S.Z,{})},{label:"Routing",href:"/routing",icon:(0,n.jsx)(w.Z,{})}];function T(e){let{mobileOpen:r,onMenuToggle:t}=e,i=(0,s.usePathname)(),{data:y}=(0,A.kP)(),v=e=>"/dashboard"===e?"/dashboard"===i||"/"===i:i.startsWith(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,n.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[(0,n.jsx)(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:t,sx:{mr:2,display:{md:"none"}},children:(0,n.jsx)(b.Z,{})}),(0,n.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"common.white",letterSpacing:"0.05em",fontSize:"1.1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(a.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderRadius:2,color:r?"primary.main":"text.secondary",backgroundColor:r?"action.selected":"transparent",transition:"all 0.2s ease","&:hover":{backgroundColor:"action.hover",color:r?"primary.main":"text.primary"}},children:[(0,n.jsx)(a.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),(0,n.jsx)(x.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:(0,n.jsx)(P.Ie,{})})]})}),(0,n.jsx)(h.ZP,{variant:"temporary",anchor:"left",open:r,onClose:t,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"primary.main",letterSpacing:"0.05em",fontSize:"1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(d.Z,{onClick:t,"aria-label":"close menu",children:(0,n.jsx)(j.Z,{})})]}),(0,n.jsx)(m.Z,{sx:{flex:1,px:1,py:2},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(u.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,n.jsxs)(p.Z,{component:l.default,href:e.href,onClick:()=>{t(),r||(0,W.Av)()},"aria-current":r?"page":void 0,sx:{borderRadius:2,backgroundColor:r?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[(0,n.jsx)(f.Z,{sx:{color:r?"primary.main":"text.secondary",minWidth:40},children:e.icon}),(0,n.jsx)(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:r?600:400,color:r?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var _=t(67337),E=t(41261),q=t(69123),M=t(75845),L=t(43880);function R(e){return(0,n.jsx)(z.Z,{...e,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"})})}let U=[{title:"Resources",links:[{label:"Getting Started",href:"https://minecraft-server-manager.readthedocs.io/en/latest/getting-started/",external:!0},{label:"Configuration",href:"https://minecraft-server-manager.readthedocs.io/en/latest/configuration/",external:!0},{label:"Troubleshooting",href:"https://minecraft-server-manager.readthedocs.io/en/latest/troubleshooting/",external:!0}]},{title:"Documentation",links:[{label:"CLI Commands",href:"https://minecraft-server-manager.readthedocs.io/en/latest/cli/",external:!0},{label:"API Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/console/",external:!0},{label:"itzg Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/itzg-reference/",external:!0}]},{title:"Community",links:[{label:"GitHub",href:"https://github.com/smallmiro/minecraft-server-manager",external:!0},{label:"Issues",href:"https://github.com/smallmiro/minecraft-server-manager/issues",external:!0}]},{title:"About",links:[{label:"License",href:"https://github.com/smallmiro/minecraft-server-manager/blob/main/LICENSE",external:!0},{label:"Docker Hub",href:"https://hub.docker.com/r/itzg/minecraft-server",external:!0}]}];function H(){let e=new Date().getFullYear();return(0,n.jsx)(a.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,n.jsxs)(_.Z,{maxWidth:"lg",sx:{py:6},children:[(0,n.jsx)(a.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:U.map(e=>(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(x.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),(0,n.jsx)(a.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>(0,n.jsx)(a.Z,{component:"li",sx:{mb:1},children:(0,n.jsx)(E.Z,{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,underline:"hover",sx:{color:"text.secondary",fontSize:"0.875rem",transition:"color 0.2s ease","&:hover":{color:"primary.main"}},children:e.label})},e.label))})]},e.title))}),(0,n.jsx)(q.Z,{sx:{mb:3}}),(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,n.jsxs)(x.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer",underline:"hover",sx:{color:"primary.main"},children:"Minecraft Server Management Console"})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:2},children:[(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(M.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://minecraft-server-manager.readthedocs.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(L.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://hub.docker.com/r/itzg/minecraft-server",target:"_blank",rel:"noopener noreferrer","aria-label":"Docker Hub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(R,{fontSize:"small"})})]})]})]})})}function B(e){let{children:r}=e,[t,s]=(0,i.useState)(!1);return(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[(0,n.jsx)(T,{mobileOpen:t,onMenuToggle:()=>{s(!t)}}),(0,n.jsx)(a.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"".concat(88,"px"),sm:"".concat(96,"px")},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:r}),(0,n.jsx)(H,{})]})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return u},WS:function(){return p},Ie:function(){return I}});var n=t(94655),i=t(35106),a=t(7281),s=t(81071),l=t(97436),o=t(52082),c=t(79983),d=t(30417),x=t(36848),h=t(554),m=t(6986);function u(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(!1),[j,y]=(0,i.useState)({}),[v,Z]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),k=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),y(e),0===Object.keys(e).length},S=async e=>{if(e.preventDefault(),Z(null),k()){C(!0);try{let e=await m.cg.email({email:t,password:p});if(e.error){Z(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){Z("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:S,sx:{display:"flex",flexDirection:"column",gap:2},children:[v&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>Z(null),children:v}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>u(e.target.value),error:!!j.email,helperText:j.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!j.password,helperText:j.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!g)},edge:"end",children:g?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(""),[j,y]=(0,i.useState)(""),[v,Z]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),[k,S]=(0,i.useState)({}),[P,z]=(0,i.useState)(null),[I,W]=(0,i.useState)(!1),A=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",j?g!==j&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",S(e),0===Object.keys(e).length},D=async e=>{if(e.preventDefault(),z(null),A()){W(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){z(e.error.message||"Registration failed"),W(!1);return}r&&r()}catch(e){z("An unexpected error occurred. Please try again."),W(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:D,sx:{display:"flex",flexDirection:"column",gap:2},children:[P&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>z(null),children:P}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>u(e.target.value),error:!!k.name,helperText:k.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!k.email,helperText:k.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:v?"text":"password",value:g,onChange:e=>b(e.target.value),error:!!k.password,helperText:k.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!v)},edge:"end",children:v?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:j,onChange:e=>y(e.target.value),error:!!k.confirmPassword,helperText:k.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),b=t(86702),j=t(88812),y=t(31317),v=t(25333),Z=t(69123),w=t(7178),C=t(17820),k=t(73424),S=t(25169),P=t(41094),z=t(78319);function I(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[s,l]=(0,i.useState)(null),o=()=>{l(null)},x=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,u=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(b.Z,{sx:{bgcolor:"primary.main"},children:u})}),(0,n.jsxs)(j.Z,{anchorEl:s,open:!!s,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(a.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(y.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),(0,n.jsx)(y.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&(0,n.jsx)(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(Z.Z,{}),"admin"===h.role&&(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/admin/users")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(S.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Users"})]}),(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/settings")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(P.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Settings"})]}),(0,n.jsxs)(w.Z,{onClick:x,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(z.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Logout"})]})]})]})}},3454:function(e,r,t){"use strict";t.d(r,{LoadingProvider:function(){return o},startLoading:function(){return c},stopLoading:function(){return d}});var n=t(94655),i=t(35106),a=t(74228),s=t(31477),l=t.n(s);function o(e){let{children:r}=e,t=(0,a.usePathname)(),s=(0,a.useSearchParams)();return(0,i.useEffect)(()=>{l().done()},[t,s]),(0,n.jsx)(n.Fragment,{children:r})}function c(){l().start()}function d(){l().done()}l().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,r,t){"use strict";t.d(r,{Av:function(){return n.startLoading}});var n=t(3454)},6986:function(e,r,t){"use strict";t.d(r,{Cp:function(){return h},Nq:function(){return x},cg:function(){return l},kP:function(){return d},w7:function(){return o},y1:function(){return c},zB:function(){return m}});var n=t(77054),i=t(61648),a=t(35016);let s=(0,n.X)({baseURL:a.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,i.zB)()]}),{signIn:l,signOut:o,signUp:c,useSession:d,updateUser:x,changePassword:h}=s,m=s.admin}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,2542,55,7727,8347,9949,4240,212,3669,2757,1744],function(){return e(e.s=16387)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[781],{31809:function(e,n,a){Promise.resolve().then(a.bind(a,38538))},38538:function(e,n,a){"use strict";a.r(n),a.d(n,{default:function(){return ep}});var r=a(94655),l=a(35106),t=a(7281),s=a(31317),i=a(84840),o=a(33402),c=a(60097),d=a(29793),h=a(75726),x=a(62328),u=a(7178),p=a(69899),m=a(76492),j=a(35847),y=a(628),Z=a(41565),v=a(90158),b=a(58347),g=a(73424),f=a(69783),C=a(86702),w=a(79983),k=a(30417),S=a(25333),E=a(99770),P=a(62508),F=a(5682),I=a(65087),A=a(76678),O=a(97436),W=a(93017),D=a(81071),L=a(66561),N=a(12795),z=a(96407),B=a(69366),R=a(11597),T=a(81960),U=a(30114);function M(e){let{onPlayerKicked:n}=e,[a,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(null),[d,h]=(0,l.useState)([]),[x,u]=(0,l.useState)(!1),[p,m]=(0,l.useState)(null),[j,M]=(0,l.useState)(""),[_,K]=(0,l.useState)(!1),q=(0,l.useCallback)(async()=>{i(!0),c(null);try{let e=await fetch("/api/players");if(!e.ok)throw Error("Failed to fetch players");let n=await e.json();h(n.servers)}catch(e){c("Failed to load players"),console.error("Error fetching players:",e)}finally{i(!1)}},[]);(0,l.useEffect)(()=>{q()},[q]);let J=(e,n)=>{m({player:e,server:n}),M(""),u(!0)},G=async()=>{if(p){K(!0);try{if(!(await fetch("/api/players/kick",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:p.player.name,server:p.server,reason:j||"Kicked by administrator"})})).ok)throw Error("Failed to kick player");u(!1),m(null),null==n||n(p.player,p.server),await q()}catch(e){console.error("Error kicking player:",e)}finally{K(!1)}}},Y=d.some(e=>e.players.length>0);return(0,r.jsx)(y.Z,{"data-testid":"player-list",children:(0,r.jsxs)(Z.Z,{children:[(0,r.jsxs)(t.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,r.jsx)(s.Z,{variant:"h6",children:"Online Players"}),(0,r.jsx)(w.Z,{onClick:q,disabled:a,"aria-label":"Refresh",children:(0,r.jsx)(B.Z,{})})]}),a&&(0,r.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(W.Z,{})}),o&&(0,r.jsx)(D.Z,{severity:"error",sx:{mb:2},children:o}),!a&&!o&&!Y&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players online"}),!a&&!o&&Y&&(0,r.jsx)(t.Z,{children:d.map(e=>(0,r.jsxs)(L.Z,{defaultExpanded:e.players.length>0,children:[(0,r.jsx)(N.Z,{expandIcon:(0,r.jsx)(T.Z,{}),children:(0,r.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:2,width:"100%"},children:[(0,r.jsx)(s.Z,{variant:"subtitle1",sx:{fontWeight:500},children:e.name}),(0,r.jsx)(S.Z,{label:"".concat(e.players.length," player").concat(1!==e.players.length?"s":""),size:"small",color:e.players.length>0?"success":"default"})]})}),(0,r.jsx)(z.Z,{children:0===e.players.length?(0,r.jsx)(s.Z,{color:"text.secondary",sx:{fontStyle:"italic"},children:"No players online on this server"}):(0,r.jsx)(v.Z,{dense:!0,children:e.players.map(n=>(0,r.jsxs)(b.ZP,{secondaryAction:(0,r.jsx)(w.Z,{edge:"end","aria-label":"Kick player",onClick:()=>J(n,e.name),color:"error",children:(0,r.jsx)(R.Z,{})}),children:[(0,r.jsx)(f.Z,{children:(0,r.jsx)(C.Z,{src:"https://mc-heads.net/avatar/".concat(n.uuid,"/40"),alt:n.name,children:(0,r.jsx)(U.Z,{})})}),(0,r.jsx)(g.Z,{primary:n.name,secondary:n.uuid.substring(0,8)+"..."})]},n.uuid))})})]},e.name))}),(0,r.jsxs)(E.Z,{open:x,onClose:()=>u(!1),children:[(0,r.jsx)(P.Z,{children:"Kick Player"}),(0,r.jsxs)(F.Z,{children:[(0,r.jsxs)(I.Z,{children:["Are you sure you want to kick ",null==p?void 0:p.player.name," from ",null==p?void 0:p.server,"?"]}),(0,r.jsx)(O.Z,{autoFocus:!0,margin:"dense",label:"Reason (optional)",fullWidth:!0,variant:"outlined",value:j,onChange:e=>M(e.target.value),placeholder:"Kicked by administrator"})]}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(k.Z,{onClick:()=>u(!1),disabled:_,children:"Cancel"}),(0,r.jsx)(k.Z,{onClick:G,color:"error",variant:"contained",disabled:_,"aria-label":"Confirm kick",children:_?(0,r.jsx)(W.Z,{size:20}):"Confirm"})]})]})]})})}var _=a(70115),K=a(38393),q=a(52082),J=a(21111),G=a(47606),Y=a(42431),H=a(29114),$=a(92666);function Q(e){var n,a;let{serverName:i}=e,[o,c]=(0,l.useState)(""),[d,h]=(0,l.useState)(null),[x,u]=(0,l.useState)(!1),[p,m]=(0,l.useState)(""),[j,E]=(0,l.useState)(null),[P,F]=(0,l.useState)(""),{data:I,isLoading:A,error:L}=(0,$.ox)(i),{data:N}=(0,$.Yo)(i),z=(0,$.zF)(),B=(0,$.Ll)(),R=(0,$.S0)(),T=null!==(n=null==I?void 0:I.players)&&void 0!==n?n:[],M=null==I?void 0:I.source,Q=null!==(a=null==N?void 0:N.enabled)&&void 0!==a&&a,V=(0,l.useMemo)(()=>{if(!P.trim())return T;let e=P.toLowerCase();return T.filter(n=>n.name.toLowerCase().includes(e))},[T,P]),X=(null==L?void 0:L.message)||(B.error?"Failed to add player to whitelist":null)||(R.error&&!d?"Failed to remove player from whitelist":null)||(z.error?"Failed to update whitelist status":null),ee=()=>{o.trim()&&B.mutate({serverName:i,player:o.trim()},{onSuccess:()=>c("")})},en=e=>{h(e),R.mutate({serverName:i,player:e},{onSettled:()=>h(null)})},ea=async()=>{let e=p.split(/[,\n]/).map(e=>e.trim()).filter(Boolean);if(0===e.length)return;E(null);let n=0;for(let a of e)try{await B.mutateAsync({serverName:i,player:a}),n++}catch(e){}E("Added ".concat(n," of ").concat(e.length," players")),n>0&&m("")},er=B.isPending;return(0,r.jsx)(y.Z,{"data-testid":"whitelist-manager",children:(0,r.jsxs)(Z.Z,{children:[(0,r.jsxs)(_.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{mb:2},children:[(0,r.jsxs)(_.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,r.jsx)(s.Z,{variant:"h6",children:"Whitelist"}),(0,r.jsx)(S.Z,{label:Q?"ON":"OFF",color:Q?"success":"default",size:"small","data-testid":"whitelist-status-chip"})]}),(0,r.jsx)(K.Z,{checked:Q,onChange:()=>{z.mutate({serverName:i,enabled:!Q})},disabled:z.isPending,inputProps:{"aria-label":"Toggle whitelist"},"data-testid":"whitelist-toggle"})]}),X&&(0,r.jsx)(D.Z,{severity:"error",sx:{mb:2},children:X}),!A&&M&&"rcon"!==M&&(0,r.jsxs)(D.Z,{severity:"info",sx:{mb:2},children:["Server is offline. Showing data from ","config"===M?"config.env":"whitelist.json",". Changes will apply on next server start."]}),(0,r.jsxs)(_.Z,{direction:"row",spacing:1,alignItems:"flex-start",sx:{mb:2},children:[x?(0,r.jsxs)(t.Z,{sx:{flex:1},children:[(0,r.jsx)(O.Z,{size:"small",placeholder:"player1, player2, player3",value:p,onChange:e=>m(e.target.value),disabled:er,fullWidth:!0,multiline:!0,rows:3,"data-testid":"bulk-input"}),j&&(0,r.jsx)(D.Z,{severity:"info",sx:{mt:1},"data-testid":"bulk-result",children:j})]}):(0,r.jsx)(O.Z,{size:"small",placeholder:"Player name",value:o,onChange:e=>c(e.target.value),onKeyDown:e=>{"Enter"===e.key&&ee()},disabled:er,fullWidth:!0}),x?(0,r.jsx)(k.Z,{variant:"contained",onClick:ea,disabled:!p.trim()||er,startIcon:er?(0,r.jsx)(W.Z,{size:16}):(0,r.jsx)(H.Z,{}),"aria-label":"Add players in bulk",children:"Add All"}):(0,r.jsx)(k.Z,{variant:"contained",onClick:ee,disabled:!o.trim()||er,startIcon:er?(0,r.jsx)(W.Z,{size:16}):(0,r.jsx)(G.Z,{}),"aria-label":"Add player to whitelist",children:"Add"}),(0,r.jsx)(k.Z,{variant:x?"contained":"outlined",onClick:()=>{u(!x),E(null)},"aria-label":"Toggle bulk mode","data-testid":"bulk-toggle",sx:{whiteSpace:"nowrap"},children:"Bulk"})]}),T.length>=5&&(0,r.jsx)(O.Z,{size:"small",placeholder:"Search players...",value:P,onChange:e=>F(e.target.value),fullWidth:!0,sx:{mb:2},InputProps:{startAdornment:(0,r.jsx)(q.Z,{position:"start",children:(0,r.jsx)(Y.Z,{})})},"data-testid":"search-input"}),A&&(0,r.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(W.Z,{})}),!A&&0===T.length&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players whitelisted"}),!A&&T.length>0&&0===V.length&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},"data-testid":"no-match-message",children:"No matching players"}),!A&&V.length>0&&(0,r.jsx)(v.Z,{dense:!0,children:V.map(e=>(0,r.jsxs)(b.ZP,{secondaryAction:(0,r.jsx)(w.Z,{edge:"end","aria-label":"Remove from whitelist",onClick:()=>en(e.name),disabled:d===e.name,color:"error",children:d===e.name?(0,r.jsx)(W.Z,{size:20}):(0,r.jsx)(J.Z,{})}),children:[(0,r.jsx)(f.Z,{children:(0,r.jsx)(C.Z,{src:e.uuid?"https://mc-heads.net/avatar/".concat(e.uuid,"/40"):void 0,alt:e.name,children:(0,r.jsx)(U.Z,{})})}),(0,r.jsx)(g.Z,{primary:e.name,secondary:e.uuid?e.uuid.substring(0,8)+"...":"UUID not available"})]},e.uuid||e.name))})]})})}var V=a(35694),X=a(37809),ee=a(407),en=a(45813);let ea={1:{color:"info",label:"Moderator",icon:"\uD83D\uDEE1️"},2:{color:"success",label:"Gamemaster",icon:"\uD83C\uDFAE"},3:{color:"warning",label:"Admin",icon:"⚙️"},4:{color:"error",label:"Owner",icon:"\uD83D\uDC51"}};function er(e){let{level:n,showIcon:a=!1,compact:l=!1,size:s="medium",variant:i="filled"}=e,o=ea[n];if(!o)return null;let c=l?n.toString():"Level ".concat(n," - ").concat(o.label),d=a?(0,r.jsx)(t.Z,{component:"span",sx:{mr:.5},children:o.icon}):void 0;return(0,r.jsx)(S.Z,{label:(0,r.jsxs)(r.Fragment,{children:[d,c]}),color:o.color,size:s,variant:i})}var el=a(68038),et=a(34080),es=a(40064),ei=a(39181);let eo=[{value:1,label:"Level 1 - Moderator",description:"Bypass spawn protection",icon:"\uD83D\uDEE1️"},{value:2,label:"Level 2 - Gamemaster",description:"Cheats, command blocks",icon:"\uD83C\uDFAE"},{value:3,label:"Level 3 - Admin",description:"Player management commands",icon:"⚙️"},{value:4,label:"Level 4 - Owner",description:"Full server control",icon:"\uD83D\uDC51"}];function ec(e){let{value:n,onChange:a,label:l,disabled:i=!1}=e;return(0,r.jsxs)(d.Z,{component:"fieldset",fullWidth:!0,disabled:i,children:[l&&(0,r.jsx)(el.Z,{component:"legend",sx:{mb:1},children:l}),(0,r.jsx)(et.Z,{value:n,onChange:e=>{a(parseInt(e.target.value,10))},children:eo.map(e=>(0,r.jsx)(es.Z,{value:e.value,control:(0,r.jsx)(ei.Z,{}),label:(0,r.jsxs)(t.Z,{children:[(0,r.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,r.jsx)(s.Z,{component:"span",children:e.icon}),(0,r.jsx)(s.Z,{component:"span",fontWeight:"medium",children:e.label})]}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",sx:{ml:4},children:e.description})]}),sx:{alignItems:"flex-start",py:1}},e.value))})]})}function ed(e){let{serverName:n}=e,[a,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(null),[d,h]=(0,l.useState)([]),[x,p]=(0,l.useState)(),[m,j]=(0,l.useState)(""),[S,I]=(0,l.useState)(!1),[L,N]=(0,l.useState)(null),[z,B]=(0,l.useState)(!1),[R,T]=(0,l.useState)(4),[U,M]=(0,l.useState)(!1),[_,K]=(0,l.useState)(null),[q,Y]=(0,l.useState)(4),[H,$]=(0,l.useState)(!1),[Q,ea]=(0,l.useState)(null),[el,et]=(0,l.useState)(null),es=(0,l.useCallback)(async()=>{i(!0),c(null);try{let e=await fetch("/api/players/op?server=".concat(encodeURIComponent(n)));if(!e.ok)throw Error("Failed to fetch operators");let a=await e.json();h(a.operators),p(a.source)}catch(e){c("Failed to load operators"),console.error("Error fetching operators:",e)}finally{i(!1)}},[n]);(0,l.useEffect)(()=>{es()},[es]);let ei=async()=>{if(m.trim()){I(!0),c(null);try{if(!(await fetch("/api/players/op",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:m.trim(),server:n,level:R})})).ok)throw Error("Failed to add operator");j(""),T(4),B(!1),await es()}catch(e){c("Failed to add operator"),console.error("Error adding operator:",e)}finally{I(!1)}}},eo=async e=>{N(e),c(null),ea(null),et(null);try{if(!(await fetch("/api/players/op?player=".concat(encodeURIComponent(e),"&server=").concat(encodeURIComponent(n)),{method:"DELETE"})).ok)throw Error("Failed to remove operator");await es()}catch(e){c("Failed to remove operator"),console.error("Error removing operator:",e)}finally{N(null)}},ed=async()=>{if(_){$(!0),c(null);try{if(!(await fetch("/api/players/op/".concat(encodeURIComponent(_.name),"?server=").concat(encodeURIComponent(n)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({level:q})})).ok)throw Error("Failed to change operator level");M(!1),K(null),await es()}catch(e){c("Failed to change operator level"),console.error("Error changing operator level:",e)}finally{$(!1)}}},eh=(e,n)=>{ea(e.currentTarget),et(n)},ex=()=>{ea(null),et(null)};return(0,r.jsxs)(y.Z,{"data-testid":"op-manager",children:[(0,r.jsxs)(Z.Z,{children:[(0,r.jsx)(s.Z,{variant:"h6",gutterBottom:!0,children:"Operators"}),o&&(0,r.jsx)(D.Z,{severity:"error",sx:{mb:2},children:o}),!a&&x&&"rcon"!==x&&(0,r.jsxs)(D.Z,{severity:"info",sx:{mb:2},children:["Server is offline. Showing data from ","config"===x?"config.env":"ops.json",". Changes will apply on next server start."]}),(0,r.jsx)(t.Z,{sx:{mb:2},children:(0,r.jsx)(k.Z,{variant:"contained",onClick:()=>B(!0),startIcon:(0,r.jsx)(G.Z,{}),"aria-label":"Add operator",fullWidth:!0,children:"Add Operator"})}),a&&(0,r.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(W.Z,{})}),!a&&0===d.length&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No operators configured"}),!a&&d.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v.Z,{dense:!0,children:d.map(e=>(0,r.jsxs)(b.ZP,{secondaryAction:(0,r.jsx)(w.Z,{edge:"end","aria-label":"Operator actions",onClick:n=>eh(n,e),disabled:L===e.name,children:L===e.name?(0,r.jsx)(W.Z,{size:20}):(0,r.jsx)(X.Z,{})}),children:[(0,r.jsx)(f.Z,{children:(0,r.jsx)(C.Z,{src:e.uuid?"https://mc-heads.net/avatar/".concat(e.uuid,"/40"):void 0,alt:e.name,sx:{bgcolor:"warning.main"},children:(0,r.jsx)(ee.Z,{})})}),(0,r.jsx)(g.Z,{primary:(0,r.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[(0,r.jsx)(s.Z,{component:"span",children:e.name}),(0,r.jsx)(er,{level:e.level,showIcon:!0,size:"small"})]}),secondary:e.uuid?e.uuid.substring(0,8)+"...":"UUID not available"})]},e.uuid||e.name))}),(0,r.jsxs)(V.Z,{anchorEl:Q,open:!!Q,onClose:ex,children:[(0,r.jsxs)(u.Z,{onClick:()=>{el&&(K(el),Y(el.level),M(!0),ex())},children:[(0,r.jsx)(en.Z,{sx:{mr:1},fontSize:"small"}),"Change Level"]}),(0,r.jsxs)(u.Z,{onClick:()=>el&&eo(el.name),children:[(0,r.jsx)(J.Z,{sx:{mr:1},fontSize:"small",color:"error"}),"Remove OP"]})]})]})]}),(0,r.jsxs)(E.Z,{open:z,onClose:()=>!S&&B(!1),maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(P.Z,{children:"Add Operator"}),(0,r.jsxs)(F.Z,{children:[(0,r.jsx)(O.Z,{autoFocus:!0,margin:"dense",label:"Player Name",placeholder:"Enter player name",fullWidth:!0,value:m,onChange:e=>j(e.target.value),disabled:S,sx:{mb:2}}),(0,r.jsx)(ec,{value:R,onChange:T,label:"OP Level",disabled:S})]}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(k.Z,{onClick:()=>B(!1),disabled:S,children:"Cancel"}),(0,r.jsx)(k.Z,{variant:"contained",onClick:ei,disabled:!m.trim()||S,startIcon:S?(0,r.jsx)(W.Z,{size:16}):void 0,children:S?"Adding...":"Add OP"})]})]}),(0,r.jsxs)(E.Z,{open:U,onClose:()=>!H&&M(!1),maxWidth:"sm",fullWidth:!0,children:[(0,r.jsxs)(P.Z,{children:["Change OP Level - ",null==_?void 0:_.name]}),(0,r.jsx)(F.Z,{children:_&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:["Current: Level ",_.level," (",_.role,")"]}),(0,r.jsx)(ec,{value:q,onChange:Y,label:"New Level",disabled:H})]})}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(k.Z,{onClick:()=>M(!1),disabled:H,children:"Cancel"}),(0,r.jsx)(k.Z,{variant:"contained",onClick:ed,disabled:H||q===(null==_?void 0:_.level),startIcon:H?(0,r.jsx)(W.Z,{size:16}):void 0,children:H?"Saving...":"Save Changes"})]})]})]})}var eh=a(397);function ex(e){let{serverName:n}=e,[a,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(null),[d,h]=(0,l.useState)([]),[x,u]=(0,l.useState)(),[p,m]=(0,l.useState)(!1),[j,S]=(0,l.useState)({player:"",reason:""}),[I,L]=(0,l.useState)(!1),[N,z]=(0,l.useState)(null),B=(0,l.useCallback)(async()=>{i(!0),c(null);try{let e=await fetch("/api/players/ban?server=".concat(encodeURIComponent(n)));if(!e.ok)throw Error("Failed to fetch bans");let a=await e.json();h(a.players),u(a.source)}catch(e){c("Failed to load ban list"),console.error("Error fetching bans:",e)}finally{i(!1)}},[n]);(0,l.useEffect)(()=>{B()},[B]);let R=()=>{m(!1),S({player:"",reason:""})},T=async()=>{if(j.player.trim()){L(!0),c(null);try{if(!(await fetch("/api/players/ban",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:j.player.trim(),reason:j.reason.trim()||"Banned by administrator",server:n})})).ok)throw Error("Failed to ban player");R(),await B()}catch(e){c("Failed to ban player"),console.error("Error banning player:",e)}finally{L(!1)}}},M=async e=>{z(e),c(null);try{if(!(await fetch("/api/players/ban?player=".concat(encodeURIComponent(e),"&server=").concat(encodeURIComponent(n)),{method:"DELETE"})).ok)throw Error("Failed to unban player");await B()}catch(e){c("Failed to unban player"),console.error("Error unbanning player:",e)}finally{z(null)}},K=e=>{try{return new Date(e).toLocaleDateString()}catch(n){return e}};return(0,r.jsx)(y.Z,{"data-testid":"ban-manager",children:(0,r.jsxs)(Z.Z,{children:[(0,r.jsxs)(t.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,r.jsx)(s.Z,{variant:"h6",children:"Ban List"}),(0,r.jsx)(k.Z,{variant:"outlined",color:"error",startIcon:(0,r.jsx)(eh.Z,{}),onClick:()=>{S({player:"",reason:""}),m(!0)},"aria-label":"Ban player",children:"Ban Player"})]}),o&&(0,r.jsx)(D.Z,{severity:"error",sx:{mb:2},children:o}),!a&&x&&"rcon"!==x&&(0,r.jsxs)(D.Z,{severity:"info",sx:{mb:2},children:["Server is offline. Showing data from ","config"===x?"config.env":"banned-players.json",". Changes will apply on next server start."]}),a&&(0,r.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(W.Z,{})}),!a&&0===d.length&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players banned"}),!a&&d.length>0&&(0,r.jsx)(v.Z,{dense:!0,children:d.map(e=>(0,r.jsxs)(b.ZP,{secondaryAction:(0,r.jsx)(w.Z,{edge:"end","aria-label":"Unban player",onClick:()=>M(e.name),disabled:N===e.name,color:"success",children:N===e.name?(0,r.jsx)(W.Z,{size:20}):(0,r.jsx)(J.Z,{})}),children:[(0,r.jsx)(f.Z,{children:(0,r.jsx)(C.Z,{src:e.uuid?"https://mc-heads.net/avatar/".concat(e.uuid,"/40"):void 0,alt:e.name,sx:{bgcolor:"error.main"},children:(0,r.jsx)(U.Z,{})})}),(0,r.jsx)(g.Z,{primary:e.name,secondary:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.Z,{component:"span",variant:"body2",color:"text.secondary",children:["Reason: ",e.reason||"No reason specified"]}),(0,r.jsx)("br",{}),(0,r.jsxs)(s.Z,{component:"span",variant:"caption",color:"text.secondary",children:["Banned: ",K(e.created)," by ",e.source||"Unknown"]})]})})]},e.uuid||e.name))}),(0,r.jsxs)(E.Z,{open:p,onClose:R,maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(P.Z,{children:"Ban Player"}),(0,r.jsx)(F.Z,{children:(0,r.jsxs)(_.Z,{spacing:2,sx:{mt:1},children:[(0,r.jsx)(O.Z,{label:"Player Name",placeholder:"Enter player name",value:j.player,onChange:e=>S({...j,player:e.target.value}),fullWidth:!0,required:!0}),(0,r.jsx)(O.Z,{label:"Reason",placeholder:"Banned by administrator",value:j.reason,onChange:e=>S({...j,reason:e.target.value}),fullWidth:!0,multiline:!0,rows:2})]})}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(k.Z,{onClick:R,disabled:I,children:"Cancel"}),(0,r.jsx)(k.Z,{onClick:T,color:"error",variant:"contained",disabled:!j.player.trim()||I,startIcon:I?(0,r.jsx)(W.Z,{size:16}):(0,r.jsx)(eh.Z,{}),children:"Ban"})]})]})]})})}function eu(e){let{children:n,value:a,index:l}=e;return(0,r.jsx)("div",{role:"tabpanel",hidden:a!==l,children:a===l&&(0,r.jsx)(t.Z,{sx:{py:3},children:n})})}function ep(){let[e,n]=(0,l.useState)(0),[a,y]=(0,l.useState)(""),{data:Z,isLoading:v}=(0,$.x$)(),b=null==Z?void 0:Z.servers;return(0,l.useEffect)(()=>{!a&&b&&b.length>0&&y(b[0].name)},[b,a]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,m.Fq)(e.palette.info.main,.1)," 0%, ").concat((0,m.Fq)(e.palette.secondary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,m.Fq)(e.palette.info.main,.2))},children:(0,r.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,r.jsx)(t.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"info.main",color:"info.contrastText"},children:(0,r.jsx)(j.Z,{sx:{fontSize:32}})}),(0,r.jsxs)(t.Z,{children:[(0,r.jsx)(s.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Player Management"}),(0,r.jsx)(s.Z,{variant:"body1",color:"text.secondary",children:"Manage players, whitelist, operators, and bans across your servers"})]})]})}),(0,r.jsx)(t.Z,{sx:{mb:3},children:(0,r.jsxs)(d.Z,{sx:{minWidth:200},children:[(0,r.jsx)(h.Z,{id:"server-select-label",children:"Server"}),(0,r.jsx)(x.Z,{labelId:"server-select-label",value:a,label:"Server",onChange:e=>y(e.target.value),disabled:v,children:null==b?void 0:b.map(e=>(0,r.jsx)(u.Z,{value:e.name,children:e.name},e.name))})]})}),(0,r.jsx)(t.Z,{sx:{borderBottom:1,borderColor:"divider"},children:(0,r.jsxs)(o.Z,{value:e,onChange:(e,a)=>{n(a)},"aria-label":"Player management tabs",children:[(0,r.jsx)(c.Z,{label:"Online Players"}),(0,r.jsx)(c.Z,{label:"Whitelist",disabled:!a}),(0,r.jsx)(c.Z,{label:"Operators",disabled:!a}),(0,r.jsx)(c.Z,{label:"Ban List",disabled:!a})]})}),(0,r.jsx)(eu,{value:e,index:0,children:(0,r.jsx)(M,{})}),(0,r.jsx)(eu,{value:e,index:1,children:a&&(0,r.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,r.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,r.jsx)(Q,{serverName:a})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,r.jsxs)(t.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,r.jsx)(s.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Whitelist"}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"The whitelist controls which players can join your server. When enabled, only players on the whitelist can connect. Add players by their Minecraft username."})]})})]})}),(0,r.jsx)(eu,{value:e,index:2,children:a&&(0,r.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,r.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,r.jsx)(ed,{serverName:a})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,r.jsxs)(t.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,r.jsx)(s.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Operators"}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"Operators (OPs) have elevated permissions on the server. They can use commands like /give, /gamemode, /tp, and more. OP levels range from 1-4, with 4 being the highest."}),(0,r.jsxs)(t.Z,{sx:{mt:2},children:[(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 1: Can bypass spawn protection"}),(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 2: Can use /clear, /gamemode, etc."}),(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 3: Can use /ban, /kick, /op, etc."}),(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 4: Can use /stop, full access"})]})]})})]})}),(0,r.jsx)(eu,{value:e,index:3,children:a&&(0,r.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,r.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,r.jsx)(ex,{serverName:a})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,r.jsxs)(t.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,r.jsx)(s.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Bans"}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"Banned players cannot connect to your server. You can ban players by username and provide an optional reason. Bans can be removed (pardoned) at any time."})]})})]})})]})}}},function(e){e.O(0,[6812,9760,6758,680,1668,7436,1071,540,4416,2538,880,7727,8347,1658,5381,4187,4219,392,2666,3669,2757,1744],function(){return e(e.s=31809)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[781],{31809:function(e,n,a){Promise.resolve().then(a.bind(a,38538))},38538:function(e,n,a){"use strict";a.r(n),a.d(n,{default:function(){return ep}});var r=a(94655),l=a(35106),t=a(7281),s=a(31317),i=a(84840),o=a(33402),c=a(60097),d=a(29793),h=a(75726),x=a(62328),u=a(7178),p=a(69899),m=a(76492),j=a(35847),y=a(628),Z=a(41565),v=a(90158),b=a(58347),g=a(73424),f=a(69783),C=a(86702),w=a(79983),k=a(30417),S=a(25333),E=a(99770),P=a(62508),F=a(5682),I=a(65087),A=a(76678),O=a(97436),W=a(93017),D=a(81071),L=a(66561),N=a(12795),z=a(96407),B=a(69366),R=a(11597),T=a(81960),U=a(30114);function M(e){let{onPlayerKicked:n}=e,[a,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(null),[d,h]=(0,l.useState)([]),[x,u]=(0,l.useState)(!1),[p,m]=(0,l.useState)(null),[j,M]=(0,l.useState)(""),[_,K]=(0,l.useState)(!1),q=(0,l.useCallback)(async()=>{i(!0),c(null);try{let e=await fetch("/api/players");if(!e.ok)throw Error("Failed to fetch players");let n=await e.json();h(n.servers)}catch(e){c("Failed to load players"),console.error("Error fetching players:",e)}finally{i(!1)}},[]);(0,l.useEffect)(()=>{q()},[q]);let J=(e,n)=>{m({player:e,server:n}),M(""),u(!0)},G=async()=>{if(p){K(!0);try{if(!(await fetch("/api/players/kick",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:p.player.name,server:p.server,reason:j||"Kicked by administrator"})})).ok)throw Error("Failed to kick player");u(!1),m(null),null==n||n(p.player,p.server),await q()}catch(e){console.error("Error kicking player:",e)}finally{K(!1)}}},Y=d.some(e=>e.players.length>0);return(0,r.jsx)(y.Z,{"data-testid":"player-list",children:(0,r.jsxs)(Z.Z,{children:[(0,r.jsxs)(t.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,r.jsx)(s.Z,{variant:"h6",children:"Online Players"}),(0,r.jsx)(w.Z,{onClick:q,disabled:a,"aria-label":"Refresh",children:(0,r.jsx)(B.Z,{})})]}),a&&(0,r.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(W.Z,{})}),o&&(0,r.jsx)(D.Z,{severity:"error",sx:{mb:2},children:o}),!a&&!o&&!Y&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players online"}),!a&&!o&&Y&&(0,r.jsx)(t.Z,{children:d.map(e=>(0,r.jsxs)(L.Z,{defaultExpanded:e.players.length>0,children:[(0,r.jsx)(N.Z,{expandIcon:(0,r.jsx)(T.Z,{}),children:(0,r.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:2,width:"100%"},children:[(0,r.jsx)(s.Z,{variant:"subtitle1",sx:{fontWeight:500},children:e.name}),(0,r.jsx)(S.Z,{label:"".concat(e.players.length," player").concat(1!==e.players.length?"s":""),size:"small",color:e.players.length>0?"success":"default"})]})}),(0,r.jsx)(z.Z,{children:0===e.players.length?(0,r.jsx)(s.Z,{color:"text.secondary",sx:{fontStyle:"italic"},children:"No players online on this server"}):(0,r.jsx)(v.Z,{dense:!0,children:e.players.map(n=>(0,r.jsxs)(b.ZP,{secondaryAction:(0,r.jsx)(w.Z,{edge:"end","aria-label":"Kick player",onClick:()=>J(n,e.name),color:"error",children:(0,r.jsx)(R.Z,{})}),children:[(0,r.jsx)(f.Z,{children:(0,r.jsx)(C.Z,{src:"https://mc-heads.net/avatar/".concat(n.uuid,"/40"),alt:n.name,children:(0,r.jsx)(U.Z,{})})}),(0,r.jsx)(g.Z,{primary:n.name,secondary:n.uuid.substring(0,8)+"..."})]},n.uuid))})})]},e.name))}),(0,r.jsxs)(E.Z,{open:x,onClose:()=>u(!1),children:[(0,r.jsx)(P.Z,{children:"Kick Player"}),(0,r.jsxs)(F.Z,{children:[(0,r.jsxs)(I.Z,{children:["Are you sure you want to kick ",null==p?void 0:p.player.name," from ",null==p?void 0:p.server,"?"]}),(0,r.jsx)(O.Z,{autoFocus:!0,margin:"dense",label:"Reason (optional)",fullWidth:!0,variant:"outlined",value:j,onChange:e=>M(e.target.value),placeholder:"Kicked by administrator"})]}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(k.Z,{onClick:()=>u(!1),disabled:_,children:"Cancel"}),(0,r.jsx)(k.Z,{onClick:G,color:"error",variant:"contained",disabled:_,"aria-label":"Confirm kick",children:_?(0,r.jsx)(W.Z,{size:20}):"Confirm"})]})]})]})})}var _=a(70115),K=a(38393),q=a(52082),J=a(21111),G=a(47606),Y=a(42431),H=a(29114),$=a(92666);function Q(e){var n,a;let{serverName:i}=e,[o,c]=(0,l.useState)(""),[d,h]=(0,l.useState)(null),[x,u]=(0,l.useState)(!1),[p,m]=(0,l.useState)(""),[j,E]=(0,l.useState)(null),[P,F]=(0,l.useState)(""),{data:I,isLoading:A,error:L}=(0,$.ox)(i),{data:N}=(0,$.Yo)(i),z=(0,$.zF)(),B=(0,$.Ll)(),R=(0,$.S0)(),T=null!==(n=null==I?void 0:I.players)&&void 0!==n?n:[],M=null==I?void 0:I.source,Q=null!==(a=null==N?void 0:N.enabled)&&void 0!==a&&a,V=(0,l.useMemo)(()=>{if(!P.trim())return T;let e=P.toLowerCase();return T.filter(n=>n.name.toLowerCase().includes(e))},[T,P]),X=(null==L?void 0:L.message)||(B.error?"Failed to add player to whitelist":null)||(R.error&&!d?"Failed to remove player from whitelist":null)||(z.error?"Failed to update whitelist status":null),ee=()=>{o.trim()&&B.mutate({serverName:i,player:o.trim()},{onSuccess:()=>c("")})},en=e=>{h(e),R.mutate({serverName:i,player:e},{onSettled:()=>h(null)})},ea=async()=>{let e=p.split(/[,\n]/).map(e=>e.trim()).filter(Boolean);if(0===e.length)return;E(null);let n=0;for(let a of e)try{await B.mutateAsync({serverName:i,player:a}),n++}catch(e){}E("Added ".concat(n," of ").concat(e.length," players")),n>0&&m("")},er=B.isPending;return(0,r.jsx)(y.Z,{"data-testid":"whitelist-manager",children:(0,r.jsxs)(Z.Z,{children:[(0,r.jsxs)(_.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{mb:2},children:[(0,r.jsxs)(_.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,r.jsx)(s.Z,{variant:"h6",children:"Whitelist"}),(0,r.jsx)(S.Z,{label:Q?"ON":"OFF",color:Q?"success":"default",size:"small","data-testid":"whitelist-status-chip"})]}),(0,r.jsx)(K.Z,{checked:Q,onChange:()=>{z.mutate({serverName:i,enabled:!Q})},disabled:z.isPending,inputProps:{"aria-label":"Toggle whitelist"},"data-testid":"whitelist-toggle"})]}),X&&(0,r.jsx)(D.Z,{severity:"error",sx:{mb:2},children:X}),!A&&M&&"rcon"!==M&&(0,r.jsxs)(D.Z,{severity:"info",sx:{mb:2},children:["Server is offline. Showing data from ","config"===M?"config.env":"whitelist.json",". Changes will apply on next server start."]}),(0,r.jsxs)(_.Z,{direction:"row",spacing:1,alignItems:"flex-start",sx:{mb:2},children:[x?(0,r.jsxs)(t.Z,{sx:{flex:1},children:[(0,r.jsx)(O.Z,{size:"small",placeholder:"player1, player2, player3",value:p,onChange:e=>m(e.target.value),disabled:er,fullWidth:!0,multiline:!0,rows:3,"data-testid":"bulk-input"}),j&&(0,r.jsx)(D.Z,{severity:"info",sx:{mt:1},"data-testid":"bulk-result",children:j})]}):(0,r.jsx)(O.Z,{size:"small",placeholder:"Player name",value:o,onChange:e=>c(e.target.value),onKeyDown:e=>{"Enter"===e.key&&ee()},disabled:er,fullWidth:!0}),x?(0,r.jsx)(k.Z,{variant:"contained",onClick:ea,disabled:!p.trim()||er,startIcon:er?(0,r.jsx)(W.Z,{size:16}):(0,r.jsx)(H.Z,{}),"aria-label":"Add players in bulk",children:"Add All"}):(0,r.jsx)(k.Z,{variant:"contained",onClick:ee,disabled:!o.trim()||er,startIcon:er?(0,r.jsx)(W.Z,{size:16}):(0,r.jsx)(G.Z,{}),"aria-label":"Add player to whitelist",children:"Add"}),(0,r.jsx)(k.Z,{variant:x?"contained":"outlined",onClick:()=>{u(!x),E(null)},"aria-label":"Toggle bulk mode","data-testid":"bulk-toggle",sx:{whiteSpace:"nowrap"},children:"Bulk"})]}),T.length>=5&&(0,r.jsx)(O.Z,{size:"small",placeholder:"Search players...",value:P,onChange:e=>F(e.target.value),fullWidth:!0,sx:{mb:2},InputProps:{startAdornment:(0,r.jsx)(q.Z,{position:"start",children:(0,r.jsx)(Y.Z,{})})},"data-testid":"search-input"}),A&&(0,r.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(W.Z,{})}),!A&&0===T.length&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players whitelisted"}),!A&&T.length>0&&0===V.length&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},"data-testid":"no-match-message",children:"No matching players"}),!A&&V.length>0&&(0,r.jsx)(v.Z,{dense:!0,children:V.map(e=>(0,r.jsxs)(b.ZP,{secondaryAction:(0,r.jsx)(w.Z,{edge:"end","aria-label":"Remove from whitelist",onClick:()=>en(e.name),disabled:d===e.name,color:"error",children:d===e.name?(0,r.jsx)(W.Z,{size:20}):(0,r.jsx)(J.Z,{})}),children:[(0,r.jsx)(f.Z,{children:(0,r.jsx)(C.Z,{src:e.uuid?"https://mc-heads.net/avatar/".concat(e.uuid,"/40"):void 0,alt:e.name,children:(0,r.jsx)(U.Z,{})})}),(0,r.jsx)(g.Z,{primary:e.name,secondary:e.uuid?e.uuid.substring(0,8)+"...":"UUID not available"})]},e.uuid||e.name))})]})})}var V=a(88812),X=a(37809),ee=a(407),en=a(45813);let ea={1:{color:"info",label:"Moderator",icon:"\uD83D\uDEE1️"},2:{color:"success",label:"Gamemaster",icon:"\uD83C\uDFAE"},3:{color:"warning",label:"Admin",icon:"⚙️"},4:{color:"error",label:"Owner",icon:"\uD83D\uDC51"}};function er(e){let{level:n,showIcon:a=!1,compact:l=!1,size:s="medium",variant:i="filled"}=e,o=ea[n];if(!o)return null;let c=l?n.toString():"Level ".concat(n," - ").concat(o.label),d=a?(0,r.jsx)(t.Z,{component:"span",sx:{mr:.5},children:o.icon}):void 0;return(0,r.jsx)(S.Z,{label:(0,r.jsxs)(r.Fragment,{children:[d,c]}),color:o.color,size:s,variant:i})}var el=a(68038),et=a(34080),es=a(40064),ei=a(39181);let eo=[{value:1,label:"Level 1 - Moderator",description:"Bypass spawn protection",icon:"\uD83D\uDEE1️"},{value:2,label:"Level 2 - Gamemaster",description:"Cheats, command blocks",icon:"\uD83C\uDFAE"},{value:3,label:"Level 3 - Admin",description:"Player management commands",icon:"⚙️"},{value:4,label:"Level 4 - Owner",description:"Full server control",icon:"\uD83D\uDC51"}];function ec(e){let{value:n,onChange:a,label:l,disabled:i=!1}=e;return(0,r.jsxs)(d.Z,{component:"fieldset",fullWidth:!0,disabled:i,children:[l&&(0,r.jsx)(el.Z,{component:"legend",sx:{mb:1},children:l}),(0,r.jsx)(et.Z,{value:n,onChange:e=>{a(parseInt(e.target.value,10))},children:eo.map(e=>(0,r.jsx)(es.Z,{value:e.value,control:(0,r.jsx)(ei.Z,{}),label:(0,r.jsxs)(t.Z,{children:[(0,r.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,r.jsx)(s.Z,{component:"span",children:e.icon}),(0,r.jsx)(s.Z,{component:"span",fontWeight:"medium",children:e.label})]}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",sx:{ml:4},children:e.description})]}),sx:{alignItems:"flex-start",py:1}},e.value))})]})}function ed(e){let{serverName:n}=e,[a,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(null),[d,h]=(0,l.useState)([]),[x,p]=(0,l.useState)(),[m,j]=(0,l.useState)(""),[S,I]=(0,l.useState)(!1),[L,N]=(0,l.useState)(null),[z,B]=(0,l.useState)(!1),[R,T]=(0,l.useState)(4),[U,M]=(0,l.useState)(!1),[_,K]=(0,l.useState)(null),[q,Y]=(0,l.useState)(4),[H,$]=(0,l.useState)(!1),[Q,ea]=(0,l.useState)(null),[el,et]=(0,l.useState)(null),es=(0,l.useCallback)(async()=>{i(!0),c(null);try{let e=await fetch("/api/players/op?server=".concat(encodeURIComponent(n)));if(!e.ok)throw Error("Failed to fetch operators");let a=await e.json();h(a.operators),p(a.source)}catch(e){c("Failed to load operators"),console.error("Error fetching operators:",e)}finally{i(!1)}},[n]);(0,l.useEffect)(()=>{es()},[es]);let ei=async()=>{if(m.trim()){I(!0),c(null);try{if(!(await fetch("/api/players/op",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:m.trim(),server:n,level:R})})).ok)throw Error("Failed to add operator");j(""),T(4),B(!1),await es()}catch(e){c("Failed to add operator"),console.error("Error adding operator:",e)}finally{I(!1)}}},eo=async e=>{N(e),c(null),ea(null),et(null);try{if(!(await fetch("/api/players/op?player=".concat(encodeURIComponent(e),"&server=").concat(encodeURIComponent(n)),{method:"DELETE"})).ok)throw Error("Failed to remove operator");await es()}catch(e){c("Failed to remove operator"),console.error("Error removing operator:",e)}finally{N(null)}},ed=async()=>{if(_){$(!0),c(null);try{if(!(await fetch("/api/players/op/".concat(encodeURIComponent(_.name),"?server=").concat(encodeURIComponent(n)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({level:q})})).ok)throw Error("Failed to change operator level");M(!1),K(null),await es()}catch(e){c("Failed to change operator level"),console.error("Error changing operator level:",e)}finally{$(!1)}}},eh=(e,n)=>{ea(e.currentTarget),et(n)},ex=()=>{ea(null),et(null)};return(0,r.jsxs)(y.Z,{"data-testid":"op-manager",children:[(0,r.jsxs)(Z.Z,{children:[(0,r.jsx)(s.Z,{variant:"h6",gutterBottom:!0,children:"Operators"}),o&&(0,r.jsx)(D.Z,{severity:"error",sx:{mb:2},children:o}),!a&&x&&"rcon"!==x&&(0,r.jsxs)(D.Z,{severity:"info",sx:{mb:2},children:["Server is offline. Showing data from ","config"===x?"config.env":"ops.json",". Changes will apply on next server start."]}),(0,r.jsx)(t.Z,{sx:{mb:2},children:(0,r.jsx)(k.Z,{variant:"contained",onClick:()=>B(!0),startIcon:(0,r.jsx)(G.Z,{}),"aria-label":"Add operator",fullWidth:!0,children:"Add Operator"})}),a&&(0,r.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(W.Z,{})}),!a&&0===d.length&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No operators configured"}),!a&&d.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v.Z,{dense:!0,children:d.map(e=>(0,r.jsxs)(b.ZP,{secondaryAction:(0,r.jsx)(w.Z,{edge:"end","aria-label":"Operator actions",onClick:n=>eh(n,e),disabled:L===e.name,children:L===e.name?(0,r.jsx)(W.Z,{size:20}):(0,r.jsx)(X.Z,{})}),children:[(0,r.jsx)(f.Z,{children:(0,r.jsx)(C.Z,{src:e.uuid?"https://mc-heads.net/avatar/".concat(e.uuid,"/40"):void 0,alt:e.name,sx:{bgcolor:"warning.main"},children:(0,r.jsx)(ee.Z,{})})}),(0,r.jsx)(g.Z,{primary:(0,r.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[(0,r.jsx)(s.Z,{component:"span",children:e.name}),(0,r.jsx)(er,{level:e.level,showIcon:!0,size:"small"})]}),secondary:e.uuid?e.uuid.substring(0,8)+"...":"UUID not available"})]},e.uuid||e.name))}),(0,r.jsxs)(V.Z,{anchorEl:Q,open:!!Q,onClose:ex,children:[(0,r.jsxs)(u.Z,{onClick:()=>{el&&(K(el),Y(el.level),M(!0),ex())},children:[(0,r.jsx)(en.Z,{sx:{mr:1},fontSize:"small"}),"Change Level"]}),(0,r.jsxs)(u.Z,{onClick:()=>el&&eo(el.name),children:[(0,r.jsx)(J.Z,{sx:{mr:1},fontSize:"small",color:"error"}),"Remove OP"]})]})]})]}),(0,r.jsxs)(E.Z,{open:z,onClose:()=>!S&&B(!1),maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(P.Z,{children:"Add Operator"}),(0,r.jsxs)(F.Z,{children:[(0,r.jsx)(O.Z,{autoFocus:!0,margin:"dense",label:"Player Name",placeholder:"Enter player name",fullWidth:!0,value:m,onChange:e=>j(e.target.value),disabled:S,sx:{mb:2}}),(0,r.jsx)(ec,{value:R,onChange:T,label:"OP Level",disabled:S})]}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(k.Z,{onClick:()=>B(!1),disabled:S,children:"Cancel"}),(0,r.jsx)(k.Z,{variant:"contained",onClick:ei,disabled:!m.trim()||S,startIcon:S?(0,r.jsx)(W.Z,{size:16}):void 0,children:S?"Adding...":"Add OP"})]})]}),(0,r.jsxs)(E.Z,{open:U,onClose:()=>!H&&M(!1),maxWidth:"sm",fullWidth:!0,children:[(0,r.jsxs)(P.Z,{children:["Change OP Level - ",null==_?void 0:_.name]}),(0,r.jsx)(F.Z,{children:_&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:["Current: Level ",_.level," (",_.role,")"]}),(0,r.jsx)(ec,{value:q,onChange:Y,label:"New Level",disabled:H})]})}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(k.Z,{onClick:()=>M(!1),disabled:H,children:"Cancel"}),(0,r.jsx)(k.Z,{variant:"contained",onClick:ed,disabled:H||q===(null==_?void 0:_.level),startIcon:H?(0,r.jsx)(W.Z,{size:16}):void 0,children:H?"Saving...":"Save Changes"})]})]})]})}var eh=a(397);function ex(e){let{serverName:n}=e,[a,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(null),[d,h]=(0,l.useState)([]),[x,u]=(0,l.useState)(),[p,m]=(0,l.useState)(!1),[j,S]=(0,l.useState)({player:"",reason:""}),[I,L]=(0,l.useState)(!1),[N,z]=(0,l.useState)(null),B=(0,l.useCallback)(async()=>{i(!0),c(null);try{let e=await fetch("/api/players/ban?server=".concat(encodeURIComponent(n)));if(!e.ok)throw Error("Failed to fetch bans");let a=await e.json();h(a.players),u(a.source)}catch(e){c("Failed to load ban list"),console.error("Error fetching bans:",e)}finally{i(!1)}},[n]);(0,l.useEffect)(()=>{B()},[B]);let R=()=>{m(!1),S({player:"",reason:""})},T=async()=>{if(j.player.trim()){L(!0),c(null);try{if(!(await fetch("/api/players/ban",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:j.player.trim(),reason:j.reason.trim()||"Banned by administrator",server:n})})).ok)throw Error("Failed to ban player");R(),await B()}catch(e){c("Failed to ban player"),console.error("Error banning player:",e)}finally{L(!1)}}},M=async e=>{z(e),c(null);try{if(!(await fetch("/api/players/ban?player=".concat(encodeURIComponent(e),"&server=").concat(encodeURIComponent(n)),{method:"DELETE"})).ok)throw Error("Failed to unban player");await B()}catch(e){c("Failed to unban player"),console.error("Error unbanning player:",e)}finally{z(null)}},K=e=>{try{return new Date(e).toLocaleDateString()}catch(n){return e}};return(0,r.jsx)(y.Z,{"data-testid":"ban-manager",children:(0,r.jsxs)(Z.Z,{children:[(0,r.jsxs)(t.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,r.jsx)(s.Z,{variant:"h6",children:"Ban List"}),(0,r.jsx)(k.Z,{variant:"outlined",color:"error",startIcon:(0,r.jsx)(eh.Z,{}),onClick:()=>{S({player:"",reason:""}),m(!0)},"aria-label":"Ban player",children:"Ban Player"})]}),o&&(0,r.jsx)(D.Z,{severity:"error",sx:{mb:2},children:o}),!a&&x&&"rcon"!==x&&(0,r.jsxs)(D.Z,{severity:"info",sx:{mb:2},children:["Server is offline. Showing data from ","config"===x?"config.env":"banned-players.json",". Changes will apply on next server start."]}),a&&(0,r.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,r.jsx)(W.Z,{})}),!a&&0===d.length&&(0,r.jsx)(s.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players banned"}),!a&&d.length>0&&(0,r.jsx)(v.Z,{dense:!0,children:d.map(e=>(0,r.jsxs)(b.ZP,{secondaryAction:(0,r.jsx)(w.Z,{edge:"end","aria-label":"Unban player",onClick:()=>M(e.name),disabled:N===e.name,color:"success",children:N===e.name?(0,r.jsx)(W.Z,{size:20}):(0,r.jsx)(J.Z,{})}),children:[(0,r.jsx)(f.Z,{children:(0,r.jsx)(C.Z,{src:e.uuid?"https://mc-heads.net/avatar/".concat(e.uuid,"/40"):void 0,alt:e.name,sx:{bgcolor:"error.main"},children:(0,r.jsx)(U.Z,{})})}),(0,r.jsx)(g.Z,{primary:e.name,secondary:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.Z,{component:"span",variant:"body2",color:"text.secondary",children:["Reason: ",e.reason||"No reason specified"]}),(0,r.jsx)("br",{}),(0,r.jsxs)(s.Z,{component:"span",variant:"caption",color:"text.secondary",children:["Banned: ",K(e.created)," by ",e.source||"Unknown"]})]})})]},e.uuid||e.name))}),(0,r.jsxs)(E.Z,{open:p,onClose:R,maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(P.Z,{children:"Ban Player"}),(0,r.jsx)(F.Z,{children:(0,r.jsxs)(_.Z,{spacing:2,sx:{mt:1},children:[(0,r.jsx)(O.Z,{label:"Player Name",placeholder:"Enter player name",value:j.player,onChange:e=>S({...j,player:e.target.value}),fullWidth:!0,required:!0}),(0,r.jsx)(O.Z,{label:"Reason",placeholder:"Banned by administrator",value:j.reason,onChange:e=>S({...j,reason:e.target.value}),fullWidth:!0,multiline:!0,rows:2})]})}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(k.Z,{onClick:R,disabled:I,children:"Cancel"}),(0,r.jsx)(k.Z,{onClick:T,color:"error",variant:"contained",disabled:!j.player.trim()||I,startIcon:I?(0,r.jsx)(W.Z,{size:16}):(0,r.jsx)(eh.Z,{}),children:"Ban"})]})]})]})})}function eu(e){let{children:n,value:a,index:l}=e;return(0,r.jsx)("div",{role:"tabpanel",hidden:a!==l,children:a===l&&(0,r.jsx)(t.Z,{sx:{py:3},children:n})})}function ep(){let[e,n]=(0,l.useState)(0),[a,y]=(0,l.useState)(""),{data:Z,isLoading:v}=(0,$.x$)(),b=null==Z?void 0:Z.servers;return(0,l.useEffect)(()=>{!a&&b&&b.length>0&&y(b[0].name)},[b,a]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,m.Fq)(e.palette.info.main,.1)," 0%, ").concat((0,m.Fq)(e.palette.secondary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,m.Fq)(e.palette.info.main,.2))},children:(0,r.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,r.jsx)(t.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"info.main",color:"info.contrastText"},children:(0,r.jsx)(j.Z,{sx:{fontSize:32}})}),(0,r.jsxs)(t.Z,{children:[(0,r.jsx)(s.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Player Management"}),(0,r.jsx)(s.Z,{variant:"body1",color:"text.secondary",children:"Manage players, whitelist, operators, and bans across your servers"})]})]})}),(0,r.jsx)(t.Z,{sx:{mb:3},children:(0,r.jsxs)(d.Z,{sx:{minWidth:200},children:[(0,r.jsx)(h.Z,{id:"server-select-label",children:"Server"}),(0,r.jsx)(x.Z,{labelId:"server-select-label",value:a,label:"Server",onChange:e=>y(e.target.value),disabled:v,children:null==b?void 0:b.map(e=>(0,r.jsx)(u.Z,{value:e.name,children:e.name},e.name))})]})}),(0,r.jsx)(t.Z,{sx:{borderBottom:1,borderColor:"divider"},children:(0,r.jsxs)(o.Z,{value:e,onChange:(e,a)=>{n(a)},"aria-label":"Player management tabs",children:[(0,r.jsx)(c.Z,{label:"Online Players"}),(0,r.jsx)(c.Z,{label:"Whitelist",disabled:!a}),(0,r.jsx)(c.Z,{label:"Operators",disabled:!a}),(0,r.jsx)(c.Z,{label:"Ban List",disabled:!a})]})}),(0,r.jsx)(eu,{value:e,index:0,children:(0,r.jsx)(M,{})}),(0,r.jsx)(eu,{value:e,index:1,children:a&&(0,r.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,r.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,r.jsx)(Q,{serverName:a})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,r.jsxs)(t.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,r.jsx)(s.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Whitelist"}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"The whitelist controls which players can join your server. When enabled, only players on the whitelist can connect. Add players by their Minecraft username."})]})})]})}),(0,r.jsx)(eu,{value:e,index:2,children:a&&(0,r.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,r.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,r.jsx)(ed,{serverName:a})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,r.jsxs)(t.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,r.jsx)(s.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Operators"}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"Operators (OPs) have elevated permissions on the server. They can use commands like /give, /gamemode, /tp, and more. OP levels range from 1-4, with 4 being the highest."}),(0,r.jsxs)(t.Z,{sx:{mt:2},children:[(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 1: Can bypass spawn protection"}),(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 2: Can use /clear, /gamemode, etc."}),(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 3: Can use /ban, /kick, /op, etc."}),(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 4: Can use /stop, full access"})]})]})})]})}),(0,r.jsx)(eu,{value:e,index:3,children:a&&(0,r.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,r.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,r.jsx)(ex,{serverName:a})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,r.jsxs)(t.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,r.jsx)(s.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Bans"}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"Banned players cannot connect to your server. You can ban players by username and provide an optional reason. Bans can be removed (pardoned) at any time."})]})})]})})]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,2538,880,7727,8347,1658,5381,4187,4219,392,2666,3669,2757,1744],function(){return e(e.s=31809)}),_N_E=e.O()}]);
|
package/.next/static/chunks/app/(main)/routing/{page-29d4216d11c4d426.js → page-0fbdeec8fee218ef.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[148],{61943:function(e,t,i){Promise.resolve().then(i.bind(i,34488))},34488:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return p}});var n=i(94655),r=i(7281),s=i(84840),a=i(31317),x=i(10721),l=i(81071),d=i(628),o=i(41565),c=i(69899),h=i(76492),j=i(29983),u=i(92666),Z=i(57965);function g(e){let{rows:t}=e;return(0,n.jsx)(d.Z,{children:(0,n.jsxs)(o.Z,{children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(x.Z,{variant:"circular",width:24,height:24}),(0,n.jsx)(x.Z,{variant:"text",width:"50%",height:32})]}),[...Array(t)].map((e,t)=>(0,n.jsxs)(r.Z,{sx:{display:"flex",justifyContent:"space-between",py:.75},children:[(0,n.jsx)(x.Z,{variant:"text",width:"35%"}),(0,n.jsx)(x.Z,{variant:"text",width:"40%"})]},t))]})})}function m(){return(0,n.jsx)(d.Z,{sx:{height:"100%"},children:(0,n.jsxs)(o.Z,{children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(x.Z,{variant:"circular",width:24,height:24}),(0,n.jsx)(x.Z,{variant:"text",width:"40%",height:32}),(0,n.jsxs)(r.Z,{sx:{ml:"auto",display:"flex",gap:1},children:[(0,n.jsx)(x.Z,{variant:"rounded",width:70,height:24}),(0,n.jsx)(x.Z,{variant:"rounded",width:70,height:24})]})]}),(0,n.jsx)(x.Z,{variant:"text",width:"30%",sx:{mt:3,mb:1}}),[0,1].map(e=>(0,n.jsxs)(r.Z,{sx:{border:1,borderColor:"divider",p:2,"&:not(:last-child)":{borderBottom:0}},children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1.5},children:[(0,n.jsx)(x.Z,{variant:"circular",width:10,height:10}),(0,n.jsx)(x.Z,{variant:"text",width:"25%"}),(0,n.jsx)(x.Z,{variant:"text",width:"15%"}),(0,n.jsx)(x.Z,{variant:"text",width:"10%",sx:{ml:"auto"}})]}),[0,1,2].map(e=>(0,n.jsx)(x.Z,{variant:"text",width:"70%",sx:{ml:2.5}},e))]},e))]})})}function p(){let{data:e,isLoading:t,error:i}=(0,u.nv)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,h.Fq)(e.palette.warning.main,.1)," 0%, ").concat((0,h.Fq)(e.palette.info.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,h.Fq)(e.palette.warning.main,.2))},children:(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(r.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"warning.main",color:"warning.contrastText"},children:(0,n.jsx)(j.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(r.Z,{children:[(0,n.jsx)(a.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Routing"}),(0,n.jsx)(a.Z,{variant:"body1",color:"text.secondary",children:"Server routing and network configuration"})]})]})}),i&&(0,n.jsxs)(l.Z,{severity:"error",sx:{mb:3},children:["Failed to load router status: ",i.message]}),t?(0,n.jsxs)(s.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(s.ZP,{item:!0,xs:12,md:4,children:(0,n.jsxs)(r.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(g,{rows:4}),(0,n.jsx)(g,{rows:4}),(0,n.jsx)(g,{rows:1})]})}),(0,n.jsx)(s.ZP,{item:!0,xs:12,md:8,children:(0,n.jsx)(m,{})})]}):(null==e?void 0:e.router)?(0,n.jsxs)(s.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(s.ZP,{item:!0,xs:12,md:4,children:(0,n.jsxs)(r.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(Z.hI,{router:e.router}),(0,n.jsx)(Z.SB,{router:e.router}),(0,n.jsx)(Z.E4,{avahi:e.avahi}),(0,n.jsx)(Z.aY,{})]})}),(0,n.jsx)(s.ZP,{item:!0,xs:12,md:8,children:(0,n.jsx)(Z.Ik,{router:e.router})})]}):null]})}}},function(e){e.O(0,[6812,9760,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[148],{61943:function(e,t,i){Promise.resolve().then(i.bind(i,34488))},34488:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return p}});var n=i(94655),r=i(7281),s=i(84840),a=i(31317),x=i(10721),l=i(81071),d=i(628),o=i(41565),c=i(69899),h=i(76492),j=i(29983),u=i(92666),Z=i(57965);function g(e){let{rows:t}=e;return(0,n.jsx)(d.Z,{children:(0,n.jsxs)(o.Z,{children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(x.Z,{variant:"circular",width:24,height:24}),(0,n.jsx)(x.Z,{variant:"text",width:"50%",height:32})]}),[...Array(t)].map((e,t)=>(0,n.jsxs)(r.Z,{sx:{display:"flex",justifyContent:"space-between",py:.75},children:[(0,n.jsx)(x.Z,{variant:"text",width:"35%"}),(0,n.jsx)(x.Z,{variant:"text",width:"40%"})]},t))]})})}function m(){return(0,n.jsx)(d.Z,{sx:{height:"100%"},children:(0,n.jsxs)(o.Z,{children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(x.Z,{variant:"circular",width:24,height:24}),(0,n.jsx)(x.Z,{variant:"text",width:"40%",height:32}),(0,n.jsxs)(r.Z,{sx:{ml:"auto",display:"flex",gap:1},children:[(0,n.jsx)(x.Z,{variant:"rounded",width:70,height:24}),(0,n.jsx)(x.Z,{variant:"rounded",width:70,height:24})]})]}),(0,n.jsx)(x.Z,{variant:"text",width:"30%",sx:{mt:3,mb:1}}),[0,1].map(e=>(0,n.jsxs)(r.Z,{sx:{border:1,borderColor:"divider",p:2,"&:not(:last-child)":{borderBottom:0}},children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1.5},children:[(0,n.jsx)(x.Z,{variant:"circular",width:10,height:10}),(0,n.jsx)(x.Z,{variant:"text",width:"25%"}),(0,n.jsx)(x.Z,{variant:"text",width:"15%"}),(0,n.jsx)(x.Z,{variant:"text",width:"10%",sx:{ml:"auto"}})]}),[0,1,2].map(e=>(0,n.jsx)(x.Z,{variant:"text",width:"70%",sx:{ml:2.5}},e))]},e))]})})}function p(){let{data:e,isLoading:t,error:i}=(0,u.nv)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,h.Fq)(e.palette.warning.main,.1)," 0%, ").concat((0,h.Fq)(e.palette.info.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,h.Fq)(e.palette.warning.main,.2))},children:(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(r.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"warning.main",color:"warning.contrastText"},children:(0,n.jsx)(j.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(r.Z,{children:[(0,n.jsx)(a.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Routing"}),(0,n.jsx)(a.Z,{variant:"body1",color:"text.secondary",children:"Server routing and network configuration"})]})]})}),i&&(0,n.jsxs)(l.Z,{severity:"error",sx:{mb:3},children:["Failed to load router status: ",i.message]}),t?(0,n.jsxs)(s.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(s.ZP,{item:!0,xs:12,md:4,children:(0,n.jsxs)(r.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(g,{rows:4}),(0,n.jsx)(g,{rows:4}),(0,n.jsx)(g,{rows:1})]})}),(0,n.jsx)(s.ZP,{item:!0,xs:12,md:8,children:(0,n.jsx)(m,{})})]}):(null==e?void 0:e.router)?(0,n.jsxs)(s.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(s.ZP,{item:!0,xs:12,md:4,children:(0,n.jsxs)(r.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(Z.hI,{router:e.router}),(0,n.jsx)(Z.SB,{router:e.router}),(0,n.jsx)(Z.E4,{avahi:e.avahi}),(0,n.jsx)(Z.aY,{})]})}),(0,n.jsx)(s.ZP,{item:!0,xs:12,md:8,children:(0,n.jsx)(Z.Ik,{router:e.router})})]}):null]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,2538,2542,5511,2844,8738,5381,1099,2666,7965,3669,2757,1744],function(){return e(e.s=61943)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3767],{32823:function(e,n,r){Promise.resolve().then(r.bind(r,32050))},32050:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return d}});var s=r(94655),i=r(35106),o=r(31358),c=r(7281),l=r(31317),t=r(26138),a=r(41261),h=r(79983),u=r(10117),x=r(73660);function d(e){let{params:n}=e,r=(0,o.x)(),{name:d}=(0,i.use)(n),p=decodeURIComponent(d);return(0,s.jsxs)(c.Z,{sx:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,s.jsxs)(c.Z,{sx:{mb:2},children:[(0,s.jsxs)(c.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1},children:[(0,s.jsx)(h.Z,{onClick:()=>r.push("/servers/".concat(d)),size:"small","aria-label":"Back to server",children:(0,s.jsx)(u.Z,{})}),(0,s.jsxs)(t.Z,{"aria-label":"breadcrumb",children:[(0,s.jsx)(a.Z,{component:"button",variant:"body1",onClick:()=>r.push("/servers"),sx:{cursor:"pointer"},underline:"hover",color:"inherit",children:"Servers"}),(0,s.jsx)(a.Z,{component:"button",variant:"body1",onClick:()=>r.push("/servers/".concat(d)),sx:{cursor:"pointer"},underline:"hover",color:"inherit",children:p}),(0,s.jsx)(l.Z,{color:"text.primary",children:"Console"})]})]}),(0,s.jsxs)(l.Z,{variant:"h5",component:"h1",children:[p," Console"]})]}),(0,s.jsx)(c.Z,{sx:{flex:1,minHeight:0},children:(0,s.jsx)(x.K,{serverName:p})})]})}}},function(e){e.O(0,[6812,9760,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3767],{32823:function(e,n,r){Promise.resolve().then(r.bind(r,32050))},32050:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return d}});var s=r(94655),i=r(35106),o=r(31358),c=r(7281),l=r(31317),t=r(26138),a=r(41261),h=r(79983),u=r(10117),x=r(73660);function d(e){let{params:n}=e,r=(0,o.x)(),{name:d}=(0,i.use)(n),p=decodeURIComponent(d);return(0,s.jsxs)(c.Z,{sx:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,s.jsxs)(c.Z,{sx:{mb:2},children:[(0,s.jsxs)(c.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1},children:[(0,s.jsx)(h.Z,{onClick:()=>r.push("/servers/".concat(d)),size:"small","aria-label":"Back to server",children:(0,s.jsx)(u.Z,{})}),(0,s.jsxs)(t.Z,{"aria-label":"breadcrumb",children:[(0,s.jsx)(a.Z,{component:"button",variant:"body1",onClick:()=>r.push("/servers"),sx:{cursor:"pointer"},underline:"hover",color:"inherit",children:"Servers"}),(0,s.jsx)(a.Z,{component:"button",variant:"body1",onClick:()=>r.push("/servers/".concat(d)),sx:{cursor:"pointer"},underline:"hover",color:"inherit",children:p}),(0,s.jsx)(l.Z,{color:"text.primary",children:"Console"})]})]}),(0,s.jsxs)(l.Z,{variant:"h5",component:"h1",children:[p," Console"]})]}),(0,s.jsx)(c.Z,{sx:{flex:1,minHeight:0},children:(0,s.jsx)(x.K,{serverName:p})})]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1658,6727,6645,1476,5787,3669,2757,1744],function(){return e(e.s=32823)}),_N_E=e.O()}]);
|