mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-17 03:31:52 +00:00
Compare commits
1 Commits
0.16.1
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a246e8ad3 |
@@ -16,10 +16,7 @@ class InfoTab extends React.Component {
|
|||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
config: this.props.config,
|
config: this.props.config
|
||||||
subscriptionFormStatus: 'idle',
|
|
||||||
subscriptionFormErrorMessage: null,
|
|
||||||
subscriptionFormEmail: ''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,48 +31,6 @@ class InfoTab extends React.Component {
|
|||||||
this.setState({ config: newConfig })
|
this.setState({ config: newConfig })
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSubscriptionFormSubmit(e) {
|
|
||||||
e.preventDefault()
|
|
||||||
this.setState({
|
|
||||||
subscriptionFormStatus: 'sending',
|
|
||||||
subscriptionFormErrorMessage: null
|
|
||||||
})
|
|
||||||
|
|
||||||
fetch(
|
|
||||||
'https://boostmails.boostio.co/api/public/lists/5f434dccd05f3160b41c0d49/subscriptions',
|
|
||||||
{
|
|
||||||
headers: {
|
|
||||||
Accept: 'application/json',
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
method: 'POST',
|
|
||||||
body: JSON.stringify({ email: this.state.subscriptionFormEmail })
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.then(response => {
|
|
||||||
if (response.status >= 400) {
|
|
||||||
return response.text().then(text => {
|
|
||||||
throw new Error(text)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.setState({
|
|
||||||
subscriptionFormStatus: 'done'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
this.setState({
|
|
||||||
subscriptionFormStatus: 'idle',
|
|
||||||
subscriptionFormErrorMessage: error.message
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
handleSubscriptionFormEmailChange(e) {
|
|
||||||
this.setState({
|
|
||||||
subscriptionFormEmail: e.target.value
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
handleSaveButtonClick(e) {
|
handleSaveButtonClick(e) {
|
||||||
const newConfig = {
|
const newConfig = {
|
||||||
amaEnabled: this.state.config.amaEnabled
|
amaEnabled: this.state.config.amaEnabled
|
||||||
@@ -179,40 +134,6 @@ class InfoTab extends React.Component {
|
|||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<div styleName='group-header--sub'>Subscribe Update Notes</div>
|
|
||||||
{this.state.subscriptionFormStatus === 'done' ? (
|
|
||||||
<div>
|
|
||||||
<blockquote color={{ color: 'green' }}>
|
|
||||||
Thanks for the subscription!
|
|
||||||
</blockquote>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div>
|
|
||||||
{this.state.subscriptionFormErrorMessage != null && (
|
|
||||||
<blockquote style={{ color: 'red' }}>
|
|
||||||
{this.state.subscriptionFormErrorMessage}
|
|
||||||
</blockquote>
|
|
||||||
)}
|
|
||||||
<form onSubmit={e => this.handleSubscriptionFormSubmit(e)}>
|
|
||||||
<input
|
|
||||||
styleName='subscription-email-input'
|
|
||||||
placeholder='E-mail'
|
|
||||||
type='email'
|
|
||||||
onChange={e => this.handleSubscriptionFormEmailChange(e)}
|
|
||||||
disabled={this.state.subscriptionFormStatus === 'sending'}
|
|
||||||
/>
|
|
||||||
<button
|
|
||||||
styleName='subscription-submit-button'
|
|
||||||
type='submit'
|
|
||||||
disabled={this.state.subscriptionFormStatus === 'sending'}
|
|
||||||
>
|
|
||||||
Subscribe
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div styleName='group-header--sub'>{i18n.__('About')}</div>
|
<div styleName='group-header--sub'>{i18n.__('About')}</div>
|
||||||
|
|
||||||
<div styleName='top'>
|
<div styleName='top'>
|
||||||
|
|||||||
@@ -33,35 +33,6 @@
|
|||||||
.separate-line
|
.separate-line
|
||||||
margin 40px 0
|
margin 40px 0
|
||||||
|
|
||||||
.subscription-email-input
|
|
||||||
height 35px
|
|
||||||
vertical-align middle
|
|
||||||
width 200px
|
|
||||||
font-size $tab--button-font-size
|
|
||||||
border solid 1px $border-color
|
|
||||||
border-radius 2px
|
|
||||||
padding 0 5px
|
|
||||||
margin-right 5px
|
|
||||||
outline none
|
|
||||||
&:disabled
|
|
||||||
background-color $ui-input--disabled-backgroundColor
|
|
||||||
|
|
||||||
.subscription-submit-button
|
|
||||||
margin-top 10px
|
|
||||||
height 35px
|
|
||||||
border-radius 2px
|
|
||||||
border none
|
|
||||||
background-color alpha(#1EC38B, 90%)
|
|
||||||
padding-left 20px
|
|
||||||
padding-right 20px
|
|
||||||
text-decoration none
|
|
||||||
color white
|
|
||||||
font-weight 600
|
|
||||||
font-size 16px
|
|
||||||
&:hover
|
|
||||||
background-color #1EC38B
|
|
||||||
transition 0.2s
|
|
||||||
|
|
||||||
.policy-submit
|
.policy-submit
|
||||||
margin-top 10px
|
margin-top 10px
|
||||||
height 35px
|
height 35px
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "boost",
|
"name": "boost",
|
||||||
"productName": "Boostnote",
|
"productName": "Boostnote",
|
||||||
"version": "0.16.1",
|
"version": "0.16.0",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"description": "Boostnote",
|
"description": "Boostnote",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|||||||
@@ -6138,8 +6138,9 @@ lodash.memoize@^4.1.2:
|
|||||||
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
|
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
|
||||||
|
|
||||||
lodash.merge@^4.6.0:
|
lodash.merge@^4.6.0:
|
||||||
version "4.6.1"
|
version "4.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.1.tgz#adc25d9cb99b9391c59624f379fbba60d7111d54"
|
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
|
||||||
|
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
|
||||||
|
|
||||||
lodash.mergewith@^4.6.0:
|
lodash.mergewith@^4.6.0:
|
||||||
version "4.6.2"
|
version "4.6.2"
|
||||||
|
|||||||
Reference in New Issue
Block a user