diff --git a/.gitignore b/.gitignore index fbfa7d1..6ae33d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ **/*.pyc +./tmp/**/* diff --git a/.roo/rules/01-general.md b/.roo/rules/01-general.md index 74c8936..9b8d24d 100644 --- a/.roo/rules/01-general.md +++ b/.roo/rules/01-general.md @@ -31,3 +31,18 @@ is preferred, and this is less preferred: # check if the user is an adult x = age >= 18 ``` + +9. Buttons should be disabled, and a spinner should replace the icon content when loading. Only the button that was clicked should be disabled though. Typically this is done something like this: +``` +
+ +
+``` +This will scope the disable to just the button, and disabled the button from being clicked. When in a modal, the whole modal should be disabled. + +### context7 documentation library ids: +* HTMX: /bigskysoftware/htmx +* HTMX extensions: /bigskysoftware/htmx-extensions diff --git a/QWEN.md b/QWEN.md index 74c8936..9b8d24d 100644 --- a/QWEN.md +++ b/QWEN.md @@ -31,3 +31,18 @@ is preferred, and this is less preferred: # check if the user is an adult x = age >= 18 ``` + +9. Buttons should be disabled, and a spinner should replace the icon content when loading. Only the button that was clicked should be disabled though. Typically this is done something like this: +``` +
+ +
+``` +This will scope the disable to just the button, and disabled the button from being clicked. When in a modal, the whole modal should be disabled. + +### context7 documentation library ids: +* HTMX: /bigskysoftware/htmx +* HTMX extensions: /bigskysoftware/htmx-extensions diff --git a/app/routes.py b/app/routes.py index a3a591f..3e5866e 100644 --- a/app/routes.py +++ b/app/routes.py @@ -242,8 +242,9 @@ def imap_config_modal(): @login_required def test_imap_connection(): """Test IMAP connection with provided configuration.""" - print("HELLO") try: + import time + time.sleep(5) # Get form data server = request.form.get('server') port = request.form.get('port') diff --git a/app/templates/base.html b/app/templates/base.html index b12e991..740fc87 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -5,6 +5,7 @@ {% block title %}Email Organizer - Prototype{% endblock %} + @@ -23,7 +24,9 @@ {% block head %}{% endblock %} + x-on:close-modal.window="$refs.modal.close()" + hx-ext="loading-states" + data-loading-delay="200"> {% block header %}{% endblock %} {% block content %}{% endblock %} diff --git a/app/templates/index.html b/app/templates/index.html index 21ba158..3c717f3 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -21,39 +21,54 @@

Email Folders

Create and manage your email organization rules

- +
+ +

Welcome to Email Organizer!

Organize your emails automatically with AI-powered rules. Create folders and set up rules to categorize incoming emails.

-
+
{% if current_user.imap_config %} +
-
+
+ +
{% else %} - +
{% endif %}
diff --git a/app/templates/partials/folder_card.html b/app/templates/partials/folder_card.html index 9dad1da..fd27f7e 100644 --- a/app/templates/partials/folder_card.html +++ b/app/templates/partials/folder_card.html @@ -1,21 +1,28 @@
-
+ +

{{ folder.name }}

- -
@@ -34,7 +41,7 @@ {% endif %}
Organize: - - + + +
diff --git a/app/templates/partials/folder_modal.html b/app/templates/partials/folder_modal.html index 4a5c468..586246b 100644 --- a/app/templates/partials/folder_modal.html +++ b/app/templates/partials/folder_modal.html @@ -16,7 +16,7 @@ {% endif %}
- @@ -26,7 +26,7 @@
- @@ -42,11 +42,12 @@
-

No folders yet

Add your first folder to get started organizing your emails.

- + + Create Folder + + +

Need help setting up your first folder?

View tutorial diff --git a/app/templates/partials/imap_config_modal.html b/app/templates/partials/imap_config_modal.html index fc6a20c..353e830 100644 --- a/app/templates/partials/imap_config_modal.html +++ b/app/templates/partials/imap_config_modal.html @@ -1,4 +1,4 @@ -