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

Desktop client #78

Merged
merged 29 commits into from
Oct 24, 2023
Merged
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
41 changes: 41 additions & 0 deletions .github/workflows/tauri-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: 'tauri-publish'
on:
push:
branches:
- release

jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: install frontend dependencies
run: cd client && npm install # change this to npm or pnpm depending on which one you use
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: 'Twwe v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
projectPath: desktop
31 changes: 22 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

Teeworlds / DDraceNetwork map editor. Online and collaborative, just like the game.

A demo server is hosted at [tw.thissma.fr](https://tw.thissma.fr).
A demo server is hosted at [tw.thissma.fr](https://tw.thissma.fr). A DDNet server is hosted with the name `twwe -- tw.thissma.fr` (ip: `82.64.235.33:8303`).


## Development Status (Sep. 2023)
## Development Status (Oct. 2023)

The app is now mostly compatible with ddnet editor.
Bugs are expected. It is advised to save regularly and if a bug happens, log out and back in to roll back to the previous save.
Expand Down Expand Up @@ -40,13 +40,13 @@ The table below shows the feature parity with ddnet's in-game map editor.

### Roadmap to 1.0

* Desktop client
* Server bridging
* sync with ddnet server / reload-on-save (#21)
* Map passwords and permissions
* Undo / Redo history (#31)
* More tools: Proof, Quad tools
* Bug squashing
[*] Desktop client
[*] Server bridging
[] sync with ddnet server / reload-on-save (#21)
[] Map passwords and permissions
[*] Undo / Redo history (#31)
[] More tools: Proof, Quad tools
[] Bug squashing

## Usage

Expand Down Expand Up @@ -85,6 +85,15 @@ Use the `--cert` and `--key` flags to enable TLS support for websocket. They mus

Use the `--rpp <path>` flat to enable Rules++ support (experimental). `<path>` must be the **absolute** path to a directory containing: `rpp` (the rpp executable), `base.r` and `base.p`.

#### Server bridging

With the desktop client, it is possible to connect a "bridge" to a remote server (e.g. pi.thissma.fr:16900), such that other users can access and edit a map on your hard drive from the internet. This feature has security implications for both the server and the client, so make sure you understand them before enabling bridging.

* For the client, enabling bridge essentially gives the internet a direct access to the map file on your computer. Anyone who has access to the passphrase can do damage to your map file. Make sure you make a backup and trust the people with whom you share the passphrase.
* For the server, bridging initiates a connection to a websocket url chosen by the client. Make sure your server may not leak the local network or connect to unwanted networks. Do to not use this feature aside from the desktop client's server.

The `bridge_out` and `bridge_in` feature flags guard this feature and are disabled by default. You can enable them with `cargo run --feature bridge_in -- ...`.

### Client

Copy the `env.example` file to `.env` or `.env.production` and configure the websocket server url. For a TLS-encrypted websocket, the url schemes are `wss://` and `https://`. Otherwise, use `ws://` and `http://`.
Expand All @@ -94,6 +103,10 @@ Have [npm](https://www.npmjs.com/) installed and run `npm install` in the client
Note: the client is written in non-strict Typescript. Typescript is only used for IDE hints and documentation, but ignored by the [Vite](https://vitejs.dev/guide/features.html#typescript) bundler.
Use `npm run check` to run Typescript checks on the project.

### Desktop

The desktop client is a [Tauri](https://tauri.app/) web-app that you can install and enables editing your local map files like the default editor. You can also enable sharing your maps over the internet (read [Server bridging](#server-bridging)). Binaries are can be found in the [releases page](./releases).

## License

This work is licensed under the GNU Affero General Public License v3.0 (agpl). You are free to use and modify the code and executables under some conditions. Please contact me if the license doesn't fit your needs.
55 changes: 0 additions & 55 deletions client/assets/icon/fr.thissma.tw.svg

This file was deleted.

Loading