mirror of
https://github.com/motajs/template.git
synced 2026-10-22 15:20:17 +08:00
feat(09-02): migrate main/settings/statusBar/toolbar to src/ui and rebuild barrel
- Move render/ui/{main,settings,statusBar,toolbar}.tsx to src/ui/ with only relative specifiers rewritten
- Rewrite render capabilities to leaf modules (../render/use, ../render/renderer), never the ../render barrel
- Complete src/ui/index.ts with ./main ./settings ./statusBar ./toolbar + createUI()
- Delete the four old render/ui files
This commit is contained in:
parent
6a3812252b
commit
964f479270
@ -1,3 +1,9 @@
|
||||
import { createMainController } from './controller';
|
||||
|
||||
export function createUI() {
|
||||
createMainController();
|
||||
}
|
||||
|
||||
export * from './types';
|
||||
export * from './save';
|
||||
export * from './statistics';
|
||||
@ -5,3 +11,7 @@ export * from './viewmap';
|
||||
export * from './controller';
|
||||
export * from './background';
|
||||
export * from './func';
|
||||
export * from './main';
|
||||
export * from './settings';
|
||||
export * from './statusBar';
|
||||
export * from './toolbar';
|
||||
|
||||
@ -17,7 +17,7 @@ import {
|
||||
RIGHT_STATUS_POS,
|
||||
STATUS_BAR_HEIGHT,
|
||||
STATUS_BAR_WIDTH
|
||||
} from '../../shared';
|
||||
} from '../shared';
|
||||
import {
|
||||
ILeftHeroStatus,
|
||||
IRightHeroStatus,
|
||||
@ -28,8 +28,8 @@ import { ReplayingStatus } from './toolbar';
|
||||
import { state } from '@user/data-state';
|
||||
import { mainUIController } from './controller';
|
||||
import { isNil } from 'lodash-es';
|
||||
import { using } from '../renderer';
|
||||
import { client } from '../../core';
|
||||
import { using } from '../render/renderer';
|
||||
import { client } from '../core';
|
||||
|
||||
const MainScene = defineComponent(() => {
|
||||
const { mainMapRenderer, mainMapExtension } = client;
|
||||
@ -17,15 +17,15 @@ import {
|
||||
import { mainUi } from '@motajs/legacy-ui';
|
||||
import { gameKey, generateKeyboardEvent } from '@motajs/system';
|
||||
import { getVitualKeyOnce } from '@motajs/legacy-ui';
|
||||
import { getAllSavesData, getSaveData, syncFromServer } from '../utils';
|
||||
import { getAllSavesData, getSaveData, syncFromServer } from '../render/utils';
|
||||
import { getInput } from '@user/client-base';
|
||||
import { openStatistics } from './statistics';
|
||||
import { saveWithExist } from './save';
|
||||
import { compressToBase64 } from 'lz-string';
|
||||
import { ViewMapUI } from './viewmap';
|
||||
import { CENTER_LOC, FULL_LOC, MAIN_HEIGHT, POP_BOX_WIDTH } from '../../shared';
|
||||
import { useKey } from '../use';
|
||||
import { client } from '../../core';
|
||||
import { CENTER_LOC, FULL_LOC, MAIN_HEIGHT, POP_BOX_WIDTH } from '../shared';
|
||||
import { useKey } from '../render/use';
|
||||
import { client } from '../core';
|
||||
|
||||
export interface MainSettingsProps
|
||||
extends Partial<ChoicesProps>, IUIDefaultPropsBase {
|
||||
@ -10,9 +10,9 @@ import {
|
||||
MAIN_WIDTH,
|
||||
STATUS_BAR_HEIGHT,
|
||||
STATUS_BAR_WIDTH
|
||||
} from '../../shared';
|
||||
} from '../shared';
|
||||
import { DefaultProps } from '@motajs/render-vue';
|
||||
import { client } from '../../core';
|
||||
import { client } from '../core';
|
||||
|
||||
export interface ILeftHeroStatus {
|
||||
/** 楼层 id */
|
||||
@ -13,7 +13,7 @@ import {
|
||||
} from '@user/client-base';
|
||||
import { getVitualKeyOnce } from '@motajs/legacy-ui';
|
||||
import { gameKey, generateKeyboardEvent } from '@motajs/system';
|
||||
import { transitioned } from '../use';
|
||||
import { transitioned } from '../render/use';
|
||||
import { linear } from 'mutate-animate';
|
||||
import { KeyCode } from '@motajs/client-base';
|
||||
import { Progress } from '@user/client-base';
|
||||
@ -21,11 +21,11 @@ import { generateBinary } from '@motajs/legacy-common';
|
||||
import { SetupComponentOptions } from '@motajs/system';
|
||||
import { saveSave, saveLoad } from './save';
|
||||
import { mainUIController } from './controller';
|
||||
import { MAIN_HEIGHT, FULL_LOC, POP_BOX_WIDTH, CENTER_LOC } from '../../shared';
|
||||
import { MAIN_HEIGHT, FULL_LOC, POP_BOX_WIDTH, CENTER_LOC } from '../shared';
|
||||
import { openReplay, openSettings } from './settings';
|
||||
import { openViewMap } from './viewmap';
|
||||
import { DefaultProps } from '@motajs/render-vue';
|
||||
import { client } from '../../core';
|
||||
import { client } from '../core';
|
||||
|
||||
interface ToolbarProps extends DefaultProps {
|
||||
loc?: ElementLocator;
|
||||
Loading…
Reference in New Issue
Block a user