fix: Enhance Kol Variable Rendering and Management
- Updated the regex for placeholder matching to support more flexible key formats. - Refactored variable storage to allow both ID and key lookups in rendering. - Improved schema validation to check for duplicate keys and enforce non-empty keys. - Added new utility functions for variable value lookup and display name generation. - Enhanced tests to cover new key-based variable scenarios. - Refactored KolPrompt repository to simplify prompt storage and management, including the removal of obsolete revision handling. - Introduced new API endpoints for saving, activating, and archiving prompts. - Added new utility functions for handling Kol placeholders and platform options in the admin web. - Implemented database migrations to simplify prompt storage structure and ensure data integrity.
This commit is contained in:
@@ -4,7 +4,7 @@ import { useQuery } from "@tanstack/vue-query";
|
||||
import { computed, ref, watch } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { imagesApi } from "@/lib/api";
|
||||
import { formatBytes } from "@/lib/display";
|
||||
import { formatBytes, formatPercentage } from "@/lib/display";
|
||||
import type { ImageAssetItem } from "@geo/shared-types";
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
@@ -139,7 +139,7 @@ function getSelectPopupContainer(triggerNode: HTMLElement) {
|
||||
<span>{{ t("images.storageUsage") }}: {{ t("images.storageUsageDetail", {
|
||||
used: formatBytes(storageUsage.used_bytes),
|
||||
total: formatBytes(storageUsage.quota_bytes),
|
||||
percent: storageUsage.used_pct
|
||||
percent: formatPercentage(storageUsage.used_pct)
|
||||
}) }}</span>
|
||||
</div>
|
||||
<a-progress
|
||||
|
||||
Reference in New Issue
Block a user