-
Notifications
You must be signed in to change notification settings - Fork 1
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 b3e22ce
Showing
43 changed files
with
5,181 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,4 @@ | ||
node_modules | ||
dist | ||
out | ||
.gitignore |
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,17 @@ | ||
/* eslint-env node */ | ||
require('@rushstack/eslint-patch/modern-module-resolution') | ||
|
||
module.exports = { | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:vue/vue3-recommended', | ||
'@electron-toolkit', | ||
'@electron-toolkit/eslint-config-ts/eslint-recommended', | ||
'@vue/eslint-config-typescript/recommended', | ||
'@vue/eslint-config-prettier' | ||
], | ||
rules: { | ||
'vue/require-default-prop': 'off', | ||
'vue/multi-word-component-names': '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,90 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: [ master ] | ||
tags: | ||
- v* | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
platform: [linux, windows, macos] | ||
include: | ||
- platform: linux | ||
os: ubuntu-latest | ||
target: AppImage | ||
extension: AppImage | ||
- platform: windows | ||
os: ubuntu-latest | ||
target: nsis | ||
extension: exe | ||
- platform: macos | ||
os: macos-latest | ||
target: dmg | ||
extension: dmg | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Node.js, NPM and Yarn | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
- name: Install wine | ||
if: ${{ matrix.platform == 'windows' }} | ||
run: | | ||
sudo dpkg --add-architecture i386 | ||
wget -nc https://dl.winehq.org/wine-builds/winehq.key | ||
sudo apt-key add winehq.key | ||
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main' | ||
sudo apt-get update | ||
sudo apt install -y winehq-stable | ||
- name: Build | ||
env: | ||
PLATFORM: ${{ matrix.platform }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
if [ "${{ matrix.platform }}" == "macos" ]; then | ||
export CSC_IDENTITY_AUTO_DISCOVERY=false | ||
EXTRA_ARGS="-c.mac.identity=null" | ||
fi | ||
yarn install | ||
yarn build | ||
npx electron-builder --${{ matrix.platform }} ${{ matrix.target }} -p never $EXTRA_ARGS | ||
- name: Upload artifact | ||
if: "contains(github.ref, 'refs/tags/v')" | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.platform }} | ||
path: dist/*.${{ matrix.extension }} | ||
publish: | ||
if: "contains(github.ref, 'refs/tags/v')" | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download windows artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: windows | ||
- name: Download linux artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: linux | ||
- name: Download macos artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: macos | ||
- name: Create release draft | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
draft: true | ||
generate_release_notes: true | ||
files: | | ||
*.exe | ||
*.AppImage | ||
*.dmg |
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,4 @@ | ||
node_modules | ||
dist | ||
out | ||
*.log* |
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,6 @@ | ||
out | ||
dist | ||
pnpm-lock.yaml | ||
LICENSE.md | ||
tsconfig.json | ||
tsconfig.*.json |
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,4 @@ | ||
singleQuote: true | ||
semi: false | ||
printWidth: 100 | ||
trailingComma: none |
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 @@ | ||
<div align="center> | ||
<a href="https://shellhub.io"><img src="http://docs.shellhub.io/img/logo.png" alt="ShellHub"></a> | ||
|
||
<hr/> | ||
|
||
<h1 align="center">ShellHub Connect</h1> | ||
|
||
<p align="center">Download ShellHub Connect for your platform:</p> | ||
|
||
<p align="center"> | ||
<a href="https://redir-url.fly.dev/?url=https://api.github.com/repos/shellhub-io/desktop/releases/latest&query=$.assets[0].browser_download_url)"> | ||
<img src="https://img.shields.io/badge/Windows-rgb(102,122,204)?style=flat-rounded&logo=windows&logoColor=white" height="28px"/> | ||
</a> | ||
<a href="https://redir-url.fly.dev/?url=https://api.github.com/repos/shellhub-io/desktop/releases/latest&query=$.assets[1].browser_download_url)"> | ||
<img src='https://img.shields.io/badge/Linux-rgb(102,122,204)?style=flat-rounded&logo=linux&logoColor=white' height="28px"/> | ||
</a> | ||
<a href="https://redir-url.fly.dev/?url=https://api.github.com/repos/shellhub-io/desktop/releases/latest&query=$.assets[2].browser_download_url)"> | ||
<img src='https://img.shields.io/badge/MacOS_X-rgb(102,122,204)?style=flat-rounded&logo=apple&logoColor=white' height="28px"/> | ||
</a> | ||
</p> | ||
</div> | ||
|
||
## | ||
|
||
ShellHub Connect is an application designed to simplify and enhance the experience of connecting and managing | ||
remote devices via ShellHub. With an intuitive and user-friendly interface, ShellHub Connect allows users to | ||
easily access their devices in **ShellHub Cloud** and on custom instances of ShellHub, whether it's | ||
the **Enterprise Edition** or **Community Edition**, managed or self-hosted. | ||
|
||
<p align="center"> | ||
<img src="https://github.com/shellhub-io/desktop/assets/86747/2a92b9e4-8c39-4c7f-9bfd-b85049f4eca4" border=1/> | ||
</p> |
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 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.cs.allow-jit</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-dyld-environment-variables</key> | ||
<true/> | ||
</dict> | ||
</plist> |
Binary file not shown.
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,3 @@ | ||
provider: generic | ||
url: https://example.com/auto-updates | ||
updaterCacheDirName: shellhub-updater |
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,43 @@ | ||
appId: com.electron.app | ||
productName: shellhub | ||
directories: | ||
buildResources: build | ||
files: | ||
- '!**/.vscode/*' | ||
- '!src/*' | ||
- '!electron.vite.config.{js,ts,mjs,cjs}' | ||
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}' | ||
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}' | ||
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}' | ||
asarUnpack: | ||
- resources/** | ||
win: | ||
executableName: shellhub | ||
nsis: | ||
artifactName: ${name}-${version}-setup.${ext} | ||
shortcutName: ${productName} | ||
uninstallDisplayName: ${productName} | ||
createDesktopShortcut: always | ||
mac: | ||
entitlementsInherit: build/entitlements.mac.plist | ||
extendInfo: | ||
- NSCameraUsageDescription: Application requests access to the device's camera. | ||
- NSMicrophoneUsageDescription: Application requests access to the device's microphone. | ||
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder. | ||
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder. | ||
notarize: false | ||
dmg: | ||
artifactName: ${name}-${version}.${ext} | ||
linux: | ||
target: | ||
- AppImage | ||
- snap | ||
- deb | ||
maintainer: electronjs.org | ||
category: Utility | ||
appImage: | ||
artifactName: ${name}-${version}.${ext} | ||
npmRebuild: false | ||
publish: | ||
provider: generic | ||
url: https://example.com/auto-updates |
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,28 @@ | ||
import { resolve } from 'path' | ||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite' | ||
import vue from '@vitejs/plugin-vue' | ||
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify' | ||
|
||
export default defineConfig({ | ||
main: { | ||
plugins: [externalizeDepsPlugin()] | ||
}, | ||
preload: { | ||
plugins: [externalizeDepsPlugin()] | ||
}, | ||
renderer: { | ||
resolve: { | ||
alias: { | ||
'@renderer': resolve('src/renderer/src') | ||
} | ||
}, | ||
plugins: [ | ||
vue({ | ||
template: { transformAssetUrls } | ||
}), | ||
vuetify({ | ||
autoImport: 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,58 @@ | ||
{ | ||
"name": "shellhub-connect", | ||
"version": "1.0.0", | ||
"description": "An application designed to simplify and enhance the experience of connecting and managing remote devices via ShellHub", | ||
"main": "./out/main/index.js", | ||
"author": "ShellHub <[email protected]>(https://shellhub.io)", | ||
"homepage": "https://github.com/shellhub-io/desktop", | ||
"scripts": { | ||
"format": "prettier --write .", | ||
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts,.vue --fix", | ||
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false", | ||
"typecheck:web": "vue-tsc --noEmit -p tsconfig.web.json --composite false", | ||
"typecheck": "npm run typecheck:node && npm run typecheck:web", | ||
"start": "electron-vite preview", | ||
"dev": "electron-vite dev", | ||
"build": "npm run typecheck && electron-vite build", | ||
"postinstall": "electron-builder install-app-deps", | ||
"build:win": "npm run build && electron-builder --win --config", | ||
"build:mac": "npm run build && electron-builder --mac --config", | ||
"build:linux": "npm run build && electron-builder --linux --config" | ||
}, | ||
"dependencies": { | ||
"@electron-toolkit/preload": "^2.0.0", | ||
"@electron-toolkit/utils": "^2.0.0", | ||
"@fortawesome/fontawesome-free": "^6.5.1", | ||
"@mdi/font": "^7.3.67", | ||
"@vueuse/core": "^10.7.0", | ||
"axios": "^1.6.2", | ||
"electron-updater": "^6.1.1", | ||
"pinia": "^2.1.7", | ||
"sass": "^1.69.5", | ||
"vue-router": "^4.2.5", | ||
"vuetify": "^3.4.6", | ||
"webfontloader": "^1.6.28" | ||
}, | ||
"devDependencies": { | ||
"@electron-toolkit/eslint-config": "^1.0.1", | ||
"@electron-toolkit/eslint-config-ts": "^1.0.0", | ||
"@electron-toolkit/tsconfig": "^1.0.1", | ||
"@rushstack/eslint-patch": "^1.3.3", | ||
"@types/node": "^18.17.5", | ||
"@vitejs/plugin-vue": "^4.3.1", | ||
"@vue/eslint-config-prettier": "^8.0.0", | ||
"@vue/eslint-config-typescript": "^11.0.3", | ||
"electron": "^25.6.0", | ||
"electron-builder": "^24.6.3", | ||
"electron-vite": "^1.0.27", | ||
"eslint": "^8.47.0", | ||
"eslint-plugin-vue": "^9.17.0", | ||
"less": "^4.2.0", | ||
"prettier": "^3.0.2", | ||
"typescript": "^5.1.6", | ||
"vite": "^4.4.9", | ||
"vite-plugin-vuetify": "^2.0.1", | ||
"vue": "^3.3.4", | ||
"vue-tsc": "^1.8.8" | ||
} | ||
} |
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,74 @@ | ||
import { app, shell, BrowserWindow } from 'electron' | ||
import { join } from 'path' | ||
import { electronApp, optimizer, is } from '@electron-toolkit/utils' | ||
import icon from '../../resources/icon.png?asset' | ||
|
||
function createWindow(): void { | ||
// Create the browser window. | ||
const mainWindow = new BrowserWindow({ | ||
width: 900, | ||
height: 670, | ||
show: false, | ||
autoHideMenuBar: true, | ||
...(process.platform === 'linux' ? { icon } : {}), | ||
webPreferences: { | ||
webviewTag: true, | ||
webSecurity: false, | ||
partition: 'persist:shellhub', | ||
preload: join(__dirname, '../preload/index.js'), | ||
sandbox: false | ||
} | ||
}) | ||
|
||
mainWindow.on('ready-to-show', () => { | ||
mainWindow.show() | ||
}) | ||
|
||
mainWindow.webContents.setWindowOpenHandler((details) => { | ||
shell.openExternal(details.url) | ||
return { action: 'deny' } | ||
}) | ||
|
||
// HMR for renderer base on electron-vite cli. | ||
// Load the remote URL for development or the local html file for production. | ||
if (is.dev && process.env['ELECTRON_RENDERER_URL']) { | ||
mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL']) | ||
} else { | ||
mainWindow.loadFile(join(__dirname, '../renderer/index.html')) | ||
} | ||
} | ||
|
||
// This method will be called when Electron has finished | ||
// initialization and is ready to create browser windows. | ||
// Some APIs can only be used after this event occurs. | ||
app.whenReady().then(() => { | ||
// Set app user model id for windows | ||
electronApp.setAppUserModelId('com.electron') | ||
|
||
// Default open or close DevTools by F12 in development | ||
// and ignore CommandOrControl + R in production. | ||
// see https://github.com/alex8088/electron-toolkit/tree/master/packages/utils | ||
app.on('browser-window-created', (_, window) => { | ||
optimizer.watchWindowShortcuts(window) | ||
}) | ||
|
||
createWindow() | ||
|
||
app.on('activate', function () { | ||
// On macOS it's common to re-create a window in the app when the | ||
// dock icon is clicked and there are no other windows open. | ||
if (BrowserWindow.getAllWindows().length === 0) createWindow() | ||
}) | ||
}) | ||
|
||
// Quit when all windows are closed, except on macOS. There, it's common | ||
// for applications and their menu bar to stay active until the user quits | ||
// explicitly with Cmd + Q. | ||
app.on('window-all-closed', () => { | ||
if (process.platform !== 'darwin') { | ||
app.quit() | ||
} | ||
}) | ||
|
||
// In this file you can include the rest of your app"s specific main process | ||
// code. You can also put them in separate files and require them here. |
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,8 @@ | ||
import { ElectronAPI } from '@electron-toolkit/preload' | ||
|
||
declare global { | ||
interface Window { | ||
electron: ElectronAPI | ||
api: unknown | ||
} | ||
} |
Oops, something went wrong.