mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-27 08:40:10 +02:00
remove d-clicks
This commit is contained in:
@@ -207,6 +207,7 @@ export default class Footer extends Component {
|
|||||||
</a>
|
</a>
|
||||||
<A
|
<A
|
||||||
onClick={this.props.supportDeveloperBtnClickHandler}
|
onClick={this.props.supportDeveloperBtnClickHandler}
|
||||||
|
data-event-category="ui"
|
||||||
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"
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
import { h } from 'preact';
|
import { h } from 'preact';
|
||||||
import Modal from './Modal.jsx';
|
import Modal from './Modal';
|
||||||
|
import { Button } from './common';
|
||||||
|
|
||||||
export function HelpModal(props) {
|
export function HelpModal(props) {
|
||||||
return (
|
return (
|
||||||
@@ -47,16 +48,17 @@ export function HelpModal(props) {
|
|||||||
</a>.
|
</a>.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<button
|
<Button
|
||||||
aria-label="Support the developer"
|
aria-label="Support the developer"
|
||||||
d-click="openSupportDeveloperModal"
|
onClick={props.onSupportBtnClick}
|
||||||
data-event-action="supportDeveloperHelpBtnClick"
|
data-event-action="supportDeveloperHelpBtnClick"
|
||||||
|
data-event-category="ui"
|
||||||
class="btn btn-icon"
|
class="btn btn-icon"
|
||||||
>
|
>
|
||||||
<svg>
|
<svg>
|
||||||
<use xlinkHref="#gift-icon" />
|
<use xlinkHref="#gift-icon" />
|
||||||
</svg>Support the developer
|
</svg>Support the developer
|
||||||
</button>{' '}
|
</Button>{' '}
|
||||||
<a
|
<a
|
||||||
aria-label="Rate Web Maker"
|
aria-label="Rate Web Maker"
|
||||||
href="https://chrome.google.com/webstore/detail/web-maker/lkfkkhfhhdkiemehlpkgjeojomhpccnh/reviews"
|
href="https://chrome.google.com/webstore/detail/web-maker/lkfkkhfhhdkiemehlpkgjeojomhpccnh/reviews"
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
import { h } from 'preact';
|
import { h } from 'preact';
|
||||||
|
import { A } from './common';
|
||||||
|
|
||||||
export function Notifications() {
|
export function Notifications(props) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h1>Whats new?</h1>
|
<h1>Whats new?</h1>
|
||||||
@@ -74,14 +75,15 @@ export function Notifications() {
|
|||||||
>
|
>
|
||||||
Share it
|
Share it
|
||||||
</a>
|
</a>
|
||||||
<a
|
<A
|
||||||
aria-label="Support the developer"
|
aria-label="Support the developer"
|
||||||
d-click="openSupportDeveloperModal"
|
onClick={props.onSupportBtnClick}
|
||||||
data-event-action="supportDeveloperChangelogBtnClick"
|
data-event-action="supportDeveloperChangelogBtnClick"
|
||||||
|
data-event-category="ui"
|
||||||
class="btn btn-icon"
|
class="btn btn-icon"
|
||||||
>
|
>
|
||||||
Support the developer
|
Support the developer
|
||||||
</a>
|
</A>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -219,6 +219,7 @@ export default class App extends Component {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
updateProfileUi() {
|
updateProfileUi() {
|
||||||
if (this.state.user) {
|
if (this.state.user) {
|
||||||
document.body.classList.add('is-logged-in');
|
document.body.classList.add('is-logged-in');
|
||||||
@@ -459,7 +460,7 @@ export default class App extends Component {
|
|||||||
});
|
});
|
||||||
trackEvent('ui', 'showKeyboardShortcutsShortcut');
|
trackEvent('ui', 'showKeyboardShortcutsShortcut');
|
||||||
} else if (event.keyCode === 27) {
|
} else if (event.keyCode === 27) {
|
||||||
this.closeAllOverlays();
|
this.closeSavedItemsPane();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -468,6 +469,19 @@ export default class App extends Component {
|
|||||||
if (this.state.isSavedItemPaneOpen) {
|
if (this.state.isSavedItemPaneOpen) {
|
||||||
this.closeSavedItemsPane();
|
this.closeSavedItemsPane();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.setState({
|
||||||
|
isAddLibraryModalOpen: false,
|
||||||
|
isSettingsModalOpen: false,
|
||||||
|
isHelpModalOpen: false,
|
||||||
|
isNotificationsModalOpen: false,
|
||||||
|
isLoginModalOpen: false,
|
||||||
|
isProfileModalOpen: false,
|
||||||
|
isSupportDeveloperModalOpen: false,
|
||||||
|
isKeyboardShortcutsModalOpen: false,
|
||||||
|
isAskToImportModalOpen: false,
|
||||||
|
isOnboardModalOpen: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
onExternalLibChange(newValues) {
|
onExternalLibChange(newValues) {
|
||||||
log('onExternalLibChange');
|
log('onExternalLibChange');
|
||||||
@@ -899,14 +913,11 @@ export default class App extends Component {
|
|||||||
});
|
});
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
openSupportDeveloperModal(e) {
|
openSupportDeveloperModal() {
|
||||||
// this.closeAllModals();
|
this.closeAllOverlays();
|
||||||
this.setState({
|
this.setState({
|
||||||
isSupportDeveloperModalOpen: true
|
isSupportDeveloperModalOpen: true
|
||||||
});
|
});
|
||||||
if (e) {
|
|
||||||
trackEvent('ui', e.target.dataset.eventAction);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
supportDeveloperBtnClickHandler(e) {
|
supportDeveloperBtnClickHandler(e) {
|
||||||
this.openSupportDeveloperModal(e);
|
this.openSupportDeveloperModal(e);
|
||||||
@@ -1048,7 +1059,9 @@ export default class App extends Component {
|
|||||||
this.setState({ isNotificationsModalOpen: false })
|
this.setState({ isNotificationsModalOpen: false })
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Notifications />
|
<Notifications
|
||||||
|
onSupportBtnClick={this.openSupportDeveloperModal.bind(this)}
|
||||||
|
/>
|
||||||
</Modal>
|
</Modal>
|
||||||
<Modal
|
<Modal
|
||||||
extraClasses="modal--settings"
|
extraClasses="modal--settings"
|
||||||
@@ -1079,6 +1092,7 @@ export default class App extends Component {
|
|||||||
<HelpModal
|
<HelpModal
|
||||||
show={this.state.isHelpModalOpen}
|
show={this.state.isHelpModalOpen}
|
||||||
closeHandler={() => this.setState({ isHelpModalOpen: false })}
|
closeHandler={() => this.setState({ isHelpModalOpen: false })}
|
||||||
|
onSupportBtnClick={this.openSupportDeveloperModal.bind(this)}
|
||||||
/>
|
/>
|
||||||
<SupportDeveloperModal
|
<SupportDeveloperModal
|
||||||
show={this.state.isSupportDeveloperModalOpen}
|
show={this.state.isSupportDeveloperModalOpen}
|
||||||
|
@@ -8,7 +8,7 @@ class Clickable extends Component {
|
|||||||
el.getAttribute('data-event-category'),
|
el.getAttribute('data-event-category'),
|
||||||
el.getAttribute('data-event-action')
|
el.getAttribute('data-event-action')
|
||||||
);
|
);
|
||||||
this.props.onClick();
|
this.props.onClick(e);
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
const { onClick, Tag, ...props } = this.props;
|
const { onClick, Tag, ...props } = this.props;
|
||||||
|
Reference in New Issue
Block a user