beautify ui!

main
Dawn1Ocean 2024-03-19 00:14:13 +08:00
parent 3db6425dc3
commit 31d7aea480
9 changed files with 79 additions and 68 deletions

View File

@ -103,56 +103,48 @@ export default class DetailFramework extends Component<
<View></View> <View></View>
), ),
description: this.props.isInfoShow['description'] ? ( description: this.props.isInfoShow['description'] ? (
this.props.isInfoShow['info'] ? (
<View <View
className='at-row'
style={{ paddingTop: 10, paddingBottom: 10, width: '100%' }}
>
<View
className='at-col'
style={{ style={{
marginLeft: 10, paddingTop: 10,
paddingRight: 5, paddingBottom: 10,
marginTop: 10, width: '94%',
marginBottom: 10, marginLeft: '3%',
width: '50%',
}} }}
> >
<AtCard title={pt.get().ticketDetail.descTitle}> <AtCard isFull title={pt.get().ticketDetail.descTitle}>
<View className='at-article__h3'> <View className='at-article__h3'>
{this.state.ticketInfo.description} {this.state.ticketInfo.description}
</View> </View>
</AtCard> </AtCard>
</View> </View>
) : (
<View></View>
),
info: this.props.isInfoShow['info'] ? (
<View <View
className='at-col'
style={{ style={{
marginLeft: 5, paddingTop: 10,
paddingRight: 10, paddingBottom: 10,
marginTop: 10, width: '94%',
marginBottom: 10, marginLeft: '3%',
width: '50%',
}} }}
> >
<AtCard title={pt.get().ticketDetail.infoTitle}> <AtCard
isFull
title={pt.get().ticketDetail.info.title}
extra={pt.get().ticketDetail.info.extra}
extraStyle={{ fontSize: '32rpx', marginRight: 20 }}
>
<View style={{ display: 'flex' }}>
<View className='at-article__h3'> <View className='at-article__h3'>
{this.state.ticketInfo.info.name} {this.state.ticketInfo.info.name}
</View> </View>
<View className='at-article__h3'> <View style={{ marginLeft: 'auto' }} className='at-article__h3'>
{this.state.ticketInfo.info.phone} {this.state.ticketInfo.info.phone}
</View> </View>
</AtCard>
</View>
</View>
) : (
<View style={{ marginTop: 10, marginBottom: 10 }}>
<AtCard title={pt.get().ticketDetail.descTitle}>
<View className='at-article__h3'>
{this.state.ticketInfo.description}
</View> </View>
</AtCard> </AtCard>
</View> </View>
)
) : ( ) : (
<View></View> <View></View>
), ),
@ -189,6 +181,7 @@ export default class DetailFramework extends Component<
{elements.device} {elements.device}
{elements.createdTime} {elements.createdTime}
{elements.description} {elements.description}
{elements.info}
{elements.current} {elements.current}
{this.props.middleButton} {this.props.middleButton}
{elements.notelist} {elements.notelist}

View File

@ -36,13 +36,12 @@ export default class NoteCard extends Component<NoteCardProps, {}> {
} }
return ( return (
<View> <View style={{ marginTop: 20, marginBottom: 20 }}>
<View className='at-article__h2'>{note.op}</View> <View className='at-article__p'>{note.op}</View>
<View className='at-article__info'> <View className='at-article__info'>
{note.createdTime.format(timeFormat)} {note.createdTime.format(timeFormat)}
</View> </View>
<View className='at-article__p'>{message}</View> <View className='at-article__h3'>{message}</View>
<AtDivider />
</View> </View>
); );
} }

View File

@ -15,7 +15,7 @@ export default class NoteList extends Component<NoteListProps, {}> {
render(): ReactNode { render(): ReactNode {
return ( return (
<View> <View>
<AtDivider /> <AtDivider height={40} />
{this.props.noteList.map((note, idx) => ( {this.props.noteList.map((note, idx) => (
<View key={idx}> <View key={idx}>
<NoteCard note={note} /> <NoteCard note={note} />

View File

@ -269,10 +269,10 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
<AtButton <AtButton
loading={this.state.isStatusLoading} loading={this.state.isStatusLoading}
disabled={this.state.isStatusDisable} disabled={this.state.isStatusDisable}
type='secondary' type='primary'
onClick={this.onChangeStatus.bind(this)} onClick={this.onChangeStatus.bind(this)}
> >
{pt.get().ticketDetail.addNote} {pt.get().ticketDetail.status.button}
</AtButton> </AtButton>
</View> </View>
<View <View

View File

@ -23,6 +23,7 @@ export class ShowElements {
device: JSX.Element; device: JSX.Element;
createdTime: JSX.Element; createdTime: JSX.Element;
description: JSX.Element; description: JSX.Element;
info: JSX.Element;
current: JSX.Element; current: JSX.Element;
notelist: JSX.Element; notelist: JSX.Element;
} }

View File

@ -49,7 +49,7 @@ class Card extends Component {
<View <View
style={{ style={{
marginLeft: 10, marginLeft: 10,
fontSize: 30, fontSize: '60rpx',
fontWeight: 'bold', fontWeight: 'bold',
}} }}
> >

View File

@ -105,6 +105,7 @@ export default class MainPage extends Component<{}, MainPageState> {
return ( return (
<View> <View>
<TitleCard /> <TitleCard />
<View style={{ width: '94%', marginLeft: '3%' }}>
<View style={{ marginTop: 30 }}> <View style={{ marginTop: 30 }}>
{mainPageCard(this.state.dutyInfoCard)} {mainPageCard(this.state.dutyInfoCard)}
{mainPageCard(this.state.tipsInfoCard)} {mainPageCard(this.state.tipsInfoCard)}
@ -115,6 +116,7 @@ export default class MainPage extends Component<{}, MainPageState> {
</View> </View>
<PageFooter /> <PageFooter />
</View> </View>
</View>
); );
} }
} }

View File

@ -207,9 +207,16 @@ export default class RepairPage extends Component<{}, RepairPageState> {
</AtCard> </AtCard>
)); ));
return ( return (
<View> <View style={{ width: '94%', marginLeft: '3%' }}>
<AtMessage /> <AtMessage />
<View
style={{
marginTop: 10,
marginBottom: 20,
}}
>
{ticketsRenderer} {ticketsRenderer}
</View>
<AtCard <AtCard
note={pt.get().repairPage.cardText.note} note={pt.get().repairPage.cardText.note}
title={pt.get().repairPage.cardText.title} title={pt.get().repairPage.cardText.title}

View File

@ -10,7 +10,10 @@ export interface TicketDetailText {
statusModifyPrefix: string; statusModifyPrefix: string;
statusModifyMessage: Map<StatusStr, string>; statusModifyMessage: Map<StatusStr, string>;
descTitle: string; descTitle: string;
infoTitle: string; info: {
title: string;
extra: string;
};
tookAway: string; tookAway: string;
addToOreo: string; addToOreo: string;
addNote: string; addNote: string;
@ -54,7 +57,10 @@ export const ticketDetailZhCn: TicketDetailText = {
['7', '维修翻车已取回'], ['7', '维修翻车已取回'],
]), ]),
descTitle: '问题描述', descTitle: '问题描述',
infoTitle: '机主信息', info: {
title: '机主姓名',
extra: '联系方式',
},
tookAway: '我已取回', tookAway: '我已取回',
addToOreo: '加入 Oreo', addToOreo: '加入 Oreo',
addNote: '添加评论', addNote: '添加评论',
@ -98,7 +104,10 @@ export const ticketDetailEnUs: TicketDetailText = {
['7', 'Retrieved (Failed)'], ['7', 'Retrieved (Failed)'],
]), ]),
descTitle: 'Description', descTitle: 'Description',
infoTitle: 'Contact', info: {
title: 'Name',
extra: 'Contact',
},
tookAway: 'Already retrieved', tookAway: 'Already retrieved',
addToOreo: 'Add to Oreo', addToOreo: 'Add to Oreo',
addNote: 'Comment', addNote: 'Comment',