91 | )
92 | }}
93 |
94 |
95 |
96 |
97 |
98 | )
99 | }
100 |
101 | export default Component
102 |
--------------------------------------------------------------------------------
/.github/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | ## Code of Conduct
2 |
3 | ### Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6 |
7 | We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8 |
9 | ### Our Standards
10 |
11 | Examples of behavior that contributes to a positive environment for our community include:
12 |
13 | - Demonstrating empathy and kindness toward other people
14 | - Being respectful of differing opinions, viewpoints, and experiences
15 | - Giving and gracefully accepting constructive feedback
16 | - Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17 | - Focusing on what is best not just for us as individuals, but for the overall community
18 |
19 | Examples of unacceptable behavior include:
20 |
21 | - The use of sexualized language or imagery, and sexual attention or advances of any kind
22 | - Trolling, insulting or derogatory comments, and personal or political attacks
23 | - Public or private harassment
24 | - Publishing others’ private information, such as a physical or email address, without their explicit permission
25 | - Other conduct which could reasonably be considered inappropriate in a professional setting
26 |
27 | ### Enforcement Responsibilities
28 |
29 | Project maintainers are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32 |
33 | ### Scope
34 |
35 | This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official _e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36 |
37 | ### Enforcement
38 |
39 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project team responsible for enforcement at [riccardoaccoma@gmail.com](mailto:riccardoaccoma@gmail.com). All complaints will be reviewed and investigated promptly and fairly.
40 |
41 | All project maintainers are obligated to respect the privacy and security of the reporter of any incident.
42 |
43 | Project maintainers who do not follow or enforce the Code of Conduct in good
44 | faith may face temporary or permanent repercussions as determined by other
45 | members of the project's leadership.
46 |
47 | ### Attribution
48 |
49 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1,
50 | available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct/][version]
51 |
52 | [homepage]: http://contributor-covenant.org
53 | [version]: https://www.contributor-covenant.org/version/2/1
54 |
--------------------------------------------------------------------------------
/.github/ROADMAP.md:
--------------------------------------------------------------------------------
1 | # 🗺️ JEXPE ROADMAP 🗺️
2 |
3 | This roadmap should give direction on what to expect in the next few days, weeks as we continue to build together with the community.
4 |
5 | Goal status:
6 | [ ✅ ] = achieved
7 | [ ❌ ] = not achieved
8 | [ ⛳ ] = planned
9 |
10 | _Please note that this is not the final roadmap and what you see can be updated down the road, so check back regularly for any future updates._
11 |
12 | ## 🗿**Q3 2022**
13 |
14 | [ ✅ ] **- THE IDEA WAS BORN**
15 |
16 | > While me and @mghizzo were working for Minecraft servers, we realized that we were having some troubles finding a special SSH and SFTP client. We needed a single software including them both with additional features like passwords management and sharing.
17 |
18 | **[ ✅ ] - MARKET ANALYSIS**
19 |
20 | > Once the idea was born, we looked for competitors to see if there was a viable market. We found a few and analyzed and grouped them according to two parameters: all-in-one and cross-platform. We got:
21 | >
22 | > - Putty ([https://www.putty.org/](https://www.putty.org/ 'https://www.putty.org/'))
23 | > - FileZilla ([https://filezilla-project.org/](https://filezilla-project.org/ 'https://filezilla-project.org/'))
24 | > - WinSCP ([https://winscp.net/](https://winscp.net/ 'https://winscp.net/'))
25 | > - CyberDuck ([https://cyberduck.io/](https://cyberduck.io/ 'https://cyberduck.io/'))
26 | > - MobaXterm ([https://mobaxterm.mobatek.net/](https://mobaxterm.mobatek.net/ 'https://mobaxterm.mobatek.net/'))
27 | > - WindTerm ([https://github.com/kingToolbox/WindTerm](https://github.com/kingToolbox/WindTerm 'https://github.com/kingToolbox/WindTerm'))
28 | > - Termius ([https://termius.com/](https://termius.com/ 'https://termius.com/'))
29 | >
30 | > You'll probably think that we are a Termius copycat and that's
31 | > partially true. Analyzing Termius' user base, we can deduce that
32 | > almost 60% of all the users know it and use it on mobile. We are
33 | > extremely focused on desktop instead.
34 | >
35 | > **Here is why Jexpe is better:**
36 | >
37 | > - **It's lightweight**: Jexpe runs on Tauri which completely overcome Termius' stack (Electron) in terms of security and
38 | > performance.
39 | > - **It's open source**: We strongly believe that in 21st century a software like this should be free
40 |
41 | **[ ✅ ] - SOFTWARE STACK**
42 |
43 | > If you work like a developer today you will discover a trouble: there's not a software using a technology that provides you a tidy modern interface and a good performance without compromising. That's why we chose Tauri. It give us the chance to provide to our users all the features that I listed before.
44 |
45 | **[ ✅ ] - LAUNCH THE PROJECT**
46 |
47 | > We created a Github repository and a Discord server to grow up a community and a relationship between users and developers. Our goal is to not stop users' ideas with some feedbacks, but we want them to contribute directly to the project to grow blazingly fast.
48 |
49 | ## **Q1 2023**
50 |
51 | **[ ⛳ ] - WORKING LOCAL SHELL**
52 |
53 | > Let's start with basic functionality. The user must have the ability to:
54 | >
55 | > - Choose which of the shells available on his or her operating system to start.
56 | > - Have multiple shells open at the same time
57 | > - Manage through a horizontal navigation bar similar to Chrome's, all open shells
58 |
59 | **[ ⛳ ] - 50 STARS ON GITHUB**
60 |
61 | > Stars on GitHub are one of the most important metrics to watch for in this project. They reflect the interest of a segment of our community. The one composed of users who are also developers and therefore make a greater contribution to the project.
62 |
63 | **[ ⛳ ] - 50 MEMBERS ON DISCORD**
64 |
65 | > Members on the Discord server are another of the most important metrics to consider in this project. Our goal is to not stop users' ideas with some feedbacks, but we want them to contribute directly to the project to grow blazingly fast.
66 |
--------------------------------------------------------------------------------
/public/assets/icons/msys2.svg:
--------------------------------------------------------------------------------
1 |
2 |
26 |
--------------------------------------------------------------------------------
/public/assets/icons/debian.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/icons/vs2022.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/xterm.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2014 The xterm.js authors. All rights reserved.
3 | * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
4 | * https://github.com/chjj/term.js
5 | * @license MIT
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | *
25 | * Originally forked from (with the author's permission):
26 | * Fabrice Bellard's javascript vt100 for jslinux:
27 | * http://bellard.org/jslinux/
28 | * Copyright (c) 2011 Fabrice Bellard
29 | * The original design remains. The terminal itself
30 | * has been extended to include xterm CSI codes, among
31 | * other features.
32 | */
33 |
34 | /**
35 | * Default styles for xterm.js
36 | */
37 |
38 | .xterm {
39 | cursor: text;
40 | position: relative;
41 | user-select: none;
42 | -ms-user-select: none;
43 | -webkit-user-select: none;
44 | }
45 |
46 | .xterm.focus,
47 | .xterm:focus {
48 | outline: none;
49 | }
50 |
51 | .xterm .xterm-helpers {
52 | position: absolute;
53 | top: 0;
54 | /**
55 | * The z-index of the helpers must be higher than the canvases in order for
56 | * IMEs to appear on top.
57 | */
58 | z-index: 5;
59 | }
60 |
61 | .xterm .xterm-helper-textarea {
62 | padding: 0;
63 | border: 0;
64 | margin: 0;
65 | /* Move textarea out of the screen to the far left, so that the cursor is not visible */
66 | position: absolute;
67 | opacity: 0;
68 | left: -9999em;
69 | top: 0;
70 | width: 0;
71 | height: 0;
72 | z-index: -5;
73 | /** Prevent wrapping so the IME appears against the textarea at the correct position */
74 | white-space: nowrap;
75 | overflow: hidden;
76 | resize: none;
77 | }
78 |
79 | .xterm .composition-view {
80 | /* TODO: Composition position got messed up somewhere */
81 | background: #000;
82 | color: #FFF;
83 | display: none;
84 | position: absolute;
85 | white-space: nowrap;
86 | z-index: 1;
87 | }
88 |
89 | .xterm .composition-view.active {
90 | display: block;
91 | }
92 |
93 | .xterm .xterm-viewport {
94 | /* On OS X this is required in order for the scroll bar to appear fully opaque */
95 | background-color: #000;
96 | overflow-y: scroll;
97 | cursor: default;
98 | position: absolute;
99 | right: 0;
100 | left: 0;
101 | top: 0;
102 | bottom: 0;
103 | }
104 |
105 | .xterm .xterm-screen {
106 | position: relative;
107 | }
108 |
109 | .xterm .xterm-screen canvas {
110 | position: absolute;
111 | left: 0;
112 | top: 0;
113 | }
114 |
115 | .xterm .xterm-scroll-area {
116 | visibility: hidden;
117 | }
118 |
119 | .xterm-char-measure-element {
120 | display: inline-block;
121 | visibility: hidden;
122 | position: absolute;
123 | top: 0;
124 | left: -9999em;
125 | line-height: normal;
126 | }
127 |
128 | .xterm.enable-mouse-events {
129 | /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
130 | cursor: default;
131 | }
132 |
133 | .xterm.xterm-cursor-pointer,
134 | .xterm .xterm-cursor-pointer {
135 | cursor: pointer;
136 | }
137 |
138 | .xterm.column-select.focus {
139 | /* Column selection mode */
140 | cursor: crosshair;
141 | }
142 |
143 | .xterm .xterm-accessibility,
144 | .xterm .xterm-message {
145 | position: absolute;
146 | left: 0;
147 | top: 0;
148 | bottom: 0;
149 | z-index: 10;
150 | color: transparent;
151 | }
152 |
153 | .xterm .live-region {
154 | position: absolute;
155 | left: -9999px;
156 | width: 1px;
157 | height: 1px;
158 | overflow: hidden;
159 | }
160 |
161 | .xterm-dim {
162 | opacity: 0.5;
163 | }
164 |
165 | .xterm-underline-1 {
166 | text-decoration: underline;
167 | }
168 |
169 | .xterm-underline-2 {
170 | text-decoration: double underline;
171 | }
172 |
173 | .xterm-underline-3 {
174 | text-decoration: wavy underline;
175 | }
176 |
177 | .xterm-underline-4 {
178 | text-decoration: dotted underline;
179 | }
180 |
181 | .xterm-underline-5 {
182 | text-decoration: dashed underline;
183 | }
184 |
185 | .xterm-strikethrough {
186 | text-decoration: line-through;
187 | }
188 |
189 | .xterm-screen .xterm-decoration-container .xterm-decoration {
190 | z-index: 6;
191 | position: absolute;
192 | }
193 |
194 | .xterm-decoration-overview-ruler {
195 | z-index: 7;
196 | position: absolute;
197 | top: 0;
198 | right: 0;
199 | pointer-events: none;
200 | }
201 |
202 | .xterm-decoration-top {
203 | z-index: 2;
204 | position: relative;
205 | }
206 |
207 |
208 | .xterm-viewport::-webkit-scrollbar {
209 | background-color: transparent;
210 | width: 0.5rem;
211 | }
212 |
213 | .xterm-viewport::-webkit-scrollbar-thumb {
214 | border-radius: 0.5rem;
215 | }
--------------------------------------------------------------------------------
/src/contexts/terminal/index.tsx:
--------------------------------------------------------------------------------
1 | import { createContext, useCallback, useContext, useEffect, useState } from 'react'
2 | import { listen } from '@tauri-apps/api/event'
3 | import { invoke } from '@tauri-apps/api/tauri'
4 | import { useRouter } from 'next/router'
5 |
6 | import { GET_SYSTEM_SHELLS_COMMAND, PTY_EXIT_EVENT, PTY_KILL_COMMAND, PTY_RESIZE_COMMAND, PTY_SPAWN_COMMAND, PTY_SPAWN_EVENT, PTY_STDIN_COMMAND, PTY_STDOUT_EVENT } from './constants'
7 |
8 | import type { FCWithChildren } from 'src/types'
9 | import type { ITerminal, ITerminalContext, IPTYSpawnPayload, IPTYExitPayload, IPTYSdoutPayload, ISystemShell, IPtySize } from './types'
10 |
11 | const TerminalContext = createContext({
12 | shells: [],
13 | spawnPty: () => undefined,
14 | killPty: () => undefined,
15 | terminals: [],
16 | focused: undefined,
17 | focus: () => undefined,
18 | })
19 |
20 | export const TerminalContextProvider: FCWithChildren = ({ children }) => {
21 | const [shells, setShells] = useState([])
22 | const [terminals, setTerminals] = useState([])
23 | const [focused, setFocused] = useState(undefined)
24 |
25 | const router = useRouter()
26 |
27 | const spawnPty = useCallback((shell: ISystemShell) => {
28 | invoke(PTY_SPAWN_COMMAND, { shell }).catch(console.error)
29 | }, [])
30 |
31 | const writePty = useCallback((id: string, data: string) => {
32 | invoke(PTY_STDIN_COMMAND, { id, data })
33 | // TODO: Handle errors properly
34 | .catch(console.error)
35 | }, [])
36 |
37 | const resizePty = useCallback((id: string, size: IPtySize) => {
38 | invoke(PTY_RESIZE_COMMAND, { id, size })
39 | // TODO: Handle errors properly
40 | .catch(console.error)
41 | }, [])
42 |
43 | const updateTitle = useCallback(
44 | (id: string, title: string) => {
45 | setTerminals((terminals) => {
46 | const index = terminals.findIndex((x) => x.id === id)
47 | if (index < 0) {
48 | // This should never happen, but just to be on the safe side
49 | console.error(`[TITLE-LISTENER] Could not find terminal with id ${id}`)
50 | return terminals
51 | }
52 |
53 | terminals[index].title = title
54 | return [...terminals]
55 | })
56 | },
57 | [terminals]
58 | )
59 |
60 | const killPty = useCallback((id: string) => {
61 | invoke(PTY_KILL_COMMAND, { id })
62 | // TODO: Handle errors properly
63 | .catch(console.error)
64 | }, [])
65 |
66 | useEffect(() => {
67 | invoke(GET_SYSTEM_SHELLS_COMMAND, {}).then(setShells).catch(console.error)
68 | }, [])
69 |
70 | useEffect(() => {
71 | const spawnListener = listen(PTY_SPAWN_EVENT, ({ payload }) => {
72 | const { id, shell } = payload
73 |
74 | // Dynamically import xterm to ensure it's only loaded client-side
75 | import('xterm')
76 | .then(({ Terminal }) => {
77 | // Create a new xterm instance
78 | const xterm = new Terminal({
79 | // TODO: Add possibility to customize theme
80 | theme: {
81 | background: '#1A1B1E',
82 | cursor: '#10B981',
83 | cursorAccent: '#10B98100',
84 | },
85 | fontFamily: 'Cascadia Mono, MesloLGS NF, Monospace',
86 | fontWeight: 'normal',
87 | fontSize: 14,
88 | cursorBlink: true,
89 | allowTransparency: true,
90 | allowProposedApi: true,
91 | overviewRulerWidth: 8,
92 | })
93 |
94 | xterm.onData((data) => writePty(id, data))
95 | xterm.onResize((size) =>
96 | resizePty(id, {
97 | ...size,
98 | // TODO: Retrieve char width and height
99 | pixel_width: 0,
100 | pixel_height: 0,
101 | })
102 | )
103 | xterm.onTitleChange((title) => updateTitle(id, title))
104 |
105 | // Add the terminal to the context
106 | setTerminals((terminals) => [...terminals, { id, shell, title: shell.name, xterm }])
107 |
108 | // Focus the new terminal
109 | setFocused(id)
110 |
111 | if (router.asPath !== '/terminal') {
112 | void router.push('/terminal')
113 | }
114 | })
115 | // TODO: Maybe kill pty, just to be on the safe side (?)
116 | .catch(console.error)
117 | })
118 |
119 | const stdoutListener = listen(PTY_STDOUT_EVENT, ({ payload }) => {
120 | const { id, bytes } = payload
121 |
122 | // Find the terminal with the given id
123 | const terminal = terminals.find((terminal) => terminal.id === id)
124 | if (!terminal) {
125 | // TODO: Maybe kill pty, just to be on the safe side (?)
126 | console.error(`[STDOUT-LISTENER] Could not find terminal with id ${id}`)
127 | return
128 | }
129 |
130 | // Write the bytes to the xterm instance
131 | terminal.xterm.write(bytes)
132 | })
133 |
134 | const exitListener = listen(PTY_EXIT_EVENT, ({ payload }) => {
135 | const { id, success, code } = payload
136 |
137 | // Find the terminal with the given id
138 | const index = terminals.findIndex((terminal) => terminal.id === id)
139 | if (index < 0) {
140 | // This should never happen, but just to be on the safe side
141 | console.error(`[EXIT-LISTENER] Could not find terminal with id ${id}`)
142 | setFocused(undefined)
143 | return
144 | }
145 |
146 | // TODO: Handle `success` and `code` properly
147 | void success
148 | void code
149 |
150 | setTerminals((terminals) => {
151 | // Focus the next terminal in the array
152 | const toFocus = terminals.at(index + 1) ?? terminals.at(index - 1)
153 | setFocused(toFocus?.id)
154 |
155 | // Remove the terminal from the array
156 | terminals.splice(index, 1)
157 | return [...terminals]
158 | })
159 | })
160 |
161 | return () => {
162 | spawnListener.then((unlisten) => unlisten()).catch(console.error)
163 |
164 | stdoutListener.then((unlisten) => unlisten()).catch(console.error)
165 |
166 | exitListener.then((unlisten) => unlisten()).catch(console.error)
167 | }
168 | }, [terminals])
169 |
170 | return (
171 |
181 | {children}
182 |
183 | )
184 | }
185 |
186 | export const useTerminal = () => useContext(TerminalContext)
187 |
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Jexpe Contributing Guide
2 |
3 | Hi! We, the maintainers, are really excited that you are interested in contributing to Jexpe. Before submitting your
4 | contribution though, please make sure to take a moment and read through the [Code of Conduct](CODE_OF_CONDUCT.md), as
5 | well as the appropriate section for the contribution you intend to make:
6 |
7 | - [Issue Reporting Guidelines](#issue-reporting-guidelines)
8 | - [Development Guide](#development-guide)
9 | - [Pull Request Guidelines](#pull-request-guidelines)
10 |
11 | **We strongly advise you to join the [Jexpe Discord](https://discord.com/invite/cfHmUnPDtM) to discuss your contribution
12 | with the community.**
13 |
14 | ## Issue Reporting Guidelines
15 |
16 | - The issue list of this repo is **exclusively** for bug reports and feature requests. Non-conforming issues will be
17 | closed immediately.
18 |
19 | - If you have a question, you can get quick answers from the [Jexpe Discord](https://discord.com/invite/cfHmUnPDtM).
20 |
21 | - Try to search for your issue, it may have already been answered or even fixed in the development branch (`dev`).
22 |
23 | - Check if the issue is reproducible with the latest stable version of Jexpe. If you are using a pre-release, please
24 | indicate the specific version you are using.
25 |
26 | - It is **required** that you clearly describe the steps necessary to reproduce the issue you are running into. Although
27 | we would love to help our users as much as possible, diagnosing issues without clear reproduction steps is extremely
28 | time-consuming and simply not sustainable.
29 |
30 | - Use only the minimum amount of code necessary to reproduce the unexpected behavior. A good bug report should isolate
31 | specific methods that exhibit unexpected behavior and precisely define how expectations were violated. What did you
32 | expect the method or methods to do, and how did the observed behavior differ? The more precisely you isolate the
33 | issue, the faster we can investigate.
34 |
35 | - Issues with no clear repro steps will not be triaged. If an issue labeled "need repro" receives no further input from
36 | the issue author for more than 5 days, it will be closed.
37 |
38 | - If your issue is resolved but still open, don’t hesitate to close it. In case you found a solution by yourself, it
39 | could be helpful to explain how you fixed it.
40 |
41 | - Most importantly, we beg your patience: the team must balance your request against many other responsibilities —
42 | fixing other bugs, answering other questions, new features, new documentation, etc. The issue list is not paid
43 | support, and we cannot make guarantees about how fast your issue can be resolved.
44 |
45 | ## Development Guide
46 |
47 | **Jexpe is undergoing rapid development right now, and the docs match the latest published version. They
48 | are horribly out of date when compared with the code in the development branch (`dev`). This contributor guide is up-to-date, but it
49 | doesn't cover all of Jexpe's functions in depth. If you have any questions, don't hesitate to ask in
50 | our [Jexpe Discord](https://discord.com/invite/cfHmUnPDtM)**
51 |
52 | Is this repository we stick to the following branch structure:
53 |
54 | | Branch | Description |
55 | |-|-|
56 | | `dev` | The develop branch is where all the working branches are merged. It's not possible to push code directly here, not even for a maintainer. Everything in `dev` must come from a pull request after a code review. |
57 | | `` | Working branches are always created from `dev` and to `dev` shall return! Only working branches should be merged in to the develop branch after a code review. |
58 | | `release` | Release branches are handled by [code owners](https://github.com/jexpe-apps/jexpe/blob/dev/.github/CODEOWNERS). A release branch contains all the features planned for that release. |
59 |
60 | ## Pull Request Guidelines
61 |
62 | You must read the [Development Guide](#development-guide) section before proceeding with the pull request guidelines.
63 |
64 | In this project we stick to the following naming convention for the Pull Request title:
65 |
66 | ```yml
67 | ():
68 | │ │ │
69 | │ │ └─⫸ Summary: Present tense. Not capitalized. No period at the end.
70 | │ │
71 | │ └─⫸ Scope: tauri|nextjs|
72 | │
73 | └─⫸ Type: build|ci|docs|feat|fix|perf|refactor
74 | ```
75 |
76 | The `` and `` fields are mandatory, the `()` field is optional.
77 |
78 | ##### Type must be one of the following:
79 | >* **build**: Changes that affect the build system or external dependencies (example scopes: yarn)
80 | >* **ci**: Changes to our CI configuration files and scripts (examples: Github Actions)
81 | >* **docs**: Documentation only changes
82 | >* **feat**: A new feature
83 | >* **fix**: A bug fix
84 | >* **perf**: A code change that improves performance
85 | >* **refactor**: A code change that neither fixes a bug nor adds a feature
86 |
87 |
88 | ##### Scope should be one of the following:
89 | >The scope should be the name of the package affected.
90 | >
91 | >* **tauri**: Backend **only** changes
92 | >* **nextjs**: Frontend **only** changes
93 | >* **\**: Reference of the fixed issue
94 |
95 | ##### Summary
96 | >Use the summary field to provide a succinct description of the change:
97 | >
98 | >* use the imperative, present tense: "change" not "changed" nor "changes"
99 | >* don't capitalize the first letter
100 | >* no dot (.) at the end
101 |
102 | **You must follow this convention also for the working branch name: `/`, _e.g. `build/migrate_yarn`.**
103 |
104 | ##### Some clarifications
105 | >- It's OK to have multiple small commits as you work on the PR - We will let GitHub automatically squash it before
106 | > merging. (That is why we are restrictive about the title of the PR)
107 | >
108 | >- If adding new feature:
109 | >
110 | > - Provide convincing reason to add this feature. Ideally you should open a suggestion issue first and have it
111 | > greenlighted before working on it.
112 | >
113 | >- If fixing a bug:
114 | > - If you are resolving a special issue, in the `` set the issue id in your PR title for a better release log, _e.g. `fix(#3899): ...`.
115 | > - Provide detailed description of the bug in the PR, or link to an issue that does.
116 |
117 | ## Financial Contribution
118 |
119 | Jexpe is an MIT-licensed open source project. Its ongoing development can be supported [here](https://github.com/jexpe-apps/jexpe/blob/dev/.github/FUNDING.yml)
120 |
--------------------------------------------------------------------------------
/src-tauri/jexpe/src/shell/windows.rs:
--------------------------------------------------------------------------------
1 | use std::collections::HashMap;
2 | use std::{env, fs};
3 | use std::path::Path;
4 | use std::string::ToString;
5 | use winreg::enums::{HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE};
6 | use winreg::RegKey;
7 | use crate::shell::SystemShell;
8 | use phf::{phf_map};
9 |
10 | const WSL_ICON_MAPPINGS: phf::Map<&'static str, &'static str> = phf_map! {
11 | "Alpine" => "/assets/icons/alpine.svg",
12 | "Debian" => "/assets/icons/debian.svg",
13 | "kali-linux" => "/assets/icons/kali.svg",
14 | "SLES-12" => "/assets/icons/suse.svg",
15 | "openSUSE-Leap-15-1" => "/assets/icons/suse.svg",
16 | "Ubuntu-16.04" => "/assets/icons/ubuntu.svg",
17 | "Ubuntu-18.04" => "/assets/icons/ubuntu.svg",
18 | "Ubuntu-22.04" => "/assets/icons/ubuntu.svg",
19 | "Ubuntu" => "/assets/icons/ubuntu.svg",
20 | "AlmaLinux-8" => "/assets/icons/alma.svg",
21 | "OracleLinux_7_9" => "/assets/icons/oracle-linux.svg",
22 | "OracleLinux_8_5" => "/assets/icons/oracle-linux.svg",
23 | "openEuler" => "/assets/icons/open-euler.svg",
24 | "Linux" => "/assets/icons/linux.svg",
25 | "docker-desktop" => "/assets/icons/docker.svg",
26 | "docker-desktop-data" => "/assets/icons/docker.svg",
27 | };
28 |
29 | pub fn get_available_shells() -> Vec {
30 | let mut shells = Vec::new();
31 |
32 | shells = get_stock(shells);
33 | shells = get_gitbash(shells);
34 | shells = get_powershell_core(shells);
35 | shells = get_vscode(shells);
36 | shells = get_wsl(shells);
37 |
38 | shells
39 | }
40 |
41 | fn get_stock(mut shells: Vec) -> Vec {
42 |
43 | // TODO: Maybe bundle https://mridgers.github.io/clink/ (?)
44 |
45 | shells.push(SystemShell {
46 | id: "cmd".to_string(),
47 | name: "CMD (Stock)".to_string(),
48 | command: "cmd.exe".to_string(),
49 | args: Vec::new(),
50 | env: HashMap::new(),
51 | cwd: None,
52 | icon: "/assets/icons/cmd.svg".to_string(),
53 | });
54 |
55 | shells.push(SystemShell {
56 | id: "powershell".to_string(),
57 | name: "PowerShell".to_string(),
58 | command: "powershell.exe".to_string(),
59 | args: Vec::from(["-NoLogo".to_string()]),
60 | env: HashMap::from([
61 | ("TERM".to_string(), "cygwin".to_string())
62 | ]),
63 | cwd: None,
64 | icon: "/assets/icons/powershell.svg".to_string(),
65 | });
66 |
67 | shells
68 | }
69 |
70 | fn get_gitbash(mut shells: Vec) -> Vec {
71 | let mut gitbash_path: Option = None;
72 |
73 | if let Ok(regkey) = RegKey::predef(HKEY_LOCAL_MACHINE).open_subkey("Software\\GitForWindows") {
74 | if let Ok(path) = regkey.get_value("InstallPath") {
75 | gitbash_path = Some(path);
76 | }
77 | }
78 |
79 | if let Ok(regkey) = RegKey::predef(HKEY_CURRENT_USER).open_subkey("Software\\GitForWindows") {
80 | if let Ok(path) = regkey.get_value("InstallPath") {
81 | gitbash_path = Some(path);
82 | }
83 | }
84 |
85 | if let Some(path) = gitbash_path {
86 | shells.push(SystemShell {
87 | id: "git-bash".to_string(),
88 | name: "Git Bash".to_string(),
89 | command: format!("{}\\bin\\bash.exe", path),
90 | args: Vec::from(["--login".to_string(), "-i".to_string()]),
91 | env: HashMap::from([
92 | ("TERM".to_string(), "cygwin".to_string())
93 | ]),
94 | cwd: None,
95 | icon: "/assets/icons/git-bash.svg".to_string(),
96 | });
97 | };
98 |
99 | shells
100 | }
101 |
102 | fn get_powershell_core(mut shells: Vec) -> Vec {
103 | if let Ok(regkey) = RegKey::predef(HKEY_LOCAL_MACHINE)
104 | .open_subkey("Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\pwsh.exe") {
105 | if let Ok(path) = regkey.get_value("") {
106 | shells.push(SystemShell {
107 | id: "powershell-core".to_string(),
108 | name: "PowerShell Core".to_string(),
109 | command: path,
110 | args: Vec::from(["-NoLogo".to_string()]),
111 | env: HashMap::from([
112 | ("TERM".to_string(), "cygwin".to_string())
113 | ]),
114 | cwd: None,
115 | icon: "/assets/icons/powershell-core.svg".to_string(),
116 | });
117 | }
118 | }
119 |
120 | shells
121 | }
122 |
123 | fn get_vscode(mut shells: Vec) -> Vec {
124 | if let Ok(program_files) = env::var("ProgramFiles") {
125 | let path = Path::new(&program_files).join("Microsoft Visual Studio").display().to_string();
126 | if let Ok(dirs) = fs::read_dir(path) {
127 | for dir in dirs
128 | .filter_map(|x| x.ok())
129 | .map(|x| x.path()) {
130 | let version = dir.file_name().unwrap().to_str().unwrap();
131 | let bat = dir.join("Community\\Common7\\Tools\\VsDevCmd.bat").display().to_string();
132 |
133 | shells.push(SystemShell {
134 | id: format!("vs-cmd-{}", version),
135 | name: format!("Developer Prompt for VS {}", version),
136 | command: "cmd.exe".to_string(),
137 | args: Vec::from(["/k".to_string(), bat]),
138 | env: HashMap::new(),
139 | cwd: None,
140 | icon: format!("/assets/icons/vs{}.svg", version),
141 | })
142 | }
143 | }
144 | }
145 |
146 | shells
147 | }
148 |
149 | fn get_wsl(mut shells: Vec) -> Vec {
150 | let lxss_path = "Software\\Microsoft\\Windows\\CurrentVersion\\Lxss";
151 |
152 | for key in RegKey::predef(HKEY_CURRENT_USER)
153 | .open_subkey(lxss_path).unwrap()
154 | .enum_keys()
155 | .map(|x| x.unwrap())
156 | {
157 | let distribution_name: String = RegKey::predef(HKEY_CURRENT_USER)
158 | .open_subkey(format!("{}\\{}", lxss_path, key)).unwrap()
159 | .get_value("DistributionName").unwrap();
160 |
161 | shells.push(SystemShell {
162 | id: format!("wsl-{}", distribution_name.clone()),
163 | name: format!("WSL / {}", distribution_name.clone()),
164 | command: "wsl.exe".to_string(),
165 | args: Vec::from(["-d".to_string(), distribution_name.clone()]),
166 | env: HashMap::from([
167 | ("TERM".to_string(), "xterm-256color".to_string()),
168 | ("COLORTERM".to_string(), "truecolor".to_string()),
169 | ]),
170 | cwd: None,
171 | icon: WSL_ICON_MAPPINGS.get(distribution_name.clone().as_ref()).cloned()
172 | .unwrap_or("/assets/icons/linux.svg").to_string(),
173 | })
174 | }
175 |
176 | shells
177 | }
--------------------------------------------------------------------------------
/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | module.exports = {
3 | important: true,
4 | content: ['./src/**/*.{js,ts,jsx,tsx}'],
5 | theme: {
6 | extend: {
7 | colors: {
8 | brand: {
9 | 50: '#e7f8f2',
10 | 100: '#cff1e6',
11 | 200: '#b7ead9',
12 | 300: '#88dcc0',
13 | 400: '#58cea7',
14 | 500: '#40c79a',
15 | 600: '#28c08e',
16 | 700: '#10B981',
17 | 800: '#0ea774',
18 | 900: '#0d9467',
19 | },
20 | dark: {
21 | 50: '#C1C2C5',
22 | 100: '#A6A7AB',
23 | 200: '#909296',
24 | 300: '#5c5f66',
25 | 400: '#373A40',
26 | 500: '#2C2E33',
27 | 600: '#25262b',
28 | 700: '#1A1B1E',
29 | 800: '#141517',
30 | 900: '#101113',
31 | },
32 | gray: {
33 | 50: '#f8f9fa',
34 | 100: '#f1f3f5',
35 | 200: '#e9ecef',
36 | 300: '#dee2e6',
37 | 400: '#ced4da',
38 | 500: '#adb5bd',
39 | 600: '#868e96',
40 | 700: '#495057',
41 | 800: '#343a40',
42 | 900: '#212529',
43 | },
44 | red: {
45 | 50: '#fff5f5',
46 | 100: '#ffe3e3',
47 | 200: '#ffc9c9',
48 | 300: '#ffa8a8',
49 | 400: '#ff8787',
50 | 500: '#ff6b6b',
51 | 600: '#fa5252',
52 | 700: '#f03e3e',
53 | 800: '#e03131',
54 | 900: '#c92a2a',
55 | },
56 | pink: {
57 | 50: '#fff0f6',
58 | 100: '#ffdeeb',
59 | 200: '#fcc2d7',
60 | 300: '#faa2c1',
61 | 400: '#f783ac',
62 | 500: '#f06595',
63 | 600: '#e64980',
64 | 700: '#d6336c',
65 | 800: '#c2255c',
66 | 900: '#a61e4d',
67 | },
68 | grape: {
69 | 50: '#f8f0fc',
70 | 100: '#f3d9fa',
71 | 200: '#eebefa',
72 | 300: '#e599f7',
73 | 400: '#da77f2',
74 | 500: '#cc5de8',
75 | 600: '#be4bdb',
76 | 700: '#ae3ec9',
77 | 800: '#9c36b5',
78 | 900: '#862e9c',
79 | },
80 | violet: {
81 | 50: '#f3f0ff',
82 | 100: '#e5dbff',
83 | 200: '#d0bfff',
84 | 300: '#b197fc',
85 | 400: '#9775fa',
86 | 500: '#845ef7',
87 | 600: '#7950f2',
88 | 700: '#7048e8',
89 | 800: '#6741d9',
90 | 900: '#5f3dc4',
91 | },
92 | indigo: {
93 | 50: '#edf2ff',
94 | 100: '#dbe4ff',
95 | 200: '#bac8ff',
96 | 300: '#91a7ff',
97 | 400: '#748ffc',
98 | 500: '#5c7cfa',
99 | 600: '#4c6ef5',
100 | 700: '#4263eb',
101 | 800: '#3b5bdb',
102 | 900: '#364fc7',
103 | },
104 | blue: {
105 | 50: '#e7f5ff',
106 | 100: '#d0ebff',
107 | 200: '#a5d8ff',
108 | 300: '#74c0fc',
109 | 400: '#4dabf7',
110 | 500: '#339af0',
111 | 600: '#228be6',
112 | 700: '#1c7ed6',
113 | 800: '#1971c2',
114 | 900: '#1864ab',
115 | },
116 | cyan: {
117 | 50: '#e3fafc',
118 | 100: '#c5f6fa',
119 | 200: '#99e9f2',
120 | 300: '#66d9e8',
121 | 400: '#3bc9db',
122 | 500: '#22b8cf',
123 | 600: '#15aabf',
124 | 700: '#1098ad',
125 | 800: '#0c8599',
126 | 900: '#0b7285',
127 | },
128 | teal: {
129 | 50: '#e6fcf5',
130 | 100: '#c3fae8',
131 | 200: '#96f2d7',
132 | 300: '#63e6be',
133 | 400: '#38d9a9',
134 | 500: '#20c997',
135 | 600: '#12b886',
136 | 700: '#0ca678',
137 | 800: '#099268',
138 | 900: '#087f5b',
139 | },
140 | green: {
141 | 50: '#ebfbee',
142 | 100: '#d3f9d8',
143 | 200: '#b2f2bb',
144 | 300: '#8ce99a',
145 | 400: '#69db7c',
146 | 500: '#51cf66',
147 | 600: '#40c057',
148 | 700: '#37b24d',
149 | 800: '#2f9e44',
150 | 900: '#2b8a3e',
151 | },
152 | lime: {
153 | 50: '#f4fce3',
154 | 100: '#e9fac8',
155 | 200: '#d8f5a2',
156 | 300: '#c0eb75',
157 | 400: '#a9e34b',
158 | 500: '#94d82d',
159 | 600: '#82c91e',
160 | 700: '#74b816',
161 | 800: '#66a80f',
162 | 900: '#5c940d',
163 | },
164 | yellow: {
165 | 50: '#fff9db',
166 | 100: '#fff3bf',
167 | 200: '#ffec99',
168 | 300: '#ffe066',
169 | 400: '#ffd43b',
170 | 500: '#fcc419',
171 | 600: '#fab005',
172 | 700: '#f59f00',
173 | 800: '#f08c00',
174 | 900: '#e67700',
175 | },
176 | orange: {
177 | 50: '#fff4e6',
178 | 100: '#ffe8cc',
179 | 200: '#ffd8a8',
180 | 300: '#ffc078',
181 | 400: '#ffa94d',
182 | 500: '#ff922b',
183 | 600: '#fd7e14',
184 | 700: '#f76707',
185 | 800: '#e8590c',
186 | 900: '#d9480f',
187 | },
188 | },
189 | borderRadius: {
190 | DEFAULT: '0.5rem',
191 | },
192 | boxShadow: {
193 | DEFAULT:
194 | '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',
195 | },
196 | },
197 | },
198 | plugins: [],
199 | }
200 |
--------------------------------------------------------------------------------
/src-tauri/jexpe/src/pty/commands.rs:
--------------------------------------------------------------------------------
1 | use cuid::cuid;
2 | use portable_pty::{CommandBuilder, native_pty_system, PtySize};
3 | use tauri::{AppHandle, Manager, State};
4 | use tokio::sync::mpsc::channel;
5 | use tokio::task::spawn_blocking;
6 | use tokio::time::sleep;
7 | use crate::JexpeState;
8 | use crate::pty::constants::{PTY_EXIT_EVENT, PTY_SPAWN_EVENT, PTY_STDOUT_EVENT};
9 | use crate::shell::SystemShell;
10 | use super::{PtyProcess, PtyExitPayload, PtyStdoutPayload, PtySpawnPayload};
11 | use super::constants::{MAX_PIPE_CHUNK_SIZE, READ_PAUSE_DURATION};
12 |
13 | #[tauri::command]
14 | pub async fn spawn_pty(
15 | app_handle: AppHandle,
16 | state: State<'_, JexpeState>,
17 | shell: SystemShell,
18 | ) -> Result<(), String> {
19 | let id = cuid()
20 | .map_err(|_| "Failed to generate cuid.".to_string())?;
21 |
22 | // Establish our new pty for the given size
23 | let pty_system = native_pty_system();
24 | let pty_pair = pty_system.openpty(PtySize::default())
25 | .map_err(|x| x.to_string())?;
26 |
27 | let pty_master = pty_pair.master;
28 | let pty_slave = pty_pair.slave;
29 |
30 | // Spawn our process within the pty
31 | let mut cmd = CommandBuilder::new(shell.command.clone());
32 | cmd.args(shell.args.clone());
33 |
34 | if let Some(dir) = shell.cwd.clone() {
35 | cmd.cwd(dir);
36 | }
37 |
38 | for (key, value) in shell.env.clone() {
39 | cmd.env(key, value)
40 | }
41 |
42 | let mut child = pty_slave
43 | .spawn_command(cmd)
44 | .map_err(|x| x.to_string())?;
45 |
46 | // NOTE: Need to drop slave to close out file handles and avoid deadlock when waiting on the child
47 | drop(pty_slave);
48 |
49 | // Spawn a thread to wait input from frontend and write to the pty
50 | let (stdin_tx, mut stdin_rx) = channel::>(1);
51 | let mut stdin_writer = pty_master
52 | .take_writer()
53 | .map_err(|x| x.to_string())?;
54 |
55 | let stdin_task = spawn_blocking(move || {
56 | while let Some(input) = stdin_rx.blocking_recv() {
57 | if stdin_writer.write_all(&input).is_err() {
58 | break;
59 | }
60 | }
61 | });
62 |
63 | // Spawn a thread to read from the pty and send the output to the frontend
64 | let mut stdout_reader = pty_master
65 | .try_clone_reader()
66 | .map_err(|x| x.to_string())?;
67 |
68 | let app_handle_clone = app_handle.clone();
69 | let id_clone = id.clone();
70 | let stdout_task = spawn_blocking(move || {
71 | let mut buf: [u8; MAX_PIPE_CHUNK_SIZE] = [0; MAX_PIPE_CHUNK_SIZE];
72 | loop {
73 | match stdout_reader.read(&mut buf) {
74 | Ok(n) if n > 0 => {
75 | app_handle_clone
76 | .emit_all(PTY_STDOUT_EVENT, PtyStdoutPayload {
77 | id: id_clone.clone(),
78 | bytes: buf[..n].to_vec(),
79 | })
80 | .unwrap();
81 | }
82 | _ => { break; }
83 | }
84 | }
85 | });
86 |
87 | // Wait for the child to exit and send the exit code to the frontend
88 | let (kill_tx, mut kill_rx) = channel::<()>(1);
89 |
90 | // Update the state with the new pty process
91 | {
92 | let mut ptys = state.ptys.lock().await;
93 | ptys.insert(id.clone(), PtyProcess {
94 | id: id.clone(),
95 | pty_master,
96 | stdin_tx,
97 | kill_tx,
98 | stdin_task,
99 | stdout_task,
100 | });
101 |
102 | app_handle
103 | .emit_all(PTY_SPAWN_EVENT, PtySpawnPayload {
104 | id: id.clone(),
105 | shell: shell.clone(),
106 | })
107 | .unwrap();
108 |
109 | println!("[TAURI]: Successfully spawned pty ({}).", id.clone());
110 | }
111 |
112 | loop {
113 | match (child.try_wait(), kill_rx.try_recv()) {
114 | (Ok(Some(status)), _) => {
115 | app_handle
116 | .emit_all(PTY_EXIT_EVENT, PtyExitPayload {
117 | id: id.clone(),
118 | success: status.success(),
119 | code: Some(status.exit_code()),
120 | }).unwrap();
121 | break;
122 | }
123 |
124 | (_, Ok(_)) => {
125 | app_handle
126 | .emit_all(PTY_EXIT_EVENT, PtyExitPayload {
127 | id: id.clone(),
128 | success: true,
129 | code: None,
130 | }).unwrap();
131 | break;
132 | }
133 |
134 | (Err(_), _) => {
135 | app_handle
136 | .emit_all(PTY_EXIT_EVENT, PtyExitPayload {
137 | id: id.clone(),
138 | success: false,
139 | code: None,
140 | }).unwrap();
141 | break;
142 | }
143 |
144 | _ => {
145 | sleep(READ_PAUSE_DURATION).await;
146 | continue;
147 | }
148 | }
149 | }
150 |
151 | let mut ptys = state.ptys.lock().await;
152 | if let Some(pty) = ptys.remove(&id) {
153 |
154 | // Need to drop the stdin_tx to avoid deadlock when waiting on stdin_task
155 | drop(pty.stdin_tx);
156 |
157 | // Need to drop the kill_tx to drop also the kill_rx
158 | drop(pty.kill_tx);
159 |
160 | // Need to drop the pty_master to close out file handles and avoid deadlock when waiting on stdout_task
161 | drop(pty.pty_master);
162 |
163 | pty.stdin_task.await.unwrap();
164 | pty.stdout_task.await.unwrap();
165 |
166 | println!("[TAURI]: Successfully dropped pty ({}).", id.clone());
167 | }
168 |
169 | Ok(())
170 | }
171 |
172 | #[tauri::command]
173 | pub async fn write_pty(
174 | state: State<'_, JexpeState>,
175 | id: String,
176 | data: String,
177 | ) -> Result<(), String> {
178 | let mut ptys = state.ptys.lock().await;
179 |
180 | let pty = ptys.get_mut(&id)
181 | .ok_or("[WRITE_PTY] The specified ID is not associated with any pty.")?;
182 |
183 | pty.stdin_tx.send(data.into_bytes())
184 | .await
185 | .map_err(|x| x.to_string())?;
186 |
187 | Ok(())
188 | }
189 |
190 | #[tauri::command]
191 | pub async fn resize_pty(
192 | state: State<'_, JexpeState>,
193 | id: String,
194 | size: PtySize,
195 | ) -> Result<(), String> {
196 | let ptys = state.ptys.lock().await;
197 |
198 | let pty = ptys.get(&id)
199 | .ok_or("[RESIZE_PTY] The specified ID is not associated with any pty.")?;
200 |
201 | pty.pty_master.resize(size)
202 | .map_err(|x| x.to_string())?;
203 |
204 | Ok(())
205 | }
206 |
207 | #[tauri::command]
208 | pub async fn kill_pty(
209 | state: State<'_, JexpeState>,
210 | id: String,
211 | ) -> Result<(), String> {
212 | let mut ptys = state.ptys.lock().await;
213 |
214 | let pty = ptys.get_mut(&id)
215 | .ok_or("[KILL_PTY] The specified ID is not associated with any pty.")?;
216 |
217 | pty.kill_tx.send(())
218 | .await
219 | .map_err(|x| x.to_string())?;
220 |
221 | Ok(())
222 | }
--------------------------------------------------------------------------------
/public/assets/lock.svg:
--------------------------------------------------------------------------------
1 |
2 |
126 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright 2022 - Present Jexpe Contributors
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/public/assets/empty_vault.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------