Compare commits
	
		
			No commits in common. "7adadb6d46b7220f716aed1b6ff24ebc086ce719" and "ac0fef2901a396910cb653adc0e3a0118e912d53" have entirely different histories.
		
	
	
		
			7adadb6d46
			...
			ac0fef2901
		
	
		
| @ -188,6 +188,11 @@ class CommandBar extends Component<IMixinSettingProps & IMixinStatusProps, IComm | ||||
|                         this.props.status ? this.props.status.newLabel() : undefined; | ||||
|                     }} | ||||
|                 /> | ||||
| 
 | ||||
|                 <CommandButton | ||||
|                     iconName="Camera" | ||||
|                     i18NKey="Command.Bar.Camera.Info" | ||||
|                 /> | ||||
|             </div> | ||||
|             <div> | ||||
|                 <CommandButton | ||||
|  | ||||
| @ -3,6 +3,4 @@ | ||||
| div.setting-popup { | ||||
| 	width: 100%; | ||||
| 	height: 100%; | ||||
| 	box-sizing: border-box; | ||||
| 	padding: 10px; | ||||
| } | ||||
| @ -2,11 +2,8 @@ import { Component, ReactNode } from "react"; | ||||
| import { Popup } from "@Context/Popups"; | ||||
| import { Theme } from "@Component/Theme/Theme"; | ||||
| import { Localization } from "@Component/Localization/Localization"; | ||||
| import { useSettingWithEvent, IMixinSettingProps, Themes } from "@Context/Setting"; | ||||
| import { ComboInput } from "@Input/ComboInput/ComboInput"; | ||||
| import "./SettingPopup.scss"; | ||||
| 
 | ||||
| 
 | ||||
| interface ISettingPopupProps { | ||||
| 
 | ||||
| } | ||||
| @ -27,42 +24,10 @@ class SettingPopup extends Popup<ISettingPopupProps> { | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| @useSettingWithEvent("themes", "language") | ||||
| class SettingPopupComponent extends Component<ISettingPopupProps & IMixinSettingProps> { | ||||
| class SettingPopupComponent extends Component<ISettingPopupProps> { | ||||
| 
 | ||||
| 	public render(): ReactNode { | ||||
| 		return <Theme className="setting-popup"> | ||||
| 
 | ||||
| 			<ComboInput | ||||
| 				keyI18n="Language" | ||||
| 				allOption={[ | ||||
| 					{ key: "EN_US", i18n: "EN_US" }, | ||||
| 					{ key: "ZH_CN", i18n: "ZH_CN" } | ||||
| 				]} | ||||
| 				value={{ | ||||
| 					key: this.props.setting?.language ?? "EN_US", | ||||
| 					i18n: this.props.setting?.language ?? "EN_US" | ||||
| 				}} | ||||
| 				valueChange={(data) => { | ||||
| 					this.props.setting?.setProps("language", data.key as any); | ||||
| 				}} | ||||
| 			/> | ||||
| 
 | ||||
| 			<ComboInput | ||||
| 				keyI18n="Themes" | ||||
| 				allOption={[ | ||||
| 					{ key: Themes.dark as any, i18n: "Themes.Dark" }, | ||||
| 					{ key: Themes.light as any, i18n: "Themes.Light" } | ||||
| 				]} | ||||
| 				value={{ | ||||
| 					key: this.props.setting?.themes ?? Themes.dark as any, | ||||
| 					i18n: this.props.setting?.themes === Themes.dark ? "Themes.Dark" : "Themes.Light" | ||||
| 				}} | ||||
| 				valueChange={(data) => { | ||||
| 					this.props.setting?.setProps("themes", parseInt(data.key)); | ||||
| 				}} | ||||
| 			/> | ||||
| 		</Theme> | ||||
| 		return <Theme className="setting-popup"></Theme> | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -1,10 +1,6 @@ | ||||
| const EN_US = { | ||||
|     "Language": "Language", | ||||
|     "EN_US": "English (US)", | ||||
|     "ZH_CN": "Chinese (Simplified)", | ||||
|     "Themes": "Themes", | ||||
|     "Themes.Dark": "Dark", | ||||
|     "Themes.Light": "Light", | ||||
|     "Header.Bar.Title": "Living Together | Emulator", | ||||
|     "Header.Bar.Title.Info": "Group Behavior Research Emulator", | ||||
|     "Header.Bar.File.Name.Info": "{file} ({status})", | ||||
|  | ||||
| @ -1,10 +1,6 @@ | ||||
| const ZH_CN = { | ||||
|     "Language": "语言", | ||||
|     "EN_US": "英语 (美国)", | ||||
|     "ZH_CN": "中文 (简体)", | ||||
|     "Themes": "主题", | ||||
|     "Themes.Dark": "黑暗", | ||||
|     "Themes.Light": "亮色", | ||||
|     "Header.Bar.Title": "群生共进 | 仿真器", | ||||
|     "Header.Bar.Title.Info": "群体行为研究仿真器", | ||||
|     "Header.Bar.File.Name.Info": "{file} ({status})", | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user