mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-26 17:54:14 +00:00
[API Node] User management (#3567)
Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Chenlei Hu <hcl@comfy.org>
This commit is contained in:
@@ -8,6 +8,8 @@ import MissingModelsWarning from '@/components/dialog/content/MissingModelsWarni
|
||||
import PromptDialogContent from '@/components/dialog/content/PromptDialogContent.vue'
|
||||
import SettingDialogContent from '@/components/dialog/content/SettingDialogContent.vue'
|
||||
import SignInContent from '@/components/dialog/content/SignInContent.vue'
|
||||
import SignInRequiredDialogContent from '@/components/dialog/content/SignInRequiredDialogContent.vue'
|
||||
import TopUpCreditsDialogContent from '@/components/dialog/content/TopUpCreditsDialogContent.vue'
|
||||
import ManagerDialogContent from '@/components/dialog/content/manager/ManagerDialogContent.vue'
|
||||
import ManagerHeader from '@/components/dialog/content/manager/ManagerHeader.vue'
|
||||
import ManagerProgressFooter from '@/components/dialog/footer/ManagerProgressFooter.vue'
|
||||
@@ -51,7 +53,13 @@ export const useDialogService = () => {
|
||||
}
|
||||
|
||||
function showSettingsDialog(
|
||||
panel?: 'about' | 'keybinding' | 'extension' | 'server-config'
|
||||
panel?:
|
||||
| 'about'
|
||||
| 'keybinding'
|
||||
| 'extension'
|
||||
| 'server-config'
|
||||
| 'user'
|
||||
| 'credits'
|
||||
) {
|
||||
const props = panel ? { props: { defaultPanel: panel } } : undefined
|
||||
|
||||
@@ -340,6 +348,29 @@ export const useDialogService = () => {
|
||||
})
|
||||
}
|
||||
|
||||
function showSignInRequiredDialog(options: { type: 'signIn' | 'credits' }) {
|
||||
dialogStore.showDialog({
|
||||
key: 'signin-required',
|
||||
component: SignInRequiredDialogContent,
|
||||
props: options
|
||||
})
|
||||
}
|
||||
|
||||
function showTopUpCreditsDialog(options?: {
|
||||
isInsufficientCredits?: boolean
|
||||
}) {
|
||||
return dialogStore.showDialog({
|
||||
key: 'top-up-credits',
|
||||
component: TopUpCreditsDialogContent,
|
||||
props: options,
|
||||
dialogComponentProps: {
|
||||
pt: {
|
||||
header: { class: '!p-3' }
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
showLoadWorkflowWarning,
|
||||
showMissingModelsWarning,
|
||||
@@ -353,6 +384,8 @@ export const useDialogService = () => {
|
||||
showErrorDialog,
|
||||
showApiNodesSignInDialog,
|
||||
showSignInDialog,
|
||||
showSignInRequiredDialog,
|
||||
showTopUpCreditsDialog,
|
||||
prompt,
|
||||
confirm
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user