- 16 Jun, 2025 12 commits
-
-
🔧 🔧 refactor(redis): replace direct constant usage with RedisKeyCacheSeconds function for cache durationRedwindA committed -
🔧 RedwindA committed -
CaIon committed
-
CaIon committed
-
feat(Gemini): implement thinking budget control in model name
Calcium-Ion committed -
🔧 CaIon committed -
Apple\Apple committed
-
🐛 Summary • Added stable, descending sort to `GetAnnouncements()` so that the API always returns the latest announcements first. • Introduced helper `getPublishTime()` to safely parse `publishDate` (RFC 3339) and fall back to zero value on failure. • Switched to `sort.SliceStable` for deterministic ordering when timestamps are identical. • Imported the standard `sort` package and removed redundant, duplicate date parsing. Impact Front-end no longer needs to perform client-side sorting; the latest announcement is guaranteed to appear at the top on all platforms and clients.
Apple\Apple committed -
RedwindA committed
-
修复Azure渠道对responses API的兼容性支持 - 为Azure渠道添加对responses API的特殊处理 - 兼容微软新…
Calcium-Ion committed -
fix: include group in payload for playground
Calcium-Ion committed -
🔧 CaIon committed
-
- 15 Jun, 2025 4 commits
-
-
✨ * backend - model: add `Remark` field (varchar 255, `json:"remark,omitempty"`); AutoMigrate handles schema change automatically - controller: * accept `remark` on user create/update endpoints * hide remark from regular users (`GetSelf`) by zero-ing the field before JSON marshalling * clarify inline comment explaining the omitempty behaviour * frontend (React / Semi UI) - AddUser.js & EditUser.js: add “Remark” input for admins - UsersTable.js: * remove standalone “Remark” column * show remark as a truncated Tag next to username with Tooltip for full text * import Tooltip component - i18n: reuse existing translations where applicable This commit enables administrators to label users with private notes while ensuring those notes are never exposed to the users themselves.Apple\Apple committed -
🐛 RedwindA committed -
RedwindA committed
-
RedwindA committed
-
- 14 Jun, 2025 11 commits
-
-
💄 Improve UX by hiding the vertical scrollbar inside the announcement (NoticeModal) while keeping the content scrollable. Changes • NoticeModal.js - Introduce `notice-content-scroll` class to the content wrapper. - Remove inline custom scrollbar styling for cleaner code. • index.css - Add `.notice-content-scroll` to the global hidden-scrollbar rules, ensuring scrollbars are hidden across browsers. Result Users can still scroll through long announcements, but no scrollbar is shown, giving the modal a cleaner and more consistent appearance.Apple\Apple committed -
🎨 Summary: Refactored the `Detail` page to deliver a more consistent and compact visual experience when displaying empty states. Key changes: 1. Introduced a reusable `ILLUSTRATION_SIZE` constant (96 × 96) to ensure all `IllustrationConstruction` / `IllustrationConstructionDark` icons render at a uniform, reduced size. 2. Applied the new size to every `Empty` component instance within the file. 3. Ensured Empty‐state content (title, description, icon) is centrally aligned for better readability. 4. Updated the Uptime panel’s empty description text for greater clarity. These adjustments improve UI cohesion, reduce visual noise, and make empty messages easier to scan.
Apple\Apple committed -
♻ * Added migration logic in `controller/console_migrate.go` * Detects both `UptimeKumaUrl` and `UptimeKumaSlug` * Creates a single-group JSON array under `console_setting.uptime_kuma_groups` - Uses `categoryName: "old"` to mark migrated data - Preserves original `url` and `slug` values * Clears and removes obsolete `UptimeKumaUrl` and `UptimeKumaSlug` keys * Removes outdated code paths that wrote to `console_setting.uptime_kuma_url` and `console_setting.uptime_kuma_slug` * Keeps frontend `DashboardSetting.js` compatible — no additional changes required * Aligns migration behavior with previous `ApiInfo` refactor for consistent console settings managementApple\Apple committed -
🚦 Backend • controller/uptime_kuma.go - Added Group field to Monitor struct to carry publicGroupList.name. - Extended status page parsing to capture group Name and inject it into each monitor. - Re-worked fetchGroupData loop: aggregate all sub-groups, drop unnecessary pre-allocation/breaks. Frontend • web/src/pages/Detail/index.js - renderMonitorList now buckets monitors by the new group field and renders a lightweight header per subgroup. - Fallback gracefully when group is empty to preserve previous single-list behaviour. Other • Expanded anonymous struct definition for statusData.PublicGroupList to include ID/Name, enabling JSON unmarshalling of group names. Result Custom CategoryName continues to work while each uptime group’s internal sub-groups are now clearly displayed in the UI, providing finer-grained visibility without impacting performance or existing validation logic.
Apple\Apple committed -
💬 fix(Gemini): clean up empty system instructions in requestCalcium-Ion committed -
✨ CaIon committed -
💬 RedwindA committed -
Fix mixing databases conflicts
Calcium-Ion committed -
🐛 CaIon committed -
🐛 CaIon committed -
CaIon committed
-
- 13 Jun, 2025 13 commits
-
-
🎛 Backend: • ConsoleSetting - Introduce `ApiInfoEnabled`, `UptimeKumaEnabled`, `AnnouncementsEnabled`, `FAQEnabled` (default true). • misc.GetStatus - Refactor to build response map dynamically. - Return the four *_enabled flags. - Only append `api_info`, `announcements`, `faq` when their respective flags are true. Frontend: • Detail page - Remove all `self_use_mode_enabled` checks. - Render API, Announcement, FAQ and Uptime panels based on the new *_enabled flags. • Dashboard → Settings - Added `Switch` controls in: · SettingsAPIInfo.js · SettingsAnnouncements.js · SettingsFAQ.js · SettingsUptimeKuma.js - Each switch persists its state via `/api/option` to the corresponding `console_setting.<panel>_enabled` key and reflects current status on load. - DashboardSetting.js now initialises and refreshes the four *_enabled keys so child components receive accurate panel states. Fixes: • Switches previously defaulted to “on” because *_enabled keys were missing. They are now included, ensuring correct visual state when panels are disabled. No breaking changes; existing functionality remains untouched aside from the new per-panel visibility control.Apple\Apple committed -
✨ ✨ feat: Add `controller/console_migrate.go` providing `/api/option/migrate_console_setting` endpoint for one-off data migration.Apple\Apple committed -
Backend • Removed the exported function `ValidateApiInfo` from `setting/console_setting/validation.go`; it was only a legacy wrapper and is no longer required. • Updated `controller/option.go` to call `ValidateConsoleSettings(value, "ApiInfo")` directly when validating `console_setting.api_info`. • Confirmed there are no remaining references to `ValidateApiInfo` in the codebase. This commit eliminates the last piece of compatibility code related to the old validation interface, keeping the API surface clean and consistent.
Apple\Apple committed -
✨ Backend - Introduce `setting/console_setting` package that defines `ConsoleSetting` struct with JSON tags and validation rules. - Register the new module with `config.GlobalConfig` to enable automatic injection/export of configuration values. - Remove legacy `setting/console.go` and the manual `OptionMap` hooks; clean up `model/option.go`. - Add `controller/console_migrate.go` providing `/api/option/migrate_console_setting` endpoint for one-off data migration. - Update controllers (`misc`, `option`, `uptime_kuma`) and router to consume namespaced keys `console_setting.*`. Frontend - Refactor dashboard pages (`SettingsAPIInfo`, `SettingsAnnouncements`, `SettingsFAQ`, `SettingsUptimeKuma`) and detail page to read/write the new keys. - Simplify `DashboardSetting.js` state to only include namespaced options. BREAKING CHANGE: All console-related option keys are now stored under `console_setting.*`. Run the migration endpoint once after deployment to preserve existing data.
Apple\Apple committed -
Apple\Apple committed
-
🎫 Backend • Introduced `validateExpiredTime` helper in `controller/redemption.go`; reused in both Add & Update endpoints to enforce “expiry time must not be earlier than now”, eliminating duplicated checks • Removed `RedemptionCodeStatusExpired` constant and all related references – expiry is now determined exclusively by the `expired_time` field for simpler, safer state management • Simplified `DeleteInvalidRedemptions`: deletes codes that are `used` / `disabled` or `enabled` but already expired, without relying on extra status codes • Controller no longer mutates `status` when listing or fetching redemption codes; clients derive expiry status from timestamp Frontend • Added reusable `isExpired` helper in `RedemptionsTable.js`; leveraged for: – status rendering (orange “Expired” tag) – action-menu enable/disable logic – row styling • Removed duplicated inline expiry logic, improving readability and performance • Adjusted toolbar layout: on small screens the “Clear invalid codes” button now wraps onto its own line, while “Add” & “Copy” remain grouped Result The codebase is now more maintainable, secure, and performant with no redundant constants, centralized validation, and cleaner UI behaviour across devices.
Apple\Apple committed -
✨ CaIon committed -
🎨 - Add informative header section to TokensTable with Key icon and description - Replace generic eye icon with semantic Ticket icon in RedemptionsTable header - Import additional UI components (Divider, Typography) for better layout structure - Improve user experience with contextual information about token and redemption functionality - Maintain consistent styling and layout between both table components The changes provide users with clear understanding of each table's purpose: - Tokens: "令牌用于API访问认证,可以设置额度限制和模型权限" with Key icon - Redemptions: "兑换码可以批量生成和分发,适合用于推广活动或批量充值" with Ticket icon
Apple\Apple committed -
✨ Front-end enhancements around “Add custom models”: • EditChannel.js / EditTagModal.js – Skip models that already exist instead of blocking the action. – Collect actually inserted items and display: • Success toast: “Added N models: model1, model2 …” • Info toast when no new model detected. – Keeps UX smooth while preserving deduplication logic. • i18n – en.json: added keys • "已新增 {{count}} 个模型:{{list}}" • "未发现新增模型" – Fixed a broken JSON string containing smart quotes to maintain valid syntax. Result: Users can bulk-paste model names; duplicates are silently ignored and the UI clearly lists what was incrementally appended. All messages are fully internationalised. Closes #1218Apple\Apple committed -
Apple\Apple committed
-
🐛 The previous patch lower-cased `group` and `model` when building the temporary `abilitySet` used to prevent duplicate inserts. This merged models that differ only by letter case, e.g. `GPT-3.5-turbo` vs `gpt-3.5-turbo`, causing them to disappear from the user’s available-models list and pricing page. Change: • ability.go – removed all `strings.ToLower` calls when composing the deduplication key (`group|model`), so duplicates are checked in a case-sensitive manner while preserving the original data. Result: • `GPT-3.5-turbo` and `gpt-3.5-turbo` are now treated as distinct models throughout the system.
Apple\Apple committed -
🐛 When importing large model lists (≈700+) an attempt to save a channel could fail with: Error 1062 (23000): Duplicate entry 'default-DeepSeek-1' for key 'abilities.PRIMARY' Root cause: AddAbilities / UpdateAbilities inserted the same (group, model) pair multiple times if the input list contained duplicates or case-variants (e.g. `default` vs `Default`). Changes: • ability.go – AddAbilities: introduced `abilitySet` to deduplicate by lower-cased `group|model` key before batch-inserting. – UpdateAbilities: applied the same deduplication logic when rebuilding abilities inside a transaction. Notes: • The lower-casing is only for set comparison; the original `group` and `model` values are preserved when persisting to DB, so case sensitivity of stored data is unchanged. • Batch chunking logic (lo.Chunk) and performance characteristics remain unaffected. Fixes #1215Apple\Apple committed -
🐛 The User model applies `validate:"max=12"` to the `Username` field, but the initial setup flow did not validate this constraint. This allowed creation of a root user with an overly long username (e.g. "Uselessly1344"), which later caused every update request to fail with: Field validation for 'Username' failed on the 'max' tag This patch adds an explicit length check in `controller/setup.go` to reject usernames longer than 12 characters during setup, keeping validation rules consistent across the entire application. Refs: #1214
Apple\Apple committed
-