[API Nodes] Add API Nodes new feature dialog (#3755)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2025-05-04 17:20:05 -04:00
committed by GitHub
parent 6601cf6959
commit 2d9a0d02ab
12 changed files with 240 additions and 0 deletions

View File

@@ -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
}