-
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
0 parents
commit cb62653
Showing
132 changed files
with
5,028 additions
and
0 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,36 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
dist-electron | ||
release | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
#lockfile | ||
package-lock.json | ||
pnpm-lock.yaml | ||
yarn.lock | ||
/test-results/ | ||
/playwright-report/ | ||
/playwright/.cache/ | ||
|
||
#.env file | ||
.env |
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,3 @@ | ||
# see https://github.com/electron-userland/electron-builder/issues/6289#issuecomment-1042620422 | ||
node-linker=hoisted | ||
public-hoist-pattern=* |
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,12 @@ | ||
{ | ||
"printWidth": 120, | ||
"tabWidth": 2, | ||
"useTabs": true, | ||
"semi": true, | ||
"singleQuote": true, | ||
"quoteProps": "as-needed", | ||
"trailingComma": "all", | ||
"bracketSpacing": true, | ||
"bracketSameLine": false, | ||
"arrowParens": "always" | ||
} |
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) 2023 草鞋没号 | ||
|
||
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 |
---|---|---|
@@ -0,0 +1,135 @@ | ||
<a href="https://github.com/VGontier-cmd/"> | ||
<img src="https://github.com/VGontier-cmd/summoner-configs/tree/main/public/logo_zoomed.png" alt="Summoner's Config logo" title="Summoner's Config" align="right" height="60" /> | ||
</a> | ||
|
||
# **Summoners Config** | ||
⭐ Star us on GitHub if you find the app useful. | ||
|
||
![Version](https://img.shields.io/github/package-json/v/VGontier-cmd/summoners-config) | ||
|
||
![Downloads](https://img.shields.io/github/downloads/VGontier-cmd/summoners-config/total | ||
) | ||
## **Description** | ||
This is an Electron application that provides the League of Legends player the ability to manage the configs of different League accounts and switch between them easily. It is built using an Electron, Vite, React, and Sass boilerplate, all in Typescript. | ||
|
||
## **Features** | ||
- Manage your different accounts configs | ||
- Import and export them easily | ||
|
||
|
||
## **How to use** | ||
1️⃣ - Launch the League of Legends Client and the Summoner's Configs Application | ||
|
||
2️⃣ - Import the configs of your accounts by clicking on the import button of our app and choosing a profile name | ||
|
||
3️⃣ - Repeat the import for each of your League accounts | ||
|
||
4️⃣ - Now that you have all your configs profiles, you can switch between them easily by exporting them. | ||
|
||
**Caution**: each time you're importing a profile into the League Client, you'll need to start a game to take them into account (it can be a custom game or anything else). | ||
|
||
|
||
## **Preview** | ||
|
||
![Img1](https://github.com/VGontier-cmd/summoner-configs/tree/main/readme/home.png) | ||
![Img2](https://github.com/VGontier-cmd/summoner-configs/tree/main/readme/profile%20actions.png) | ||
## **Releases** | ||
|
||
🖥️ Windows: | ||
- [Download Now !](https://github.com/VGontier-cmd/summoner-configs/releases/latest) | ||
|
||
|
||
|
||
## **Installation for contributors** | ||
To run this application locally, follow these steps: | ||
|
||
Clone the repository: | ||
|
||
``` | ||
git clone https://github.com/VGontier-cmd/summoner-configs.git | ||
``` | ||
|
||
Navigate to the project directory: | ||
``` | ||
cd summoner-configs | ||
``` | ||
|
||
Install the dependencies: | ||
|
||
``` | ||
pnpm install | ||
``` | ||
|
||
## **Usage** | ||
After installing the dependencies, you can start the application using the following command: | ||
|
||
``` | ||
pnpm run dev | ||
``` | ||
|
||
## **Contributing** | ||
We welcome contributions from the community. To contribute to this project, please follow these steps: | ||
|
||
|
||
### Fork the repository | ||
Go to the GitHub repository you want to contribute to and click on the "Fork" button at the top right corner of the page. This will create a copy of the repository under your GitHub account. | ||
|
||
### Clone the repository | ||
On your forked repository, click the "Code" button and copy the URL. Open your terminal and run the following command | ||
|
||
``` | ||
git clone summonner-configs | ||
``` | ||
|
||
### Create a new branch | ||
|
||
Create a new branch for your contribution using the following command: | ||
``` | ||
git checkout -b your-branch | ||
``` | ||
Replace ```your-branch``` with a descriptive name. | ||
|
||
|
||
### Commit your changes and push your changes | ||
|
||
``` | ||
git add . | ||
git commit -m "..." | ||
git push origin my-branch | ||
``` | ||
|
||
### Create a pull request | ||
Go to your forked repository on GitHub and you should see a message suggesting to create a pull request. Click on the ```"Compare & pull request"``` button, review your changes, and click ```"Create pull request"```. Provide a descriptive title and explanation of your changes in the pull request description. | ||
|
||
Collaborate and iterate: The repository owner will review your pull request and may provide feedback or request changes. Engage in the discussion, make the necessary adjustments, and push new commits to your branch. The pull request will update automatically. | ||
|
||
Merge the pull request: Once your pull request has been approved, the repository owner will merge your changes into the main repository. Congratulations, you've successfully contributed to the project! | ||
|
||
### Tips | ||
Remember to regularly sync your forked repository with the original repository to stay up to date with the latest changes. You can do this by adding the original repository as a remote and pulling from it. | ||
|
||
## **Packaging and Distribution** | ||
To package and distribute the Electron app for different operating systems, you can use the following commands: | ||
|
||
Build and package the app | ||
``` | ||
pnpm run build | ||
``` | ||
``` | ||
pnpm run package | ||
``` | ||
|
||
The packaging is only supporting **Windows**. | ||
|
||
## **License** | ||
This project is licensed under the MIT License. | ||
|
||
Authors: | ||
- [VGontier-cmd](https://github.com/VGontier-cmd) | ||
- [TCarel-dev](https://github.com/TCarel-dev) | ||
|
||
|
||
## **Feedback and Support** | ||
If you have any questions, or suggestions, or encounter any issues, please open an issue on GitHub or contact us directly. | ||
|
||
Thank you for using our application! We hope you find it useful. |
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,83 @@ | ||
# vite-react-electron | ||
|
||
[![awesome-vite](https://awesome.re/mentioned-badge.svg)](https://github.com/vitejs/awesome-vite) | ||
![GitHub stars](https://img.shields.io/github/stars/caoxiemeihao/vite-react-electron?color=fa6470) | ||
![GitHub issues](https://img.shields.io/github/issues/caoxiemeihao/vite-react-electron?color=d8b22d) | ||
![GitHub license](https://img.shields.io/github/license/caoxiemeihao/vite-react-electron) | ||
[![Required Node.JS >= 14.18.0 || >=16.0.0](https://img.shields.io/static/v1?label=node&message=14.18.0%20||%20%3E=16.0.0&logo=node.js&color=3f893e)](https://nodejs.org/about/releases) | ||
|
||
[English](README.md) | 简体中文 | ||
|
||
## 概述 | ||
|
||
📦 开箱即用 | ||
🎯 基于官方的 [template-react-ts](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts), 低侵入性 | ||
🌱 结构清晰,可塑性强 | ||
💪 支持在渲染进程中使用 Electron、Node.js API | ||
🔩 支持 C/C++ 模块 | ||
🖥 很容易实现多窗口 | ||
|
||
## 快速开始 | ||
|
||
```sh | ||
npm create electron-vite | ||
``` | ||
|
||
![electron-vite-react.gif](/electron-vite-react.gif) | ||
|
||
## 调试 | ||
|
||
![electron-vite-react-debug.gif](/electron-vite-react-debug.gif) | ||
|
||
## 目录 | ||
|
||
*🚨 默认情况下, `electron` 文件夹下的文件将会被构建到 `dist-electron`* | ||
|
||
```tree | ||
├── electron Electron 源码文件夹 | ||
│ ├── main Main-process 源码 | ||
│ └── preload Preload-scripts 源码 | ||
│ | ||
├── release 构建后生成程序目录 | ||
│ └── {version} | ||
│ ├── {os}-{os_arch} 未打包的程序(绿色运行版) | ||
│ └── {app_name}_{version}.{ext} 应用安装文件 | ||
│ | ||
├── public 同 Vite 模板的 public | ||
└── src 渲染进程源码、React代码 | ||
``` | ||
|
||
<!-- | ||
## 🚨 这需要留神 | ||
默认情况下,该模板在渲染进程中集成了 Node.js,如果你不需要它,你只需要删除下面的选项. [因为它会修改 Vite 默认的配置](https://github.com/electron-vite/vite-plugin-electron-renderer#config-presets-opinionated). | ||
```diff | ||
# vite.config.ts | ||
export default { | ||
plugins: [ | ||
... | ||
- // Use Node.js API in the Renderer-process | ||
- renderer({ | ||
- nodeIntegration: true, | ||
- }), | ||
... | ||
], | ||
} | ||
``` | ||
--> | ||
|
||
## 🔧 额外的功能 | ||
|
||
1. Electron 自动更新 👉 [阅读文档](src/components/update/README.zh-CN.md) | ||
2. Playwright 测试 | ||
|
||
## ❔ FAQ | ||
|
||
- [C/C++ addons, Node.js modules - Pre-Bundling](https://github.com/electron-vite/vite-plugin-electron-renderer#dependency-pre-bundling) | ||
- [dependencies vs devDependencies](https://github.com/electron-vite/vite-plugin-electron-renderer#dependencies-vs-devdependencies) | ||
|
||
## 🍵 🍰 🍣 🍟 | ||
|
||
<img width="270" src="https://github.com/caoxiemeihao/blog/blob/main/assets/$qrcode/$.png?raw=true"> |
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.
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,11 @@ | ||
/// <reference types="vite-electron-plugin/electron-env" /> | ||
|
||
declare namespace NodeJS { | ||
interface ProcessEnv { | ||
VSCODE_DEBUG?: 'true'; | ||
DIST_ELECTRON: string; | ||
DIST: string; | ||
/** /dist/ or /public/ */ | ||
PUBLIC: string; | ||
} | ||
} |
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,50 @@ | ||
import Store from 'electron-store'; | ||
|
||
/** | ||
* Helper class for interacting with the Electron Store. | ||
*/ | ||
export class ElectronStoreHelper { | ||
private static instance: ElectronStoreHelper | null = null; | ||
private store: Store; | ||
|
||
private constructor() { | ||
this.store = new Store(); | ||
} | ||
|
||
/** | ||
* Retrieves the singleton instance of ElectronStoreHelper. | ||
* @returns {ElectronStoreHelper} The singleton instance. | ||
*/ | ||
public static getInstance(): ElectronStoreHelper { | ||
if (!ElectronStoreHelper.instance) { | ||
ElectronStoreHelper.instance = new ElectronStoreHelper(); | ||
} | ||
return ElectronStoreHelper.instance; | ||
} | ||
|
||
/** | ||
* Sets a value in the Electron Store. | ||
* @param {string} key - The key to set. | ||
* @param {any} value - The value to set. | ||
*/ | ||
set(key: string, value: any): void { | ||
this.store.set(key, value); | ||
} | ||
|
||
/** | ||
* Retrieves a value from the Electron Store. | ||
* @param {string} key - The key to retrieve. | ||
* @returns {any} The retrieved value. | ||
*/ | ||
get(key: string): any { | ||
return this.store.get(key); | ||
} | ||
|
||
/** | ||
* Deletes a value from the Electron Store. | ||
* @param {string} key - The key to delete. | ||
*/ | ||
delete(key: string): void { | ||
this.store.delete(key); | ||
} | ||
} |
Oops, something went wrong.