-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
249ee81
commit e809009
Showing
55 changed files
with
16,561 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:import/errors", | ||
"plugin:import/warnings" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"settings": { | ||
"import/resolver": { | ||
"node": { | ||
"extensions": [".js", ".jsx", ".ts", ".tsx"] | ||
}, | ||
"alias": { | ||
"map": [ | ||
["@renderer", "./src/renderer"], | ||
["@components", "./src/renderer/components"], | ||
["@common", "./src/common"], | ||
["@main", "./src/main"], | ||
["@src", "./src"], | ||
["@misc", "./misc"], | ||
["@assets", "./assets"] | ||
], | ||
"extensions": [".js", ".jsx", ".ts", ".tsx"] | ||
} | ||
}, | ||
"react": { | ||
"version": "latest" | ||
} | ||
}, | ||
"rules": { | ||
"react/prop-types": "off", | ||
"@typescript-eslint/no-var-requires": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.scss linguist-detectable=false | ||
*.sass linguist-detectable=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
.DS_Store | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# next.js build output | ||
.next | ||
|
||
# nuxt.js build output | ||
.nuxt | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# Webpack | ||
.webpack/ | ||
|
||
# Electron-Forge | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"jsxSingleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Codesbiome | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,182 @@ | ||
# Salvus | ||
A save manager desktop app for the game Exanima. | ||
# Electron React Webpack Typescript (Custom Titlebar) | ||
|
||
A minimal secure boilerplate for writing Desktop Applications using [Electron](https://www.electronjs.org/), [React](https://reactjs.org/), [Webpack](https://webpack.js.org/) & [TypeScript](https://www.typescriptlang.org/) with Custom Titlebar. | ||
|
||
|
||
<br> | ||
<img src="assets/images/animation.gif" /> | ||
|
||
Special thanks to [@guasam](https://github.com/guasam) for Custom Window Titlebar and Menus modules. | ||
|
||
<br> | ||
|
||
### <img src="https://github.com/guasam/electrovite-react/raw/main/assets/electrovite-round.png" width="32" align="top" /> Want to use ViteJS instead of Webpack? | ||
|
||
Introducing the [ElectroVite](https://github.com/guasam/electrovite-react) project with a brief description below. | ||
|
||
> A prebuilt project for creating desktop apps using Electron, React, ViteJS with blazing fast hot-reload, easy to use custom import aliases & executable builds for distribution. | ||
|
||
|
||
|
||
<br> | ||
|
||
|
||
# Custom Electron Window Titlebar & Menus etc. | ||
|
||
This project includes [electron-window](https://github.com/guasam/electron-window) for creating custom window components. | ||
|
||
**Following are the list of features it provides :** | ||
|
||
- Custom Titlebar for Electron Window. | ||
- Easily changable platform specific controls for max/min/close buttons using `windows` or `mac` value for `platform` property with `<WindowFrame>` in renderer. | ||
- Titlebar menus can show/hide by pressing `alt` or `option` key. | ||
- Window frame `title` prop displays in titlebar center when menus are toggeled off. | ||
- Menu entries can be customized in `misc/window/titlebarMenus.ts` file. | ||
- Menu items and windows controls layout or colors can be customized easily by modifying the `misc/window` modules. | ||
|
||
<br><br> | ||
|
||
# Core Features | ||
|
||
- 🌟 Electron | ||
- 🌀 TypeScript | ||
- ⚛️ React | ||
- 🥗 SASS/SCSS Loader | ||
- 🛶 LESS Loader (optional) | ||
- 🎨 CSS Loader | ||
- 📸 Image Loader | ||
- 🆎 Font Loader | ||
- 🧹 ESLint | ||
- 📦 Electron Forge | ||
- 📐 Custom Window Frame | ||
- 📐 Custom Window Titlebar | ||
- 📐 Custom Window Menubar | ||
- 🔱 Webpack & Configuration | ||
- 🧩 Aliases for Project Paths | ||
- 🔥 React Fast Refresh + Webpack HMR | ||
- 🌞 Dark Mode + Light Mode (Theme) | ||
- 🎁 Package Bundling (Distribution / Release) | ||
|
||
<br> | ||
|
||
## Custom Aliases for Paths | ||
|
||
We can use predefined aliases for `import` paths already used in this project. Following are the details: | ||
|
||
| Alias | Target Path | | ||
| ------------- | -------------------------- | | ||
| `@assets` | `/assets` | | ||
| `@main` | `/src/main` | | ||
| `@renderer` | `/src/renderer` | | ||
| `@common` | `/src/common` | | ||
| `@misc` | `/misc` | | ||
| `@src` | `/src` | | ||
| `@components` | `/src/renderer/components` | | ||
|
||
<br><br> | ||
|
||
# Installation | ||
|
||
![status](https://img.shields.io/badge/ERWT-Main%20Version-blue.svg) | ||
|
||
Main version of this project contains files structure in separate context for `main` and `renderer`, with custom electron window, titlebar etc. | ||
|
||
```bash | ||
git clone https://github.com/codesbiome/electron-react-webpack-typescript-2023 | ||
``` | ||
|
||
<br> | ||
<div align="center"> | ||
<b>OR</b> | ||
</div> | ||
<br> | ||
|
||
![status](https://img.shields.io/badge/ERWT-Minimal%20Version-0a922a.svg) | ||
|
||
Minimal version of ERWT contains very simple project files structure, no custom window, no custom titlebar & menus. | ||
|
||
```bash | ||
git clone -b minimal https://github.com/codesbiome/electron-react-webpack-typescript-2023 | ||
``` | ||
|
||
<br> | ||
|
||
Install dependencies using [pnpm](https://pnpm.io/) or [yarn](https://www.npmjs.com/package/yarn) or [npm](https://www.npmjs.com/) : | ||
|
||
```bash | ||
# using pnpm | ||
pnpm install | ||
|
||
# or using yarn | ||
yarn install | ||
|
||
# or using npm | ||
npm install | ||
``` | ||
|
||
<br /> | ||
|
||
## Start : Development | ||
|
||
To develop and run your application, you need to run following command. | ||
<br /> | ||
Start electron application for development : | ||
|
||
```bash | ||
yarn start | ||
``` | ||
|
||
<br /> | ||
|
||
## Lint : Development | ||
|
||
To lint application source code using ESLint via this command : | ||
|
||
```bash | ||
yarn lint | ||
``` | ||
|
||
<br /> | ||
|
||
## Package : Production | ||
|
||
Customize and package your Electron app with OS-specific bundles (.app, .exe etc) | ||
|
||
```bash | ||
yarn package | ||
``` | ||
|
||
<br /> | ||
|
||
## Make : Production | ||
|
||
Making is a way of taking your packaged application and making platform specific distributables like DMG, EXE, or Flatpak files (amongst others). | ||
|
||
```bash | ||
yarn make | ||
``` | ||
|
||
<br /> | ||
|
||
## Publish : Production | ||
|
||
Publishing is a way of taking the artifacts generated by the `make` command and sending them to a service somewhere for you to distribute or use as updates. (This could be your update server or an S3 bucket) | ||
|
||
```bash | ||
yarn publish | ||
``` | ||
|
||
<br /> | ||
|
||
## Packager & Makers Configuration | ||
|
||
This provides an easy way of configuring your packaged application and making platform specific distributables like DMG, EXE, or Flatpak files. | ||
|
||
This configurations file is available in : | ||
|
||
```bash | ||
tools/forge/forge.config.js | ||
``` | ||
|
||
For further information, you can visit [Electron Forge Configuration](https://www.electronforge.io/configuration) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## TODO | ||
|
||
Functionality: | ||
|
||
- [x] See current saves | ||
- [x] Sort saves by date modified | ||
- [x] See current backup status | ||
- [x] Backup individual saves | ||
- [x] Backup all saves | ||
- [x] Restore individual saves | ||
- [x] Restore all saves | ||
- [x] Launch Steam Game | ||
- [x] Open Saves Folder | ||
- [x] Open Backups Folder | ||
- [x] Calculate and store checksums of save game files to ensure data integrity across copies | ||
- [x] Update checks to cross check saves and backups, add new state | ||
- [x] Delete individual backups | ||
- [x] Delete all backups | ||
- [x] Disable warnings for outdated backups | ||
- [x] Auto-refresh saves list | ||
|
||
Bugs: | ||
|
||
- [ ] If you currently have a backup for 00X, which gets deleted due to player death, then if you create a new campaign Salvus will think your 00X is outdated | ||
- Option 1: Restore outdated backup which replaces the new Campaign save you created | ||
- Option 2: Backup the new Campaign save and forget about the old backup | ||
- Option 3: Don't create a new campaign without first choosing to restore or delete the backup for 00X in Salvus | ||
|
||
``` | ||
// Color Palette | ||
#311608, #532F12, #DE9750, #D7D2BB, #7C4115 | ||
``` |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Copyright (c) 2021-2022 Guasam | ||
|
||
This software is provided "as-is", without any express or implied warranty. In no event | ||
will the authors be held liable for any damages arising from the use of this software. | ||
|
||
Permission is granted to anyone to use this software for any purpose, including commercial | ||
applications, and to alter it and redistribute it freely, subject to the following restrictions: | ||
|
||
1. The origin of this software must not be misrepresented; you must not claim that you | ||
wrote the original software. If you use this software in a product, an acknowledgment | ||
in the product documentation would be appreciated but is not required. | ||
|
||
2. Altered source versions must be plainly marked as such, and must not be misrepresented | ||
as being the original software. | ||
|
||
3. This notice may not be removed or altered from any source distribution. |
Oops, something went wrong.