Skip to content

Commit 3eb0467

Browse files
Tert0jmattheis
authored andcommitted
Fix bracketSameLine prettier
1 parent 17b9b52 commit 3eb0467

20 files changed

+49
-91
lines changed

ui/.prettierrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"singleQuote": true,
77
"trailingComma": "es5",
88
"bracketSpacing": false,
9-
"jsxBracketSameLine": true,
9+
"bracketSameLine": true,
1010
"arrowParens": "always",
1111
"parser": "typescript"
12-
}
12+
}

ui/src/application/AddApplicationDialog.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ export default class AddDialog extends Component<IProps, IState> {
3434
open={true}
3535
onClose={fClose}
3636
aria-labelledby="form-dialog-title"
37-
id="app-dialog"
38-
>
37+
id="app-dialog">
3938
<DialogTitle id="form-dialog-title">Create an application</DialogTitle>
4039
<DialogContent>
4140
<DialogContentText>
@@ -70,8 +69,7 @@ export default class AddDialog extends Component<IProps, IState> {
7069
disabled={!submitEnabled}
7170
onClick={submitAndClose}
7271
color="primary"
73-
variant="contained"
74-
>
72+
variant="contained">
7573
Create
7674
</Button>
7775
</div>

ui/src/application/Applications.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,11 @@ class Applications extends Component<Stores<'appStore'>> {
5353
id="create-app"
5454
variant="contained"
5555
color="primary"
56-
onClick={() => (this.createDialog = true)}
57-
>
56+
onClick={() => (this.createDialog = true)}>
5857
Create Application
5958
</Button>
6059
}
61-
maxWidth={1000}
62-
>
60+
maxWidth={1000}>
6361
<Grid item xs={12}>
6462
<Paper elevation={6}>
6563
<Table id="app-table">

ui/src/application/UpdateApplicationDialog.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ export default class UpdateDialog extends Component<IProps, IState> {
4444
open={true}
4545
onClose={fClose}
4646
aria-labelledby="form-dialog-title"
47-
id="app-dialog"
48-
>
47+
id="app-dialog">
4948
<DialogTitle id="form-dialog-title">Update an application</DialogTitle>
5049
<DialogContent>
5150
<DialogContentText>
@@ -80,8 +79,7 @@ export default class UpdateDialog extends Component<IProps, IState> {
8079
disabled={!submitEnabled}
8180
onClick={submitAndClose}
8281
color="primary"
83-
variant="contained"
84-
>
82+
variant="contained">
8583
Update
8684
</Button>
8785
</div>

ui/src/client/AddClientDialog.tsx

+3-6
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ export default class AddDialog extends Component<IProps, {name: string}> {
2828
open={true}
2929
onClose={fClose}
3030
aria-labelledby="form-dialog-title"
31-
id="client-dialog"
32-
>
31+
id="client-dialog">
3332
<DialogTitle id="form-dialog-title">Create a client</DialogTitle>
3433
<DialogContent>
3534
<TextField
@@ -47,16 +46,14 @@ export default class AddDialog extends Component<IProps, {name: string}> {
4746
<Button onClick={fClose}>Cancel</Button>
4847
<Tooltip
4948
placement={'bottom-start'}
50-
title={submitEnabled ? '' : 'name is required'}
51-
>
49+
title={submitEnabled ? '' : 'name is required'}>
5250
<div>
5351
<Button
5452
className="create"
5553
disabled={!submitEnabled}
5654
onClick={submitAndClose}
5755
color="primary"
58-
variant="contained"
59-
>
56+
variant="contained">
6057
Create
6158
</Button>
6259
</div>

ui/src/client/Clients.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,10 @@ class Clients extends Component<Stores<'clientStore'>> {
4848
id="create-client"
4949
variant="contained"
5050
color="primary"
51-
onClick={() => (this.showDialog = true)}
52-
>
51+
onClick={() => (this.showDialog = true)}>
5352
Create Client
5453
</Button>
55-
}
56-
>
54+
}>
5755
<Grid item xs={12}>
5856
<Paper elevation={6}>
5957
<Table id="client-table">

ui/src/client/UpdateClientDialog.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ export default class UpdateDialog extends Component<IProps, IState> {
4141
open={true}
4242
onClose={fClose}
4343
aria-labelledby="form-dialog-title"
44-
id="client-dialog"
45-
>
44+
id="client-dialog">
4645
<DialogTitle id="form-dialog-title">Update a Client</DialogTitle>
4746
<DialogContent>
4847
<DialogContentText>
@@ -69,8 +68,7 @@ export default class UpdateDialog extends Component<IProps, IState> {
6968
disabled={!submitEnabled}
7069
onClick={submitAndClose}
7170
color="primary"
72-
variant="contained"
73-
>
71+
variant="contained">
7472
Update
7573
</Button>
7674
</div>

ui/src/common/ConfirmDialog.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ export default function ConfirmDialog({title, text, fClose, fOnSubmit}: IProps)
2323
open={true}
2424
onClose={fClose}
2525
aria-labelledby="form-dialog-title"
26-
className="confirm-dialog"
27-
>
26+
className="confirm-dialog">
2827
<DialogTitle id="form-dialog-title">{title}</DialogTitle>
2928
<DialogContent>
3029
<DialogContentText>{text}</DialogContentText>
@@ -38,8 +37,7 @@ export default function ConfirmDialog({title, text, fClose, fOnSubmit}: IProps)
3837
autoFocus
3938
color="primary"
4039
variant="contained"
41-
className="confirm"
42-
>
40+
className="confirm">
4341
Yes
4442
</Button>
4543
</DialogActions>

ui/src/common/ConnectionErrorBanner.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ export const ConnectionErrorBanner = ({height, retry, message}: ConnectionErrorB
1616
width: '100%',
1717
zIndex: 1300,
1818
position: 'relative',
19-
}}
20-
>
19+
}}>
2120
<Typography align="center" variant="h6" style={{lineHeight: `${height}px`}}>
2221
{message}{' '}
2322
<Button variant="outlined" onClick={retry}>

ui/src/common/ScrollUpButton.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ class ScrollUpButton extends Component {
3636
display: this.state.display,
3737
opacity: this.state.opacity,
3838
}}
39-
onClick={this.scrollUp}
40-
>
39+
onClick={this.scrollUp}>
4140
<KeyboardArrowUp />
4241
</Fab>
4342
);

ui/src/common/SettingsDialog.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ class SettingsDialog extends Component<IProps & Stores<'currentUser'>> {
3131
open={true}
3232
onClose={fClose}
3333
aria-labelledby="form-dialog-title"
34-
id="changepw-dialog"
35-
>
34+
id="changepw-dialog">
3635
<DialogTitle id="form-dialog-title">Change Password</DialogTitle>
3736
<DialogContent>
3837
<TextField
@@ -55,8 +54,7 @@ class SettingsDialog extends Component<IProps & Stores<'currentUser'>> {
5554
disabled={pass.length === 0}
5655
onClick={submitAndClose}
5756
color="primary"
58-
variant="contained"
59-
>
57+
variant="contained">
6058
Change
6159
</Button>
6260
</div>

ui/src/layout/Header.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ class Header extends Component<IProps> {
106106
</Link>
107107
<a
108108
href={'https://github.com/gotify/server/releases/tag/v' + version}
109-
className={classes.link}
110-
>
109+
className={classes.link}>
111110
<Typography variant="button" color="inherit">
112111
@{version}
113112
</Typography>
@@ -123,8 +122,7 @@ class Header extends Component<IProps> {
123122
href="https://github.com/gotify/server"
124123
className={classes.link}
125124
target="_blank"
126-
rel="noopener noreferrer"
127-
>
125+
rel="noopener noreferrer">
128126
<IconButton color="inherit">
129127
<GitHubIcon />
130128
</IconButton>

ui/src/layout/Navigation.tsx

+3-6
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ class Navigation extends Component<
5757
onClick={() => setNavOpen(false)}
5858
className={`${classes.link} item`}
5959
to={'/messages/' + app.id}
60-
key={app.id}
61-
>
60+
key={app.id}>
6261
<ListItem button>
6362
<ListItemText primary={app.name} />
6463
</ListItem>
@@ -79,8 +78,7 @@ class Navigation extends Component<
7978
classes={{root: classes.root, paper: classes.drawerPaper}}
8079
navOpen={navOpen}
8180
setNavOpen={setNavOpen}
82-
id="message-navigation"
83-
>
81+
id="message-navigation">
8482
<div className={classes.toolbar} />
8583
<Link className={classes.link} to="/" onClick={() => setNavOpen(false)}>
8684
<ListItem button disabled={!loggedIn} className="all">
@@ -96,8 +94,7 @@ class Navigation extends Component<
9694
onClick={() => {
9795
requestPermission();
9896
this.setState({showRequestNotification: false});
99-
}}
100-
>
97+
}}>
10198
Enable Notifications
10299
</Button>
103100
) : null}

ui/src/message/Messages.tsx

+7-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {inject, Stores} from '../inject';
1111
import {observable} from 'mobx';
1212
import ReactInfinite from 'react-infinite';
1313
import {IMessage} from '../types';
14-
import ConfirmDialog from "../common/ConfirmDialog";
14+
import ConfirmDialog from '../common/ConfirmDialog';
1515

1616
type IProps = RouteComponentProps<{id: string}>;
1717

@@ -73,30 +73,28 @@ class Messages extends Component<IProps & Stores<'messagesStore' | 'appStore'>,
7373
disabled={!hasMessages}
7474
color="primary"
7575
onClick={() => messagesStore.refreshByApp(appId)}
76-
style={{marginRight: 5}}
77-
>
76+
style={{marginRight: 5}}>
7877
Refresh
7978
</Button>
8079
<Button
8180
id="delete-all"
8281
variant="contained"
8382
disabled={!hasMessages}
8483
color="primary"
85-
onClick={() => {this.deleteAll = true}}
86-
>
84+
onClick={() => {
85+
this.deleteAll = true;
86+
}}>
8787
Delete All
8888
</Button>
8989
</div>
90-
}
91-
>
90+
}>
9291
{hasMessages ? (
9392
<div style={{width: '100%'}} id="messages">
9493
<ReactInfinite
9594
key={appId}
9695
useWindowAsScrollContainer
9796
preloadBatchSize={window.innerHeight * 3}
98-
elementHeight={messages.map((m) => this.heights[m.id] || 1)}
99-
>
97+
elementHeight={messages.map((m) => this.heights[m.id] || 1)}>
10098
{messages.map(this.renderMessage)}
10199
</ReactInfinite>
102100

ui/src/plugin/PluginDetailView.tsx

+5-10
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ class PluginDetailView extends Component<IProps & Stores<'pluginStore'>, IState>
7979
name={'Configurer'}
8080
description={'This is the configuration panel for this plugin.'}
8181
icon={Build}
82-
refresh={this.refreshConfigurer.bind(this)}
83-
>
82+
refresh={this.refreshConfigurer.bind(this)}>
8483
<ConfigurerPanel
8584
pluginInfo={pluginInfo}
8685
initialConfig={
@@ -100,8 +99,7 @@ class PluginDetailView extends Component<IProps & Stores<'pluginStore'>, IState>
10099
name={'Displayer'}
101100
description={'This is the information generated by the plugin.'}
102101
refresh={this.refreshDisplayer.bind(this)}
103-
icon={Subject}
104-
>
102+
icon={Subject}>
105103
<DisplayerPanel
106104
pluginInfo={pluginInfo}
107105
displayText={
@@ -147,8 +145,7 @@ const PanelWrapper: React.FC<IPanelWrapperProps> = ({
147145
style={{float: 'right'}}
148146
onClick={() => {
149147
refresh();
150-
}}
151-
>
148+
}}>
152149
<Refresh />
153150
</Button>
154151
) : null}
@@ -202,8 +199,7 @@ class ConfigurerPanel extends Component<IConfigurerPanelProps, {unsavedChanges:
202199
this.props.save(newConfig!).then(() => {
203200
this.setState({unsavedChanges: null});
204201
});
205-
}}
206-
>
202+
}}>
207203
<Typography variant="button">Save</Typography>
208204
</Button>
209205
</div>
@@ -264,8 +260,7 @@ class PluginInfo extends Component<{pluginInfo: IPlugin}> {
264260
href={url}
265261
target="_blank"
266262
rel="noopener noreferrer"
267-
className="custom-route"
268-
>
263+
className="custom-route">
269264
{url}
270265
</a>
271266
))(`${config.get('url')}plugin/${id}/custom/${token}/`)}

ui/src/snack/SnackBarHandler.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ class SnackBarHandler extends Component<Stores<'snackManager'>> {
4242
key="close"
4343
aria-label="Close"
4444
color="inherit"
45-
onClick={this.closeCurrentSnack}
46-
>
45+
onClick={this.closeCurrentSnack}>
4746
<Close />
4847
</IconButton>
4948
}

ui/src/user/AddEditUserDialog.tsx

+3-6
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ export default class AddEditDialog extends Component<IProps, IState> {
4444
open={true}
4545
onClose={fClose}
4646
aria-labelledby="form-dialog-title"
47-
id="add-edit-user-dialog"
48-
>
47+
id="add-edit-user-dialog">
4948
<DialogTitle id="form-dialog-title">
5049
{isEdit ? 'Edit ' + this.props.name : 'Add a user'}
5150
</DialogTitle>
@@ -91,16 +90,14 @@ export default class AddEditDialog extends Component<IProps, IState> {
9190
? ''
9291
: 'password is required'
9392
: 'name is required'
94-
}
95-
>
93+
}>
9694
<div>
9795
<Button
9896
className="save-create"
9997
disabled={!passPresent || !namePresent}
10098
onClick={submitAndClose}
10199
color="primary"
102-
variant="contained"
103-
>
100+
variant="contained">
104101
{isEdit ? 'Save' : 'Create'}
105102
</Button>
106103
</div>

ui/src/user/Login.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ class Login extends Component<Stores<'currentUser'>> {
5252
color="primary"
5353
disabled={!!this.props.currentUser.connectionErrorMessage}
5454
style={{marginTop: 15, marginBottom: 5}}
55-
onClick={this.login}
56-
>
55+
onClick={this.login}>
5756
Login
5857
</Button>
5958
</form>
@@ -81,8 +80,7 @@ class Login extends Component<Stores<'currentUser'>> {
8180
id="register"
8281
variant="contained"
8382
color="primary"
84-
onClick={() => (this.registerDialog = true)}
85-
>
83+
onClick={() => (this.registerDialog = true)}>
8684
Register
8785
</Button>
8886
);

0 commit comments

Comments
 (0)