Taobin-Recipe-Manager/client-electron
2024-02-20 15:01:43 +07:00
..
electron update filemanager navigation 2024-02-20 15:01:43 +07:00
public update filemanager navigation 2024-02-20 15:01:43 +07:00
src update filemanager navigation 2024-02-20 15:01:43 +07:00
.eslintrc.cjs update filemanager navigation 2024-02-20 15:01:43 +07:00
.gitignore update new config to can dev as web and application desktop at same time 2024-01-14 22:02:03 +07:00
.prettierignore new client electron 2024-01-11 15:40:18 +07:00
.prettierrc working around on table 2024-01-24 16:56:26 +07:00
components.json update layout 2024-01-24 11:41:58 +07:00
electron-builder.json5 update new config to can dev as web and application desktop at same time 2024-01-14 22:02:03 +07:00
index.d.ts test upload file to server 2024-02-05 11:45:54 +07:00
index.html update filemanager navigation 2024-02-20 15:01:43 +07:00
package-lock.json Fixed: fixed bug scrcpy and shell is disconnect when switch page 2024-02-19 14:24:05 +07:00
package.json Fixed: fixed bug scrcpy and shell is disconnect when switch page 2024-02-19 14:24:05 +07:00
postcss.config.js new client electron 2024-01-11 15:40:18 +07:00
README.md test upload file to server 2024-02-05 11:45:54 +07:00
tailwind.config.js update layout 2024-01-24 11:41:58 +07:00
tsconfig.json update layout 2024-01-24 11:41:58 +07:00
tsconfig.node.json update new config to can dev as web and application desktop at same time 2024-01-14 22:02:03 +07:00
vite.config.electron.ts update layout 2024-01-24 11:41:58 +07:00
vite.config.web.ts update layout 2024-01-24 11:41:58 +07:00

Taobin Recipe Manager (Electron)

Development

Install dependencies

npm install

Run develop

npm run dev

Build

Before build, you have to change version in package.json to the new version.

npm run build

note: this will build executable and installer for your current platform

Environment Variables

We have some environment variables to control app behavior. The environment variables in this project have a prefix TAOBIN_RECIPE_MANAGER_. If you want to set environment variables, you have to add this prefix.

note: All the environment variables can access through import.meta.env.{VARIABLE_NAME}.

note: In development, you can create a .env.local file in the root directory of the project to set environment variables.

Environment Mode

In this Client project, we have two environment modes: electron and web. Business logic will be different in these two modes. you wrap the code in if (window.electronRuntime) to run the code in electron mode. You can also use if (!window.electronRuntime) to run the code in web mode.

The reason why we have two environment modes is that in electron we have to use native modules for example deeplink to handle login callback. But in web, we have to use window.location.href to handle login callback.

In Development, the default if to run cmd npm run dev is will run in both electron and web mode. If you want to run in electron or web mode, you can run npm run dev:electron or npm run dev:web.

Environment Variables List

In this section, we will list all the environment variables. That app will use in both environment mode the default value if you don't set the environment variables.

dev: if you add new environment variables, please add it to this section.

TAOBIN_RECIPE_MANAGER_SERVER_URL

  • The url of the server. Default: http://localhost:8080

TAOBIN_RECIPE_MANAGER_TUS_SERVER_URL

  • The url of the tus server for upload/download files. Default: http://localhost:8090/files