-
Notifications
You must be signed in to change notification settings - Fork 2
chore: user hint & opt download logic #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,11 +60,33 @@ const galleryRef = ref<HTMLElement | null>(null) | |
| const containerWidth = ref(1200) // Default start width | ||
| let resizeObserver: ResizeObserver | null = null | ||
|
|
||
| // Validation | ||
| const canGenerate = computed(() => { | ||
| if (isGenerating.value) | ||
| return true // Allow stopping | ||
| return !!modelFolder.value && !!outputFolder.value | ||
| }) | ||
|
Comment on lines
+64
to
+68
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The logic in |
||
|
|
||
| const validationMessage = computed(() => { | ||
| if (!modelFolder.value) | ||
| return t('validation.modelFolderRequired') | ||
| if (!outputFolder.value) | ||
| return t('validation.outputFolderRequired') | ||
| return '' | ||
| }) | ||
|
|
||
| // Lifecycle | ||
| onMounted(async () => { | ||
| await fetchModels() | ||
| checkAllModels() // Check all zoo models status | ||
|
|
||
| // Initial validation check to guide user | ||
| if (validationMessage.value) { | ||
| message.warning(validationMessage.value, { duration: 5000 }) | ||
| // Optional: Auto-open settings if critical config missing? | ||
| // showSettings.value = true | ||
| } | ||
|
|
||
| // If we have a selected model, check it specifically (in case it's local custom) | ||
| if (selectedModel.value && !availableModels.value.includes(selectedModel.value)) { | ||
| checkModel(selectedModel.value) | ||
|
|
@@ -117,20 +139,6 @@ watch(logs, () => { | |
| }) | ||
|
|
||
| // Actions | ||
| // Validation | ||
| const canGenerate = computed(() => { | ||
| if (isGenerating.value) | ||
| return true // Allow stopping | ||
| return !!modelFolder.value && !!outputFolder.value | ||
| }) | ||
|
|
||
| const validationMessage = computed(() => { | ||
| if (!modelFolder.value) | ||
| return t('validation.modelFolderRequired') | ||
| if (!outputFolder.value) | ||
| return t('validation.outputFolderRequired') | ||
| return '' | ||
| }) | ||
|
|
||
| function handleGenerate(): void { | ||
| if (!prompt.value) | ||
|
|
@@ -503,8 +511,8 @@ const gridStyle = computed(() => { | |
| transform-origin="center" | ||
| > | ||
| <NCard | ||
| class="glass-panel" | ||
| style="width: 400px;" | ||
| class="ios-glass-dark" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using the |
||
| style="width: 400px; --n-color: transparent;" | ||
| :title="t('common.downloading')" | ||
| :bordered="false" | ||
| size="huge" | ||
|
|
@@ -797,13 +805,13 @@ const gridStyle = computed(() => { | |
| align-items: center; | ||
| margin-bottom: 8px; | ||
| font-size: 13px; | ||
| color: rgba(255, 255, 255, 0.9); | ||
| color: #333; | ||
| } | ||
|
|
||
| .download-size { | ||
| font-variant-numeric: tabular-nums; | ||
| font-weight: 600; | ||
| color: white; | ||
| color: #000; | ||
| } | ||
| } | ||
| </style> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment
// Darker menu for contrastis no longer accurate after changing the color torgba(255, 255, 255, 0.95), which is a very light color. Please update the comment to reflect that this is now a light menu to avoid confusion for future developers.