diff --git a/hwe/b_inheritPoint.php b/hwe/b_inheritPoint.php deleted file mode 100644 index 773e4f8d..00000000 --- a/hwe/b_inheritPoint.php +++ /dev/null @@ -1,134 +0,0 @@ -setReadOnly(); -$userID = Session::getUserID(); -$generalID = $session->generalID; - -$db = DB::db(); -$gameStor = KVStorage::getStorage($db, 'game_env'); - -$me = General::createGeneralObjFromDB($generalID); - - -$pointHelpText = [ - 'sum' => '다음 플레이에서 사용할 수 있는 총 포인트입니다.', - 'new' => '이번 플레이에서 얻은 총 포인트입니다.', - 'previous' => '이전에 물려받은 포인트입니다.', - 'lived_month' => '살아남은 기간입니다. (1개월 단위)', - 'max_belong' => '가장 오래 임관했던 국가의 연도입니다.', - 'max_domestic_critical' => '성공한 내정 중 최대 연속값입니다.', - 'snipe_combat' => '유리한 상성을 가지고 전투했습니다.', - 'combat' => '전투 횟수입니다.', - 'sabotage' => '계략 성공 횟수입니다.', - 'unifier' => '천통에 기여한 포인트입니다.
각 국의 군주, 천통 수뇌, 천통 군주가 받습니다.', - 'dex' => '총 숙련도합입니다.', - 'tournament' => '토너먼트 입상 포인트입니다.', - 'betting' => '성공적인 베팅을 했습니다.
수익율과 베팅 성공 횟수를 따릅니다.', -]; -$items = []; -foreach(array_keys(General::INHERITANCE_KEY) as $key){ - $items[$key] = $me->getInheritancePoint($key)??0; -} -?> - - - - - <?= UniqueConst::$serverName ?>: 유산 관리 - - - - - - - - - - - - - - - - - - - - - - -
유산 관리
-
-
-
-
- -
- -
-
- -
- -
-
- -
-
- -
- -
-
- -
- -
-
- -
-
- -
- -
-
- -
- -
-
-

- [$type, $multiplier, $name]) : ?> - -
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - \ No newline at end of file diff --git a/hwe/templates/commandButton.php b/hwe/templates/commandButton.php index 27ca81aa..7a4f00ef 100644 --- a/hwe/templates/commandButton.php +++ b/hwe/templates/commandButton.php @@ -1,7 +1,7 @@
- - + + diff --git a/hwe/ts/Board.vue b/hwe/ts/Board.vue new file mode 100644 index 00000000..28a1d0ba --- /dev/null +++ b/hwe/ts/Board.vue @@ -0,0 +1,200 @@ + + + + + + \ No newline at end of file diff --git a/hwe/ts/components/BoardArticle.vue b/hwe/ts/components/BoardArticle.vue new file mode 100644 index 00000000..28e93b61 --- /dev/null +++ b/hwe/ts/components/BoardArticle.vue @@ -0,0 +1,72 @@ + + diff --git a/hwe/ts/components/BoardComment.vue b/hwe/ts/components/BoardComment.vue new file mode 100644 index 00000000..564d7f21 --- /dev/null +++ b/hwe/ts/components/BoardComment.vue @@ -0,0 +1,22 @@ + + diff --git a/hwe/ts/components/BottomBar.vue b/hwe/ts/components/BottomBar.vue new file mode 100644 index 00000000..72a6d348 --- /dev/null +++ b/hwe/ts/components/BottomBar.vue @@ -0,0 +1,51 @@ + + + + + + \ No newline at end of file diff --git a/hwe/ts/board.ts b/hwe/ts/legacy/board.ts similarity index 91% rename from hwe/ts/board.ts rename to hwe/ts/legacy/board.ts index e21a194e..79be2e77 100644 --- a/hwe/ts/board.ts +++ b/hwe/ts/legacy/board.ts @@ -2,12 +2,12 @@ import axios from 'axios'; import $ from 'jquery'; import { trim } from 'lodash'; -import { escapeHtml } from "./legacy/escapeHtml"; -import { nl2br } from "./util/nl2br"; -import { InvalidResponse } from './defs'; -import { convertFormData } from './util/convertFormData'; -import { setAxiosXMLHttpRequest } from './util/setAxiosXMLHttpRequest'; -import { unwrap_any } from './util/unwrap_any'; +import { escapeHtml } from "./escapeHtml"; +import { nl2br } from "../util/nl2br"; +import { InvalidResponse } from '../defs'; +import { convertFormData } from '../util/convertFormData'; +import { setAxiosXMLHttpRequest } from '../util/setAxiosXMLHttpRequest'; +import { unwrap_any } from '../util/unwrap_any'; declare const isSecretBoard: boolean; @@ -212,13 +212,6 @@ async function loadArticles() { alert(`에러: ${e}`); return; } - return $.post({ - url: 'j_board_get_articles.php', - dataType: 'json', - data: { - isSecret: isSecretBoard, //첫 버전이니까 전체 다 불러오자 - } - }); } function resizeTextarea($obj: JQuery) { diff --git a/hwe/ts/util/delay.ts b/hwe/ts/util/delay.ts new file mode 100644 index 00000000..aabec78b --- /dev/null +++ b/hwe/ts/util/delay.ts @@ -0,0 +1,7 @@ +export function delay(ms: number): Promise { + return new Promise((resolve) => { + setTimeout(() => { + resolve(); + }, ms); + }); +} \ No newline at end of file diff --git a/hwe/ts/v_board.ts b/hwe/ts/v_board.ts new file mode 100644 index 00000000..3d3dd76e --- /dev/null +++ b/hwe/ts/v_board.ts @@ -0,0 +1,6 @@ +import { createApp } from 'vue' +import Board from './Board.vue'; +import { setAxiosXMLHttpRequest } from './util/setAxiosXMLHttpRequest'; + +setAxiosXMLHttpRequest(); +createApp(Board).mount('#app') \ No newline at end of file diff --git a/hwe/v_board.php b/hwe/v_board.php new file mode 100644 index 00000000..03a1bc8d --- /dev/null +++ b/hwe/v_board.php @@ -0,0 +1,60 @@ +setReadOnly(); +$userID = Session::getUserID(); + +$db = DB::db(); +$gameStor = KVStorage::getStorage($db, 'game_env'); + +$isSecretBoard = Util::getReq('isSecret', 'bool', false); + +//increaseRefresh("회의실", 1); + +$me = $db->queryFirstRow('SELECT no, nation, officer_level, permission, con, turntime, belong, penalty FROM general WHERE owner=%i', $userID); + + +$con = checkLimit($me['con']); +if ($con >= 2) { + printLimitMsg($me['turntime']); + exit(); +} + +$permission = checkSecretPermission($me); +if ($permission < 0) { + echo '국가에 소속되어있지 않습니다.'; + die(); +} else if ($isSecretBoard && $permission < 2) { + echo "권한이 부족합니다. 수뇌부가 아닙니다."; + die(); +} + +$boardName = $isSecretBoard ? '기밀실' : '회의실'; + +?> + + + + + <?= UniqueConst::$serverName ?>: <?= $boardName ?> + + + + + + + + + $isSecretBoard, + ]) ?> + + +
+ + + \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 40e3dead..fc9ce599 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -45,9 +45,9 @@ /* Module Resolution Options */ "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - "baseUrl": "./hwe/ts", /* Base directory to resolve non-absolute module names. */ + //"baseUrl": "./hwe/ts", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - //"rootDirs": [] /* List of root folders whose combined content represents the structure of the project at runtime. */ + "rootDirs": ["./hwe/ts"], /* List of root folders whose combined content represents the structure of the project at runtime. */ //"typeRoots": ["./typings"], /* List of folders to include type definitions from. */ //"types": ["ts/common_path.d.ts"], /* Type declaration files to be included in compilation. */ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ diff --git a/webpack.config.cjs b/webpack.config.cjs index 85b3a9b5..748086fb 100644 --- a/webpack.config.cjs +++ b/webpack.config.cjs @@ -8,6 +8,7 @@ const CleanTerminalPlugin = require('clean-terminal-webpack-plugin'); module.exports = (env, argv) => { const target = env.target ?? 'hwe'; const mode = argv.mode ?? 'production'; + const tsDir = resolve(__dirname, `${target}/ts/`); const ingame_vue = { name: 'ingame_vue', resolve: { @@ -18,7 +19,9 @@ module.exports = (env, argv) => { }, mode, entry: { - v_inheritPoint: resolve(__dirname, `${target}/ts/v_inheritPoint.ts`) + v_inheritPoint: `${tsDir}/v_inheritPoint.ts`, + v_board: `${tsDir}/v_board.ts` + }, output: { filename: '[name].js', @@ -31,7 +34,16 @@ module.exports = (env, argv) => { commons: { test: /[\\/]node_modules[\\/]/, name: 'vendors_vue', + priority: -10, chunks: 'all', + reuseExistingChunk: true, + }, + default: { + name: 'common_vue', + minChunks: 2, + priority: -20, + chunks: 'all', + reuseExistingChunk: true, }, }, } @@ -156,37 +168,33 @@ module.exports = (env, argv) => { name: 'ingame', resolve: { extensions: [".js", ".ts", ".tsx"], - alias: { - '@': resolve(__dirname, `${target}/ts`) - } }, mode, entry: { - chiefCenter: '@/chiefCenter.ts', - inheritPoint: '@/legacy/inheritPoint.ts', - common: '@/common_deprecated.ts', - troop: '@/troop.ts', - map: '@/map.ts', - install_db: '@/install_db.ts', - install: '@/install.ts', - battle_simulator: '@/battle_simulator.ts', - recent_map: '@/recent_map.ts', - processing: '@/processing.ts', - select_npc: '@/select_npc.ts', - betting: '@/betting.ts', - board: '@/board.ts', - bossInfo: '@/bossInfo.ts', - myPage: '@/myPage.ts', - extExpandCity: '@/extExpandCity.ts', - main: '@/main.ts', - dipcenter: '@/dipcenter.ts', - diplomacy: '@/diplomacy.ts', - currentCity: '@/currentCity.ts', - hallOfFame: '@/hallOfFame.ts', - history: '@/history.ts', - join: '@/join.ts', - select_general_from_pool: '@/select_general_from_pool.ts', - extKingdoms: '@/extKingdoms.ts', + chiefCenter: `${tsDir}/chiefCenter.ts`, + common: `${tsDir}/common_deprecated.ts`, + troop: `${tsDir}/troop.ts`, + map: `${tsDir}/map.ts`, + install_db: `${tsDir}/install_db.ts`, + install: `${tsDir}/install.ts`, + battle_simulator: `${tsDir}/battle_simulator.ts`, + recent_map: `${tsDir}/recent_map.ts`, + processing: `${tsDir}/processing.ts`, + select_npc: `${tsDir}/select_npc.ts`, + betting: `${tsDir}/betting.ts`, + board: `${tsDir}/legacy/board.ts`, + bossInfo: `${tsDir}/bossInfo.ts`, + myPage: `${tsDir}/myPage.ts`, + extExpandCity: `${tsDir}/extExpandCity.ts`, + main: `${tsDir}/main.ts`, + dipcenter: `${tsDir}/dipcenter.ts`, + diplomacy: `${tsDir}/diplomacy.ts`, + currentCity: `${tsDir}/currentCity.ts`, + hallOfFame: `${tsDir}/hallOfFame.ts`, + history: `${tsDir}/history.ts`, + join: `${tsDir}/join.ts`, + select_general_from_pool: `${tsDir}/select_general_from_pool.ts`, + extKingdoms: `${tsDir}/extKingdoms.ts`, }, output: { filename: '[name].js', @@ -244,19 +252,16 @@ module.exports = (env, argv) => { name: 'gateway', resolve: { extensions: [".js", ".ts", ".tsx"], - alias: { - '@': resolve(__dirname, `${target}/ts/gateway`) - } }, mode, entry: { - 'common': '@/common_deprecated.ts', - 'entrance': '@/entrance.ts', - 'user_info': '@/user_info.ts', - 'admin_member': '@/admin_member.ts', - 'join': '@/join.ts', - 'login': '@/login.ts', - 'install': '@/install.ts', + common: `${tsDir}/gateway/common_deprecated.ts`, + entrance: `${tsDir}/gateway/entrance.ts`, + user_info: `${tsDir}/gateway/user_info.ts`, + admin_member: `${tsDir}/gateway/admin_member.ts`, + join: `${tsDir}/gateway/join.ts`, + login: `${tsDir}/gateway/login.ts`, + install: `${tsDir}/gateway/install.ts`, }, output: { filename: '[name].js',