wip fix
This commit is contained in:
parent
bce86b5881
commit
804a5ffc98
|
|
@ -47,7 +47,7 @@ export const EdPopCode = () => {
|
|||
useEffect(() => {
|
||||
if (code.mode === "") {
|
||||
db.code.findFirst({ where: { id_site: p.site.id } }).then((e) => {
|
||||
code.mode = !!e ? "new" : "old";
|
||||
code.mode = e ? "new" : "old";
|
||||
p.render();
|
||||
});
|
||||
}
|
||||
|
|
@ -76,7 +76,7 @@ export const EdPopCode = () => {
|
|||
onClick={() => {
|
||||
if (
|
||||
confirm(
|
||||
"Old code will not load, are you sure want to upgrade ?"
|
||||
"Old code will not load, are you sure want to upgrade ?",
|
||||
)
|
||||
) {
|
||||
code.mode = "new";
|
||||
|
|
@ -139,7 +139,7 @@ const CodeBody = () => {
|
|||
popoverClassName="bg-white shadow-md"
|
||||
className={cx(
|
||||
"flex items-center px-2 w-[200px] hover:bg-blue-50 space-x-1",
|
||||
"cursor-pointer justify-between"
|
||||
"cursor-pointer justify-between",
|
||||
)}
|
||||
open={local.namePicker}
|
||||
onOpenChange={(open) => {
|
||||
|
|
@ -166,7 +166,7 @@ const CodeBody = () => {
|
|||
onClick={async () => {
|
||||
if (
|
||||
prompt(
|
||||
"Are you sure want to delete this code?\ntype 'yes' to confirm:"
|
||||
"Are you sure want to delete this code?\ntype 'yes' to confirm:",
|
||||
) === "yes"
|
||||
) {
|
||||
await db.code.delete({
|
||||
|
|
@ -174,7 +174,7 @@ const CodeBody = () => {
|
|||
});
|
||||
|
||||
codeName.list = codeName.list.filter(
|
||||
(e) => e.id !== p.ui.popup.code.id
|
||||
(e) => e.id !== p.ui.popup.code.id,
|
||||
);
|
||||
|
||||
p.ui.popup.code.name = codeName.list[0].name;
|
||||
|
|
@ -223,7 +223,7 @@ const CodeBody = () => {
|
|||
placement="bottom"
|
||||
className={cx(
|
||||
"flex items-stretch relative border-l",
|
||||
p.ui.popup.code.error && "bg-red-500 text-white"
|
||||
p.ui.popup.code.error && "bg-red-500 text-white",
|
||||
)}
|
||||
onClick={() => {
|
||||
p.ui.popup.code.show_log = !p.ui.popup.code.show_log;
|
||||
|
|
@ -238,7 +238,7 @@ const CodeBody = () => {
|
|||
"border-r flex text-center items-center hover:bg-blue-50 cursor-pointer px-2 transition-all",
|
||||
p.ui.popup.code.loading
|
||||
? "border-b-2 border-b-orange-400"
|
||||
: "border-b-2 border-b-transparent"
|
||||
: "border-b-2 border-b-transparent",
|
||||
)}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: p.ui.popup.code.loading ? iconLog : iconLoading,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"linter": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue