From 76bd65cf539fef0f42dfe614a35c89d879fcf194 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 4 Sep 2021 00:06:54 +0900 Subject: [PATCH] =?UTF-8?q?vue:=20inheritPoint=20=EC=83=98=ED=94=8C=20?= =?UTF-8?q?=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.cjs | 47 ++++--- .phan/config.php | 2 +- hwe/scss/bootstrap5.scss | 7 + hwe/scss/game_bg.scss | 4 + hwe/templates/commandButton.php | 2 +- hwe/ts/components/TopBackBar.vue | 1 + hwe/ts/inheritPoint.vue | 229 +++++++++++++------------------ hwe/ts/legacy/inheritPoint.ts | 2 +- hwe/v_inheritPoint.php | 28 +--- package.json | 3 + src/sammo/WebUtil.php | 35 +++-- webpack.config.cjs | 5 +- 12 files changed, 177 insertions(+), 188 deletions(-) create mode 100644 hwe/scss/bootstrap5.scss diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 877dd203..3720f478 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,22 +1,27 @@ module.exports = { - root: true, - parser: "@typescript-eslint/parser", - parserOptions: { - "project": "./tsconfig.json" - }, - ignorePatterns: ['*.test.ts', '.eslintrc.cjs', 'webpack.config.cjs', '*.js'], - overrides: [{ - files: ['*.ts', '*.tsx'], - }], - plugins: [ - "@typescript-eslint", - ], - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended" - ], - rules: { - '@typescript-eslint/no-floating-promises': 'error', - } - } \ No newline at end of file + root: true, + parser: "vue-eslint-parser", + parserOptions: { + "project": "./tsconfig.json" + }, + ignorePatterns: ['*.test.ts', '.eslintrc.cjs', 'webpack.config.cjs', '*.js'], + overrides: [{ + files: ['*.ts', '*.tsx', "*.vue"], + }], + plugins: [ + "@typescript-eslint", + + ], + extends: [ + "eslint:recommended", + 'plugin:vue/essential', + '@vue/typescript', + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended" + ], + rules: { + '@typescript-eslint/no-floating-promises': 'error', + "vue/no-multiple-template-root": "off", + "vue/no-v-for-template-key": "off", + } +} \ No newline at end of file diff --git a/.phan/config.php b/.phan/config.php index ea554725..003d0c28 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -41,7 +41,7 @@ return [ 'hwe/b_dipcenter.php', 'hwe/b_diplomacy.php', 'hwe/b_genList.php', - 'hwe/b_inheritPoint.php', + 'hwe/v_inheritPoint.php', 'hwe/b_myBossInfo.php', 'hwe/b_myCityInfo.php', 'hwe/b_myGenInfo.php', diff --git a/hwe/scss/bootstrap5.scss b/hwe/scss/bootstrap5.scss new file mode 100644 index 00000000..9876a6c9 --- /dev/null +++ b/hwe/scss/bootstrap5.scss @@ -0,0 +1,7 @@ + +$font-family-sans-serif: '나눔 고딕', 'Nanum Gothic'; +$body-bg: #000; + +@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 7c4197f6..c76d8b0f 100644 --- a/hwe/scss/game_bg.scss +++ b/hwe/scss/game_bg.scss @@ -17,6 +17,10 @@ table.tb_layout { word-break: break-all; } +html, body{ + font-size: 13px; +} + .tb_layout td, .tb_layout th { border: solid 1px gray; diff --git a/hwe/templates/commandButton.php b/hwe/templates/commandButton.php index 045813af..27ca81aa 100644 --- a/hwe/templates/commandButton.php +++ b/hwe/templates/commandButton.php @@ -16,7 +16,7 @@ - + diff --git a/hwe/ts/components/TopBackBar.vue b/hwe/ts/components/TopBackBar.vue index 10ae00f6..72a6d348 100644 --- a/hwe/ts/components/TopBackBar.vue +++ b/hwe/ts/components/TopBackBar.vue @@ -4,6 +4,7 @@ {{title}}

diff --git a/hwe/ts/inheritPoint.vue b/hwe/ts/inheritPoint.vue index d32ce7e2..093bd39b 100644 --- a/hwe/ts/inheritPoint.vue +++ b/hwe/ts/inheritPoint.vue @@ -1,122 +1,50 @@ + $items + ]) ?> -
+
diff --git a/package.json b/package.json index e727d0c8..fcf89475 100644 --- a/package.json +++ b/package.json @@ -52,9 +52,11 @@ "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vue/compiler-sfc": "^3.2.7", + "@vue/eslint-config-typescript": "^7.0.0", "babel-loader": "^8.2.2", "babel-plugin-lodash": "^3.3.4", "babel-preset-modern-browsers": "^15.0.2", + "bootswatch": "^5.1.0", "clean-terminal-webpack-plugin": "^3.0.0", "css-loader": "^6.2.0", "eslint": "^7.32.0", @@ -67,6 +69,7 @@ "ts-loader": "^9.2.5", "typescript": "^4.4.2", "url-loader": "^4.1.1", + "vue-eslint-parser": "^7.10.0", "vue-loader": "^16.5.0", "vue-style-loader": "^4.1.3", "webpack": "^5.51.2", diff --git a/src/sammo/WebUtil.php b/src/sammo/WebUtil.php index b4b653ec..77f299d1 100644 --- a/src/sammo/WebUtil.php +++ b/src/sammo/WebUtil.php @@ -1,6 +1,8 @@ \n"; } + public static function printStaticValues(array $values, bool $pretty=true){ + if(!count($values)){ + return; + } + $lines = [""; + + return join("\n", $lines); + } + protected static $jsFilesList = []; public static function pushJSFile(string $path){ static::$jsFilesList[] = $path; diff --git a/webpack.config.cjs b/webpack.config.cjs index a5a86fa5..85b3a9b5 100644 --- a/webpack.config.cjs +++ b/webpack.config.cjs @@ -3,6 +3,7 @@ const { VueLoaderPlugin } = require('vue-loader'); const MiniCssExtractPlugin = require('mini-css-extract-plugin') const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const { resolve } = require('path'); +const CleanTerminalPlugin = require('clean-terminal-webpack-plugin'); module.exports = (env, argv) => { const target = env.target ?? 'hwe'; @@ -139,6 +140,7 @@ module.exports = (env, argv) => { ] }, plugins: [ + new CleanTerminalPlugin(), new VueLoaderPlugin(), new MiniCssExtractPlugin({ filename: '../dist_css/[name].css' @@ -227,6 +229,7 @@ module.exports = (env, argv) => { }] }, plugins: [ + new CleanTerminalPlugin(), new MiniCssExtractPlugin({ filename: '../dist_css/[name].css' }), @@ -307,7 +310,7 @@ module.exports = (env, argv) => { }; if (target == 'hwe') { - return [ingame_vue, ingame, gateway]; + return [gateway, ingame_vue, ingame]; } else { return [ingame_vue, ingame];