mirror of
https://github.com/chinchang/web-maker.git
synced 2025-08-03 20:07:35 +02:00
add support developer modal
This commit is contained in:
@@ -197,7 +197,7 @@ export default class Footer extends Component {
|
|||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
d-click="openSupportDeveloperModal"
|
onClick={this.props.supportDeveloperBtnClickHandler}
|
||||||
data-event-action="supportDeveloperFooterBtnClick"
|
data-event-action="supportDeveloperFooterBtnClick"
|
||||||
class="footer__link ml-1 hint--rounded hint--top-right hide-on-mobile"
|
class="footer__link ml-1 hint--rounded hint--top-right hide-on-mobile"
|
||||||
aria-label="Support the developer by pledging some amount"
|
aria-label="Support the developer by pledging some amount"
|
||||||
|
54
webmaker/src/components/SupportDeveloperModal.jsx
Normal file
54
webmaker/src/components/SupportDeveloperModal.jsx
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
import { h, Component } from 'preact';
|
||||||
|
import Modal from './Modal';
|
||||||
|
|
||||||
|
export default class SupportDeveloperModal extends Component {
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<Modal show={this.props.isOpen} closeHandler={this.props.closeHandler}>
|
||||||
|
<div class="tac">
|
||||||
|
<h1>Support the Developer</h1>
|
||||||
|
<p>
|
||||||
|
Hi,{' '}
|
||||||
|
<a href="https://kushagragour.in" target="_blank">
|
||||||
|
Kushagra
|
||||||
|
</a>{' '}
|
||||||
|
here! Web Maker is a free and open-source project. To keep myself
|
||||||
|
motivated for working on such open-source and free{' '}
|
||||||
|
<a href="https://kushagragour.in/lab/" target="_blank">
|
||||||
|
side projects
|
||||||
|
</a>, I am accepting donations. Your pledge, no matter how small,
|
||||||
|
will act as an appreciation towards my work and keep me going
|
||||||
|
forward making Web Maker more awesome🔥. So please consider
|
||||||
|
donating. 🙏🏼 (could be as small as $1/month).
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="flex flex-h-center"
|
||||||
|
id="onboardDontShowInTabOptionBtn"
|
||||||
|
d-click="onDontShowInTabClicked"
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
class="onboard-selection"
|
||||||
|
href="https://patreon.com/kushagra"
|
||||||
|
target="_blank"
|
||||||
|
aria-label="Make a monthly pledge on Patreon"
|
||||||
|
>
|
||||||
|
<img src="patreon.png" height="60" alt="Become a patron image" />
|
||||||
|
<h3 class="onboard-selection-text">
|
||||||
|
Make a monthly pledge on Patreon
|
||||||
|
</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://www.paypal.me/kushagragour"
|
||||||
|
target="_blank"
|
||||||
|
aria-label="Make a one time donation on Paypal"
|
||||||
|
>
|
||||||
|
Or, make a one time donation
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@@ -22,6 +22,7 @@ import firebase from 'firebase/app';
|
|||||||
import 'firebase/auth';
|
import 'firebase/auth';
|
||||||
import Profile from './Profile';
|
import Profile from './Profile';
|
||||||
import { auth } from '../auth';
|
import { auth } from '../auth';
|
||||||
|
import SupportDeveloperModal from './SupportDeveloperModal';
|
||||||
|
|
||||||
if (module.hot) {
|
if (module.hot) {
|
||||||
require('preact/debug');
|
require('preact/debug');
|
||||||
@@ -46,6 +47,7 @@ export default class App extends Component {
|
|||||||
isNotificationsModalOpen: false,
|
isNotificationsModalOpen: false,
|
||||||
isLoginModalOpen: false,
|
isLoginModalOpen: false,
|
||||||
isProfileModalOpen: false,
|
isProfileModalOpen: false,
|
||||||
|
isSupportDeveloperModalOpen: false,
|
||||||
prefs: {},
|
prefs: {},
|
||||||
currentItem: {
|
currentItem: {
|
||||||
title: '',
|
title: '',
|
||||||
@@ -117,7 +119,6 @@ export default class App extends Component {
|
|||||||
this.updateProfileUi();
|
this.updateProfileUi();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
var lastCode;
|
var lastCode;
|
||||||
window.onunload = () => {
|
window.onunload = () => {
|
||||||
@@ -744,7 +745,7 @@ export default class App extends Component {
|
|||||||
detachedPreviewBtnHandler() {
|
detachedPreviewBtnHandler() {
|
||||||
trackEvent('ui', 'detachPreviewBtnClick');
|
trackEvent('ui', 'detachPreviewBtnClick');
|
||||||
|
|
||||||
this.contentWrap.detachPreview()
|
this.contentWrap.detachPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@@ -784,6 +785,11 @@ export default class App extends Component {
|
|||||||
notificationsBtnClickHandler={() =>
|
notificationsBtnClickHandler={() =>
|
||||||
this.setState({ isNotificationsModalOpen: true })
|
this.setState({ isNotificationsModalOpen: true })
|
||||||
}
|
}
|
||||||
|
supportDeveloperBtnClickHandler={() =>
|
||||||
|
this.setState({
|
||||||
|
isSupportDeveloperModalOpen: true
|
||||||
|
})
|
||||||
|
}
|
||||||
detachedPreviewBtnHandler={this.detachedPreviewBtnHandler.bind(
|
detachedPreviewBtnHandler={this.detachedPreviewBtnHandler.bind(
|
||||||
this
|
this
|
||||||
)}
|
)}
|
||||||
@@ -867,6 +873,12 @@ export default class App extends Component {
|
|||||||
show={this.state.isHelpModalOpen}
|
show={this.state.isHelpModalOpen}
|
||||||
closeHandler={() => this.setState({ isHelpModalOpen: false })}
|
closeHandler={() => this.setState({ isHelpModalOpen: false })}
|
||||||
/>
|
/>
|
||||||
|
<SupportDeveloperModal
|
||||||
|
isOpen={this.state.isSupportDeveloperModalOpen}
|
||||||
|
closeHandler={() =>
|
||||||
|
this.setState({ isSupportDeveloperModalOpen: false })
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
<div class="modal-overlay" />
|
<div class="modal-overlay" />
|
||||||
|
|
||||||
|
BIN
webmaker/src/patreon.png
Normal file
BIN
webmaker/src/patreon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.4 KiB |
Reference in New Issue
Block a user