mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-11 02:20:08 +00:00
[API Nodes] Add API Nodes new feature dialog (#3755)
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import ApiNodesNewsContent from '@/components/dialog/content/ApiNodesNewsContent.vue'
|
||||
import ApiNodesSignInContent from '@/components/dialog/content/ApiNodesSignInContent.vue'
|
||||
import ConfirmationDialogContent from '@/components/dialog/content/ConfirmationDialogContent.vue'
|
||||
import ErrorDialogContent from '@/components/dialog/content/ErrorDialogContent.vue'
|
||||
@@ -379,6 +380,31 @@ export const useDialogService = () => {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows a dialog for the API nodes news.
|
||||
* TODO: Remove the news dialog on next major feature release.
|
||||
*/
|
||||
function showApiNodesNewsDialog() {
|
||||
if (localStorage.getItem('api-nodes-news-seen') === 'true') {
|
||||
return
|
||||
}
|
||||
|
||||
return dialogStore.showDialog({
|
||||
key: 'api-nodes-news',
|
||||
component: ApiNodesNewsContent,
|
||||
props: {
|
||||
onClose: () => {
|
||||
dialogStore.closeDialog({ key: 'api-nodes-news' })
|
||||
localStorage.setItem('api-nodes-news-seen', 'true')
|
||||
}
|
||||
},
|
||||
dialogComponentProps: {
|
||||
modal: false,
|
||||
position: 'bottomright'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
showLoadWorkflowWarning,
|
||||
showMissingModelsWarning,
|
||||
@@ -394,6 +420,7 @@ export const useDialogService = () => {
|
||||
showSignInDialog,
|
||||
showTopUpCreditsDialog,
|
||||
showUpdatePasswordDialog,
|
||||
showApiNodesNewsDialog,
|
||||
prompt,
|
||||
confirm
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user