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

Frontend rework #813

Merged
merged 36 commits into from
Jun 30, 2024
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f34530c
Initial migration
Benji377 Jun 9, 2024
b5f4573
Deps update
Benji377 Jun 9, 2024
06a6d86
Made project compile; Changed downloads dir
GamingGuy003 Jun 9, 2024
f965ddb
Somewhat fixed GUI
Benji377 Jun 9, 2024
ed45006
Fixed cli
GamingGuy003 Jun 9, 2024
bb831f8
Fixed frontend
Benji377 Jun 9, 2024
33e61f8
Merge pull request #789 from Raspirus/migration
Benji377 Jun 9, 2024
1318b26
Initiating Rust frontend
Benji377 Jun 10, 2024
fd66c94
Added TailwindCSS
Benji377 Jun 10, 2024
54fa924
Delete src-ui/dist directory
Benji377 Jun 11, 2024
2bf5776
Added basic structure and router
Benji377 Jun 11, 2024
c3e2022
Restructure
Benji377 Jun 12, 2024
057957a
Ugly working example
Benji377 Jun 14, 2024
39a3842
Added language
Benji377 Jun 14, 2024
2800e2a
Added info page
Benji377 Jun 14, 2024
f1f404d
Added settings card
Benji377 Jun 14, 2024
24ad3be
Progress update
Benji377 Jun 15, 2024
32a7a4c
File and events progress
Benji377 Jun 16, 2024
2c0b4b3
Functioning scan
Benji377 Jun 20, 2024
9e9579d
Added future todos
Benji377 Jun 20, 2024
e3e05dc
Added infected and settings
Benji377 Jun 21, 2024
9a29089
Added update card
Benji377 Jun 21, 2024
d8540f1
Added final components
Benji377 Jun 21, 2024
89f382f
Started styling
Benji377 Jun 22, 2024
bf43781
Added proper styling
Benji377 Jun 29, 2024
096a2f8
Added Loading style
Benji377 Jun 29, 2024
5e8899c
Fixed Updating style
Benji377 Jun 29, 2024
a660d02
General styling done
Benji377 Jun 29, 2024
b8bc43f
Refactored translations
Benji377 Jun 30, 2024
2819432
Fixed Dockerfiles
Benji377 Jun 30, 2024
410fdde
Added docs
Benji377 Jun 30, 2024
c174aaa
Merge branch 'main' of https://github.com/Raspirus/Raspirus into fron…
Benji377 Jun 30, 2024
dc61291
Update Cargo.toml
Benji377 Jun 30, 2024
9c616f5
Fixing borrowing issues
Benji377 Jun 30, 2024
4696987
Fixed clippy issues
Benji377 Jun 30, 2024
4557e2a
Added clippy suggestions
Benji377 Jun 30, 2024
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
4 changes: 4 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ linker = "arm-linux-gnueabihf-gcc"

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"

[build]
# `leptonic` depends on some `leptos-use` functions requiring this opt-in. This may change in the future.
rustflags = ["--cfg=web_sys_unstable_apis"]
3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

12 changes: 0 additions & 12 deletions .github/dependabot.yml

This file was deleted.

12 changes: 9 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev libsoup2.4-dev pkg-config libssl-dev libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev
- name: Create necessary out directory
run: mkdir out
run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
- name: Create necessary dist directory
run: mkdir dist
- name: Install Rust
run: rustup update stable
- name: Add wasm target
run: rustup target add wasm32-unknown-unknown
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Install app dependencies
run: cargo install tauri-cli trunk
- name: Install submodule src-tauri
run: cargo install --path src-tauri/
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
Expand Down
66 changes: 26 additions & 40 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,19 @@ on:
workflow_dispatch:
env:
VERSION: 1.2.1
env:
VERSION: 1.2.1
jobs:
build_arm64:
strategy:
matrix:
include:
- arch: arm64
triple: aarch64-unknown-linux-gnu
dir: arm
- arch: armhf
triple: armv7-unknown-linux-gnueabihf
dir: armhf
strategy:
matrix:
include:
Expand All @@ -18,48 +29,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build the arm64 Docker image
run: docker build -t raspirus-${{ matrix.dir }} -f ./docker/${{ matrix.dir }}/Dockerfile .
- name: Checkout code
uses: actions/checkout@v4

- name: Create the Docker container
run: docker create --name raspirus raspirus-${{ matrix.dir }}
- name: Build the arm64 Docker image
run: docker build -t raspirus-${{ matrix.dir }} -f ./docker/${{ matrix.dir }}/Dockerfile .

- name: Create dist folder
run: mkdir -p ./dist
- name: Create the Docker container
run: docker create --name raspirus raspirus-${{ matrix.dir }}

- name: Copy file from docker
run: docker cp raspirus:/usr/app/raspirus/target/${{ matrix.triple }}/release/bundle/deb/raspirus_${{ env.VERSION }}_${{ matrix.arch }}.deb ./dist
- name: Create dist folder
run: mkdir -p ./output

- name: Upload file to artifacts
uses: actions/upload-artifact@v4
with:
name: raspirus_${{ env.VERSION }}_${{ matrix.arch}}_${{ github.run_number }}.deb
path: ./dist/raspirus_${{ env.VERSION }}_${{ matrix.arch }}.deb
- name: Copy file from docker
run: docker cp raspirus:/usr/app/raspirus/target/${{ matrix.triple }}/release/bundle/deb/raspirus_${{ env.VERSION }}_${{ matrix.arch }}.deb ./output

# build_armhf:
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
#
# - name: Build the armhf Docker image
# run: docker build -t raspirus-armhf -f ./docker/armhf/Dockerfile .
#
# - name: Create the Docker container
# run: docker create --name raspirus raspirus-armhf
#
# - name: Create dist folder
# run: mkdir -p ./dist
#
# - name: Copy file from docker
# run: docker cp raspirus:/usr/app/raspirus/target/armv7-unknown-linux-gnueabihf/release/bundle/deb/raspirus_${{ env.VERSION }}_armhf.deb ./dist
#
# - name: Upload file to artifacts
# uses: actions/upload-artifact@v4
# with:
# name: raspirus_${{ env.VERSION }}_armhf_.deb
# path: ./dist/raspirus_${{ env.VERSION }}_armhf.deb
- name: Upload file to artifacts
uses: actions/upload-artifact@v4
with:
name: raspirus_${{ env.VERSION }}_${{ matrix.arch}}_${{ github.run_number }}.deb
path: ./output/raspirus_${{ env.VERSION }}_${{ matrix.arch }}.deb
42 changes: 0 additions & 42 deletions .github/workflows/njsscan.yml

This file was deleted.

15 changes: 5 additions & 10 deletions .github/workflows/tauri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev

- name: Rust setup
uses: dtolnay/rust-toolchain@stable
Expand All @@ -32,16 +32,11 @@ jobs:
with:
workspaces: './src-tauri -> target'

- name: Sync node version and setup cache
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm' # Set this to npm, yarn or pnpm.
cache-dependency-path: package-lock.json
- name: Install app dependencies
run: cargo install trunk

- name: Install app dependencies and build web
# Remove `&& yarn build` if you build your frontend in `beforeBuildCommand`
run: npm install # Change this to npm, yarn or pnpm.
- name: Add Rust WASM target
run: rustup target add wasm32-unknown-unknown

- name: Build the app
uses: tauri-apps/tauri-action@v0
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/testproject.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev libsoup2.4-dev pkg-config libssl-dev libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev
- name: Create necessary out directory
run: mkdir out
run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
- name: Create necessary dist directory
run: mkdir dist
- name: Install Rust
run: rustup update stable
- name: Install app dependencies
run: cargo install tauri-cli trunk
- name: Install submodule src-tauri
run: cargo install --path src-tauri/
- name: Install wasm target
run: rustup target add wasm32-unknown-unknown
- name: Build
run: cargo build --verbose
- name: Run tests
Expand Down
25 changes: 3 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,41 +1,22 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
node_modules
.pnp
.pnp.js
# Trunk
dist/

# testing
coverage

# next.js
.next/
out/

# production
build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
.idea/

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
*.log

# Custom
target/
.bash.example
Expand Down
3 changes: 3 additions & 0 deletions .taurignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/src
/public
/Cargo.toml
6 changes: 2 additions & 4 deletions .tokeignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Same syntax as .gitignore
# Ignores files from being counted with tokei line counter

package.json
package-lock.json

Cargo.lock
Cargo.toml
src-tauri/Cargo.toml
src-tauri/Cargo.lock
src-tauri/Cargo.lock
dist/
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
}
8 changes: 4 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"rust-analyzer.linkedProjects": [
"./src-tauri/Cargo.toml"
]
}
"emmet.includeLanguages": {
"rust": "html"
}
}
36 changes: 18 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@ Our release schedule is designed to balance feature development, stability, and

## Change Log

| Version | Description |
| --------- | ----------------------------------------------------------- |
| 0.1.0 | Initial release with basic folder scanning functionality. |
| 0.1.1 | BETA: First test build with a GUI |
| 0.1.2 | BETA: Enhanced GUI with Icons and expansions |
| 0.1.3 | BETA: Expanding functionality and further testing |
| 0.1.4 | BETA: Extending the GUI |
| 0.1.5 | BETA: Adding settings |
| 0.1.6 | BETA: Improved scanning speeds |
| 0.1.7 | BETA: Dependency update |
| 0.1.8 | BETA: Moving dependabot to renovate |
| 1.0.0 | First full release with a working product |
| 1.1.0 | Added compressed file scanning functionality |
| 1.1.1 | Fixed updating bugs and improved backend syntax |
| 1.1.2 | Improved backend and speed overall. Some bug fixes |
| 1.1.3 | Improved updater speed and transfered to GitHub signatures |
| 1.2.0 | Fixed Bugs and added Patch functionality |
| 1.2.1 | Minor bug fixes |
| Version | Description |
|---------|------------------------------------------------------------|
| 0.1.0 | Initial release with basic folder scanning functionality. |
| 0.1.1 | BETA: First test build with a GUI |
| 0.1.2 | BETA: Enhanced GUI with Icons and expansions |
| 0.1.3 | BETA: Expanding functionality and further testing |
| 0.1.4 | BETA: Extending the GUI |
| 0.1.5 | BETA: Adding settings |
| 0.1.6 | BETA: Improved scanning speeds |
| 0.1.7 | BETA: Dependency update |
| 0.1.8 | BETA: Moving dependabot to renovate |
| 1.0.0 | First full release with a working product |
| 1.1.0 | Added compressed file scanning functionality |
| 1.1.1 | Fixed updating bugs and improved backend syntax |
| 1.1.2 | Improved backend and speed overall. Some bug fixes |
| 1.1.3 | Improved updater speed and transfered to GitHub signatures |
| 1.2.0 | Fixed Bugs and added Patch functionality |
| 1.2.1 | Minor bug fixes |


Please refer to this change log for details on each version's changes and improvements. We appreciate your feedback and contributions as we continue to enhance our antivirus application to meet your security needs.
43 changes: 41 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,46 @@
# This is needed to fix codecoverage workflow errors
[package]
name = "raspirus-ui"
version = "1.2.1"
edition = "2021"

[dependencies]
console_error_panic_hook = "0.1.7"
leptonic = { git = "https://github.com/lpotthast/leptonic", features = ["csr"] }
leptos = { version = "0.6.12", features = ["csr"] }
leptos_router = { version = "0.6.12", features = ["csr"] }
leptos_sweetalert = "1.0.2"
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.117"
serde-wasm-bindgen = "0.6"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
js-sys = "0.3"
log = "0.4.21"
leptos_i18n = "0.3.3"
tauri-wasm = { git = "https://github.com/Benji377/tauri-wasm", features = ["dialog", "core", "event"] }
futures-util = "0.3.30"
uuid = { version = "1.8.0", features = ["v4"] }
time = { version = "0.3.34", features = [
"wasm-bindgen",
"macros",
"serde",
"serde-well-known",
] }
chrono = "0.4.38"

[package.metadata.leptonic]
# REQUIRED: Leptonic's build-script will copy the Leptonic themes to this directory.
style-dir = "styles"

# REQUIRED: Leptonic's build-script will copy static JS dependencies to this directory.
js-dir = "public/js"

[package.metadata.leptos-i18n]
default = "en"
locales = ["en", "de", "it"]
locales-dir = "public/locales"

[workspace]
resolver = "1"
members = ["src-tauri"]

[profile.release]
Expand Down
Loading
Loading