mirror of
https://github.com/Physton/sd-webui-prompt-all-in-one.git
synced 2026-05-01 03:31:41 +00:00
Merge pull request #219 from bluelovers/pr/cancelBlacklistConfirm-001
fix: cancelBlacklistConfirm
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"build:watch": "vite build --watch",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -1058,7 +1058,7 @@ export default {
|
||||
},
|
||||
onUpdateBlacklist(data, cancelBlacklistConfirm) {
|
||||
this.blacklist = this._handleBlacklist(data)
|
||||
this.cancelBlacklistConfirm = cancelBlacklistConfirm
|
||||
if (typeof cancelBlacklistConfirm === "boolean") this.cancelBlacklistConfirm = cancelBlacklistConfirm
|
||||
},
|
||||
onUpdateHotkey(data) {
|
||||
this.hotkey = data
|
||||
|
||||
@@ -507,8 +507,9 @@ export default {
|
||||
onBlacklistClick(id) {
|
||||
let tag = this.tags.find(tag => tag.id === id)
|
||||
if (!tag) return
|
||||
let title = this.getLang('confirm_add_blacklist').replace('{0}', tag.value) + "\n" + this.getLang('blacklist_desc')
|
||||
|
||||
if (!this.cancelBlacklistConfirm) {
|
||||
let title = this.getLang('confirm_add_blacklist').replace('{0}', tag.value) + "\n" + this.getLang('blacklist_desc')
|
||||
if (!confirm(title)) return
|
||||
}
|
||||
|
||||
@@ -527,7 +528,7 @@ export default {
|
||||
}
|
||||
}
|
||||
this.gradioAPI.setData('blacklist', blacklist)
|
||||
this.$emit('update:blacklist', blacklist)
|
||||
this.$emit('update:blacklist', blacklist, this.cancelBlacklistConfirm)
|
||||
|
||||
this.tags.forEach(item => {
|
||||
if (item.value === tag.value) {
|
||||
|
||||
@@ -3,6 +3,7 @@ import { resolve } from 'path'
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
|
||||
/** @type {import('vite').UserConfig} */
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
define: {
|
||||
|
||||
Reference in New Issue
Block a user