fix: package, auth url

This commit is contained in:
2025-07-20 03:15:13 +05:00
parent 51b155e70a
commit fa115e0a6c
4 changed files with 14 additions and 48 deletions

45
package-lock.json generated
View File

@ -15,7 +15,6 @@
"@mui/material": "^7.2.0", "@mui/material": "^7.2.0",
"@xmcl/core": "^2.14.1", "@xmcl/core": "^2.14.1",
"@xmcl/installer": "^6.1.0", "@xmcl/installer": "^6.1.0",
"@xmcl/model": "^2.0.4",
"@xmcl/resourcepack": "^1.2.4", "@xmcl/resourcepack": "^1.2.4",
"@xmcl/user": "^4.2.0", "@xmcl/user": "^4.2.0",
"electron-debug": "^4.1.0", "electron-debug": "^4.1.0",
@ -6042,44 +6041,6 @@
"node": ">=20.18.1" "node": ">=20.18.1"
} }
}, },
"node_modules/@xmcl/model": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@xmcl/model/-/model-2.0.4.tgz",
"integrity": "sha512-m671ny9FAaM0nF731Coq+F7N7ikQFCeJA+NhrXNcYkyclMXaqL6Q/kCrYpjhnbozMYVOblqu44QPSuEFqR/JHQ==",
"license": "MIT",
"dependencies": {
"@types/three": "^0.150.0",
"@xmcl/resourcepack": "1.2.4",
"three": "0.156.1"
},
"engines": {
"node": ">=20"
}
},
"node_modules/@xmcl/model/node_modules/@types/three": {
"version": "0.150.2",
"resolved": "https://registry.npmjs.org/@types/three/-/three-0.150.2.tgz",
"integrity": "sha512-cvcz/81Mmj4oiAA+uxzwaRK3t8lYw8WxejXKqIBfu6PqvwSAEEiCi3VfCiVY18UflBqL0LDX/za85+sfqjMoIw==",
"license": "MIT",
"dependencies": {
"@types/stats.js": "*",
"@types/webxr": "*",
"fflate": "~0.6.9",
"lil-gui": "~0.17.0"
}
},
"node_modules/@xmcl/model/node_modules/fflate": {
"version": "0.6.10",
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.6.10.tgz",
"integrity": "sha512-IQrh3lEPM93wVCEczc9SaAOvkmcoQn/G8Bo1e8ZPlY3X3bnAxWaBdvTdvM1hP62iZp0BXWDy4vTAy4fF0+Dlpg==",
"license": "MIT"
},
"node_modules/@xmcl/model/node_modules/three": {
"version": "0.156.1",
"resolved": "https://registry.npmjs.org/three/-/three-0.156.1.tgz",
"integrity": "sha512-kP7H0FK9d/k6t/XvQ9FO6i+QrePoDcNhwl0I02+wmUJRNSLCUIDMcfObnzQvxb37/0Uc9TDT0T1HgsRRrO6SYQ==",
"license": "MIT"
},
"node_modules/@xmcl/resourcepack": { "node_modules/@xmcl/resourcepack": {
"version": "1.2.4", "version": "1.2.4",
"resolved": "https://registry.npmjs.org/@xmcl/resourcepack/-/resourcepack-1.2.4.tgz", "resolved": "https://registry.npmjs.org/@xmcl/resourcepack/-/resourcepack-1.2.4.tgz",
@ -15695,12 +15656,6 @@
"immediate": "~3.0.5" "immediate": "~3.0.5"
} }
}, },
"node_modules/lil-gui": {
"version": "0.17.0",
"resolved": "https://registry.npmjs.org/lil-gui/-/lil-gui-0.17.0.tgz",
"integrity": "sha512-MVBHmgY+uEbmJNApAaPbtvNh1RCAeMnKym82SBjtp5rODTYKWtM+MXHCifLe2H2Ti1HuBGBtK/5SyG4ShQ3pUQ==",
"license": "MIT"
},
"node_modules/lilconfig": { "node_modules/lilconfig": {
"version": "3.1.3", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz",

View File

@ -109,7 +109,6 @@
"@mui/material": "^7.2.0", "@mui/material": "^7.2.0",
"@xmcl/core": "^2.14.1", "@xmcl/core": "^2.14.1",
"@xmcl/installer": "^6.1.0", "@xmcl/installer": "^6.1.0",
"@xmcl/model": "^2.0.4",
"@xmcl/resourcepack": "^1.2.4", "@xmcl/resourcepack": "^1.2.4",
"@xmcl/user": "^4.2.0", "@xmcl/user": "^4.2.0",
"electron-debug": "^4.1.0", "electron-debug": "^4.1.0",

View File

@ -1,8 +1,9 @@
import { YggdrasilClient, YggrasilAuthentication } from '@xmcl/user'; import { YggdrasilClient, YggrasilAuthentication } from '@xmcl/user';
import { v4 as uuidv4 } from 'uuid'; import { v4 as uuidv4 } from 'uuid';
import { API_BASE_URL } from '../renderer/api';
// Ely.by сервер // Ely.by сервер
const ELY_BY_AUTH_SERVER = 'http://127.0.0.1:8000'; const ELY_BY_AUTH_SERVER = API_BASE_URL;
export class AuthService { export class AuthService {
private client: YggdrasilClient; private client: YggdrasilClient;

View File

@ -11,7 +11,15 @@ interface AuthFormProps {
const AuthForm = ({ config, handleInputChange, onLogin }: AuthFormProps) => { const AuthForm = ({ config, handleInputChange, onLogin }: AuthFormProps) => {
return ( return (
<Box sx={{ display: 'flex', flexDirection: 'column', gap: '1.5vw' }}> <Box
sx={{
display: 'flex',
flexDirection: 'column',
gap: '1.5vw',
alignItems: 'center',
}}
>
<Typography variant="h6">Логин</Typography>
<TextField <TextField
required required
name="username" name="username"
@ -19,6 +27,7 @@ const AuthForm = ({ config, handleInputChange, onLogin }: AuthFormProps) => {
value={config.username} value={config.username}
onChange={handleInputChange} onChange={handleInputChange}
sx={{ sx={{
width: '100%',
// '& .MuiFormLabel-root': { // '& .MuiFormLabel-root': {
// color: 'white', // color: 'white',
// }, // },
@ -42,6 +51,7 @@ const AuthForm = ({ config, handleInputChange, onLogin }: AuthFormProps) => {
}, },
}} }}
/> />
<Typography variant="h6">Пароль</Typography>
<TextField <TextField
required required
type="password" type="password"
@ -50,6 +60,7 @@ const AuthForm = ({ config, handleInputChange, onLogin }: AuthFormProps) => {
value={config.password} value={config.password}
onChange={handleInputChange} onChange={handleInputChange}
sx={{ sx={{
width: '100%',
// '& .MuiFormLabel-root': { // '& .MuiFormLabel-root': {
// color: 'white', // color: 'white',
// }, // },