Compare commits
2 Commits
d995c6ed43
...
1a30ff6def
| Author | SHA1 | Date |
|---|---|---|
|
|
1a30ff6def | |
|
|
3232994fb2 |
|
|
@ -2,6 +2,7 @@ import { AtTextarea, AtButton, AtForm, AtMessage } from 'taro-ui';
|
|||
import { Component, ReactNode } from 'react';
|
||||
import './report.scss';
|
||||
import Taro from '@tarojs/taro';
|
||||
import pt from '@/plain-text';
|
||||
|
||||
export default class SettingsPage extends Component {
|
||||
state = {
|
||||
|
|
@ -49,7 +50,7 @@ export default class SettingsPage extends Component {
|
|||
value={this.state.report}
|
||||
onChange={this.handleChange.bind(this)}
|
||||
maxLength={200}
|
||||
placeholder='无论是有关于小程序的建议,还是关于E志者协会的建议,都可以提出来哦!'
|
||||
placeholder={pt.get().reportPage.placeHolderText}
|
||||
/>
|
||||
<AtButton
|
||||
loading={this.state.isLoading}
|
||||
|
|
@ -57,10 +58,10 @@ export default class SettingsPage extends Component {
|
|||
type='primary'
|
||||
disabled={this.state.isDisable}
|
||||
>
|
||||
提交
|
||||
{pt.get().reportPage.submitText}
|
||||
</AtButton>
|
||||
<AtButton formType='reset' type='secondary'>
|
||||
清空
|
||||
{pt.get().reportPage.resetText}
|
||||
</AtButton>
|
||||
</AtForm>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -58,11 +58,11 @@ export default class SettingsPage extends Component {
|
|||
</Picker>
|
||||
</View>
|
||||
<AtButton type='secondary' onClick={this.handleAbout.bind(this)}>
|
||||
关于 EVA Notify
|
||||
{pt.get().settingsPage.aboutText}
|
||||
</AtButton>
|
||||
|
||||
<AtButton type='primary' onClick={this.handleQuit.bind(this)}>
|
||||
退出账号
|
||||
{pt.get().settingsPage.quitText}
|
||||
</AtButton>
|
||||
</View>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
export interface ReportPageText {
|
||||
placeHolderText: string;
|
||||
submitText: string;
|
||||
resetText: string;
|
||||
}
|
||||
|
||||
export const reportPageZhCn: ReportPageText = {
|
||||
placeHolderText:
|
||||
'无论是有关于小程序的建议,还是关于E志者协会的建议,都可以提出来哦!',
|
||||
submitText: '提交',
|
||||
resetText: '清空',
|
||||
};
|
||||
|
||||
export const reportPageEnUs: ReportPageText = {
|
||||
placeHolderText:
|
||||
'无论是有关于小程序的建议,还是关于E志者协会的建议,都可以提出来哦!',
|
||||
submitText: 'Submit',
|
||||
resetText: 'Reset',
|
||||
};
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
export interface SettingsPageText {
|
||||
aboutText: string;
|
||||
quitText: string;
|
||||
}
|
||||
|
||||
export const settingsPageZhCn: SettingsPageText = {
|
||||
aboutText: '关于 EVA Notify',
|
||||
quitText: '退出账号',
|
||||
};
|
||||
|
||||
export const settingsPageEnUs: SettingsPageText = {
|
||||
aboutText: 'About EVA Notify',
|
||||
quitText: 'Log Out',
|
||||
};
|
||||
|
|
@ -2,12 +2,20 @@ import { PageFooterText, pageFooterZhCn, pageFooterEnUs } from './PageFooter';
|
|||
import { MainPageText, mainPageZhCn, mainPageEnUs } from './MainPage';
|
||||
import { UserPageText, userPageZhCn, userPageEnUs } from './UserPage';
|
||||
import { TabBarText, tabBarEnUs, tabBarZhCn } from './TabBar';
|
||||
import {
|
||||
SettingsPageText,
|
||||
settingsPageEnUs,
|
||||
settingsPageZhCn,
|
||||
} from './SettingsPage';
|
||||
import { ReportPageText, reportPageEnUs, reportPageZhCn } from './ReportPage';
|
||||
|
||||
interface TextRecord {
|
||||
pageFooter: PageFooterText;
|
||||
mainPage: MainPageText;
|
||||
userPage: UserPageText;
|
||||
tabBar: TabBarText;
|
||||
settingsPage: SettingsPageText;
|
||||
reportPage: ReportPageText;
|
||||
}
|
||||
|
||||
const textZhCn: TextRecord = {
|
||||
|
|
@ -15,6 +23,8 @@ const textZhCn: TextRecord = {
|
|||
mainPage: mainPageZhCn,
|
||||
userPage: userPageZhCn,
|
||||
tabBar: tabBarZhCn,
|
||||
settingsPage: settingsPageZhCn,
|
||||
reportPage: reportPageZhCn,
|
||||
};
|
||||
|
||||
const textEnUs: TextRecord = {
|
||||
|
|
@ -22,6 +32,8 @@ const textEnUs: TextRecord = {
|
|||
mainPage: mainPageEnUs,
|
||||
userPage: userPageEnUs,
|
||||
tabBar: tabBarEnUs,
|
||||
settingsPage: settingsPageEnUs,
|
||||
reportPage: reportPageEnUs,
|
||||
};
|
||||
|
||||
// type Lang = 'zh_CN' | 'en_US' | ...;
|
||||
|
|
|
|||
Loading…
Reference in New Issue