fix: Uncapitalize folder titles and finalize file cleanup

This commit is contained in:
LukeGus
2025-10-31 21:07:12 -05:00
parent e375878576
commit a9709f3877
88 changed files with 79 additions and 821 deletions

View File

@@ -1,29 +1,24 @@
# Dependencies
node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Build outputs
dist
build
.next
.nuxt
# Development files
.env.local
.env.development.local
.env.test.local
.env.production.local
# IDE and editor files
.vscode
.idea
*.swp
*.swo
*~
# OS generated files
.DS_Store
.DS_Store?
._*
@@ -32,98 +27,67 @@ build
ehthumbs.db
Thumbs.db
# Git
.git
.gitignore
# Documentation
README.md
README-CN.md
CONTRIBUTING.md
LICENSE
# Docker files (avoid copying docker files into docker)
# docker/ - commented out to allow entrypoint.sh to be copied
# Repository images
repo-images/
# Uploads directory
uploads/
# Electron files (not needed for Docker)
electron/
electron-builder.json
# Development and build artifacts
*.log
*.tmp
*.temp
# Font files (we'll optimize these in Dockerfile)
# public/fonts/*.ttf
# Logs
logs
*.log
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Dependency directories
jspm_packages/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
.tern-port

View File

@@ -1,20 +1,14 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Matches multiple files with brace expansion notation
[*.{js,jsx,ts,tsx,json,css,scss,md,yml,yaml}]
indent_style = space
indent_size = 2
# Markdown files
[*.md]
trim_trailing_whitespace = false

5
.gitattributes vendored
View File

@@ -1,7 +1,5 @@
# Auto detect text files and perform LF normalization
* text=auto eol=lf
# Source code
*.js text eol=lf
*.jsx text eol=lf
*.ts text eol=lf
@@ -14,16 +12,13 @@
*.yaml text eol=lf
*.yml text eol=lf
# Scripts
*.sh text eol=lf
*.bash text eol=lf
# Windows scripts should use CRLF
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
# Binary files
*.png binary
*.jpg binary
*.jpeg binary

2
.gitignore vendored
View File

@@ -1,4 +1,3 @@
# Logs
logs
*.log
npm-debug.log*
@@ -12,7 +11,6 @@ dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea

View File

@@ -1,23 +1,18 @@
# Ignore artifacts:
build
coverage
dist
dist-ssr
release
# Dependencies
node_modules
package-lock.json
pnpm-lock.yaml
yarn.lock
# Database
db
# Environment
.env
# Misc
*.min.js
*.min.css
openapi.json

View File

@@ -1,364 +0,0 @@
# Package Manager Submissions for Termix
This document describes the package manager integrations for Termix and how to use them.
## Chocolatey (Windows)
### Overview
Chocolatey package files are located in the `chocolatey/` directory.
### Files
- `termix.nuspec` - Package manifest
- `tools/chocolateyinstall.ps1` - Installation script
- `tools/chocolateyuninstall.ps1` - Uninstallation script
### Automatic Submission
When you run the "Build Electron App" workflow with `artifact_destination: submit`:
1. The workflow builds the Windows x64 MSI
2. Automatically creates a Chocolatey package
3. Pushes to Chocolatey if `CHOCOLATEY_API_KEY` secret is configured
### Setup
Add your Chocolatey API key as a GitHub secret:
- Secret name: `CHOCOLATEY_API_KEY`
- Get your API key from: https://community.chocolatey.org/account
**Note:** The package ID is set to "termix-ssh" to avoid conflicts with existing packages.
### Manual Submission
If you prefer to submit manually:
1. Download the `chocolatey-package` artifact from GitHub Actions
2. Run: `choco push termix-ssh.{VERSION}.nupkg --source https://push.chocolatey.org/`
### Installation (for users)
Once approved on Chocolatey:
```powershell
choco install termix-ssh
```
---
## Flatpak (Linux)
### Overview
Flatpak package files are located in the `flatpak/` directory.
### Files
- `com.karmaa.termix.yml` - Flatpak manifest (supports x64 and arm64)
- `com.karmaa.termix.desktop` - Desktop entry file
- `com.karmaa.termix.metainfo.xml` - AppStream metadata
- `flathub.json` - Flathub configuration
- `prepare-flatpak.sh` - Helper script for manual preparation
- `README.md` - Detailed Flatpak documentation
### Automatic Preparation
When you run the "Build Electron App" workflow with `artifact_destination: submit`:
1. The workflow builds Linux x64 and arm64 AppImages
2. Generates all required Flatpak submission files
3. Creates a `flatpak-submission` artifact with everything needed
### Submission Process
Flatpak requires manual PR submission to Flathub:
1. **Download the artifact**
- Download `flatpak-submission` from the GitHub Actions run
- Extract all files
2. **Fork Flathub**
- Go to https://github.com/flathub/flathub
- Click "Fork"
3. **Prepare your fork**
```bash
git clone https://github.com/YOUR-USERNAME/flathub.git
cd flathub
git checkout -b com.karmaa.termix
```
4. **Copy submission files**
- Copy all files from the `flatpak-submission` artifact to your fork root
5. **Submit PR**
```bash
git add .
git commit -m "Add Termix application"
git push origin com.karmaa.termix
```
- Go to your fork on GitHub
- Click "Compare & pull request"
- Submit to flathub/flathub
6. **Wait for review**
- Flathub maintainers will review (typically 1-5 days)
- Be responsive to feedback
### Testing Locally
Before submitting, you can test the Flatpak build:
```bash
# Install flatpak-builder
sudo apt install flatpak-builder
# Build and install
cd flatpak/
flatpak-builder --user --install --force-clean build-dir com.karmaa.termix.yml
# Run
flatpak run com.karmaa.termix
```
### Installation (for users)
Once approved on Flathub:
```bash
flatpak install flathub com.karmaa.termix
```
---
## Homebrew Cask (macOS)
### Overview
Homebrew Cask files are located in the `homebrew/` directory. Casks are used for GUI macOS applications.
### Files
- `termix.rb` - Homebrew Cask formula
- `README.md` - Detailed documentation
### Submission Options
You have two options for distributing via Homebrew:
#### Option 1: Official Homebrew Cask (Recommended)
Submit to https://github.com/Homebrew/homebrew-cask for maximum visibility.
**Advantages:**
- Discoverable by all Homebrew users
- Automatic update checking
- Official Homebrew support
**Process:**
1. Download the `homebrew-submission` artifact from GitHub Actions
2. Fork Homebrew/homebrew-cask
3. Add the cask file to `Casks/t/termix.rb`
4. Test locally and run audit checks
5. Submit PR
**Requirements:**
- App must be stable (not beta)
- Source code must be public
- Must pass `brew audit --cask` checks
- DMG must be code-signed and notarized (already done)
#### Option 2: Custom Tap (Alternative)
Create your own Homebrew tap at `Termix-SSH/homebrew-termix`.
**Advantages:**
- Full control over updates
- No approval process
- Can include beta releases
**Setup:**
```bash
# Create repository: Termix-SSH/homebrew-termix
# Add file: Casks/termix.rb (from homebrew-submission artifact)
```
**Users install with:**
```bash
brew tap termix-ssh/termix
brew install --cask termix
```
### Automatic Preparation
When you run the "Build Electron App" workflow with `artifact_destination: submit`:
1. Builds macOS universal DMG
2. Calculates SHA256 checksum
3. Updates cask file with version and checksum
4. Verifies Ruby syntax
5. Creates a `homebrew-submission` artifact
### Installation (for users)
**From Official Homebrew (after approval):**
```bash
brew install --cask termix
```
**From Custom Tap:**
```bash
brew tap termix-ssh/termix
brew install --cask termix
```
### Updating the Cask
**Official Homebrew Cask:**
- Homebrew bot auto-updates within hours of new releases
- Or manually submit PR with new version/checksum
**Custom Tap:**
- Update version and sha256 in termix.rb
- Commit to your tap repository
- Users run: `brew upgrade --cask termix`
### Testing Locally
```bash
# Test installation
brew install --cask ./homebrew/termix.rb
# Verify it works
open /Applications/Termix.app
# Uninstall
brew uninstall --cask termix
# Run audit
brew audit --cask --online ./homebrew/termix.rb
brew style ./homebrew/termix.rb
```
---
## Workflow Integration
### GitHub Actions Workflow
The `.github/workflows/electron-build.yml` includes three package manager submission jobs:
1. **submit-to-chocolatey** - Automatically submits to Chocolatey
- Requires: `CHOCOLATEY_API_KEY` secret
- Runs when: `artifact_destination == 'submit'`
- Platform: Windows
- Output: Auto-pushes to Chocolatey + artifact
2. **submit-to-flatpak** - Prepares Flatpak submission files
- No secrets required
- Runs when: `artifact_destination == 'submit'`
- Platform: Linux
- Output: Artifact for manual Flathub PR (both x64 and arm64)
3. **submit-to-homebrew** - Prepares Homebrew Cask submission files
- No secrets required
- Runs when: `artifact_destination == 'submit'`
- Platform: macOS
- Output: Artifact for manual Homebrew PR or custom tap
### Usage
When creating a release, select "submit" for artifact destination:
- This will build for all platforms (Windows, Linux, macOS)
- Automatically submit to Chocolatey (if API key is configured)
- Create Flatpak submission artifact for manual Flathub PR
- Create Homebrew submission artifact for manual Homebrew PR or custom tap
### Artifacts Generated
- `chocolatey-package` - .nupkg file (also auto-pushed if key configured)
- `flatpak-submission` - Complete Flathub submission (x64 + arm64)
- `homebrew-submission` - Complete Homebrew Cask submission (universal DMG)
---
## Version Management
Both package managers automatically use the version from `package.json`:
- Current version: 1.8.0
- Version is dynamically injected during the build process
- Download URLs are constructed using the release tag format: `release-{VERSION}-tag`
### Important Notes
- Ensure your GitHub releases follow the tag format: `release-X.Y.Z-tag`
- Example: `release-1.8.0-tag`
- If your tag format differs, update the workflows accordingly
---
## Support
For issues with:
- **Chocolatey package**: Open issue at https://community.chocolatey.org/packages/termix
- **Flatpak package**: Open issue at https://github.com/flathub/com.karmaa.termix
- **Homebrew Cask**:
- Official: Open issue at https://github.com/Homebrew/homebrew-cask/issues
- Custom tap: Open issue in your tap repository
- **Build process**: Open issue at https://github.com/Termix-SSH/Termix/issues
## Installation Summary
### Windows
```powershell
# Chocolatey (after approval)
choco install termix-ssh
```
### Linux
```bash
# Flatpak (after approval)
flatpak install flathub com.karmaa.termix
```
### macOS
```bash
# Official Homebrew Cask (after approval)
brew install --cask termix
# Or from custom tap
brew tap termix-ssh/termix
brew install --cask termix
```
---
## Future Package Managers
To add support for additional package managers:
1. Create a directory with package files (e.g., `snap/`, `homebrew/`)
2. Add a job to `.github/workflows/electron-build.yml`
3. Update this document with instructions
4. Consider whether submission can be automated or requires manual PR

View File

@@ -1,311 +0,0 @@
# Package Submission Setup Summary
This document summarizes all the package manager integrations that have been set up for Termix.
## Overview
Termix now has complete package manager support for all three major platforms:
- **Windows**: Chocolatey
- **Linux**: Flatpak (Flathub)
- **macOS**: Homebrew Cask
## Files Created
### Chocolatey (Windows)
```
chocolatey/
├── termix.nuspec # Package manifest
└── tools/
├── chocolateyinstall.ps1 # Installation script
└── chocolateyuninstall.ps1 # Uninstallation script
```
### Flatpak (Linux)
```
flatpak/
├── com.karmaa.termix.yml # Flatpak manifest (x64 & arm64)
├── com.karmaa.termix.desktop # Desktop entry file
├── com.karmaa.termix.metainfo.xml # AppStream metadata
├── flathub.json # Flathub configuration
├── prepare-flatpak.sh # Helper script
└── README.md # Detailed documentation
```
### Homebrew (macOS)
```
homebrew/
├── termix.rb # Homebrew Cask formula
└── README.md # Detailed documentation
```
### Documentation
```
PACKAGE_MANAGERS.md # Complete guide for all package managers
PACKAGE_SUBMISSION_SUMMARY.md # This file
```
### Modified Files
```
.github/workflows/electron-build.yml # Added 3 new submission jobs
```
## GitHub Actions Integration
### New Jobs Added to Workflow
1. **submit-to-chocolatey** (Lines 551-654)
- Platform: Windows
- Trigger: `artifact_destination == 'submit'`
- Actions:
- Downloads Windows x64 MSI
- Calculates SHA256 checksum
- Updates package manifest with version/checksum
- Packs Chocolatey package
- Automatically pushes to Chocolatey (if API key configured)
- Creates artifact for backup
2. **submit-to-flatpak** (Lines 656-844)
- Platform: Linux (Ubuntu)
- Trigger: `artifact_destination == 'submit'`
- Actions:
- Downloads x64 and arm64 AppImages
- Calculates SHA256 checksums for both architectures
- Generates PNG icons from SVG
- Updates manifest and metainfo with version/checksums/date
- Creates complete submission artifact
- Includes detailed submission instructions
3. **submit-to-homebrew** (Lines 846-1059)
- Platform: macOS
- Trigger: `artifact_destination == 'submit'`
- Actions:
- Downloads macOS universal DMG
- Calculates SHA256 checksum
- Updates Cask formula with version/checksum
- Verifies Ruby syntax
- Creates submission artifact
- Includes instructions for both official and custom tap
## Setup Required
### Chocolatey (Automated)
Add GitHub secret to enable automatic submission:
- **Secret name**: `CHOCOLATEY_API_KEY`
- **Get from**: https://community.chocolatey.org/account
- **Location**: Repository Settings → Secrets and variables → Actions
**Note:** Package ID is "termix-ssh"
### Flatpak (Manual)
No secrets required. Process:
1. Run workflow with "submit" option
2. Download `flatpak-submission` artifact
3. Fork https://github.com/flathub/flathub
4. Copy files and create PR
### Homebrew (Manual)
No secrets required. Two options:
**Option 1: Official Homebrew**
1. Run workflow with "submit" option
2. Download `homebrew-submission` artifact
3. Fork https://github.com/Homebrew/homebrew-cask
4. Add to `Casks/t/termix.rb` and create PR
**Option 2: Custom Tap**
1. Create repository: `Termix-SSH/homebrew-termix`
2. Add `Casks/termix.rb` from artifact
3. Users install with: `brew tap termix-ssh/termix && brew install --cask termix`
## How to Use
### For Each Release:
1. **Prepare Release**
- Ensure version in `package.json` is updated
- Create GitHub release with tag format: `release-X.Y.Z-tag`
- Example: `release-1.8.0-tag`
2. **Run Build Workflow**
- Go to Actions → "Build Electron App"
- Click "Run workflow"
- Select options:
- **Platform**: `all` (or specific platform)
- **Artifact destination**: `submit`
3. **Automated Submissions**
- **Chocolatey**: Automatically pushed (if API key configured)
- Package appears on Chocolatey within hours
- Users can install with: `choco install termix`
4. **Manual Submissions**
- **Flatpak**: Download `flatpak-submission` artifact
- Follow instructions in `SUBMISSION_INSTRUCTIONS.md`
- Submit PR to flathub/flathub
- Review time: 1-5 days
- **Homebrew**: Download `homebrew-submission` artifact
- Follow instructions in `SUBMISSION_INSTRUCTIONS.md`
- Option 1: Submit PR to Homebrew/homebrew-cask
- Option 2: Push to custom tap
- Review time (official): 24-48 hours
## Version Management
All package managers automatically use the version from `package.json`:
- Current version: **1.8.0**
- Version format: Semantic versioning (X.Y.Z)
- All checksums calculated automatically
- Download URLs constructed automatically
## Important Notes
### Release Tag Format
The workflows expect GitHub release tags in this format:
```
release-{VERSION}-tag
```
Examples:
-`release-1.8.0-tag`
-`release-2.0.0-tag`
-`v1.8.0`
-`1.8.0`
If your tag format is different, update these lines in the workflows:
- **Chocolatey**: Line 597
- **Flatpak**: Lines 724-725
- **Homebrew**: Line 900
### Code Signing Requirements
All builds require proper code signing:
- **Windows MSI**: Already signed via electron-builder
- **Linux AppImage**: No signing required
- **macOS DMG**: Must be signed and notarized (already configured)
### File Naming Conventions
The workflows expect these file naming patterns:
- Windows: `termix_windows_x64_{version}_msi.msi`
- Linux x64: `termix_linux_x64_{version}_appimage.AppImage`
- Linux arm64: `termix_linux_arm64_{version}_appimage.AppImage`
- macOS: `termix_macos_universal_{version}_dmg.dmg`
These are already configured in `electron-builder.json`.
## Testing Locally
### Chocolatey
```powershell
cd chocolatey
choco pack termix-ssh.nuspec
choco install termix-ssh -s . -y
```
### Flatpak
```bash
cd flatpak
flatpak-builder --user --install --force-clean build-dir com.karmaa.termix.yml
flatpak run com.karmaa.termix
```
### Homebrew
```bash
cd homebrew
brew install --cask ./termix.rb
brew uninstall --cask termix
```
## User Installation Commands
Once approved on all platforms:
```bash
# Windows (Chocolatey)
choco install termix-ssh
# Linux (Flatpak)
flatpak install flathub com.karmaa.termix
# macOS (Homebrew - Official)
brew install --cask termix
# macOS (Homebrew - Custom Tap)
brew tap termix-ssh/termix
brew install --cask termix
```
## Update Strategy
### Chocolatey
- Updates pushed automatically when you run workflow with "submit"
- Users update with: `choco upgrade termix-ssh`
### Flatpak
- After initial approval, you get a repository: `flathub/com.karmaa.termix`
- For updates: commit new version/checksum to that repo
- Flathub auto-builds and publishes
- Users update with: `flatpak update`
### Homebrew (Official)
- Homebrew bot auto-updates within hours of new releases
- Detects new releases via GitHub releases
- Users update with: `brew upgrade --cask termix`
### Homebrew (Custom Tap)
- Manually update the cask file in your tap repo
- Users update with: `brew upgrade --cask termix`
## Resources
- [Chocolatey Documentation](https://docs.chocolatey.org/)
- [Flatpak Documentation](https://docs.flatpak.org/)
- [Flathub Submission](https://docs.flathub.org/docs/for-app-authors/submission)
- [Homebrew Cask Cookbook](https://docs.brew.sh/Cask-Cookbook)
- [AppStream Guidelines](https://www.freedesktop.org/software/appstream/docs/)
## Support
For issues:
- **Build/Workflow**: https://github.com/Termix-SSH/Termix/issues
- **Chocolatey**: https://community.chocolatey.org/packages/termix-ssh
- **Flatpak**: https://github.com/flathub/com.karmaa.termix/issues
- **Homebrew**: https://github.com/Homebrew/homebrew-cask/issues (or your custom tap)
---
**Next Steps:**
1. Add `CHOCOLATEY_API_KEY` to GitHub secrets
2. Run workflow with "submit" option for your next release
3. Download artifacts and follow submission instructions
4. Monitor submission PRs and respond to feedback

View File

@@ -6,34 +6,33 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Termix</title>
<style>
/* Custom scrollbar styles */
.hide-scrollbar {
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none;
-ms-overflow-style: none;
}
.hide-scrollbar::-webkit-scrollbar {
display: none; /* Chrome, Safari, Opera */
display: none;
}
.skinny-scrollbar {
scrollbar-width: thin; /* Firefox */
scrollbar-color: #4a4a4a #1e1e21; /* thumb and track color for Firefox */
scrollbar-width: thin;
scrollbar-color: #4a4a4a #1e1e21;
}
.skinny-scrollbar::-webkit-scrollbar {
width: 6px; /* width for vertical scrollbar */
height: 6px; /* height for horizontal scrollbar */
width: 6px;
height: 6px;
}
.skinny-scrollbar::-webkit-scrollbar-track {
background: #1e1e21; /* track color */
background: #1e1e21;
}
.skinny-scrollbar::-webkit-scrollbar-thumb {
background-color: #4a4a4a; /* thumb color */
border-radius: 3px; /* roundness of the thumb */
border: 1px solid #1e1e21; /* border around the thumb */
background-color: #4a4a4a;
border-radius: 3px;
border: 1px solid #1e1e21;
}
</style>
</head>

View File

@@ -231,9 +231,6 @@ class AuthManager {
return jwt.sign(payload, jwtSecret, { expiresIn } as jwt.SignOptions);
}
/**
* Parse expiresIn string to milliseconds
*/
private parseExpiresIn(expiresIn: string): number {
const match = expiresIn.match(/^(\d+)([smhd])$/);
if (!match) return 7 * 24 * 60 * 60 * 1000;

View File

@@ -206,7 +206,6 @@ function Sidebar({
data-side={side}
data-slot="sidebar"
>
{/* This is what handles the sidebar gap on desktop */}
<div
data-slot="sidebar-gap"
className={cn(

View File

@@ -2,8 +2,8 @@
import { StrictMode, useEffect, useState, useRef } from "react";
import { createRoot } from "react-dom/client";
import "./index.css";
import DesktopApp from "./ui/Desktop/DesktopApp.tsx";
import { MobileApp } from "./ui/Mobile/MobileApp.tsx";
import DesktopApp from "@/ui/desktop/DesktopApp.tsx";
import { MobileApp } from "@/ui/mobile/MobileApp.tsx";
import { ThemeProvider } from "@/components/theme-provider";
import "./i18n/i18n";
import { isElectron } from "./ui/main-axios.ts";

View File

@@ -1,15 +1,15 @@
import React, { useState, useEffect } from "react";
import { LeftSidebar } from "@/ui/Desktop/Navigation/LeftSidebar.tsx";
import { Dashboard } from "@/ui/Desktop/Apps/Dashboard/Dashboard.tsx";
import { AppView } from "@/ui/Desktop/Navigation/AppView.tsx";
import { HostManager } from "@/ui/Desktop/Apps/Host Manager/HostManager.tsx";
import { LeftSidebar } from "@/ui/desktop/navigation/LeftSidebar.tsx";
import { Dashboard } from "@/ui/desktop/apps/dashboard/Dashboard.tsx";
import { AppView } from "@/ui/desktop/navigation/AppView.tsx";
import { HostManager } from "@/ui/desktop/apps/host manager/HostManager.tsx";
import {
TabProvider,
useTabs,
} from "@/ui/Desktop/Navigation/Tabs/TabContext.tsx";
import { TopNavbar } from "@/ui/Desktop/Navigation/TopNavbar.tsx";
import { AdminSettings } from "@/ui/Desktop/Admin/AdminSettings.tsx";
import { UserProfile } from "@/ui/Desktop/User/UserProfile.tsx";
} from "@/ui/desktop/navigation/tabs/TabContext.tsx";
import { TopNavbar } from "@/ui/desktop/navigation/TopNavbar.tsx";
import { AdminSettings } from "@/ui/desktop/admin/AdminSettings.tsx";
import { UserProfile } from "@/ui/desktop/user/UserProfile.tsx";
import { Toaster } from "@/components/ui/sonner.tsx";
import { VersionCheckModal } from "@/components/ui/version-check-modal.tsx";
import { getUserInfo } from "@/ui/main-axios.ts";

View File

@@ -1,7 +1,7 @@
import React, { useEffect, useState } from "react";
import { Auth } from "@/ui/Desktop/Authentication/Auth.tsx";
import { UpdateLog } from "@/ui/Desktop/Apps/Dashboard/Apps/UpdateLog.tsx";
import { AlertManager } from "@/ui/Desktop/Apps/Dashboard/Apps/Alerts/AlertManager.tsx";
import { Auth } from "@/ui/desktop/authentication/Auth.tsx";
import { UpdateLog } from "@/ui/desktop/apps/dashboard/apps/UpdateLog.tsx";
import { AlertManager } from "@/ui/desktop/apps/dashboard/apps/alerts/AlertManager.tsx";
import { Button } from "@/components/ui/button.tsx";
import {
getUserInfo,
@@ -19,7 +19,7 @@ import {
} from "@/ui/main-axios.ts";
import { useSidebar } from "@/components/ui/sidebar.tsx";
import { Separator } from "@/components/ui/separator.tsx";
import { useTabs } from "@/ui/Desktop/Navigation/Tabs/TabContext.tsx";
import { useTabs } from "@/ui/desktop/navigation/tabs/TabContext.tsx";
import {
ChartLine,
Clock,

View File

@@ -14,8 +14,8 @@ import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { toast } from "sonner";
import { useTranslation } from "react-i18next";
import { TOTPDialog } from "@/ui/Desktop/Navigation/TOTPDialog.tsx";
import { SSHAuthDialog } from "@/ui/Desktop/Navigation/SSHAuthDialog.tsx";
import { TOTPDialog } from "@/ui/desktop/navigation/TOTPDialog.tsx";
import { SSHAuthDialog } from "@/ui/desktop/navigation/SSHAuthDialog.tsx";
import {
Upload,
FolderPlus,

View File

@@ -1072,7 +1072,6 @@ export function FileManagerGrid({
})}
</div>
) : (
/* List view */
<div className="space-y-1">
{createIntent && (
<CreateIntentListItem

View File

@@ -1084,7 +1084,6 @@ export function FileViewer({
</div>
</>
) : (
/* Full preview mode */
<div className="flex-1 overflow-auto p-6">
<div className="max-w-4xl mx-auto">
<ReactMarkdown

View File

@@ -1,6 +1,6 @@
import React from "react";
import { DraggableWindow } from "./DraggableWindow";
import { Terminal } from "../../Terminal/Terminal";
import { Terminal } from "@/ui/desktop/apps/terminal/Terminal";
import { useWindowManager } from "./WindowManager";
import { useTranslation } from "react-i18next";

View File

@@ -1,4 +1,3 @@
/* eslint-disable react-refresh/only-export-components */
import React, { useState, useCallback, useRef } from "react";
export interface WindowInstance {

View File

@@ -1,5 +1,5 @@
import React, { useState, useEffect, useRef } from "react";
import { HostManagerViewer } from "@/ui/Desktop/Apps/Host Manager/HostManagerViewer.tsx";
import { HostManagerViewer } from "@/ui/desktop/apps/host manager/HostManagerViewer.tsx";
import {
Tabs,
TabsContent,
@@ -7,9 +7,9 @@ import {
TabsTrigger,
} from "@/components/ui/tabs.tsx";
import { Separator } from "@/components/ui/separator.tsx";
import { HostManagerEditor } from "@/ui/Desktop/Apps/Host Manager/HostManagerEditor.tsx";
import { CredentialsManager } from "@/ui/Desktop/Apps/Credentials/CredentialsManager.tsx";
import { CredentialEditor } from "@/ui/Desktop/Apps/Credentials/CredentialEditor.tsx";
import { HostManagerEditor } from "@/ui/desktop/apps/host manager/HostManagerEditor.tsx";
import { CredentialsManager } from "@/ui/desktop/apps/credentials/CredentialsManager.tsx";
import { CredentialEditor } from "@/ui/desktop/apps/credentials/CredentialEditor.tsx";
import { useSidebar } from "@/components/ui/sidebar.tsx";
import { useTranslation } from "react-i18next";
import type { SSHHost, HostManagerProps } from "../../../types/index";

View File

@@ -35,7 +35,7 @@ import {
getSnippets,
} from "@/ui/main-axios.ts";
import { useTranslation } from "react-i18next";
import { CredentialSelector } from "@/ui/Desktop/Apps/Credentials/CredentialSelector.tsx";
import { CredentialSelector } from "@/ui/desktop/apps/credentials/CredentialSelector.tsx";
import CodeMirror from "@uiw/react-codemirror";
import { oneDark } from "@codemirror/theme-one-dark";
import { EditorView } from "@codemirror/view";
@@ -64,7 +64,7 @@ import {
FAST_SCROLL_MODIFIERS,
DEFAULT_TERMINAL_CONFIG,
} from "@/constants/terminal-themes";
import { TerminalPreview } from "@/ui/Desktop/Apps/Terminal/TerminalPreview.tsx";
import { TerminalPreview } from "@/ui/desktop/apps/terminal/TerminalPreview.tsx";
import type { TerminalConfig } from "@/types";
import { Plus, X } from "lucide-react";

View File

@@ -1136,7 +1136,6 @@ export function HostManagerViewer({ onEditHost }: SSHManagerHostViewerProps) {
</Badge>
)}
{/* Monitoring Status Badges */}
{(() => {
const monitoringStatus =
getMonitoringStatus(host);

View File

@@ -3,13 +3,13 @@ import { useSidebar } from "@/components/ui/sidebar.tsx";
import { Status, StatusIndicator } from "@/components/ui/shadcn-io/status";
import { Separator } from "@/components/ui/separator.tsx";
import { Button } from "@/components/ui/button.tsx";
import { Tunnel } from "@/ui/Desktop/Apps/Tunnel/Tunnel.tsx";
import { Tunnel } from "@/ui/desktop/apps/tunnel/Tunnel.tsx";
import {
getServerStatusById,
getServerMetricsById,
type ServerMetrics,
} from "@/ui/main-axios.ts";
import { useTabs } from "@/ui/Desktop/Navigation/Tabs/TabContext.tsx";
import { useTabs } from "@/ui/desktop/navigation/tabs/TabContext.tsx";
import { useTranslation } from "react-i18next";
import { toast } from "sonner";
import {

View File

@@ -19,7 +19,7 @@ import {
updateSnippet,
deleteSnippet,
} from "@/ui/main-axios";
import { useTabs } from "@/ui/Desktop/Navigation/Tabs/TabContext.tsx";
import { useTabs } from "@/ui/desktop/navigation/tabs/TabContext.tsx";
import type { Snippet, SnippetData } from "../../../../types/index.js";
interface TabData {

View File

@@ -18,8 +18,8 @@ import {
logActivity,
getSnippets,
} from "@/ui/main-axios.ts";
import { TOTPDialog } from "@/ui/Desktop/Navigation/TOTPDialog.tsx";
import { SSHAuthDialog } from "@/ui/Desktop/Navigation/SSHAuthDialog.tsx";
import { TOTPDialog } from "@/ui/desktop/navigation/TOTPDialog.tsx";
import { SSHAuthDialog } from "@/ui/desktop/navigation/SSHAuthDialog.tsx";
import {
TERMINAL_THEMES,
DEFAULT_TERMINAL_CONFIG,

View File

@@ -5,7 +5,7 @@ import { Checkbox } from "@/components/ui/checkbox.tsx";
import { Separator } from "@/components/ui/separator.tsx";
import { useTranslation } from "react-i18next";
import { getCookie, setCookie } from "@/ui/main-axios.ts";
import { useTabs } from "@/ui/Desktop/Navigation/Tabs/TabContext.tsx";
import { useTabs } from "@/ui/desktop/navigation/tabs/TabContext.tsx";
import { X } from "lucide-react";
interface TabData {

View File

@@ -1,6 +1,6 @@
import React, { useState, useEffect, useCallback } from "react";
import { useTranslation } from "react-i18next";
import { TunnelViewer } from "@/ui/Desktop/Apps/Tunnel/TunnelViewer.tsx";
import { TunnelViewer } from "@/ui/desktop/apps/tunnel/TunnelViewer.tsx";
import {
getSSHHosts,
getTunnelStatuses,

View File

@@ -6,7 +6,7 @@ import { PasswordInput } from "@/components/ui/password-input.tsx";
import { Label } from "@/components/ui/label.tsx";
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert.tsx";
import { useTranslation } from "react-i18next";
import { LanguageSwitcher } from "@/ui/Desktop/User/LanguageSwitcher.tsx";
import { LanguageSwitcher } from "@/ui/desktop/user/LanguageSwitcher.tsx";
import { toast } from "sonner";
import { Monitor } from "lucide-react";
import {
@@ -26,8 +26,8 @@ import {
isElectron,
logoutUser,
} from "../../main-axios.ts";
import { ElectronServerConfig as ServerConfigComponent } from "@/ui/Desktop/Authentication/ElectronServerConfig.tsx";
import { ElectronLoginForm } from "@/ui/Desktop/Authentication/ElectronLoginForm.tsx";
import { ElectronServerConfig as ServerConfigComponent } from "@/ui/desktop/authentication/ElectronServerConfig.tsx";
import { ElectronLoginForm } from "@/ui/desktop/authentication/ElectronLoginForm.tsx";
interface AuthProps extends React.ComponentProps<"div"> {
setLoggedIn: (loggedIn: boolean) => void;

View File

@@ -291,7 +291,6 @@ export function ElectronLoginForm({
</div>
)}
{/* Iframe Container */}
<div className="flex-1 overflow-hidden">
<iframe
ref={iframeRef}

View File

@@ -1,8 +1,8 @@
import React, { useEffect, useRef, useState, useMemo } from "react";
import { Terminal } from "@/ui/Desktop/Apps/Terminal/Terminal.tsx";
import { Server as ServerView } from "@/ui/Desktop/Apps/Server/Server.tsx";
import { FileManager } from "@/ui/Desktop/Apps/File Manager/FileManager.tsx";
import { useTabs } from "@/ui/Desktop/Navigation/Tabs/TabContext.tsx";
import { Terminal } from "@/ui/desktop/apps/terminal/Terminal.tsx";
import { Server as ServerView } from "@/ui/desktop/apps/server/Server.tsx";
import { FileManager } from "@/ui/desktop/apps/file manager/FileManager.tsx";
import { useTabs } from "@/ui/desktop/navigation/tabs/TabContext.tsx";
import {
ResizablePanelGroup,
ResizablePanel,
@@ -16,7 +16,7 @@ import {
TERMINAL_THEMES,
DEFAULT_TERMINAL_CONFIG,
} from "@/constants/terminal-themes";
import { SSHAuthDialog } from "@/ui/Desktop/Navigation/SSHAuthDialog.tsx";
import { SSHAuthDialog } from "@/ui/desktop/navigation/SSHAuthDialog.tsx";
interface TabData {
id: number;

View File

@@ -26,9 +26,9 @@ import {
} from "@radix-ui/react-dropdown-menu";
import { Input } from "@/components/ui/input.tsx";
import { Button } from "@/components/ui/button.tsx";
import { FolderCard } from "@/ui/Desktop/Navigation/Hosts/FolderCard.tsx";
import { FolderCard } from "@/ui/desktop/navigation/hosts/FolderCard.tsx";
import { getSSHHosts } from "@/ui/main-axios.ts";
import { useTabs } from "@/ui/Desktop/Navigation/Tabs/TabContext.tsx";
import { useTabs } from "@/ui/desktop/navigation/tabs/TabContext.tsx";
interface SSHHost {
id: number;

View File

@@ -3,13 +3,13 @@ import { flushSync } from "react-dom";
import { useSidebar } from "@/components/ui/sidebar.tsx";
import { Button } from "@/components/ui/button.tsx";
import { ChevronDown, ChevronUpIcon } from "lucide-react";
import { Tab } from "@/ui/Desktop/Navigation/Tabs/Tab.tsx";
import { useTabs } from "@/ui/Desktop/Navigation/Tabs/TabContext.tsx";
import { Tab } from "@/ui/desktop/navigation/tabs/Tab.tsx";
import { useTabs } from "@/ui/desktop/navigation/tabs/TabContext.tsx";
import { useTranslation } from "react-i18next";
import { TabDropdown } from "@/ui/Desktop/Navigation/Tabs/TabDropdown.tsx";
import { SnippetsSidebar } from "@/ui/Desktop/Apps/Terminal/SnippetsSidebar.tsx";
import { SshToolsSidebar } from "@/ui/Desktop/Apps/Tools/SshToolsSidebar.tsx";
import { ToolsMenu } from "@/ui/Desktop/Apps/Tools/ToolsMenu.tsx";
import { TabDropdown } from "@/ui/desktop/navigation/tabs/TabDropdown.tsx";
import { SnippetsSidebar } from "@/ui/desktop/apps/terminal/SnippetsSidebar.tsx";
import { SshToolsSidebar } from "@/ui/desktop/apps/tools/SshToolsSidebar.tsx";
import { ToolsMenu } from "@/ui/desktop/apps/tools/ToolsMenu.tsx";
interface TabData {
id: number;

View File

@@ -2,7 +2,7 @@ import React, { useState } from "react";
import { CardTitle } from "@/components/ui/card.tsx";
import { ChevronDown, Folder } from "lucide-react";
import { Button } from "@/components/ui/button.tsx";
import { Host } from "@/ui/Desktop/Navigation/Hosts/Host.tsx";
import { Host } from "@/ui/desktop/navigation/hosts/Host.tsx";
import { Separator } from "@/components/ui/separator.tsx";
interface SSHHost {

View File

@@ -15,7 +15,7 @@ import {
DropdownMenuContent,
DropdownMenuItem,
} from "@/components/ui/dropdown-menu";
import { useTabs } from "@/ui/Desktop/Navigation/Tabs/TabContext";
import { useTabs } from "@/ui/desktop/navigation/tabs/TabContext";
import { getServerStatusById } from "@/ui/main-axios";
import type { HostProps } from "../../../../types";
import { DEFAULT_STATS_CONFIG } from "@/types/stats-widgets";

View File

@@ -16,7 +16,7 @@ import {
Network as SshManagerIcon,
User as UserIcon,
} from "lucide-react";
import { useTabs, type Tab } from "@/ui/Desktop/Navigation/Tabs/TabContext.tsx";
import { useTabs, type Tab } from "@/ui/desktop/navigation/tabs/TabContext.tsx";
import { useTranslation } from "react-i18next";
export function TabDropdown(): React.ReactElement {

View File

@@ -11,7 +11,7 @@ import {
} from "@/components/ui/tabs.tsx";
import { Separator } from "@/components/ui/separator.tsx";
import { User, Shield, AlertCircle } from "lucide-react";
import { TOTPSetup } from "@/ui/Desktop/User/TOTPSetup.tsx";
import { TOTPSetup } from "@/ui/desktop/user/TOTPSetup.tsx";
import {
getUserInfo,
getVersionInfo,
@@ -19,9 +19,9 @@ import {
logoutUser,
isElectron,
} from "@/ui/main-axios.ts";
import { PasswordReset } from "@/ui/Desktop/User/PasswordReset.tsx";
import { PasswordReset } from "@/ui/desktop/user/PasswordReset.tsx";
import { useTranslation } from "react-i18next";
import { LanguageSwitcher } from "@/ui/Desktop/User/LanguageSwitcher.tsx";
import { LanguageSwitcher } from "@/ui/desktop/user/LanguageSwitcher.tsx";
import { useSidebar } from "@/components/ui/sidebar.tsx";
interface UserProfileProps {

View File

@@ -1,14 +1,14 @@
import React, { useState, useEffect, type FC } from "react";
import { Terminal } from "@/ui/Mobile/Apps/Terminal/Terminal.tsx";
import { TerminalKeyboard } from "@/ui/Mobile/Apps/Terminal/TerminalKeyboard.tsx";
import { BottomNavbar } from "@/ui/Mobile/Navigation/BottomNavbar.tsx";
import { LeftSidebar } from "@/ui/Mobile/Navigation/LeftSidebar.tsx";
import { Terminal } from "@/ui/mobile/apps/terminal/Terminal.tsx";
import { TerminalKeyboard } from "@/ui/mobile/apps/terminal/TerminalKeyboard.tsx";
import { BottomNavbar } from "@/ui/mobile/navigation/BottomNavbar.tsx";
import { LeftSidebar } from "@/ui/mobile/navigation/LeftSidebar.tsx";
import {
TabProvider,
useTabs,
} from "@/ui/Mobile/Navigation/Tabs/TabContext.tsx";
} from "@/ui/mobile/navigation/tabs/TabContext.tsx";
import { getUserInfo } from "@/ui/main-axios.ts";
import { Auth } from "@/ui/Mobile/Authentication/Auth.tsx";
import { Auth } from "@/ui/mobile/authentication/Auth.tsx";
import { useTranslation } from "react-i18next";
import { Toaster } from "@/components/ui/sonner.tsx";

View File

@@ -1,6 +1,6 @@
import { Button } from "@/components/ui/button";
import { Menu, X, Terminal as TerminalIcon } from "lucide-react";
import { useTabs } from "@/ui/Mobile/Apps/Navigation/Tabs/TabContext.tsx";
import { useTabs } from "@/ui/mobile/apps/navigation/tabs/TabContext.tsx";
import { cn } from "@/lib/utils.ts";
interface MenuProps {

View File

@@ -13,7 +13,7 @@ import { Button } from "@/components/ui/button.tsx";
import { ChevronUp, Menu, User2 } from "lucide-react";
import React, { useState, useEffect, useMemo, useCallback } from "react";
import { Separator } from "@/components/ui/separator.tsx";
import { FolderCard } from "@/ui/Mobile/Apps/Navigation/Hosts/FolderCard.tsx";
import { FolderCard } from "@/ui/mobile/apps/navigation/hosts/FolderCard.tsx";
import { getSSHHosts, logoutUser } from "@/ui/main-axios.ts";
import { useTranslation } from "react-i18next";
import { Input } from "@/components/ui/input.tsx";

View File

@@ -3,7 +3,7 @@ import { CardTitle } from "@/components/ui/card.tsx";
import { ChevronDown, Folder } from "lucide-react";
import { Button } from "@/components/ui/button.tsx";
import { Separator } from "@/components/ui/separator.tsx";
import { Host } from "@/ui/Mobile/Apps/Navigation/Hosts/Host.tsx";
import { Host } from "@/ui/mobile/apps/navigation/hosts/Host.tsx";
interface SSHHost {
id: number;

View File

@@ -4,7 +4,7 @@ import { Button } from "@/components/ui/button.tsx";
import { ButtonGroup } from "@/components/ui/button-group.tsx";
import { Terminal } from "lucide-react";
import { getServerStatusById } from "@/ui/main-axios.ts";
import { useTabs } from "@/ui/Mobile/Apps/Navigation/Tabs/TabContext.tsx";
import { useTabs } from "@/ui/mobile/apps/navigation/tabs/TabContext.tsx";
import type { HostProps } from "../../../../../types/index.js";
export function Host({ host, onHostConnect }: HostProps): React.ReactElement {

View File

@@ -5,7 +5,7 @@ import { Input } from "@/components/ui/input.tsx";
import { Label } from "@/components/ui/label.tsx";
import { Alert, AlertTitle, AlertDescription } from "@/components/ui/alert.tsx";
import { useTranslation } from "react-i18next";
import { LanguageSwitcher } from "@/ui/Desktop/User/LanguageSwitcher.tsx";
import { LanguageSwitcher } from "@/ui/desktop/user/LanguageSwitcher.tsx";
import { toast } from "sonner";
import { Smartphone } from "lucide-react";
import {

View File

@@ -1,6 +1,6 @@
import { Button } from "@/components/ui/button.tsx";
import { Menu, X, Terminal as TerminalIcon } from "lucide-react";
import { useTabs } from "@/ui/Mobile/Navigation/Tabs/TabContext.tsx";
import { useTabs } from "@/ui/mobile/navigation/tabs/TabContext.tsx";
import { cn } from "@/lib/utils.ts";
interface MenuProps {

View File

@@ -14,7 +14,7 @@ import { Button } from "@/components/ui/button.tsx";
import { ChevronUp, Menu, User2 } from "lucide-react";
import React, { useState, useEffect, useMemo, useCallback } from "react";
import { Separator } from "@/components/ui/separator.tsx";
import { FolderCard } from "@/ui/Mobile/Navigation/Hosts/FolderCard.tsx";
import { FolderCard } from "@/ui/mobile/navigation/hosts/FolderCard.tsx";
import { getSSHHosts, logoutUser } from "@/ui/main-axios.ts";
import { useTranslation } from "react-i18next";
import { Input } from "@/components/ui/input.tsx";

View File

@@ -3,7 +3,7 @@ import { CardTitle } from "@/components/ui/card.tsx";
import { ChevronDown, Folder } from "lucide-react";
import { Button } from "@/components/ui/button.tsx";
import { Separator } from "@/components/ui/separator.tsx";
import { Host } from "@/ui/Mobile/Navigation/Hosts/Host.tsx";
import { Host } from "@/ui/mobile/navigation/hosts/Host.tsx";
interface SSHHost {
id: number;

View File

@@ -4,7 +4,7 @@ import { Button } from "@/components/ui/button.tsx";
import { ButtonGroup } from "@/components/ui/button-group.tsx";
import { Terminal } from "lucide-react";
import { getServerStatusById } from "@/ui/main-axios.ts";
import { useTabs } from "@/ui/Mobile/Navigation/Tabs/TabContext.tsx";
import { useTabs } from "@/ui/mobile/navigation/tabs/TabContext.tsx";
import type { HostProps } from "../../../../types/index.js";
import { DEFAULT_STATS_CONFIG } from "@/types/stats-widgets";

View File

@@ -4,15 +4,12 @@ import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// SSL certificate paths
const sslCertPath = path.join(process.cwd(), "ssl/termix.crt");
const sslKeyPath = path.join(process.cwd(), "ssl/termix.key");
// Check if SSL certificates exist and HTTPS is requested
const hasSSL = fs.existsSync(sslCertPath) && fs.existsSync(sslKeyPath);
const useHTTPS = process.env.VITE_HTTPS === "true" && hasSSL;
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {