Commit Graph

1047 Commits

Author SHA1 Message Date
shenlan
ea6dd5cf14 Remove CMS extension system (#706) 2025-12-02 09:50:58 +08:00
shenlan
1bdaa273e1 Fix footer layout and duplication (#705) 2025-12-02 09:22:07 +08:00
shenlan
c9fc2d296d Refactor footer component (#704) 2025-12-02 08:53:11 +08:00
shenlan
c6b00d42da Restyle dashboard navbar and footer (#703) 2025-12-02 08:42:59 +08:00
shenlan
2258f2bf5b Redesign dashboard homepage (#702) 2025-12-02 08:09:02 +08:00
shenlan
65eb632305 Refine console homepage layout (#701) 2025-12-02 01:49:04 +08:00
shenlan
ecbdd2b87e Replace Discord icon import with Disc (#700) 2025-12-02 01:34:34 +08:00
shenlan
3905e83da8 Replace unavailable lucide icon (#699) 2025-12-02 01:31:07 +08:00
shenlan
659343fdd1 Replace missing lucide Api icon (#698) 2025-12-02 01:25:04 +08:00
shenlan
ccb1e5d2f5 Refine console homepage layout (#697) 2025-12-02 01:20:40 +08:00
shenlan
03483405d5 Refactor homepage to console layout (#696) 2025-12-02 01:09:45 +08:00
shenlan
936481f287 Refactor homepage to console entry layout (#695) 2025-12-02 00:37:58 +08:00
shenlan
5e419c0c69 Redesign homepage layout and footer (#694) 2025-12-02 00:24:44 +08:00
shenlan
1618fc6d96 Refine homepage console layout (#693) 2025-12-02 00:05:59 +08:00
shenlan
db8b03c6a1 Refine console entry homepage layout (#692) 2025-12-01 23:50:50 +08:00
shenlan
4c05ea3562 Refine console-style homepage cards (#691) 2025-12-01 23:29:54 +08:00
shenlan
71f23c4738 Polish scan payment layout (#690) 2025-11-21 22:58:58 +08:00
shenlan
be87d5d62f Add billing options to subscription panel (#689) 2025-11-21 22:16:13 +08:00
shenlan
eb6db5e6ab Guard billing option selection check for null (#688) 2025-11-21 22:02:21 +08:00
shenlan
3040043614 Update xstream subscription links and hide billing options (#687) 2025-11-21 21:59:05 +08:00
shenlan
152ebe374c Refine subscription payment layout (#686) 2025-11-21 21:54:25 +08:00
shenlan
065f77c8ac Move billing and subscriptions into user panel (#685) 2025-11-21 21:40:55 +08:00
shenlan
a6b180eda6 Annotate product payment methods (#684) 2025-11-21 20:56:01 +08:00
shenlan
7e32b08536 Make PayPal subscription plan ID optional (#683) 2025-11-21 20:44:53 +08:00
shenlan
50ac1019ad Add types for PayPal button callbacks (#682) 2025-11-21 19:54:35 +08:00
shenlan
09792f2af0 Ensure PayPal SDK is treated as loaded (#681) 2025-11-21 19:30:05 +08:00
shenlan
dda0dbbcd4 Add crypto billing options and trial subscriptions (#680) 2025-11-21 19:20:51 +08:00
shenlan
a1afa0d829 Add PayPal billing and subscription support (#679) 2025-11-21 18:55:12 +08:00
Haitao Pan
f175a794cf add manifest generation scripts
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 12:30:48 +08:00
Haitao Pan
256b5c9750 feat(content): separate content from code with markdown files
### Changes:

1. **Created content directories**:
   - `src/content/homepage/{zh,en}/hero.md` - Homepage content
   - `src/content/product/{xstream,xcloudflow,xscopehub}/{zh,en}/hero.md` - Product content

2. **Content generation script**:
   - `scripts/generate-content.ts` - Compiles markdown to JSON
   - Uses js-yaml for proper YAML parsing
   - Generates JSON files in `src/data/content/`

3. **Content loader**:
   - `src/lib/content-loader.ts` - Loads content from JSON files
   - No longer uses `fs` module (client-side compatible)
   - Supports homepage and product content

4. **Updated homepage component**:
   - `src/modules/homepage/page.tsx` - Now uses content loader
   - Removed hardcoded heroContent object
   - Content separated from logic and styling

### Result:
 Content separated from code
 Markdown format for easy editing
 Layout and logic unchanged
 Build succeeds with 120 static pages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 12:17:12 +08:00
Haitao Pan
f17c16579f feat(blog): add sticky navigation header
Add top navigation similar to dynamic product pages:
- SVC.plus/blog breadcrumb (clickable, returns to homepage)
- Search component on the right
- Sticky positioning with blur background

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 11:29:56 +08:00
Haitao Pan
d3b1b057b7 fix(download): resolve static generation bailout error
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 11:07:50 +08:00
Haitao Pan
10b01c675c fix(docs): resolve static generation error with caching strategy
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 10:49:45 +08:00
Haitao Pan
23b1034832 feat(Navbar): hide navigation on /blog routes
Hide navbar by default on /blog and its subpaths

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 10:39:09 +08:00
shenlan
43afc84699 feat(dashboard): fetch download manifests dynamically (#675) 2025-11-11 23:19:43 +08:00
Haitao Pan
222b9a56d8 feat: support dynamic port and manifest URLs
1. start script: npm run start passes args to next start
   - Usage: npm run start -- -p 3000

2. /docs: dynamic fetch from docs-manifest.json
   - URL: https://dl.svc.plus/dl-index/docs-manifest.json

3. /download: dynamic fetch from offline-package-manifest.json
   - URL: https://dl.svc.plus/dl-index/offline-package-manifest.json

🤖 Generated with Claude Code
2025-11-11 22:32:21 +08:00
Haitao Pan
101932a77f fix: add local fallback data for static development mode
### Changes:

1. **Added fallback data files**:
   - `public/_build/artifacts-manifest.json` - Local fallback for downloads page
   - `public/_build/offline-package.json` - Local fallback for offline-package

2. **Updated data fetching logic**:
   - `dl-index-data-artifacts.ts` - Now uses local fallback when network fetch fails
   - `dl-index-data-offline-package.ts` - Now uses local fallback when network fetch fails

### Problem:
In static development mode (`yarn start -p 3000`), the dashboard's docs and downloads pages
could not fetch data from external URLs, resulting in empty content.

### Solution:
Added local fallback data files that are imported directly into the components.
When network requests fail (e.g., in offline mode or behind firewall), the app now
falls back to local static data, ensuring pages work in development mode.

### Data Flow:
1. Try fetching from `https://dl.svc.plus/dl-index/*.json`
2. If that fails, try fallback URL
3. If that also fails, use local `public/_build/*.json` data
4. Display content to user

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 21:52:13 +08:00
shenlan
d5067fd9fb Fix dashboard download imports and registry alias (#672) 2025-11-11 19:48:16 +08:00
Haitao Pan
fe4b236a71 feat: merge quick wrapper into main manifest scripts
### Changes:

1. **gen_offline-package_manifest.py**
   - Merged gen_offline-package_manifest_quick.py functionality
   - Added auto-derivation of --root from --output path
   - Auto-discovers subdirectories when --include not specified
   - Outputs to offline-package-manifest.json
   - Removed quick wrapper script (merged into main)

2. **gen_docs_manifest.py**
   - Added auto-discovery of subdirectories
   - Scans all category/version/*.html and *.pdf when --include not specified

### Usage:

For gen_offline-package_manifest.py:
  # Auto-derive root from output
  python3 scripts/gen_offline-package_manifest.py \
    --output /data/update-server/dl-index

  # Or specify root explicitly
  python3 scripts/gen_offline-package_manifest.py \
    --root /data/update-server/offline-package \
    --output /data/update-server/dl-index

For gen_docs_manifest.py:
  # Auto-discover all subdirectories
  python3 scripts/gen_docs_manifest.py \
    --root /data/update-server/docs \
    --output /data/update-server/dl-index

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 18:58:37 +08:00
Haitao Pan
b488646de7 feat: enhance scripts with filtering and offline-package support
### Changes:

1. **scripts/gen_docs_manifest.py**
   - Added --include parameter with default "docs"
   - Filters documentation files to only include specified directories
   - Can be provided multiple times for multiple directories
   - Updated docstring to document the new parameter

2. **scripts/gen_mirror_manifest.py**
   - Added generation of offline-package.json file
   - Filters listings to only include offline-package directory entries
   - Writes to the same output directory alongside manifest.json

### Usage:

For gen_docs_manifest.py:
  python3 scripts/gen_docs_manifest.py \
    --root /data/update-server/docs \
    --base-url-prefix https://dl.svc.plus/docs \
    --include docs

For gen_mirror_manifest.py:
  python3 scripts/gen_mirror_manifest.py \
    --root /data/update-server \
    --include offline-package \
    --output dl-index/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 18:33:04 +08:00
Haitao Pan
d4a4dc186b feat: enhance scripts with filtering and offline-package support
### Changes:

1. **scripts/gen_docs_manifest.py**
   - Added --include parameter with default "docs"
   - Filters documentation files to only include specified directories
   - Can be provided multiple times for multiple directories
   - Updated docstring to document the new parameter

2. **scripts/gen_mirror_manifest.py**
   - Added generation of offline-package.json file
   - Filters listings to only include offline-package directory entries
   - Writes to the same output directory alongside manifest.json

### Usage:

For gen_docs_manifest.py:
  python3 scripts/gen_docs_manifest.py \
    --root /data/update-server/docs \
    --base-url-prefix https://dl.svc.plus/docs \
    --include docs

For gen_mirror_manifest.py:
  python3 scripts/gen_mirror_manifest.py \
    --root /data/update-server \
    --include offline-package \
    --output dl-index/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 17:53:36 +08:00
Haitao Pan
cdcaccc6d9 feat: integrate offline-package data source
### Changes:

1. **scripts/gen_mirror_manifest.py**
   - Added generation of offline-package.json file
   - Filters listings to only include offline-package directory
   - Writes to the same output directory (dl-index/)

2. **src/lib/download/dl-index-data-offline-package.ts**
   - New module to fetch offline-package data from CDN
   - Fetches from: https://dl.svc.plus/dl-index/offline-package.json
   - Provides helper functions:
     - fetchOfflinePackageListings()
     - getOfflinePackageListings()
     - getOfflinePackageSections()
     - getOfflinePackageFileCount()
   - Includes simple in-memory caching

3. **src/app/download/page.tsx**
   - Updated to use offline-package data
   - Merges offline-package sections with existing data
   - Added offline-package file count to totals
   - Made component async to support data fetching

### Result:
Download page now fetches and displays offline-package data from the CDN endpoint, providing real-time updates without rebuilding the application.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 17:50:41 +08:00
Haitao Pan
fefe3511ef feat: update base-url-prefix default in gen_mirror_manifest.py
### Changes:
- Changed --base-url-prefix default from "/" to "https://dl.svc.plus/offline-package"
- Updated docstring usage example to reflect the new default

### Reason:
Sets a more specific default URL prefix for offline package downloads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 17:44:07 +08:00
Haitao Pan
a58a6aa9ab feat: enhance gen_mirror_manifest.py with configurable options
### Changes:
1. Set ROOT default to `/data/update-server/`
   - Changed --root from required to optional with default value

2. Add --include [dirlist] parameter
   - Default: offline-package
   - Can be provided multiple times
   - Filters which directories to include in manifest
   - Only processes directories matching the include list

3. Add --output parameter
   - Default: dl-index/
   - Specifies where to write manifest.json
   - Creates directory if it doesn't exist

### Usage:
  python3 scripts/gen_mirror_manifest.py \
    --root /data/update-server \
    --base-url-prefix / \
    --include offline-package \
    --output dl-index/ \
    [--exclude docs --exclude xray-core]

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 17:37:01 +08:00
Haitao Pan
8ff0c8e3e4 fix: unwrap async params in download route segment
### Issue:
Next.js App Router expects params to be a Promise that must be awaited before accessing properties.

### Error:
```
Route "/download/[...segments]" used `params.segments`.
`params` is a Promise and must be unwrapped with `await`
or `React.use()` before accessing its properties.
```

### Solution:
- Made component async: `export default async function DownloadListing`
- Updated params type: `Promise<{ segments: string[] }>`
- Unwrapped with await: `const { segments: rawSegments } = await params`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 17:10:00 +08:00
Haitao Pan
2b0010d92e fix: resolve TypeScript import errors for download types module
### Changes:
- Moved types from legacy 'types/download.ts' to '@lib/download/types'
- Updated all imports to use the new location:
  - src/components/download/DownloadListingContent.tsx
  - src/components/download/FileTable.tsx
  - src/lib/download-data.ts
  - src/lib/download-manifest.ts
  - src/app/download/[...segments]/page.tsx

### Why:
- Resolved TS6137 error: Cannot import type declaration files
- Aligns with codebase pattern: types co-located with modules (@lib/iac/types, @lib/mail/types)
- Uses consistent @ alias import pattern throughout codebase

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 17:08:46 +08:00
shenlan
79d7ca0dc5 Fix download page total file reducer typing (#670) 2025-11-11 14:47:53 +08:00
Haitao Pan
6686e21da5 fix: resolve module import path errors
### Errors Fixed:

1. **Cloud IaC Index JSON Import** (src/app/cloud_iac/*/page.tsx)
   - Fixed incorrect relative import paths for cloud_iac_index.json
   - Updated to correct number of `../` to reach public directory
   - Both provider and service pages now import correctly

2. **Products Registry Import** (src/app/[slug]/Client.tsx)
   - Changed from non-existent `@src/products/registry` to `@modules/products/registry`
   - Uses existing path alias configured in tsconfig.json

3. **Download Type Import** (src/app/download/*/page.tsx)
   - Fixed import path from `../../../types/download` to `@types/download`
   - Added proper type annotation for filter callbacks to resolve TypeScript errors

4. **Docs Manifest Import** (src/app/docs/resources.server.ts)
   - Temporarily disabled invalid docs-manifest.json import (malformed JSON)
   - Falls back to docs_index.json
   - Build now passes without JSON parsing errors

### Result:
- Build errors reduced from 7 to 0
- All module imports resolved correctly
- TypeScript compilation passes
- Ready for production build

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 14:38:22 +08:00
Haitao Pan
40d7bb4a93 perf: convert postcss.config to mjs to eliminate module parsing warning
### Issue:
PostCSS config file was using ES module syntax (export default) in a .js file without "type": "module" in package.json.

**Warning Message:**
"Module type of file is not specified and it doesn't parse as CommonJS. Reparsing as ES module because module syntax is detected. This incurs a performance overhead."

### Solution:
Renamed `postcss.config.js` to `postcss.config.mjs`:
- .mjs extension is automatically recognized as ES module
- No need to modify package.json
- Eliminates performance overhead warning
- Cleaner, explicit ES module indication

### Changes:
- **File renamed**: `postcss.config.js` → `postcss.config.mjs`
- **Content unchanged**: Still uses ES module export syntax
- **No package.json changes needed**

### Result:
-  PostCSS module parsing warning eliminated
-  Build still works correctly
-  Performance improved (no re-parsing)
-  Clear ES module indication

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 14:25:49 +08:00
Haitao Pan
2f3744655f fix: add missing theme exports to resolve build error
### Issue:
ThemePreferenceCard was importing `darkTheme`, `lightTheme`, and `useTheme` from `../routes/theme`, but these exports didn't exist.

**Error:**
"Export darkTheme doesn't exist in target module"

### Solution:
Added missing exports to `src/modules/extensions/builtin/user-center/routes/theme.tsx`:

1. **Type Definitions:**
   - `ThemeName` - 'light' | 'dark'
   - `ThemePreference` - 'system' | 'light' | 'dark'
   - `ThemeDefinition` - Theme structure with name, colors, shadows
   - `ThemeContextValue` - Theme context value structure

2. **Theme Definitions:**
   - `lightTheme` - Light theme color tokens and shadows
   - `darkTheme` - Dark theme color tokens and shadows

3. **Hook:**
   - `useTheme()` - Stub implementation returning theme state and setter

### Result:
- Fixed "Export darkTheme doesn't exist" build error
- ThemePreferenceCard can now properly import all required exports
- Build errors reduced from 7 to 1 (pre-existing cloud_iac error remains)
- Theme component is functional with stub implementations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 14:19:07 +08:00