diff --git a/hwe/scss/bootstrap5.scss b/hwe/scss/bootstrap5.scss index 1a14b1b2..dcae837e 100644 --- a/hwe/scss/bootstrap5.scss +++ b/hwe/scss/bootstrap5.scss @@ -5,6 +5,8 @@ $body-bg: #000; $input-bg: #ddd; $input-color: #303030; +@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css"); + @import "../../node_modules/bootswatch/dist/darkly/_variables.scss"; @import "../../node_modules/bootstrap5/scss/bootstrap.scss"; @import "../../node_modules/bootswatch/dist/darkly/_bootswatch.scss"; \ No newline at end of file diff --git a/hwe/scss/game_bg.scss b/hwe/scss/game_bg.scss index c76d8b0f..bac638f0 100644 --- a/hwe/scss/game_bg.scss +++ b/hwe/scss/game_bg.scss @@ -28,3 +28,12 @@ html, body{ word-break: break-all; ; } + + +.float-left{ + float:left; +} + +.float-right{ + float:right; +} \ No newline at end of file diff --git a/hwe/ts/NPCControl.vue b/hwe/ts/NPCControl.vue index 5b936f4b..ca550bf9 100644 --- a/hwe/ts/NPCControl.vue +++ b/hwe/ts/NPCControl.vue @@ -1,5 +1,6 @@ + + \ No newline at end of file diff --git a/hwe/ts/components/MyToast.vue b/hwe/ts/components/MyToast.vue new file mode 100644 index 00000000..d7bf6db8 --- /dev/null +++ b/hwe/ts/components/MyToast.vue @@ -0,0 +1,46 @@ + + diff --git a/hwe/ts/defs.ts b/hwe/ts/defs.ts index 97ac1e76..6913eaa3 100644 --- a/hwe/ts/defs.ts +++ b/hwe/ts/defs.ts @@ -130,4 +130,17 @@ export type NationPolicy = { minNPCRecruitCityPopulation: number, safeRecruitCityPopulationRatio: number, properWarTrainAtmos: number, +} + +export declare type Colors = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light'; + +export type IDItem = { + id: T; +}; + +export type ToastType = { + title?: string, + content?: string, + type?: Colors, + delay?: number, } \ No newline at end of file diff --git a/hwe/ts/util/convertIDArray.ts b/hwe/ts/util/convertIDArray.ts new file mode 100644 index 00000000..ff182e17 --- /dev/null +++ b/hwe/ts/util/convertIDArray.ts @@ -0,0 +1,9 @@ +import { IDItem } from "../defs"; + +export function convertIDArray(array: Iterable): IDItem[] { + const result: IDItem[] = []; + for (const id of array) { + result.push({ id }); + } + return result; +} \ No newline at end of file diff --git a/hwe/v_NPCControl.php b/hwe/v_NPCControl.php index b0124a3b..3033eb3f 100644 --- a/hwe/v_NPCControl.php +++ b/hwe/v_NPCControl.php @@ -81,7 +81,6 @@ $zeroPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['optio 'defaultNationPolicy' => $defaultNationPolicy, 'currentNationPolicy' => $currentNationPolicy, 'zeroPolicy' => $zeroPolicy, - 'autoPolicy' => $autoPolicy, 'defaultNationPriority' => $defaultNationPriority, 'currentNationPriority' => $currentNationPriority, @@ -94,6 +93,7 @@ $zeroPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['optio 'defaultStatNPCMax' => GameConst::$defaultStatNPCMax, 'defaultStatMax' => GameConst::$defaultStatMax, ]) ?> + diff --git a/package.json b/package.json index bd799d71..8ca4091f 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "license": "MIT", "type": "module", "dependencies": { + "@coreui/vue": "^4.0.0-beta.2", "@types/downloadjs": "^1.4.2", "@types/linkifyjs": "^2.1.4", "@types/select2": "^4.0.54", @@ -49,6 +50,7 @@ "@types/bootstrap": "^5.1.2", "@types/jquery": "^3.5.6", "@types/lodash": "^4.14.172", + "@types/node": "^16.7.13", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vue/compiler-sfc": "^3.2.7",