mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 17:10:07 +00:00
remove dev testing code
This commit is contained in:
@@ -14,8 +14,6 @@ export const useCloudNotificationStore = defineStore(
|
||||
|
||||
const isReady = ref(false)
|
||||
const hasShownThisSession = ref(false)
|
||||
// Temporary override so developers can test the dialog in non-mac/non-desktop envs
|
||||
const devOverrideEnabled = import.meta.env.DEV
|
||||
|
||||
async function initialize() {
|
||||
if (isReady.value) return
|
||||
@@ -26,7 +24,6 @@ export const useCloudNotificationStore = defineStore(
|
||||
|
||||
const isEligiblePlatform = computed(() => {
|
||||
if (!isReady.value) return false
|
||||
if (devOverrideEnabled) return true
|
||||
if (!isElectron()) return false
|
||||
|
||||
const osString =
|
||||
|
||||
@@ -3,17 +3,11 @@ import type { useSettingStore } from '@/platform/settings/settingStore'
|
||||
let pendingCallbacks: Array<() => Promise<void>> = []
|
||||
let isNewUserDetermined = false
|
||||
let isNewUserCached: boolean | null = null
|
||||
// Temporary override to always treat dev builds as "new user" for local testing
|
||||
const devForceNewUser = import.meta.env.DEV
|
||||
|
||||
export const newUserService = () => {
|
||||
function checkIsNewUser(
|
||||
settingStore: ReturnType<typeof useSettingStore>
|
||||
): boolean {
|
||||
if (devForceNewUser) {
|
||||
return true
|
||||
}
|
||||
|
||||
const isNewUserSettings =
|
||||
Object.keys(settingStore.settingValues).length === 0 ||
|
||||
!settingStore.get('Comfy.TutorialCompleted')
|
||||
@@ -47,16 +41,6 @@ export const newUserService = () => {
|
||||
isNewUserCached = checkIsNewUser(settingStore)
|
||||
isNewUserDetermined = true
|
||||
|
||||
if (devForceNewUser) {
|
||||
localStorage.removeItem('workflow')
|
||||
localStorage.removeItem('Comfy.PreviousWorkflow')
|
||||
try {
|
||||
await settingStore.set('Comfy.TutorialCompleted', false)
|
||||
} catch (error) {
|
||||
console.error('[newUserService] Failed to reset tutorial flag', error)
|
||||
}
|
||||
}
|
||||
|
||||
if (!isNewUserCached) {
|
||||
pendingCallbacks = []
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user