diff --git a/package.json b/package.json index 5a6cb31f6..5d18a9c10 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sub-store-front-end", - "version": "2.14.67", + "version": "2.14.69", "private": true, "scripts": { "dev": "vite --host", diff --git a/src/components/FileListItem.vue b/src/components/FileListItem.vue index ac76b19f4..2eacdf624 100644 --- a/src/components/FileListItem.vue +++ b/src/components/FileListItem.vue @@ -247,6 +247,13 @@ }); const closePreview = () => { + document.querySelector('html').style['overflow-y'] = ''; + document.querySelector('html').style.height = ''; + document.body.style.height = ''; + document.body.style['overflow-y'] = ''; + (document.querySelector('#app') as HTMLElement).style['overflow-y'] = ''; + (document.querySelector('#app') as HTMLElement).style.height = ''; + filePreviewIsVisible.value = false; router.back(); }; @@ -260,6 +267,14 @@ if (res?.data?.status === 'success') { previewData.value = res.data.data; + + document.querySelector('html').style['overflow-y'] = 'hidden'; + document.querySelector('html').style.height = '100%'; + document.body.style.height = '100%'; + document.body.style['overflow-y'] = 'hidden'; + (document.querySelector('#app') as HTMLElement).style['overflow-y'] = 'hidden'; + (document.querySelector('#app') as HTMLElement).style.height = '100%'; + filePreviewIsVisible.value = true; Toast.hide('compare'); } diff --git a/src/components/SubListItem.vue b/src/components/SubListItem.vue index f4a036836..b3c62c6f7 100644 --- a/src/components/SubListItem.vue +++ b/src/components/SubListItem.vue @@ -326,6 +326,13 @@ }); const closeCompare = () => { + document.querySelector('html').style['overflow-y'] = ''; + document.querySelector('html').style.height = ''; + document.body.style.height = ''; + document.body.style['overflow-y'] = ''; + (document.querySelector('#app') as HTMLElement).style['overflow-y'] = ''; + (document.querySelector('#app') as HTMLElement).style.height = ''; + compareTableIsVisible.value = false; router.back(); }; @@ -338,6 +345,14 @@ ); if (res?.data?.status === 'success') { compareData.value = res.data.data; + + document.querySelector('html').style['overflow-y'] = 'hidden'; + document.querySelector('html').style.height = '100%'; + document.body.style.height = '100%'; + document.body.style['overflow-y'] = 'hidden'; + (document.querySelector('#app') as HTMLElement).style['overflow-y'] = 'hidden'; + (document.querySelector('#app') as HTMLElement).style.height = '100%'; + compareTableIsVisible.value = true; Toast.hide('compare'); } diff --git a/src/views/FileEditor.vue b/src/views/FileEditor.vue index 36be60eb9..67362b9c8 100644 --- a/src/views/FileEditor.vue +++ b/src/views/FileEditor.vue @@ -307,6 +307,13 @@ deleteItem(form, actionsList, actionsChecked, id); }; const closePreview = () => { + document.querySelector('html').style['overflow-y'] = ''; + document.querySelector('html').style.height = ''; + document.body.style.height = ''; + document.body.style['overflow-y'] = ''; + (document.querySelector('#app') as HTMLElement).style['overflow-y'] = ''; + (document.querySelector('#app') as HTMLElement).style.height = ''; + filePreviewIsVisible.value = false; router.back(); }; @@ -343,6 +350,14 @@ const res = await subsApi.compareSub('file', data); if (res?.data?.status === 'success') { previewData.value = res.data.data; + + document.querySelector('html').style['overflow-y'] = 'hidden'; + document.querySelector('html').style.height = '100%'; + document.body.style.height = '100%'; + document.body.style['overflow-y'] = 'hidden'; + (document.querySelector('#app') as HTMLElement).style['overflow-y'] = 'hidden'; + (document.querySelector('#app') as HTMLElement).style.height = '100%'; + filePreviewIsVisible.value = true; Toast.hide('compare'); } diff --git a/src/views/FilePreview.vue b/src/views/FilePreview.vue index 8ce817d2c..525f21e6c 100644 --- a/src/views/FilePreview.vue +++ b/src/views/FilePreview.vue @@ -250,6 +250,9 @@ } .compare-page-wrapper { + top: 0; + left: 0; + position: absolute; width: 100vw; height: 100vh; z-index: 1000; diff --git a/src/views/SubEditor.vue b/src/views/SubEditor.vue index cc57f8bf0..2d68b8b83 100644 --- a/src/views/SubEditor.vue +++ b/src/views/SubEditor.vue @@ -415,6 +415,13 @@ }; const closeCompare = () => { + document.querySelector('html').style['overflow-y'] = ''; + document.querySelector('html').style.height = ''; + document.body.style.height = ''; + document.body.style['overflow-y'] = ''; + (document.querySelector('#app') as HTMLElement).style['overflow-y'] = ''; + (document.querySelector('#app') as HTMLElement).style.height = ''; + compareTableIsVisible.value = false; router.back(); }; @@ -453,6 +460,14 @@ const res = await subsApi.compareSub(type, data); if (res?.data?.status === 'success') { compareData.value = res.data.data; + + document.querySelector('html').style['overflow-y'] = 'hidden'; + document.querySelector('html').style.height = '100%'; + document.body.style.height = '100%'; + document.body.style['overflow-y'] = 'hidden'; + (document.querySelector('#app') as HTMLElement).style['overflow-y'] = 'hidden'; + (document.querySelector('#app') as HTMLElement).style.height = '100%'; + compareTableIsVisible.value = true; Toast.hide('compare'); }