[PR #168] [MERGED] [Feature] Confirmation dialog on overriding configuration values on import #429

Closed
opened 2026-02-26 12:21:37 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/brentvollebregt/auto-py-to-exe/pull/168
Author: @kaydotdev
Created: 4/30/2021
Status: Merged
Merged: 5/5/2021
Merged by: @brentvollebregt

Base: developHead: configuration-import-dialog


📝 Commits (10+)

📊 Changes

10 files changed (+269 additions, -16 deletions)

View changed files

📝 auto_py_to_exe/dialogs.py (+48 -13)
📝 auto_py_to_exe/web/css/general.css (+4 -2)
📝 auto_py_to_exe/web/css/main.css (+1 -1)
auto_py_to_exe/web/css/modal.css (+64 -0)
📝 auto_py_to_exe/web/index.html (+3 -0)
📝 auto_py_to_exe/web/js/configuration.js (+4 -0)
📝 auto_py_to_exe/web/js/i18n.js (+18 -0)
📝 auto_py_to_exe/web/js/importExport.js (+13 -0)
auto_py_to_exe/web/js/modal.js (+105 -0)
📝 auto_py_to_exe/web/js/utils.js (+9 -0)

📄 Description

  1. Fixed runtime error with import_configuration() method:
Traceback (most recent call last):
  File "greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
  File "site-packages/eel/__init__.py", line 259, in _process_message
    return_val = _exposed_functions[message['name']](*message['args'])
  File "auto-py-to-exe/auto_py_to_exe/ui.py", line 92, in import_configuration
    with open(file_path) as f:
TypeError: expected str, bytes or os.PathLike object, not tuple

Steps to reproduce:

  • Click on "Import Config From JSON File" button;
  • Click 'Cancel' option in File Dialog;
  1. Implemented JS API for custom modal dialog window;
  2. Implemented confirmation dialog for "Import Config From JSON File" action in order to prevent accidental configuration override;

Screenshot of confirmation modal:

modal-example


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/brentvollebregt/auto-py-to-exe/pull/168 **Author:** [@kaydotdev](https://github.com/kaydotdev) **Created:** 4/30/2021 **Status:** ✅ Merged **Merged:** 5/5/2021 **Merged by:** [@brentvollebregt](https://github.com/brentvollebregt) **Base:** `develop` ← **Head:** `configuration-import-dialog` --- ### 📝 Commits (10+) - [`36759f9`](https://github.com/brentvollebregt/auto-py-to-exe/commit/36759f9b677671dbfdd2bfe699cbd530d6c7013a) Merge branch 'develop' - [`6d17313`](https://github.com/brentvollebregt/auto-py-to-exe/commit/6d17313c5935cd3c554b45c5ab9e2fa409232fa4) Merge branch 'develop' - [`5a6424c`](https://github.com/brentvollebregt/auto-py-to-exe/commit/5a6424cb97622a0ae7936f27d0d78d444594ddcf) Merge branch 'develop' - [`a0b5dca`](https://github.com/brentvollebregt/auto-py-to-exe/commit/a0b5dcaab1d0562c436988c85c10603802916fb1) Merge branch 'develop' - [`4ad151d`](https://github.com/brentvollebregt/auto-py-to-exe/commit/4ad151d9708e71aacc065ab2a7cb286c4aaa35e5) Merge branch 'develop' - [`95f6c64`](https://github.com/brentvollebregt/auto-py-to-exe/commit/95f6c6411347e776ba8f5ca376e5524c31d1f7ed) Merge branch 'develop' - [`a1966fa`](https://github.com/brentvollebregt/auto-py-to-exe/commit/a1966fa536f6c85c8da8972e8212ea4f31250838) Merge branch 'develop' - [`f7c2ff6`](https://github.com/brentvollebregt/auto-py-to-exe/commit/f7c2ff67b741ea69c388ba54301e9e818508303e) Merge branch 'develop' - [`5fdde8e`](https://github.com/brentvollebregt/auto-py-to-exe/commit/5fdde8ec4a895f291e42e985af339c37d754d9c8) Merge branch 'develop' - [`c0d4b2b`](https://github.com/brentvollebregt/auto-py-to-exe/commit/c0d4b2bc533868453129fa75d5797a742210971c) Merge branch 'develop' ### 📊 Changes **10 files changed** (+269 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `auto_py_to_exe/dialogs.py` (+48 -13) 📝 `auto_py_to_exe/web/css/general.css` (+4 -2) 📝 `auto_py_to_exe/web/css/main.css` (+1 -1) ➕ `auto_py_to_exe/web/css/modal.css` (+64 -0) 📝 `auto_py_to_exe/web/index.html` (+3 -0) 📝 `auto_py_to_exe/web/js/configuration.js` (+4 -0) 📝 `auto_py_to_exe/web/js/i18n.js` (+18 -0) 📝 `auto_py_to_exe/web/js/importExport.js` (+13 -0) ➕ `auto_py_to_exe/web/js/modal.js` (+105 -0) 📝 `auto_py_to_exe/web/js/utils.js` (+9 -0) </details> ### 📄 Description 1. Fixed runtime error with `import_configuration()` method: ``` Traceback (most recent call last): File "greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run File "site-packages/eel/__init__.py", line 259, in _process_message return_val = _exposed_functions[message['name']](*message['args']) File "auto-py-to-exe/auto_py_to_exe/ui.py", line 92, in import_configuration with open(file_path) as f: TypeError: expected str, bytes or os.PathLike object, not tuple ``` Steps to reproduce: - Click on "Import Config From JSON File" button; - Click 'Cancel' option in File Dialog; 2. Implemented JS API for custom modal dialog window; 3. Implemented confirmation dialog for "Import Config From JSON File" action in order to prevent accidental configuration override; Screenshot of confirmation modal: ![modal-example](https://user-images.githubusercontent.com/22917736/116694804-67811c00-a9c8-11eb-8084-3b1e8618898c.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 12:21:37 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/auto-py-to-exe#429
No description provided.