Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/improve UI #11

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions nested/dialog-window.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<style>
body {
color: #FFFFFF;
/* background-color: rgba(255, 255, 255, 0.1); */
}

h5 {
Expand Down Expand Up @@ -60,10 +61,12 @@ <h5>Are you sure to delete the screen shot</h3>

const window = WebviewWindow.getByLabel('main')
const dialogWindow = getCurrent()
const dialogWindow2 = WebviewWindow.getByLabel('dialog'); // reference to the WebviewWindow with the label 'dialog' to set decoration to false again.
document.getElementById('yes').addEventListener('click', async function () {
try {
await window.emit(EVENT.PERMISSION, { 'permission': true })
await dialogWindow.hide()
await dialogWindow2.setDecorations(false) // setting Decoration to false if user iterect with yes.
} catch (e) {
console.log('error while emitting', e);
}
Expand All @@ -73,6 +76,7 @@ <h5>Are you sure to delete the screen shot</h3>
try {
await window.emit(EVENT.PERMISSION, { 'permission': false })
await dialogWindow.hide()
await dialogWindow2.setDecorations(false) // setting Decoration to false if user iterect with no.
} catch (e) {
console.log('error while emitting', e);
}
Expand All @@ -81,6 +85,7 @@ <h5>Are you sure to delete the screen shot</h3>
dialogWindow.onCloseRequested(async (event) => {
await window.emit(EVENT.PERMISSION, { 'permission': false });
await dialogWindow.hide();
await dialogWindow2.setDecorations(false) // setting Decoration to false if user iterect with no if user close the dialog.
event.stopPropogation();
})

Expand Down
1,323 changes: 1,160 additions & 163 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
},
"devDependencies": {
"@tauri-apps/cli": "^1.4.0",
"@testing-library/react": "^14.1.0",
"@types/node": "^18.7.10",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^3.0.0",
"@vitejs/plugin-react": "^4.1.1",
"jsdom": "^22.1.0",
"typescript": "^4.9.5",
"vite": "^4.2.1",
"vitest": "^0.34.6"
"vitest": "^0.34.6",
"vitest-dom": "^0.1.1"
}
}
Loading
Loading