Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit 71bf8d1

Browse files
authored
Merge pull request #2562 from withspectrum/2.1.5
2.1.5
2 parents aba3d7f + ffb3bd8 commit 71bf8d1

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Spectrum",
3-
"version": "2.1.3",
3+
"version": "2.1.5",
44
"private": true,
55
"devDependencies": {
66
"babel-cli": "^6.24.1",

shared/graphql/mutations/community/disableBrandedLogin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export type DisableBrandedLoginType = {
99
slug: string,
1010
brandedLogin: {
1111
isEnabled: boolean,
12-
customMessage: ?string,
12+
message: ?string,
1313
},
1414
},
1515
},
@@ -22,7 +22,7 @@ export const disableBrandedLoginMutation = gql`
2222
slug
2323
brandedLogin {
2424
isEnabled
25-
customMessage
25+
message
2626
}
2727
}
2828
}

shared/graphql/mutations/community/enableBrandedLogin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export type EnableBrandedLoginType = {
99
slug: string,
1010
brandedLogin: {
1111
isEnabled: boolean,
12-
customMessage: ?string,
12+
message: ?string,
1313
},
1414
},
1515
},
@@ -22,7 +22,7 @@ export const enableBrandedLoginMutation = gql`
2222
slug
2323
brandedLogin {
2424
isEnabled
25-
customMessage
25+
message
2626
}
2727
}
2828
}

src/views/communityLogin/style.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const Subtitle = styled.h2`
2424
margin-bottom: 16px;
2525
padding: 0 32px;
2626
text-align: center;
27-
white-space: pre;
27+
white-space: pre-wrap;
2828
2929
b {
3030
font-weight: 700;

src/views/communitySettings/components/brandedLogin.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ type Props = {
3535
type State = {
3636
messageValue: ?string,
3737
messageLengthError: boolean,
38+
isLoading: boolean,
3839
};
3940

4041
class BrandedLogin extends React.Component<Props, State> {
4142
state = {
4243
messageValue: null,
4344
messageLengthError: false,
45+
isLoading: false,
4446
};
4547

4648
componentDidUpdate(prevProps) {
@@ -69,17 +71,21 @@ class BrandedLogin extends React.Component<Props, State> {
6971
});
7072
}
7173

74+
this.setState({
75+
isLoading: true,
76+
});
77+
7278
return this.props
7379
.saveBrandedLoginSettings({
7480
message: messageValue,
7581
id: this.props.data.community.id,
7682
})
7783
.then(() => {
78-
this.setState({ messageLengthError: false });
84+
this.setState({ messageLengthError: false, isLoading: false });
7985
return this.props.dispatch(addToastWithTimeout('success', 'Saved!'));
8086
})
8187
.catch(err => {
82-
this.setState({ messageLengthError: false });
88+
this.setState({ messageLengthError: false, isLoading: false });
8389
return this.props.dispatch(addToastWithTimeout('error', err));
8490
});
8591
};
@@ -127,6 +133,7 @@ class BrandedLogin extends React.Component<Props, State> {
127133
onSubmit={this.saveCustomMessage}
128134
onClick={this.saveCustomMessage}
129135
disabled={messageLengthError}
136+
loading={this.state.isLoading}
130137
>
131138
Save
132139
</Button>

0 commit comments

Comments
 (0)