Skip to content

Conversation

@zy84338719
Copy link
Owner

No description provided.

zy84338719 and others added 12 commits September 22, 2025 02:30
Bumps [github.com/gin-contrib/cors](https://github.com/gin-contrib/cors) from 1.4.0 to 1.6.0.
- [Release notes](https://github.com/gin-contrib/cors/releases)
- [Changelog](https://github.com/gin-contrib/cors/blob/master/.goreleaser.yaml)
- [Commits](gin-contrib/cors@v1.4.0...v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/gin-contrib/cors
  dependency-version: 1.6.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.2.0 to 5.5.4.
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](jackc/pgx@v5.2.0...v5.5.4)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
  dependency-version: 5.5.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…m/jackc/pgx/v5-5.5.4

chore(deps): bump github.com/jackc/pgx/v5 from 5.2.0 to 5.5.4
…m/gin-contrib/cors-1.6.0

chore(deps): bump github.com/gin-contrib/cors from 1.4.0 to 1.6.0
Copilot AI review requested due to automatic review settings September 24, 2025 14:31
@zy84338719 zy84338719 merged commit 29837d3 into remove-initwithdb Sep 24, 2025
13 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a comprehensive modernization and optimization of the FileCodeBox admin interface, focusing on improved UI/UX, configuration management, and system integrity.

  • Modern Material Design-inspired admin interface with responsive layout and dark/light theme support
  • Enhanced configuration handling with improved data normalization and better error management
  • Strengthened build system with consistent versioning and cross-platform compatibility

Reviewed Changes

Copilot reviewed 31 out of 32 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
themes/2025/admin/js/main.js Enhanced UI logic with theme support, mobile navigation improvements, and better configuration handling
themes/2025/admin/js/config-simple.js Added configuration normalization and improved type handling for opacity and other UI settings
themes/2025/admin/index.html Complete admin interface redesign with modern sidebar navigation, responsive metrics, and improved semantic structure
themes/2025/admin/css/admin-modern.css New comprehensive CSS framework implementing modern design system with variables, responsive breakpoints, and consistent component styling
scripts/release.sh, scripts/cross-build.sh, scripts/build.sh Updated build scripts to use correct version injection paths
main.go Updated API version number to 1.8.2
internal/utils/disk_windows.go, internal/utils/disk_unix.go Added cross-platform disk usage utilities with proper build constraints
internal/static/assets.go Enhanced theme resolution system with fallback mechanisms and improved error handling

Comment on lines +48 to +50
const clone = typeof structuredClone === 'function'
? structuredClone(config)
: JSON.parse(JSON.stringify(config));
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using JSON.parse(JSON.stringify()) as a fallback for deep cloning can be slow for large objects and doesn't handle functions, dates, or other complex types. Consider using a proper deep clone utility or implementing a more robust fallback.

Copilot uses AI. Check for mistakes.
Comment on lines +284 to +286
if (value === '') return null;
const num = parseFloat(value);
return Number.isNaN(num) ? null : num;
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The getFieldValue function has inconsistent return types - returning null for float type but 0 for number type when parsing fails. Consider standardizing the fallback behavior or documenting this difference clearly.

Suggested change
if (value === '') return null;
const num = parseFloat(value);
return Number.isNaN(num) ? null : num;
if (value === '') return 0;
const num = parseFloat(value);
return Number.isNaN(num) ? 0 : num;

Copilot uses AI. Check for mistakes.
Comment on lines +44 to +56
func firstExistingThemeDir(cfg *config.ConfigManager) string {
for _, candidate := range themeCandidates(cfg) {
if filepath.IsAbs(candidate) {
if themeDirExists(candidate) {
return candidate
}
continue
}
if themeDirExists(candidate) {
return candidate
}
}
return defaultThemeDir
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The logic for checking absolute vs relative paths is duplicated. Consider extracting this into a helper function or simplifying the logic to reduce code duplication.

Copilot uses AI. Check for mistakes.
zy84338719 added a commit that referenced this pull request Sep 24, 2025
Merge pull request #10 from zy84338719/main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants