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