mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-04 05:02:17 +00:00
Backport of #10337 to `core/1.42` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10743-backport-core-1-42-feat-App-mode-Switch-to-Nodes-2-0-when-entering-builder-3336d73d365081c58cbade12aa6ecf05) by [Unito](https://www.unito.io) Co-authored-by: pythongosssss <125205205+pythongosssss@users.noreply.github.com>
56 lines
1.4 KiB
Vue
56 lines
1.4 KiB
Vue
<template>
|
|
<NotificationPopup
|
|
v-if="appModeStore.showVueNodeSwitchPopup"
|
|
:title="$t('appBuilder.vueNodeSwitch.title')"
|
|
show-close
|
|
position="bottom-left"
|
|
@close="dismiss"
|
|
>
|
|
{{ $t('appBuilder.vueNodeSwitch.content') }}
|
|
|
|
<template #footer-start>
|
|
<label
|
|
class="flex cursor-pointer items-center gap-2 text-sm text-muted-foreground"
|
|
>
|
|
<input
|
|
v-model="dontShowAgain"
|
|
type="checkbox"
|
|
class="accent-primary-background"
|
|
/>
|
|
{{ $t('appBuilder.vueNodeSwitch.dontShowAgain') }}
|
|
</label>
|
|
</template>
|
|
|
|
<template #footer-end>
|
|
<Button
|
|
variant="secondary"
|
|
size="lg"
|
|
class="font-normal"
|
|
@click="dismiss"
|
|
>
|
|
{{ $t('appBuilder.vueNodeSwitch.dismiss') }}
|
|
</Button>
|
|
</template>
|
|
</NotificationPopup>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { ref } from 'vue'
|
|
|
|
import NotificationPopup from '@/components/common/NotificationPopup.vue'
|
|
import Button from '@/components/ui/button/Button.vue'
|
|
import { useSettingStore } from '@/platform/settings/settingStore'
|
|
import { useAppModeStore } from '@/stores/appModeStore'
|
|
|
|
const appModeStore = useAppModeStore()
|
|
const settingStore = useSettingStore()
|
|
const dontShowAgain = ref(false)
|
|
|
|
function dismiss() {
|
|
if (dontShowAgain.value) {
|
|
void settingStore.set('Comfy.AppBuilder.VueNodeSwitchDismissed', true)
|
|
}
|
|
appModeStore.showVueNodeSwitchPopup = false
|
|
}
|
|
</script>
|