Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b7968af

Browse files
feat: add donate footer to updater dialog
1 parent c09b5f7 commit b7968af

File tree

4 files changed

+68
-0
lines changed

4 files changed

+68
-0
lines changed

‎arduino-ide-extension/src/browser/dialogs/ide-updater/ide-updater-dialog.tsx‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,38 @@ export class IDEUpdaterDialog extends ReactDialog<UpdateInfo | undefined> {
165165
goToDownloadPageButton.focus();
166166
}
167167

168+
private appendDonateFooter() {
169+
const footer = document.createElement('div');
170+
footer.classList.add('ide-updater-dialog--footer');
171+
172+
footer.innerText = nls.localize(
173+
'arduino/ide-updater/donateText',
174+
'Open source is love'
175+
);
176+
footer.appendChild(document.createTextNode(',\u00A0'));
177+
178+
const footerLink = document.createElement('a');
179+
footerLink.innerText = nls.localize(
180+
'arduino/ide-updater/donateLinkText',
181+
'donate to support us'
182+
);
183+
footerLink.classList.add('ide-updater-dialog--footer-link');
184+
footerLink.onclick = () =>
185+
this.openExternal('https://www.arduino.cc/en/donate');
186+
187+
const footerLinkIcon = document.createElement('div');
188+
footerLinkIcon.title = nls.localize(
189+
'arduino/ide-updater/donateLinkIconTitle',
190+
'donate to support us'
191+
);
192+
footerLinkIcon.classList.add('ide-updater-dialog--footer-link-icon');
193+
194+
footer.appendChild(footerLink);
195+
footerLink.appendChild(footerLinkIcon);
196+
197+
this.controlPanel.insertAdjacentElement('afterend', footer);
198+
}
199+
168200
private openDownloadPage(): void {
169201
this.openExternal('https://www.arduino.cc/en/software');
170202
this.close();
@@ -187,6 +219,7 @@ export class IDEUpdaterDialog extends ReactDialog<UpdateInfo | undefined> {
187219
downloadStarted: true,
188220
});
189221
this.clearButtons();
222+
this.appendDonateFooter();
190223
this.updater.downloadUpdate();
191224
}
192225

Lines changed: 3 additions & 0 deletions
Loading[フレーム]

‎arduino-ide-extension/src/browser/style/ide-updater-dialog.css‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,34 @@
3434
min-width: 0;
3535
}
3636

37+
.ide-updater-dialog--footer {
38+
display: flex;
39+
justify-content: right;
40+
align-items: center;
41+
margin-top: -16px;
42+
padding: 12px 0 24px 0;
43+
border-top: 1px solid var(--theia-editorWidget-border);
44+
}
45+
46+
.ide-updater-dialog--footer-link {
47+
display: flex;
48+
align-items: center;
49+
color: var(--theia-textLink-foreground);
50+
font-weight: 500;
51+
line-height: 13px;
52+
}
53+
.ide-updater-dialog--footer-link:hover {
54+
color: var(--theia-textLink-foreground);
55+
cursor: pointer;
56+
}
57+
.ide-updater-dialog--footer-link-icon {
58+
-webkit-mask: url(../icons/link-open-icon.svg) center no-repeat;
59+
background-color: var(--theia-textLink-foreground);
60+
height: 24px;
61+
width: 24px;
62+
cursor: pointer;
63+
}
64+
3765
.ide-updater-dialog .changelog {
3866
color: var(--theia-editor-foreground);
3967
background-color: var(--theia-editor-background);
@@ -109,6 +137,7 @@
109137
max-height: 100%;
110138
overflow: hidden;
111139
display: flex;
140+
padding-bottom: 20px !important;
112141
}
113142

114143
#ide-updater-dialog-container .skip-version-button {

‎i18n/en.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,9 @@
275275
"checkForUpdates": "Check for Arduino IDE Updates",
276276
"closeAndInstallButton": "Close and Install",
277277
"closeToInstallNotice": "Close the software and install the update on your machine.",
278+
"donateLinkIconTitle": "donate to support us",
279+
"donateLinkText": "donate to support us",
280+
"donateText": "Open source is love",
278281
"downloadButton": "Download",
279282
"downloadingNotice": "Downloading the latest version of the Arduino IDE.",
280283
"errorCheckingForUpdates": "Error while checking for Arduino IDE updates.\n{0}",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /