feat: Implement collection deletion and loading spinners

- Add API endpoint and handler to delete collections
- Introduce LoadingSpinner component for async operations
- Show loading spinners during file loading and preview rendering
- Enhance modal accessibility by removing aria-hidden attribute
- Refactor delete functionality to distinguish between collections and files/folders
- Remove unused collection definitions from config
This commit is contained in:
Mahmoud-Emad
2025-10-27 11:32:20 +03:00
parent afcd074913
commit 3961628b3d
15 changed files with 557 additions and 32 deletions

View File

@@ -0,0 +1,44 @@
## Using Docusaurus
Once you've set up Hero, you can use it to develop, manage and publish Docusaurus websites.
## Launch the Hero Website
To start a Hero Docusaurus website in development mode:
- Build the book then close the prompt with `Ctrl+C`
```bash
hero docs -d
```
- See the book on the local browser
```
bash /root/hero/var/docusaurus/develop.sh
```
You can then view the website in your browser at `https://localhost:3100`.
## Publish a Website
- To build and publish a Hero website:
- Development
```bash
hero docs -bpd
```
- Production
```bash
hero docs -bp
```
If you want to specify a different SSH key, use `-dk`:
```bash
hero docs -bpd -dk ~/.ssh/id_ed25519
```
> Note: The container handles the SSH agent and key management automatically on startup, so in most cases, you won't need to manually specify keys.

View File

@@ -0,0 +1,67 @@
You can build Hero as a Docker container.
The code is availabe at this [open-source repository](https://github.com/mik-tf/hero-container).
## Prerequisites
- Docker installed on your system (More info [here](https://manual.grid.tf/documentation/system_administrators/computer_it_basics/docker_basics.html#install-docker-desktop-and-docker-engine))
- SSH keys for deploying Hero websites (if publishing)
## Build the Image
- Clone the repository
```
git clone https://github.com/mik-tf/hero-container
cd hero-container
```
- Build the Docker image:
```bash
docker build -t heroc .
```
## Pull the Image from Docker Hub
If you don't want to build the image, you can pull it from Docker Hub.
```
docker pull logismosis/heroc
```
In this case, use `logismosi/heroc` instead of `heroc` to use the container.
## Run the Hero Container
You can run the container with an interactive shell:
```bash
docker run -it heroc
```
You can run the container with an interactive shell, while setting the host as your local network, mounting your current directory as the workspace and adding your SSH keys:
```bash
docker run --network=host \
-v $(pwd):/workspace \
-v ~/.ssh:/root/ssh \
-it heroc
```
By default, the container will:
- Start Redis server in the background
- Copy your SSH keys to the proper location
- Initialize the SSH agent
- Add your default SSH key (`id_ed25519`)
To use a different SSH key, specify it with the KEY environment variable (e.g. `KEY=id_ed25519`):
```bash
docker run --network=host \
-v $(pwd):/workspace \
-v ~/.ssh:/root/ssh \
-e KEY=your_custom_key_name \
-it heroc
```

View File

@@ -0,0 +1,22 @@
## Basic Hero
You can build Hero natively with the following lines:
```
curl https://raw.githubusercontent.com/freeflowuniverse/herolib/refs/heads/development/install_hero.sh > /tmp/install_hero.sh
bash /tmp/install_hero.sh
```
## Hero for Developers
For developers, use the following commands:
```
curl 'https://raw.githubusercontent.com/freeflowuniverse/herolib/refs/heads/development/install_v.sh' > /tmp/install_v.sh
bash /tmp/install_v.sh --analyzer --herolib
#DONT FORGET TO START A NEW SHELL (otherwise the paths will not be set)
```
## Hero with Docker
If you have issues running Hero natively, you can use the [Docker version of Hero](hero_docker.md).

View File

@@ -0,0 +1,5 @@
This ebook contains the basic information to get you started with the Hero tool.
## What is Hero?
Hero is an open-source toolset to work with Git, AI, mdBook, Docusaurus, Starlight and more.

View File

@@ -0,0 +1 @@
If you need help with Hero, reach out to the ThreeFold Support team [here](https://threefoldfaq.crisp.help/en/).