From 307cf5eeae07d6a075f1b6317e31837e03e11a29 Mon Sep 17 00:00:00 2001 From: hide_d Date: Fri, 10 Dec 2021 02:47:10 +0900 Subject: [PATCH] =?UTF-8?q?feat(WIP):=20gateway=20bootstrap=20=ED=98=B8?= =?UTF-8?q?=EC=B6=9C=20=EC=A0=9C=EA=B1=B0=20=EC=A7=84=ED=96=89=20-=20?= =?UTF-8?q?=EB=A9=94=EC=9D=B8=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=AF=B8?= =?UTF-8?q?=EB=8F=99=EC=9E=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/ts/gateway/admin_member.ts | 1 + hwe/ts/gateway/admin_server.ts | 1 + hwe/ts/gateway/common.ts | 3 +++ hwe/ts/gateway/entrance.ts | 2 +- hwe/ts/gateway/install.ts | 1 + hwe/ts/gateway/join.ts | 2 ++ hwe/ts/gateway/login.ts | 3 ++- hwe/ts/gateway/user_info.ts | 2 +- index.php | 2 +- 9 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 hwe/ts/gateway/common.ts diff --git a/hwe/ts/gateway/admin_member.ts b/hwe/ts/gateway/admin_member.ts index ba74ecf4..f88d4d7b 100644 --- a/hwe/ts/gateway/admin_member.ts +++ b/hwe/ts/gateway/admin_member.ts @@ -7,6 +7,7 @@ import { setAxiosXMLHttpRequest } from '../util/setAxiosXMLHttpRequest'; import { unwrap_any } from '../util/unwrap_any'; import { convertFormData } from '../util/convertFormData'; import { exportWindow } from '../util/exportWindow'; +import './common'; type UserEntry = { userID: string, diff --git a/hwe/ts/gateway/admin_server.ts b/hwe/ts/gateway/admin_server.ts index f4bb6319..5172f084 100644 --- a/hwe/ts/gateway/admin_server.ts +++ b/hwe/ts/gateway/admin_server.ts @@ -6,6 +6,7 @@ import { convertFormData } from '../util/convertFormData'; import { TemplateEngine } from "../util/TemplateEngine"; import { unwrap_any } from '../util/unwrap_any'; import { unwrap } from '../util/unwrap'; +import './common'; type ServerUpdateResponse = { result: true, diff --git a/hwe/ts/gateway/common.ts b/hwe/ts/gateway/common.ts new file mode 100644 index 00000000..3cc4ca99 --- /dev/null +++ b/hwe/ts/gateway/common.ts @@ -0,0 +1,3 @@ + +import 'bootstrap'; +import "../../scss/bootstrap5.scss"; \ No newline at end of file diff --git a/hwe/ts/gateway/entrance.ts b/hwe/ts/gateway/entrance.ts index e36b17f9..51963f3d 100644 --- a/hwe/ts/gateway/entrance.ts +++ b/hwe/ts/gateway/entrance.ts @@ -2,13 +2,13 @@ import { exportWindow } from '../util/exportWindow'; import $ from 'jquery'; exportWindow($, '$'); import axios from 'axios'; -import 'bootstrap'; import { initTooltip } from '../common_legacy'; import { TemplateEngine } from "../util/TemplateEngine"; import { InvalidResponse } from '../defs'; import { getDateTimeNow } from '../util/getDateTimeNow'; import { setAxiosXMLHttpRequest } from '../util/setAxiosXMLHttpRequest'; import { loadPlugin as loadAdminPlugin } from './admin_server'; +import './common'; declare const isAdmin: boolean; diff --git a/hwe/ts/gateway/install.ts b/hwe/ts/gateway/install.ts index 52322aa8..70acd9c6 100644 --- a/hwe/ts/gateway/install.ts +++ b/hwe/ts/gateway/install.ts @@ -9,6 +9,7 @@ import { unwrap_any } from '../util/unwrap_any'; import { mb_strwidth } from '../util/mb_strwidth'; import { isString } from 'lodash'; import { sha512 } from 'js-sha512'; +import './common'; async function changeInstallMode() { let result: { diff --git a/hwe/ts/gateway/join.ts b/hwe/ts/gateway/join.ts index 17001d77..d62ea971 100644 --- a/hwe/ts/gateway/join.ts +++ b/hwe/ts/gateway/join.ts @@ -8,6 +8,8 @@ import { unwrap_any } from '../util/unwrap_any'; import { sha512 } from 'js-sha512'; import { isString } from 'lodash'; import { mb_strwidth } from '../util/mb_strwidth'; +import './common'; + $(async function () { setAxiosXMLHttpRequest(); diff --git a/hwe/ts/gateway/login.ts b/hwe/ts/gateway/login.ts index e50fa74e..cbc55fd5 100644 --- a/hwe/ts/gateway/login.ts +++ b/hwe/ts/gateway/login.ts @@ -1,5 +1,4 @@ import $ from 'jquery'; -import 'bootstrap'; import { JQValidateForm, NamedRules } from '../util/jqValidateForm'; import axios from 'axios'; import { convertFormData } from '../util/convertFormData'; @@ -9,6 +8,8 @@ import { sha512 } from 'js-sha512'; import { unwrap } from '../util/unwrap'; import { InvalidResponse } from '../defs'; import { delay } from '../util/delay'; +import './common'; + type LoginResponse = { result: true, diff --git a/hwe/ts/gateway/user_info.ts b/hwe/ts/gateway/user_info.ts index ecf4aa9e..e7cc5d93 100644 --- a/hwe/ts/gateway/user_info.ts +++ b/hwe/ts/gateway/user_info.ts @@ -1,6 +1,5 @@ import { setAxiosXMLHttpRequest } from "../util/setAxiosXMLHttpRequest"; import $ from 'jquery'; -import 'bootstrap'; import axios from 'axios'; import { subDays } from 'date-fns'; import { getDateTimeNow } from "../util/getDateTimeNow"; @@ -10,6 +9,7 @@ import { InvalidResponse } from "../defs"; import { unwrap } from "../util/unwrap"; import { parseTime } from "../util/parseTime"; import { formatTime } from "../util/formatTime"; +import './common'; type ResultUserInfo = { result: true, diff --git a/index.php b/index.php index 9467b1b6..ea536c57 100644 --- a/index.php +++ b/index.php @@ -56,7 +56,7 @@ foreach (ServConfig::getServerList() as $setting) { - +