Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New docs & Preparing for i18n #2

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ yarn-debug.log*
yarn-error.log*

.idea
/noUse
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Wanna help make the doc site better?

Make a doc page that reference the issue at hand in a general term, to apply to every e.g terminal or function in XPipe. If a doc page is already there, you can change the page to fit with the included issue.

Use `https://mdxjs.com/playground/` to play around with the style of the page if you don't have a preview in your IDE. <br/>
Docusaurus uses [MDX](https://mdxjs.com/), normal markdown also works fine.

Be sure to follow a breakdown structure:

```
docs
|
-- cli
|
-- man
|
-- synchronization
```
6 changes: 4 additions & 2 deletions docs/directories.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Directory locations

XPipe utilizes the following directories:
XPipe uses the following directories:

## Installation data
* `%LOCALAPPDATA%\XPipe` on Windows
Expand Down Expand Up @@ -39,7 +39,9 @@ When you choose to bring certain user scripts to a remote system, they are copie

## Script data

In case any created user script has to write some data to a system, e.g. the starship scripts installing starship files, they are created in
In case any created user script has to write some data to a system,
e.g., the starship scripts installing starship files;
they are created in
* `%TEMP%\xpipe\scriptdata` on Windows
* `/tmp/xpipe/$USER/scriptdata` on Linux
* `/tmp/xpipe/$USER/scriptdata` on macOS
Expand Down
2 changes: 1 addition & 1 deletion docs/two-step-connections.md → docs/double-prompts.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Two-step connections
# Double prompts

XPipe utilizes a two-step approach when connecting to a remote system. Essentially, the first connection will be opened in the background to set everything up with init scripts etc. This is also used to validate whether we can actually connect to the system in the first place. If everything is working correctly, and any init scripts are prepared, the first connection is closed, and then a second connection is opened in your terminal.

Expand Down
8 changes: 8 additions & 0 deletions docs/iot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# IOT Devices

You can connect to IOT devices by enabling the `Don't interact with system` for the SSH connection. This option is made for these systems that do not provide fully fledged shell connections

## Common errors
**Know issues are:**
- `An error occurred: io.xpipe.core.process.ProcessOutputException: Process did not start up properly and had to be killed: Shell did not respond on stderr within timeout interval.` And can be resolved by enabling the option.

11 changes: 0 additions & 11 deletions docs/preview.md

This file was deleted.

9 changes: 9 additions & 0 deletions docs/program/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# XPipe App
Welcome to the documentation for the interface and settings.

In the pages on the left sidebar,
you will find information to navigate the program better and understand the functions that you can use.

Most of the interface you see in the documentation is the professional version of XPipe.
It won't affect the use of XPipe if you are on the community edition.
If a feature is "professionel," it will be indicated with a `PRO`
23 changes: 23 additions & 0 deletions docs/proxmox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Proxmox Connection

XPipe can now detect your proxmox instances via the SSH connection.

When using XPipe to detect and connect to your proxmox server, it is important to be `root` user. Or let the user have `pct` and `qm` in the path. <br/> (Future releases will fix this so that you don't have to be the root user.)

Be sure to use `sudo` if the k8s implementation don't work.

### I cannot connect via SSH to my proxmox?!
Root is by default prevented from logging in by SSH.

- Edit `/etc/ssh/sshd_config` from the web console/shell.
- Set `PermitRootLogin yes`
- Set `Port 22` -> remove the #
- Edit `ListenAddress 0.0.0.0` ->remove the # and replace 0.0.0.0 with your proxmox computer ip address

Restart the vm/server, and it should be all fine. Login with root user.

### Showing each instance?
In the server list on the `connections` tab, you can when clicking the arrow down. It will show a list of instances on the selected server.

#### Something is not right!
Please make a issue on our GitHub repository. Or message us on Discord/Slack.
25 changes: 25 additions & 0 deletions docs/shortcuts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Keyboard shortcuts

XPipe supports common shortcuts plus a few custom ones.

### File browser

The file list can be navigated with the arrow keys. You can extend a selection with <kbd>Shift</kbd> and move the cursor while keeping the selection by pressing <kbd>Ctrl</kbd>.

### Keyboard Shortcuts

| Shortcut | Function |
|----------------|------------------------------------------|
| CTRL and SHIFT | Can be used to select multiple files |
| ALT | Drag any file you explicitly wanna move |
| CTRL+W | Closes the current file browser tab |
| CTRL+SHIFT+W | Closes all file browser tabs |
| CTRL+Q | Closes the window |
| CTRL+F | Toggle the find text field |
| CTRL+L | Focus the path location text field |
| ALT+HOME | Goes to the file system overview page |
| ALT+H | Shows the browsing history |
| ALT+UP | Navigates to the parent directory |
| ESCAPE | Clears the selection |
| SPACE | Shows the context menu for the selection |

43 changes: 43 additions & 0 deletions docs/synchronization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Synchronization

Want to have the same connections on other XPipe installations?
XPipe uses GIT to share the data to other installations of XPipe.
Here you can find the entire reference sheet for the XPipe synchronization feature.

If you prefer videos, here is an extensive video on how to set up git synchronization:

<br/>
<iframe width="560" height="315" src="https://www.youtube.com/embed/QcUNxa37diM?si=lxXMj0Skjbu-gGCo&amp;controls=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

### Synchronizing for the first time

When using the synchronizing function for the first time, it is important to have a GIT repository ready.

**You will need to have the repository set to `private`**. <br/>
(Unless you want the public to know about your server IP address and "keys", horrendous SecOps)

You can create a remote repository on the git platform of your choice.
You need to have your local git client configured with your credentials in a credential manager, otherwise XPipe will prompt for your credentials when you start XPipe.

Nowadays, most providers require a personal access token (PAT) to authenticate from the command-line instead of traditional passwords.
**You can find common (PAT) pages here:**<br/>
**GitHub**: [Personal access tokens (classic)](https://github.com/settings/tokens)<br/>
**GitLab**: [Personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html)<br/>
**BitBucket**: [Personal access token](https://support.atlassian.com/bitbucket-cloud/docs/access-tokens/)<br/>**Gitea**: `Settings -> Applications -> Manage Access Tokens section` |
Set the token permission for repository to Read and Write. The rest of the token permissions can be set as Read.

Once you have your token you can start XPipe and go to `Settings -> Synchronization` tab and insert your git http url e.g `https://github.com/name/xpipe-vault`. Then restart XPipe and enter your `username` and `TOKEN` if asked.

To have connections inside a certain category be put inside your git repository,
you need it to right-click it or click on the `⚙️` icon (when hovering over the category)
in your `connections` tab under the `category` overview on the left side.
Press `Add to git repository`, to sync the category and connections to your git repository.
(It will sync in the background, so no need to worry.)

![Connections_sync_menu](../static/img/connections_sync_menu.png)

And TA-DA!! 🎉 You now have all your connections in your git repository.

### Troubleshooting

- Check if you have the correct login information or URL to the repository.
38 changes: 38 additions & 0 deletions docs/terminal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Terminal Configuration

This is the settings for what terminal you want to use with XPipe.

## MacOS Terminal Issues

Please test the terminal via `XPipe -> Settings -> Terminal -> Press "Test"`.

**Common macOS Permission issue:**
Check your privacy settings in the `Settings` app, then navigate to `Privacy and Security`.
Go to the `Full Disk Access`, and add the terminal if is not there in the list via the `+` icon in the lower left.
If it’s already there try removing it and re-adding it.
Sometimes it helps to close the terminal via the dock and reopen it.
os x sonoma
#### Visual guide:

<div style={{backgroundColor: 'darkblue', padding: '1rem'}}>
Current documentation follows MacOS X version `sonoma`.
</div><br/>

Open your `Settings` app
![Find permissions](../static/img/privacy_security.png)

Select `Full Disk Access`
![Find permissions](../static/img/permissions_fulldisk.png)

Add the terminal and XPipe via the `+` icon on the lower left.
And a popup will appear, like below asking for your password.
![Find permissions](../static/img/permissions_enterpassword.png)

Select the app via the `Applications` folder on the left in the file browser (finder).
![Find permissions](../static/img/add_app.png)

Your list should now look like this:
![Find permissions](../static/img/permission_app_added.png)

---
Alternatively, you can re-install the terminal.
43 changes: 40 additions & 3 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,43 @@ const config = {

// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
// to replace "en" with "zh-Hans". ISO Language Code Table
// You can find your code at: http://www.lingoes.net/en/translator/langcode.htm
// Find more information at: https://docusaurus.io/docs/api/docusaurus-config#i18n

// Be sure to run "npm run start -- --locale de" to generate the locale files.

i18n: {
defaultLocale: 'en',
locales: ['en'],
locales: ['en', 'da', 'de', 'fr'],
localeConfigs: {
en: {
label: 'English',
direction: 'ltr',
htmlLang: 'en-US',
calendar: 'gregory',
path: 'en',
},
de: {
label: 'German',
direction: 'ltr',
htmlLang: 'de-DE',
path: 'de',
},
da: {
label: 'Danish',
direction: 'ltr',
htmlLang: 'da-DK',
path: 'da',
},
// You can omit a locale (e.g. fr) if you don't need to override the defaults
fr: {
label: 'French',
direction: 'ltr',
htmlLang: 'fr-FR',
path: 'fr',
},
},
},

presets: [
Expand Down Expand Up @@ -60,13 +93,17 @@ const config = {
label: 'GitHub',
position: 'right',
},
// {
// type: 'localeDropdown',
// position: 'right',
// },
],
},
footer: {
style: 'dark',
links: [
],
copyright: `Copyright © ${new Date().getFullYear()} XPipe`,
copyright: `Copyright © 2023-${new Date().getFullYear()} XPipe UG (haftungsbeschränkt)`,
},
prism: {
theme: lightCodeTheme,
Expand Down
43 changes: 31 additions & 12 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,23 @@ const sidebars = {
'index',
{
type: 'category',
label: 'XPipe CLI',
label: 'App reference',
collapsible: true,
collapsed: false,
link: {type: 'doc', id: 'program/index'},
items: [
'shortcuts',
'synchronization',
],
},
{
type: 'category',
label: 'CLI reference',
collapsible: true,
collapsed: true,
link: {type: 'doc', id: 'cli/index'},
items: [
'cli/basics',
//'cli/example',
//'cli/tips',
{
type: 'category',
label: 'Manpages',
Expand All @@ -39,25 +48,35 @@ const sidebars = {
}
],
},
'directories',
'two-step-connections',
'preview',
'license-activation',
'security',
'troubleshooting',
'license',
{
type: 'category',
label: 'Troubleshooting',
collapsible: true,
collapsed: false,
link: {type: 'doc', id: 'troubleshooting'},
items: [
'directories',
'double-prompts',
'license-activation',
'iot',
'proxmox',
'terminal'
]
},
{
type: 'category',
label: 'Legal',
collapsible: true,
collapsed: false,
collapsed: true,
items: [
'license',
'terms-of-service',
'end-user-license-agreement',
'privacy-policy',
'reporter-privacy-policy'
]
}
},
'security',
],
};

Expand Down
Binary file added static/img/add_app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/connections_sync_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/permission_app_added.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/permissions_enterpassword.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/permissions_fulldisk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/privacy_security.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.