From 038124e7db45c31f6e7a530ab04ea673c2782f94 Mon Sep 17 00:00:00 2001 From: Anduin Date: Sun, 19 May 2024 16:28:52 +0000 Subject: [PATCH] Update default initialization and script import paths Changed the default initialization of Accepter, GameId, and Game properties in Challenge model. Also modified how the 'autodark.js' and 'player.js' scripts are imported in 'layout.js' to use relative paths for better compatibility. --- src/Aiursoft.ChessServer/Models/Challenge.cs | 6 +++--- src/Aiursoft.ChessServer/wwwroot/scripts/layout.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Aiursoft.ChessServer/Models/Challenge.cs b/src/Aiursoft.ChessServer/Models/Challenge.cs index 0e92a75..2f595e2 100644 --- a/src/Aiursoft.ChessServer/Models/Challenge.cs +++ b/src/Aiursoft.ChessServer/Models/Challenge.cs @@ -7,10 +7,10 @@ public class Challenge(Player creator) public Player Creator { get; set; } = creator; public string Message { get; set; } = "A chess room."; - public Player? Accepter { get; set; } = null; + public Player? Accepter { get; set; } - public int? GameId { get; set; } = null; - public Game? Game { get; set; } = null; + public int? GameId { get; set; } + public Game? Game { get; set; } public RoleRule RoleRule { get; set; } = RoleRule.Random; diff --git a/src/Aiursoft.ChessServer/wwwroot/scripts/layout.js b/src/Aiursoft.ChessServer/wwwroot/scripts/layout.js index 9f66267..6f02312 100644 --- a/src/Aiursoft.ChessServer/wwwroot/scripts/layout.js +++ b/src/Aiursoft.ChessServer/wwwroot/scripts/layout.js @@ -1,5 +1,5 @@ -import { autoTheme } from "/node_modules/@aiursoft/autodark.js/dist/esm/autodark.js"; -import { getUserName, changeName } from "/scripts/player.js"; +import { autoTheme } from "../node_modules/@aiursoft/autodark.js/dist/esm/autodark.js"; +import { getUserName, changeName } from "./player.js"; autoTheme(); async function loadName() {