From 284a5da32b1b771ac353962fc3eae5152a89a594 Mon Sep 17 00:00:00 2001 From: vec Date: Mon, 25 Dec 2023 19:37:00 +0800 Subject: [PATCH 001/129] =?UTF-8?q?[fix]=20=E4=BC=98=E5=8C=96=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E6=95=88=E6=9E=9C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/components/Submission/scripts.tsx | 33 +++++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/front/src/components/Submission/scripts.tsx b/front/src/components/Submission/scripts.tsx index e59624ee..96d1a5c9 100644 --- a/front/src/components/Submission/scripts.tsx +++ b/front/src/components/Submission/scripts.tsx @@ -69,7 +69,7 @@ export function init() { select('下次注意点,不要又忘了', script('好的!', []) ), - select('话说,我想修改一下投稿,可以吗?', script_PhotoCreateOrEditWithTitle('当然可以!', true)), + select('话说,我想修改一下投稿,可以吗?', script_PhotoCreateOrEditWithTitle('当然可以!', 'EDIT', true)), select_我其实是想取消投稿 ]) } @@ -86,7 +86,7 @@ export function init() { if (photo) { // 已经投稿了 return componentScript([ - select('哦,我其实想修改的', script_PhotoCreateOrEditWithTitle('当然可以修改!', true)), + select('哦,我其实想修改的', script_PhotoCreateOrEditWithTitle('当然可以修改!', 'EDIT', true)), select_我其实是想取消投稿 ], () => { return ( @@ -103,30 +103,34 @@ export function init() { } else { return componentScript([], ({ changeScript }) => { return { - changeScript(script_感谢你的参与('CREATED', created_photo)) + changeScript(script_感谢你的参与('CREATE', created_photo)) }} /> }) } } - const script_感谢你的参与 = (type: 'CREATED' | 'EDITED', photo: PhotoNormal) => { + const script_感谢你的参与 = (type: 'CREATE' | 'EDIT', photo: PhotoNormal) => { return componentScript([], ({ changeScript }) => { useEffect(() => { setTimeout(() => { - if (type === 'CREATED') { + console.log(type, photo) + if (type === 'CREATE') { _EVENT_.created.trigger(normal2InActive(photo)) } else { _EVENT_.updated.trigger(normal2InActive(photo)) } }, 1500) }, []) - return <> - - + return ( + + ) }) } - const script_PhotoCreateOrEditWithTitle = (title: string, immediately = false) => componentScript([], ({ changeScript }) => { + const script_PhotoCreateOrEditWithTitle = (title: string, type: 'CREATE' | 'EDIT', immediately = false) => componentScript([], ({ changeScript }) => { const [show_form, showForm] = useState(false) useEffect(() => { if (immediately == false) { @@ -142,8 +146,8 @@ export function init() { { (show_form || immediately) && ( - { - changeScript(script_感谢你的参与('EDITED', edited_photo)) + { + changeScript(script_感谢你的参与(type, updated_photo)) }} /> ) } @@ -292,7 +296,10 @@ export function init() { const $elm = targets[i] as any if ($elm.disintegrated) { return } $elm.disintegrated = true - timeout(100).then(() => { + timeout( + 500 + + textContentEffectTotalTime(0, '你的投稿已撤回') + ).then(() => { disintegrate($elm).catch(err => { console.warn('disintegrate', err) AppCriticalError(`disintegrate error: ${err}`) @@ -387,7 +394,7 @@ export function init() { return ( <> From 8bde4012e62e04258d8e1fc1edfbd2e62dc6ad81 Mon Sep 17 00:00:00 2001 From: vec Date: Mon, 25 Dec 2023 20:43:20 +0800 Subject: [PATCH 002/129] =?UTF-8?q?[add]=20=E6=94=AF=E6=8C=81=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E8=AE=BF=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard/.env.production | 2 +- dashboard/src/views/gallery/index.vue | 4 ++-- dashboard/src/views/gallery/photo/detail.vue | 4 ++-- dashboard/src/views/gallery/photo/list.vue | 2 +- dashboard/src/views/member/detail.vue | 6 +++--- dashboard/src/views/member/index.vue | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dashboard/.env.production b/dashboard/.env.production index 83622559..90ef9af5 100755 --- a/dashboard/.env.production +++ b/dashboard/.env.production @@ -2,4 +2,4 @@ ENV = 'production' # base api -VUE_APP_BASE_API = 'https://pache.blog/torzo-gallery-server/api/' +VUE_APP_BASE_API = 'https://pache.blog/torzo-gallery-server/' diff --git a/dashboard/src/views/gallery/index.vue b/dashboard/src/views/gallery/index.vue index a2b1f5c3..31b7469e 100644 --- a/dashboard/src/views/gallery/index.vue +++ b/dashboard/src/views/gallery/index.vue @@ -1,7 +1,7 @@