feat: group ui related packages under a ui directory
@@ -45,7 +45,7 @@ pkgs.stdenv.mkDerivation {
|
|||||||
ln -snf ${fira-code}/share/fonts/truetype/FiraCode-VF.ttf ./site/static/
|
ln -snf ${fira-code}/share/fonts/truetype/FiraCode-VF.ttf ./site/static/
|
||||||
|
|
||||||
# Copy icons into place
|
# Copy icons into place
|
||||||
cp -af ../pkgs/webview-ui/app/icons ./site/static/
|
cp -af ../pkgs/ui/webview-ui/app/icons ./site/static/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
extraPythonPackages = (self'.packages.clan-cli.devshellPyDeps pkgs.python3Packages);
|
extraPythonPackages = (self'.packages.clan-cli.devshellPyDeps pkgs.python3Packages);
|
||||||
};
|
};
|
||||||
"clan-app" = {
|
"clan-app" = {
|
||||||
directory = "pkgs/clan-app";
|
directory = "pkgs/ui/clan-app";
|
||||||
extraPythonPackages = (self'.packages.clan-app.devshellPyDeps pkgs.python3Packages);
|
extraPythonPackages = (self'.packages.clan-app.devshellPyDeps pkgs.python3Packages);
|
||||||
extraPythonPaths = [ "../clan-cli" ];
|
extraPythonPaths = [ "../clan-cli" ];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./clan-cli/flake-module.nix
|
./clan-cli/flake-module.nix
|
||||||
./clan-app/flake-module.nix
|
./ui/clan-app/flake-module.nix
|
||||||
./clan-vm-manager/flake-module.nix
|
./clan-vm-manager/flake-module.nix
|
||||||
./installer/flake-module.nix
|
./installer/flake-module.nix
|
||||||
./webview-ui/flake-module.nix
|
./ui/webview-ui/flake-module.nix
|
||||||
./distro-packages/flake-module.nix
|
./distro-packages/flake-module.nix
|
||||||
./icon-update/flake-module.nix
|
./icon-update/flake-module.nix
|
||||||
./generate-test-vars/flake-module.nix
|
./generate-test-vars/flake-module.nix
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
editor = pkgs.callPackage ./editor/clan-edit-codium.nix { };
|
editor = pkgs.callPackage ./editor/clan-edit-codium.nix { };
|
||||||
classgen = pkgs.callPackage ./classgen { };
|
classgen = pkgs.callPackage ./classgen { };
|
||||||
zerotierone = pkgs.callPackage ./zerotierone { };
|
zerotierone = pkgs.callPackage ./zerotierone { };
|
||||||
webview-lib = pkgs.callPackage ./webview-lib { };
|
webview-lib = pkgs.callPackage ./ui/webview-lib { };
|
||||||
update-clan-core-for-checks = pkgs.callPackage ./update-clan-core-for-checks { };
|
update-clan-core-for-checks = pkgs.callPackage ./update-clan-core-for-checks { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ pkgs.writeShellApplication {
|
|||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
REPO_ROOT="$(git rev-parse --show-toplevel)"
|
REPO_ROOT="$(git rev-parse --show-toplevel)"
|
||||||
OUT_DIR="$(realpath "$REPO_ROOT"/pkgs/webview-ui/app/icons)"
|
OUT_DIR="$(realpath "$REPO_ROOT"/pkgs/ui/webview-ui/app/icons)"
|
||||||
export OUT_DIR
|
export OUT_DIR
|
||||||
deno run --allow-all ${src}/main.ts
|
deno run --allow-all ${src}/main.ts
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -4,28 +4,14 @@ A powerful application that allows users to create and manage their own Clans.
|
|||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
Follow the instructions below to set up your development environment and start the application:
|
To run the local dev environment:
|
||||||
|
|
||||||
|
```console
|
||||||
|
❯ nix run .#ui-dev
|
||||||
|
```
|
||||||
|
|
||||||
1. **Navigate to the Webview UI Directory**
|
This will start a [process-compose] instance running `pkgs/ui/webview-ui/app` and `pkgs/ui/clan-app`, with the web server
|
||||||
|
accessible at `http://localhost:3000`.
|
||||||
Go to the `clan-core/pkgs/webview-ui/app` directory and start the web server by executing:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm install
|
|
||||||
vite
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Start the Clan App**
|
|
||||||
|
|
||||||
In the `clan-app` directory, execute the following command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
clan-app --debug --content-uri http://localhost:3000
|
|
||||||
```
|
|
||||||
|
|
||||||
This will start the application in debug mode and link it to the web server running at `http://localhost:3000`.
|
|
||||||
|
|
||||||
|
|
||||||
### Debugging Style and Layout
|
### Debugging Style and Layout
|
||||||
|
|
||||||
@@ -87,3 +73,5 @@ Here are some important documentation links related to the Clan App:
|
|||||||
> Error dialogs should be avoided where possible, since they are disruptive.
|
> Error dialogs should be avoided where possible, since they are disruptive.
|
||||||
>
|
>
|
||||||
> For simple non-critical errors, toasts can be a good alternative.
|
> For simple non-critical errors, toasts can be a good alternative.
|
||||||
|
|
||||||
|
[process-compose]: https://f1bonacc1.github.io/process-compose/
|
||||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 375 B After Width: | Height: | Size: 375 B |
|
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 717 B |
|
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 717 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -3,6 +3,7 @@
|
|||||||
mkShell,
|
mkShell,
|
||||||
ruff,
|
ruff,
|
||||||
webview-lib,
|
webview-lib,
|
||||||
|
process-compose,
|
||||||
self',
|
self',
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@@ -11,7 +12,11 @@ mkShell {
|
|||||||
|
|
||||||
inputsFrom = [ self'.devShells.default ];
|
inputsFrom = [ self'.devShells.default ];
|
||||||
|
|
||||||
inherit (clan-app) nativeBuildInputs propagatedBuildInputs;
|
inherit (clan-app) propagatedBuildInputs;
|
||||||
|
|
||||||
|
nativeBuildInputs = clan-app.nativeBuildInputs ++ [
|
||||||
|
process-compose
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
(clan-app.pythonRuntime.withPackages (
|
(clan-app.pythonRuntime.withPackages (
|
||||||
@@ -27,7 +32,7 @@ mkShell {
|
|||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
export GIT_ROOT=$(git rev-parse --show-toplevel)
|
export GIT_ROOT=$(git rev-parse --show-toplevel)
|
||||||
export PKG_ROOT=$GIT_ROOT/pkgs/clan-app
|
export PKG_ROOT=$GIT_ROOT/pkgs/ui/clan-app
|
||||||
|
|
||||||
export CLAN_CORE_PATH="$GIT_ROOT"
|
export CLAN_CORE_PATH="$GIT_ROOT"
|
||||||
|
|
||||||
5591
pkgs/ui/webview-ui/app/app/api/API.json
Normal file
1455
pkgs/ui/webview-ui/app/app/api/API.ts
Normal file
5484
pkgs/ui/webview-ui/app/app/api/Inventory.ts
Normal file
1064
pkgs/ui/webview-ui/app/app/api/modules_schemas.json
Normal file
10439
pkgs/ui/webview-ui/app/app/api/schema.json
Normal file
|
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 234 B |
|
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 291 B |
|
Before Width: | Height: | Size: 277 B After Width: | Height: | Size: 277 B |
|
Before Width: | Height: | Size: 277 B After Width: | Height: | Size: 277 B |
|
Before Width: | Height: | Size: 373 B After Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 221 B After Width: | Height: | Size: 221 B |
|
Before Width: | Height: | Size: 221 B After Width: | Height: | Size: 221 B |
|
Before Width: | Height: | Size: 221 B After Width: | Height: | Size: 221 B |
|
Before Width: | Height: | Size: 221 B After Width: | Height: | Size: 221 B |
|
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 436 B After Width: | Height: | Size: 436 B |
|
Before Width: | Height: | Size: 370 B After Width: | Height: | Size: 370 B |
|
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 407 B |
|
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 324 B |
|
Before Width: | Height: | Size: 355 B After Width: | Height: | Size: 355 B |
|
Before Width: | Height: | Size: 400 B After Width: | Height: | Size: 400 B |
|
Before Width: | Height: | Size: 305 B After Width: | Height: | Size: 305 B |
|
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
|
Before Width: | Height: | Size: 168 B After Width: | Height: | Size: 168 B |
|
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 312 B |
|
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
|
Before Width: | Height: | Size: 194 B After Width: | Height: | Size: 194 B |
|
Before Width: | Height: | Size: 467 B After Width: | Height: | Size: 467 B |
|
Before Width: | Height: | Size: 142 B After Width: | Height: | Size: 142 B |
|
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 206 B |
|
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 171 B |
|
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 282 B |
|
Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 342 B |
|
Before Width: | Height: | Size: 363 B After Width: | Height: | Size: 363 B |
|
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 448 B |
|
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 206 B |
|
Before Width: | Height: | Size: 319 B After Width: | Height: | Size: 319 B |
|
Before Width: | Height: | Size: 218 B After Width: | Height: | Size: 218 B |