Skip to content

Commit

Permalink
Add Entry-Python eBook to Help menu
Browse files Browse the repository at this point in the history
  • Loading branch information
JeongJun-Lee committed Mar 4, 2024
1 parent bf4092e commit 30956e3
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build/entryx64.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
!define MUI_UNICON "icon.ico"
!define PRODUCT_NAME "Entry"
!define APP_NAME "Entry.exe"
!define PRODUCT_VERSION "2.0.48"
!define PRODUCT_VERSION "2.0.49"
!define PRODUCT_PUBLISHER "EntryLabs"
!define PRODUCT_WEB_SITE "http://www.playentry.org/"

Expand Down
2 changes: 1 addition & 1 deletion build/entryx86.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
!define MUI_UNICON "icon.ico"
!define PRODUCT_NAME "Entry"
!define APP_NAME "Entry.exe"
!define PRODUCT_VERSION "2.0.48"
!define PRODUCT_VERSION "2.0.49"
!define PRODUCT_PUBLISHER "EntryLabs"
!define PRODUCT_WEB_SITE "http://www.playentry.org/"

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"productName": "Entry",
"name": "entry",
"version": "2.0.48",
"version": "2.0.49",
"description": "Entry for offline",
"main": "src/main_build/main.bundle.js",
"scripts": {
Expand Down
Binary file modified src/main/static/guide/Entry-Arduino.pdf
Binary file not shown.
Binary file added src/main/static/guide/Entry-Python.pdf
Binary file not shown.
Binary file modified src/main/static/guide/Entry_dasturlash_1-qadam.pdf
Binary file not shown.
10 changes: 7 additions & 3 deletions src/renderer/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ class Header extends Component<IProps, IState> {
return [
[RendererUtils.getLang('Workspace.block_helper'), 'help_block'],
[RendererUtils.getLang('Workspace.entry_basic_book'), 'help_basic_book'],
[RendererUtils.getLang('Workspace.entry_advance_book'), 'help_advance_book'],
[RendererUtils.getLang('Workspace.entry_intermediate_book'), 'help_intermedite_book'],
[RendererUtils.getLang('Workspace.entry_arduino_book'), 'help_arduino_book'],
[RendererUtils.getLang('Workspace.entry_python_book'), 'help_python_book'],
[RendererUtils.getLang('Workspace.entry_forum'), 'help_entry_forum'],
];
} else if (lang === 'ko') {
Expand Down Expand Up @@ -236,12 +237,15 @@ class Header extends Component<IProps, IState> {
case 'help_basic_book':
RendererUtils.downloadEntryBasic();
break;
case 'help_advance_book':
RendererUtils.downloadEntryAdvance();
case 'help_intermedite_book':
RendererUtils.downloadEntryIntermediate();
break;
case 'help_arduino_book':
RendererUtils.downloadEntryArduino();
break;
case 'help_python_book':
RendererUtils.downloadEntryPython();
break;
case 'help_arduino_web':
RendererUtils.openEntryArduBook();
break;
Expand Down
16 changes: 15 additions & 1 deletion src/renderer/helper/rendererUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default class {
});
}

static downloadEntryAdvance() {
static downloadEntryIntermediate() {
this.showSaveDialog({
defaultPath: "Entry_dasturlash_2-qadam.pdf",
filters: [{ name: '*.pdf', extensions: ['pdf'] }],
Expand Down Expand Up @@ -195,6 +195,20 @@ export default class {
});
}

static downloadEntryPython() {
this.showSaveDialog({
defaultPath: "Entry-Python.pdf",
filters: [{ name: '*.pdf', extensions: ['pdf'] }],
}, (filePath) => {
if (filePath) {
IpcRendererHelper.staticDownload(
['guide', "Entry-Python.pdf"],
filePath,
);
}
});
}

static openEntryArduBook() {
IpcRendererHelper.openEntryArduBookWebPage();
}
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/resources/lang/uz.json
Original file line number Diff line number Diff line change
Expand Up @@ -6755,8 +6755,9 @@
"robot_guide": "Robot Guide",
"python_guide": "Entry-Python qo'llanmasi",
"entry_basic_book": "Entry boshlang'ich kitobi",
"entry_advance_book": "Entry o'rtancha kitobi",
"entry_intermediate_book": "Entry o'rtancha kitobi",
"entry_arduino_book": "Entry-Arduino kitobi",
"entry_python_book": "Entry-Python kitobi",
"entry_forum": "Forumga murojaat qilish",
"show_list_workspace": "Ro'yxati ko'rsatish",
"list_create_normal": "Umumiy ro'yxati sifatidan foydalanish\n(Loyihada saqlanadi)",
Expand Down

0 comments on commit 30956e3

Please sign in to comment.