Skip to content

Commit 2fa0613

Browse files
committed
增加赞助链接
1 parent 40493d6 commit 2fa0613

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/StringTable.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,11 @@ export const view_str$prompt$feedback = [
640640

641641
//---------------Select string------------------
642642

643+
export const sponsor_author_text = [
644+
`赞助作者`,
645+
`Sponsor The Author`
646+
][langIndex];
647+
643648
export const rating_text = [
644649
'打分',
645650
'Rating'

src/extension.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import { ResInstaller } from './ResInstaller';
4040
import {
4141
ERROR, WARNING, INFORMATION,
4242
view_str$operation$serialport, view_str$operation$baudrate, view_str$operation$serialport_name,
43-
txt_install_now, txt_yes, view_str$prompt$feedback, rating_text, later_text
43+
txt_install_now, txt_yes, view_str$prompt$feedback, rating_text, later_text, sponsor_author_text
4444
} from './StringTable';
4545
import { LogDumper } from './LogDumper';
4646
import { StatusBarManager } from './StatusBarManager';
@@ -324,10 +324,14 @@ function postLaunchHook(extensionCtx: vscode.ExtensionContext) {
324324
Date.now() - appUsrData['InstallTime'] > some_days) {
325325
resManager.setAppUsrData('Feedbacked', true);
326326
const msg = view_str$prompt$feedback;
327-
vscode.window.showInformationMessage(msg, rating_text).then((ans) => {
327+
vscode.window.showInformationMessage(msg, rating_text, sponsor_author_text).then((ans) => {
328328
if (ans == rating_text) {
329329
utility.openUrl(`https://marketplace.visualstudio.com/items?itemName=CL.eide&ssr=false#review-details`);
330330
}
331+
if (ans == sponsor_author_text) {
332+
// https://em-ide.com/sponsor
333+
utility.openUrl(`https://em-ide.com/sponsor`);
334+
}
331335
});
332336
}
333337
}

0 commit comments

Comments
 (0)