refactor plain-text
parent
a07545b841
commit
5bd07e0ca7
|
|
@ -109,7 +109,7 @@ export default class DetailFramework extends Component<
|
|||
marginLeft: '3%',
|
||||
}}
|
||||
>
|
||||
<AtCard isFull title={pt.get().ticketDetail.descTitle}>
|
||||
<AtCard isFull title={pt.get().ticketDetail.desc.title}>
|
||||
<View className='at-article__h3'>
|
||||
{this.state.ticketInfo.description}
|
||||
</View>
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ export default class NoteCard extends Component<NoteCardProps, {}> {
|
|||
var message = '';
|
||||
const note = this.props.note;
|
||||
const td = pt.get().ticketDetail;
|
||||
const createMessage = td.createTicketMessage;
|
||||
const createMessage = td.comment.createTicketMessage;
|
||||
const modifyMessage = td.statusModifyMessage;
|
||||
const prefix = td.statusModifyPrefix;
|
||||
const prefix = td.comment.statusModifyPrefix;
|
||||
|
||||
switch (note.type) {
|
||||
case 0:
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@ export default class NotFoundPage extends Component {
|
|||
style={{ marginTop: '150rpx', marginBottom: '240rpx' }}
|
||||
>
|
||||
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||
{pt.get().notFound.titleZhCn}
|
||||
{pt.get().notFound.title.ZhCn}
|
||||
</View>
|
||||
<View className='at-article__h2'>{pt.get().notFound.descZhCn}</View>
|
||||
<View className='at-article__h2'>{pt.get().notFound.desc.ZhCn}</View>
|
||||
<View style={{ height: '150rpx' }}></View>
|
||||
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||
{pt.get().notFound.titleEnUs}
|
||||
{pt.get().notFound.title.EnUs}
|
||||
</View>
|
||||
<View className='at-article__h2'>{pt.get().notFound.descEnUs}</View>
|
||||
<View className='at-article__h2'>{pt.get().notFound.desc.EnUs}</View>
|
||||
</View>
|
||||
<PageFooter />
|
||||
</View>
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
|||
type='secondary'
|
||||
onClick={this.onPick.bind(this)}
|
||||
>
|
||||
{pt.get().ticketDetail.pick}
|
||||
{pt.get().ticketDetail.button.pick}
|
||||
</AtButton>
|
||||
</View>
|
||||
<View
|
||||
|
|
@ -268,7 +268,7 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
|||
type='primary'
|
||||
onClick={this.onAddToOreo.bind(this)}
|
||||
>
|
||||
{pt.get().ticketDetail.addToOreo}
|
||||
{pt.get().ticketDetail.button.addToOreo}
|
||||
</AtButton>
|
||||
</View>
|
||||
</View>
|
||||
|
|
@ -286,7 +286,7 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
|||
type='primary'
|
||||
onClick={this.onChangeStatus.bind(this)}
|
||||
>
|
||||
{pt.get().ticketDetail.status.button}
|
||||
{pt.get().ticketDetail.button.status}
|
||||
</AtButton>
|
||||
</View>
|
||||
<View
|
||||
|
|
@ -301,7 +301,7 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
|||
type='secondary'
|
||||
onClick={this.onAddComment.bind(this)}
|
||||
>
|
||||
{pt.get().ticketDetail.addNote}
|
||||
{pt.get().ticketDetail.button.addNote}
|
||||
</AtButton>
|
||||
</View>
|
||||
</View>
|
||||
|
|
@ -323,7 +323,7 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
|||
type='primary'
|
||||
onClick={this.onRetrieved.bind(this)}
|
||||
>
|
||||
{pt.get().ticketDetail.tookAway}
|
||||
{pt.get().ticketDetail.button.tookAway}
|
||||
</AtButton>
|
||||
</View>
|
||||
<View
|
||||
|
|
@ -338,7 +338,7 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
|||
type='secondary'
|
||||
onClick={this.onAddComment.bind(this)}
|
||||
>
|
||||
{pt.get().ticketDetail.addNote}
|
||||
{pt.get().ticketDetail.button.addNote}
|
||||
</AtButton>
|
||||
</View>
|
||||
</View>
|
||||
|
|
@ -410,28 +410,28 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
|||
onClose={this.handleStatusCancel.bind(this)}
|
||||
>
|
||||
<AtActionSheetItem onClick={this.handleStatusChange.bind(this, 0)}>
|
||||
{pt.get().ticketDetail.status.status0}
|
||||
{pt.get().ticketDetail.statusModifyMessage['0']}
|
||||
</AtActionSheetItem>
|
||||
<AtActionSheetItem onClick={this.handleStatusChange.bind(this, 1)}>
|
||||
{pt.get().ticketDetail.status.status1}
|
||||
{pt.get().ticketDetail.statusModifyMessage['1']}
|
||||
</AtActionSheetItem>
|
||||
<AtActionSheetItem onClick={this.handleStatusChange.bind(this, 2)}>
|
||||
{pt.get().ticketDetail.status.status2}
|
||||
{pt.get().ticketDetail.statusModifyMessage['2']}
|
||||
</AtActionSheetItem>
|
||||
<AtActionSheetItem onClick={this.handleStatusChange.bind(this, 3)}>
|
||||
{pt.get().ticketDetail.status.status3}
|
||||
{pt.get().ticketDetail.statusModifyMessage['3']}
|
||||
</AtActionSheetItem>
|
||||
<AtActionSheetItem onClick={this.handleStatusChange.bind(this, 4)}>
|
||||
{pt.get().ticketDetail.status.status4}
|
||||
{pt.get().ticketDetail.statusModifyMessage['4']}
|
||||
</AtActionSheetItem>
|
||||
<AtActionSheetItem onClick={this.handleStatusChange.bind(this, 5)}>
|
||||
{pt.get().ticketDetail.status.status5}
|
||||
{pt.get().ticketDetail.statusModifyMessage['5']}
|
||||
</AtActionSheetItem>
|
||||
<AtActionSheetItem onClick={this.handleStatusChange.bind(this, 6)}>
|
||||
{pt.get().ticketDetail.status.status6}
|
||||
{pt.get().ticketDetail.statusModifyMessage['6']}
|
||||
</AtActionSheetItem>
|
||||
<AtActionSheetItem onClick={this.handleStatusChange.bind(this, 7)}>
|
||||
{pt.get().ticketDetail.status.status7}
|
||||
{pt.get().ticketDetail.statusModifyMessage['7']}
|
||||
</AtActionSheetItem>
|
||||
</AtActionSheet>
|
||||
<DetailFramework
|
||||
|
|
|
|||
|
|
@ -21,13 +21,13 @@ export default class TitleCard extends React.Component {
|
|||
<View className='page-title'>
|
||||
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||
{wechatUser.getAccess()
|
||||
? memberPage.mainTitleLine + wechatUser.getInfo().name
|
||||
: mainPage.mainTitleLine}
|
||||
? memberPage.titleLine.main.index + wechatUser.getInfo().name
|
||||
: mainPage.titleLine.main}
|
||||
</View>
|
||||
<View className='at-article__h2'>
|
||||
{wechatUser.getAccess()
|
||||
? memberPage.subTitleLine
|
||||
: mainPage.subTitleLine}
|
||||
? memberPage.titleLine.sub.index
|
||||
: mainPage.titleLine.sub}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
|
|
|||
|
|
@ -50,10 +50,10 @@ export default class UserMemberPage extends Component {
|
|||
<AtMessage />
|
||||
<View className='page-title' style={{ marginBottom: '40rpx' }}>
|
||||
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||
{pt.get().memberPage.loginMainTitleLine}
|
||||
{pt.get().memberPage.titleLine.main.login}
|
||||
</View>
|
||||
<View className='at-article__h2'>
|
||||
{pt.get().memberPage.loginSubTitleLine}
|
||||
{pt.get().memberPage.titleLine.sub.login}
|
||||
</View>
|
||||
</View>
|
||||
<AtButton
|
||||
|
|
@ -70,10 +70,10 @@ export default class UserMemberPage extends Component {
|
|||
<AtMessage />
|
||||
<View className='page-title' style={{ marginBottom: '40rpx' }}>
|
||||
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||
{pt.get().memberPage.logoutMainTitleLine}
|
||||
{pt.get().memberPage.titleLine.main.logout}
|
||||
</View>
|
||||
<View className='at-article__h2'>
|
||||
{pt.get().memberPage.logoutSubTitleLine}
|
||||
{pt.get().memberPage.titleLine.sub.logout}
|
||||
</View>
|
||||
</View>
|
||||
<AtButton type='primary' onClick={this.onLogout.bind(this)}>
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ export default class UserPage extends Component {
|
|||
if (this.state.clicks < 3) {
|
||||
this.setState({
|
||||
toastText:
|
||||
pt.get().userPage.memberEntry.front +
|
||||
pt.get().userPage.memberEntry.prefix +
|
||||
(this.state.clicks + 1).toString() + // React State's feature
|
||||
pt.get().userPage.memberEntry.behind,
|
||||
pt.get().userPage.memberEntry.affix,
|
||||
isToastOpen: true,
|
||||
});
|
||||
if (this.state.clicks == 0) {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,21 @@
|
|||
export interface NotFoundText {
|
||||
titleZhCn: string;
|
||||
titleEnUs: string;
|
||||
descZhCn: string;
|
||||
descEnUs: string;
|
||||
title: {
|
||||
ZhCn: string;
|
||||
EnUs: string;
|
||||
};
|
||||
desc: {
|
||||
ZhCn: string;
|
||||
EnUs: string;
|
||||
};
|
||||
}
|
||||
|
||||
export const notFound: NotFoundText = {
|
||||
titleZhCn: '啊哦...请求出错了...',
|
||||
descZhCn: '请确保处于校网环境后,点击右上角 "...-重新进入小程序"!',
|
||||
titleEnUs: 'Oops...Network Error...',
|
||||
descEnUs:
|
||||
'Please make sure you\'re in ZJU\'s school network environment and then click on the top right corner "... - re-enter the applet"!',
|
||||
title: {
|
||||
ZhCn: '啊哦...请求出错了...',
|
||||
EnUs: 'Oops...Network Error...',
|
||||
},
|
||||
desc: {
|
||||
ZhCn: '请确保处于校网环境后,点击右上角 "...-重新进入小程序"!',
|
||||
EnUs: 'Please make sure you\'re in ZJU\'s school network environment and then click on the top right corner "... - re-enter the applet"!',
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
export interface MainPageText {
|
||||
mainTitleLine: string;
|
||||
subTitleLine: string;
|
||||
titleLine: {
|
||||
main: string;
|
||||
sub: string;
|
||||
};
|
||||
cardTitle: {
|
||||
dutyInfo: string;
|
||||
stepInfo: string;
|
||||
|
|
@ -43,8 +45,10 @@ export interface MainPageText {
|
|||
}
|
||||
|
||||
export const mainPageZhCn: MainPageText = {
|
||||
mainTitleLine: '您好,这里是E志者协会',
|
||||
subTitleLine: '维修请至【东三-204】实验室',
|
||||
titleLine: {
|
||||
main: '您好,这里是E志者协会',
|
||||
sub: '维修请至【东三-204】实验室',
|
||||
},
|
||||
cardTitle: {
|
||||
dutyInfo: '值班情况',
|
||||
stepInfo: '维修步骤',
|
||||
|
|
@ -108,8 +112,10 @@ export const mainPageZhCn: MainPageText = {
|
|||
};
|
||||
|
||||
export const mainPageEnUs: MainPageText = {
|
||||
mainTitleLine: 'Hi! This is EVA.',
|
||||
subTitleLine: 'For maintenance, please go to [204 Lab, E3 building]',
|
||||
titleLine: {
|
||||
main: 'Hi! This is EVA.',
|
||||
sub: 'For maintenance, please go to [204 Lab, E3 building]',
|
||||
},
|
||||
cardTitle: {
|
||||
dutyInfo: 'Duty Situation',
|
||||
stepInfo: 'Maintenance Steps',
|
||||
|
|
|
|||
|
|
@ -1,10 +1,16 @@
|
|||
export interface MemberPageText {
|
||||
mainTitleLine: string;
|
||||
subTitleLine: string;
|
||||
loginMainTitleLine: string;
|
||||
loginSubTitleLine: string;
|
||||
logoutMainTitleLine: string;
|
||||
logoutSubTitleLine: string;
|
||||
titleLine: {
|
||||
main: {
|
||||
index: string;
|
||||
login: string;
|
||||
logout: string;
|
||||
};
|
||||
sub: {
|
||||
index: string;
|
||||
login: string;
|
||||
logout: string;
|
||||
};
|
||||
};
|
||||
cardTitle: {
|
||||
dutyInfo: string;
|
||||
stepInfo: string;
|
||||
|
|
@ -57,12 +63,18 @@ export interface MemberPageText {
|
|||
}
|
||||
|
||||
export const memberPageZhCn: MemberPageText = {
|
||||
mainTitleLine: '您好,',
|
||||
subTitleLine: '祝你满绩每一天',
|
||||
loginMainTitleLine: '协会成员登录入口',
|
||||
loginSubTitleLine: '请使用 EVA 统一身份认证,登录后点击下方按钮以扫描二维码',
|
||||
logoutMainTitleLine: '协会成员登出',
|
||||
logoutSubTitleLine: '登出后须扫码重新登录!',
|
||||
titleLine: {
|
||||
main: {
|
||||
index: '您好,',
|
||||
login: '协会成员登录入口',
|
||||
logout: '协会成员登出',
|
||||
},
|
||||
sub: {
|
||||
index: '祝你满绩每一天',
|
||||
login: '请使用 EVA 统一身份认证,登录后点击下方按钮以扫描二维码',
|
||||
logout: '登出后须扫码重新登录!',
|
||||
},
|
||||
},
|
||||
cardTitle: {
|
||||
dutyInfo: '值班情况',
|
||||
stepInfo: '维修步骤',
|
||||
|
|
@ -138,13 +150,19 @@ export const memberPageZhCn: MemberPageText = {
|
|||
};
|
||||
|
||||
export const memberPageEnUs: MemberPageText = {
|
||||
mainTitleLine: 'Hi! ',
|
||||
subTitleLine: 'Have a great day!',
|
||||
loginMainTitleLine: 'EVA Member Entry',
|
||||
loginSubTitleLine:
|
||||
titleLine: {
|
||||
main: {
|
||||
index: 'Hi! ',
|
||||
login: 'EVA Member Entry',
|
||||
logout: 'EVA Member Logout',
|
||||
},
|
||||
sub: {
|
||||
index: 'Have a great day!',
|
||||
login:
|
||||
'Please use EVA Auth, log in and click the button below to scan the QR code',
|
||||
logoutMainTitleLine: 'EVA Member Logout',
|
||||
logoutSubTitleLine: 'After logging out, scan the code again to log back in!',
|
||||
logout: 'After logging out, scan the code again to log back in!',
|
||||
},
|
||||
},
|
||||
cardTitle: {
|
||||
dutyInfo: 'Duty Situation',
|
||||
stepInfo: 'Maintenance Steps',
|
||||
|
|
|
|||
|
|
@ -6,35 +6,31 @@ type StatusStr = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7';
|
|||
|
||||
export interface TicketDetailText {
|
||||
stepItems: Array<StepItem>;
|
||||
createTicketMessage: string;
|
||||
statusModifyPrefix: string;
|
||||
statusModifyMessage: Map<StatusStr, string>;
|
||||
descTitle: string;
|
||||
desc: {
|
||||
title: string;
|
||||
};
|
||||
divider: string;
|
||||
info: {
|
||||
title: string;
|
||||
extra: string;
|
||||
};
|
||||
button: {
|
||||
tookAway: string;
|
||||
addToOreo: string;
|
||||
addNote: string;
|
||||
pick: string;
|
||||
status: string;
|
||||
};
|
||||
comment: {
|
||||
title: string;
|
||||
placeholder: string;
|
||||
createTicketMessage: string;
|
||||
statusModifyPrefix: string;
|
||||
};
|
||||
status: {
|
||||
button: string;
|
||||
title: string;
|
||||
cancel: string;
|
||||
status0: string;
|
||||
status1: string;
|
||||
status2: string;
|
||||
status3: string;
|
||||
status4: string;
|
||||
status5: string;
|
||||
status6: string;
|
||||
status7: string;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -45,8 +41,6 @@ export const ticketDetailZhCn: TicketDetailText = {
|
|||
{ title: '待取回' },
|
||||
{ title: '工单完成' },
|
||||
],
|
||||
createTicketMessage: '创建了维修',
|
||||
statusModifyPrefix: '将维修状态改为:',
|
||||
statusModifyMessage: new Map<StatusStr, string>([
|
||||
['0', '已创建/交接中'],
|
||||
['1', '维修中'],
|
||||
|
|
@ -57,32 +51,30 @@ export const ticketDetailZhCn: TicketDetailText = {
|
|||
['6', '维修翻车待取回'],
|
||||
['7', '维修翻车已取回'],
|
||||
]),
|
||||
descTitle: '问题描述',
|
||||
divider: '评论 / 状态',
|
||||
desc: {
|
||||
title: '问题描述',
|
||||
},
|
||||
info: {
|
||||
title: '机主姓名',
|
||||
extra: '联系方式',
|
||||
},
|
||||
divider: '评论 / 状态',
|
||||
button: {
|
||||
tookAway: '我已取回',
|
||||
addToOreo: '加入 Oreo',
|
||||
addNote: '添加评论',
|
||||
pick: '认领',
|
||||
status: '改变状态',
|
||||
},
|
||||
comment: {
|
||||
title: '添加评论',
|
||||
placeholder: '可以在这里交流机器情况、维修进度、提出问题~',
|
||||
createTicketMessage: '创建了维修',
|
||||
statusModifyPrefix: '将维修状态改为:',
|
||||
},
|
||||
status: {
|
||||
button: '改变工单状态',
|
||||
title: '请选择要改变成为的状态',
|
||||
cancel: '取消',
|
||||
status0: '已创建/交接中',
|
||||
status1: '维修中',
|
||||
status2: '劝退待取回',
|
||||
status3: '劝退已取回',
|
||||
status4: '维修成功待取回',
|
||||
status5: '维修成功已取回',
|
||||
status6: '维修翻车待取回',
|
||||
status7: '维修翻车已取回',
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -93,8 +85,6 @@ export const ticketDetailEnUs: TicketDetailText = {
|
|||
{ title: 'Finished' },
|
||||
{ title: 'Retrieved' },
|
||||
],
|
||||
createTicketMessage: 'Created ticket',
|
||||
statusModifyPrefix: 'Modified repair status to: ',
|
||||
statusModifyMessage: new Map<StatusStr, string>([
|
||||
['0', 'Created / Handovering'],
|
||||
['1', 'Repairing'],
|
||||
|
|
@ -105,32 +95,30 @@ export const ticketDetailEnUs: TicketDetailText = {
|
|||
['6', 'Pending Retrieval (Failed)'],
|
||||
['7', 'Retrieved (Failed)'],
|
||||
]),
|
||||
descTitle: 'Description',
|
||||
divider: 'Comment / Status',
|
||||
desc: {
|
||||
title: 'Description',
|
||||
},
|
||||
info: {
|
||||
title: 'Name',
|
||||
extra: 'Contact',
|
||||
},
|
||||
divider: 'Comment / Status',
|
||||
button: {
|
||||
tookAway: 'Already retrieved',
|
||||
addToOreo: 'Add to Oreo',
|
||||
addNote: 'Comment',
|
||||
pick: 'Pick',
|
||||
status: 'Change status',
|
||||
},
|
||||
comment: {
|
||||
title: 'Add Comment',
|
||||
title: 'Add comment',
|
||||
placeholder:
|
||||
'You can exchange information the device, the progress of repairs, and ask questions here.',
|
||||
createTicketMessage: 'Created ticket',
|
||||
statusModifyPrefix: 'Modified repair status to: ',
|
||||
},
|
||||
status: {
|
||||
button: 'Modify Status',
|
||||
title: 'Please select the status you want to modify to',
|
||||
cancel: 'Cancel',
|
||||
status0: 'Created / Handovering',
|
||||
status1: 'Repairing',
|
||||
status2: 'Pending Retrieval (Refused)',
|
||||
status3: 'Retrieved (Refused)',
|
||||
status4: 'Pending Retrieval (Finished)',
|
||||
status5: 'Retrieved (Finished)',
|
||||
status6: 'Pending Retrieval (Failed)',
|
||||
status7: 'Retrieved (Failed)',
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
export interface UserPageText {
|
||||
memberEntry: {
|
||||
front: string;
|
||||
behind: string;
|
||||
prefix: string;
|
||||
affix: string;
|
||||
};
|
||||
ticketColumn: {
|
||||
title: string;
|
||||
|
|
@ -27,8 +27,8 @@ export interface UserPageText {
|
|||
|
||||
export const userPageZhCn: UserPageText = {
|
||||
memberEntry: {
|
||||
front: '再点击 ',
|
||||
behind: ' 次以进入协会成员登录页面',
|
||||
prefix: '再点击 ',
|
||||
affix: ' 次以进入协会成员登录页面',
|
||||
},
|
||||
ticketColumn: {
|
||||
title: '我的工单',
|
||||
|
|
@ -54,8 +54,8 @@ export const userPageZhCn: UserPageText = {
|
|||
|
||||
export const userPageEnUs: UserPageText = {
|
||||
memberEntry: {
|
||||
front: 'Click ',
|
||||
behind: ' more times to enter member login page',
|
||||
prefix: 'Click ',
|
||||
affix: ' more times to enter member login page',
|
||||
},
|
||||
ticketColumn: {
|
||||
title: 'My Tickets',
|
||||
|
|
|
|||
Loading…
Reference in New Issue