Skip to content

Commit a7958df

Browse files
committed
Added sponsor button.
1 parent eac1b8b commit a7958df

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

src/components/MainHeader.jsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@ export function MainHeader(props) {
2020
<div className="main-header__btn-wrap flex flex-v-center">
2121
<button
2222
id="runBtn"
23-
className="hide btn--dark flex flex-v-center hint--rounded hint--bottom-left"
24-
aria-label="Run preview (Ctrl/⌘ + Shift + 5)"
23+
className="btn--dark flex flex-v-center hint--rounded hint--bottom-left"
24+
aria-label="Support ZenUML as an Open source project on Github"
2525
onClick={props.runBtnClickHandler}
2626
>
27-
<svg style="width: 14px; height: 14px;">
28-
<use xlinkHref="#play-icon" />
29-
</svg>Run
27+
<iframe src="https://github.com/sponsors/ZenUml/button" title="Sponsor ZenUml" height="35" width="107" style="border: 0;" />
3028
</button>
3129

3230
<Button
@@ -120,7 +118,7 @@ export function MainHeader(props) {
120118
/>
121119
</Button>
122120
{ featureToggle.isPaymentEnabled ? (
123-
<ProductVersionLabel user={props.user} clickHandler={props.proBtnHandler}/>
121+
<ProductVersionLabel user={props.user} clickHandler={props.proBtnHandler} />
124122
) : null }
125123
</div>
126124
</div>

src/components/app.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -859,8 +859,6 @@ BookService BookRepository Receipt Notification
859859
}
860860

861861
const prefs = this.state.prefs;
862-
// Show/hide RUN button based on autoPreview setting.
863-
runBtn.classList[prefs.autoPreview ? 'add' : 'remove']('hide');
864862

865863
this.contentWrap.applyCodemirrorSettings(this.state.prefs);
866864

@@ -893,6 +891,7 @@ BookService BookRepository Receipt Notification
893891
}
894892

895893
proBtnClickHandler() {
894+
trackEvent('ui', 'proBtnClick');
896895
this.setState({ isProFeatureListModalOpen: true });
897896
}
898897
profileBtnClickHandler() {
@@ -1007,8 +1006,7 @@ BookService BookRepository Receipt Notification
10071006
e.preventDefault();
10081007
}
10091008
runBtnClickHandler() {
1010-
this.contentWrap.setPreviewContent(true, true);
1011-
trackEvent('ui', 'runBtnClick');
1009+
trackEvent('ui', 'sponsorBtnClick');
10121010
}
10131011
exportItems() {
10141012
handleDownloadsPermission().then(() => {

src/components/subscription/ProFeatureListModal.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export function ProFeatureListModal(props) {
66
return (
77
<Modal show={props.show} closeHandler={props.closeHandler} extraClasses={'feature-list'}>
88
<section className={'header'}>
9-
<h1 className={'price'}>$9.99<sup>[1]</sup>/month</h1>
9+
<h1 className={'price'}>$4.99<sup>[1]</sup>/month</h1>
1010
<h2>Pro</h2>
1111
</section>
1212
<section className={'content'}>

0 commit comments

Comments
 (0)