From e600d879685e81de363df2374a08017ebfb0de99 Mon Sep 17 00:00:00 2001 From: Herculino Trotta Date: Tue, 28 Oct 2025 14:13:30 -0300 Subject: [PATCH] feat: automated replacement --- .gitignore | 2 + .vscode/settings.json | 7 + app/WYGIWYH/settings.py | 28 +- .../account_groups/fragments/list.html | 30 +- .../fragments/account_reconciliation.html | 93 +- app/templates/accounts/fragments/list.html | 52 +- .../calendar_view/fragments/list.html | 28 +- .../calendar_view/pages/calendar.html | 23 +- app/templates/categories/fragments/list.html | 24 +- app/templates/categories/fragments/table.html | 28 +- .../common/fragments/month_year_picker.html | 56 +- app/templates/common/fragments/toasts.html | 20 +- app/templates/cotton/amount/display.html | 4 +- app/templates/cotton/components/fab.html | 41 +- .../cotton/components/fab_menu_button.html | 17 +- .../sidebar_menu_collapsible_header.html | 10 +- .../components/sidebar_menu_header.html | 6 +- .../cotton/components/sidebar_menu_item.html | 4 +- .../components/sidebar_menu_url_item.html | 4 +- app/templates/cotton/config/search.html | 6 +- app/templates/cotton/msg/empty.html | 8 +- app/templates/cotton/transaction/item.html | 280 ++-- .../cotton/transaction/small_item.html | 64 +- app/templates/cotton/ui/account_card.html | 94 +- app/templates/cotton/ui/card.html | 4 +- app/templates/cotton/ui/currency_card.html | 90 +- .../ui/deleted_transactions_action_bar.html | 99 +- app/templates/cotton/ui/help_icon.html | 6 +- app/templates/cotton/ui/info_card.html | 10 +- .../cotton/ui/percentage_distribution.html | 30 +- .../cotton/ui/quick_transactions_buttons.html | 28 +- .../cotton/ui/transactions_action_bar.html | 325 ++-- app/templates/cotton/ui/transactions_fab.html | 2 +- .../crispy-daisyui/accordion-group.html | 9 + app/templates/crispy-daisyui/accordion.html | 3 + app/templates/crispy-daisyui/betterform.html | 22 + .../crispy-daisyui/display_form.html | 9 + app/templates/crispy-daisyui/errors.html | 8 + .../crispy-daisyui/errors_formset.html | 9 + app/templates/crispy-daisyui/field.html | 71 + app/templates/crispy-daisyui/inputs.html | 13 + .../crispy-daisyui/layout/alert.html | 4 + .../crispy-daisyui/layout/attrs.html | 1 + .../crispy-daisyui/layout/baseinput.html | 9 + .../crispy-daisyui/layout/button.html | 1 + .../crispy-daisyui/layout/buttonholder.html | 4 + .../layout/checkboxselectmultiple_inline.html | 16 + .../crispy-daisyui/layout/column.html | 6 + app/templates/crispy-daisyui/layout/div.html | 4 + .../crispy-daisyui/layout/field_errors.html | 12 + .../layout/field_errors_block.html | 12 + .../crispy-daisyui/layout/field_file.html | 26 + .../layout/field_with_buttons.html | 39 + .../crispy-daisyui/layout/fieldset.html | 6 + .../crispy-daisyui/layout/floating_field.html | 28 + .../crispy-daisyui/layout/formactions.html | 11 + .../crispy-daisyui/layout/help_text.html | 7 + .../layout/help_text_and_errors.html | 13 + .../crispy-daisyui/layout/inline_field.html | 26 + .../crispy-daisyui/layout/modal.html | 11 + .../crispy-daisyui/layout/multifield.html | 27 + .../layout/prepended_appended_text.html | 50 + .../layout/radio_checkbox_select.html | 34 + .../layout/radioselect_inline.html | 16 + app/templates/crispy-daisyui/layout/row.html | 3 + .../crispy-daisyui/layout/switch.html | 19 + .../crispy-daisyui/layout/tab-link.html | 1 + app/templates/crispy-daisyui/layout/tab.html | 4 + .../layout/uneditable_input.html | 12 + .../crispy-daisyui/table_inline_formset.html | 57 + app/templates/crispy-daisyui/uni_form.html | 11 + app/templates/crispy-daisyui/uni_formset.html | 8 + .../crispy-daisyui/whole_uni_form.html | 14 + .../crispy-daisyui/whole_uni_formset.html | 30 + app/templates/currencies/fragments/list.html | 34 +- .../dca/fragments/strategy/details.html | 140 +- .../dca/fragments/strategy/list.html | 34 +- app/templates/entities/fragments/list.html | 24 +- app/templates/entities/fragments/table.html | 22 +- .../exchange_rates/fragments/list.html | 38 +- .../exchange_rates/fragments/table.html | 74 +- .../fragments/list.html | 50 +- .../fragments/table.html | 70 +- .../export_app/fragments/export.html | 4 +- .../export_app/fragments/restore.html | 4 +- app/templates/extends/offcanvas.html | 7 +- .../import_app/fragments/profiles/list.html | 44 +- .../fragments/profiles/list_presets.html | 16 +- .../import_app/fragments/runs/list.html | 50 +- .../import_app/fragments/runs/log.html | 4 +- app/templates/includes/mobile_navbar.html | 12 +- app/templates/includes/navbar/user_menu.html | 32 +- app/templates/includes/offcanvas.html | 8 +- app/templates/includes/placeholders.html | 8 + app/templates/includes/scripts.html | 20 +- app/templates/includes/sidebar.html | 70 +- app/templates/includes/styles.html | 3 - app/templates/includes/tools/calculator.html | 14 +- .../category_explorer/charts/account.html | 2 +- .../category_explorer/charts/currency.html | 2 +- .../fragments/category_explorer/index.html | 18 +- .../fragments/category_overview/index.html | 99 +- .../insights/fragments/emergency_fund.html | 100 +- app/templates/insights/fragments/sankey.html | 2 +- app/templates/insights/pages/index.html | 58 +- .../installment_plans/fragments/list.html | 24 +- .../installment_plans/fragments/table.html | 32 +- app/templates/layouts/base.html | 13 +- app/templates/layouts/base_auth.html | 1 - .../currency_converter/converted_value.html | 2 +- .../currency_converter.html | 41 +- .../mini_tools/unit_price_calculator.html | 117 +- .../monthly_overview/fragments/list.html | 6 +- .../fragments/monthly_account_summary.html | 6 +- .../fragments/monthly_currency_summary.html | 6 +- .../fragments/monthly_summary.html | 66 +- .../monthly_overview/pages/overview.html | 178 +-- app/templates/net_worth/net_worth.html | 105 +- .../fragments/create_menu.html | 4 +- .../quick_transactions/fragments/list.html | 30 +- .../quick_transactions/pages/index.html | 6 +- .../fragments/list.html | 28 +- .../fragments/table.html | 36 +- app/templates/rules/fragments/list.html | 40 +- .../transaction_rule/dry_run/visual.html | 46 +- .../fragments/transaction_rule/view.html | 84 +- app/templates/tags/fragments/list.html | 24 +- app/templates/tags/fragments/table.html | 22 +- .../fragments/all_account_summary.html | 6 +- .../fragments/all_currency_summary.html | 6 +- .../transactions/fragments/list_all.html | 36 +- app/templates/transactions/pages/add.html | 2 +- .../transactions/pages/transactions.html | 153 +- app/templates/transactions/pages/trash.html | 4 +- .../income_expense_toggle_buttons.html | 15 +- .../widgets/paid_toggle_button.html | 16 +- .../transaction_type_filter_buttons.html | 9 +- ...ectable_income_expense_toggle_buttons.html | 22 +- .../unselectable_paid_toggle_button.html | 21 +- app/templates/users/fragments/list.html | 44 +- app/templates/users/generic/hide_amounts.html | 2 +- app/templates/users/generic/mute_sounds.html | 2 +- app/templates/users/generic/play_sounds.html | 4 +- app/templates/users/generic/show_amounts.html | 4 +- app/templates/users/login.html | 30 +- .../fragments/account_data.html | 6 +- .../fragments/currency_data.html | 6 +- .../pages/overview_by_account.html | 178 +-- .../pages/overview_by_currency.html | 178 +-- .../pages/yearly_overview_base.html | 107 ++ docker-compose.dev.yml | 4 +- frontend/package-lock.json | 1378 +++++++++++++++++ frontend/package.json | 66 +- frontend/postcss.config.js | 6 +- frontend/src/autosize.js | 2 +- frontend/src/datepicker.js | 120 +- frontend/src/select.js | 2 + frontend/src/style.js | 3 +- frontend/src/styles/_animations.scss | 2 +- frontend/src/styles/_bootstrap.scss | 42 +- frontend/src/styles/_font-awesome.scss | 5 +- frontend/src/styles/_scrollbar.scss | 8 +- frontend/src/styles/_tom-select.scss | 113 +- frontend/src/styles/style.scss | 35 +- frontend/src/styles/tailwind.css | 99 +- frontend/vite.config.js | 38 +- requirements.txt | 2 +- 167 files changed, 4442 insertions(+), 2503 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 app/templates/crispy-daisyui/accordion-group.html create mode 100644 app/templates/crispy-daisyui/accordion.html create mode 100644 app/templates/crispy-daisyui/betterform.html create mode 100644 app/templates/crispy-daisyui/display_form.html create mode 100644 app/templates/crispy-daisyui/errors.html create mode 100644 app/templates/crispy-daisyui/errors_formset.html create mode 100644 app/templates/crispy-daisyui/field.html create mode 100644 app/templates/crispy-daisyui/inputs.html create mode 100644 app/templates/crispy-daisyui/layout/alert.html create mode 100644 app/templates/crispy-daisyui/layout/attrs.html create mode 100644 app/templates/crispy-daisyui/layout/baseinput.html create mode 100644 app/templates/crispy-daisyui/layout/button.html create mode 100644 app/templates/crispy-daisyui/layout/buttonholder.html create mode 100644 app/templates/crispy-daisyui/layout/checkboxselectmultiple_inline.html create mode 100644 app/templates/crispy-daisyui/layout/column.html create mode 100644 app/templates/crispy-daisyui/layout/div.html create mode 100644 app/templates/crispy-daisyui/layout/field_errors.html create mode 100644 app/templates/crispy-daisyui/layout/field_errors_block.html create mode 100644 app/templates/crispy-daisyui/layout/field_file.html create mode 100644 app/templates/crispy-daisyui/layout/field_with_buttons.html create mode 100644 app/templates/crispy-daisyui/layout/fieldset.html create mode 100644 app/templates/crispy-daisyui/layout/floating_field.html create mode 100644 app/templates/crispy-daisyui/layout/formactions.html create mode 100644 app/templates/crispy-daisyui/layout/help_text.html create mode 100644 app/templates/crispy-daisyui/layout/help_text_and_errors.html create mode 100644 app/templates/crispy-daisyui/layout/inline_field.html create mode 100644 app/templates/crispy-daisyui/layout/modal.html create mode 100644 app/templates/crispy-daisyui/layout/multifield.html create mode 100644 app/templates/crispy-daisyui/layout/prepended_appended_text.html create mode 100644 app/templates/crispy-daisyui/layout/radio_checkbox_select.html create mode 100644 app/templates/crispy-daisyui/layout/radioselect_inline.html create mode 100644 app/templates/crispy-daisyui/layout/row.html create mode 100644 app/templates/crispy-daisyui/layout/switch.html create mode 100644 app/templates/crispy-daisyui/layout/tab-link.html create mode 100644 app/templates/crispy-daisyui/layout/tab.html create mode 100644 app/templates/crispy-daisyui/layout/uneditable_input.html create mode 100644 app/templates/crispy-daisyui/table_inline_formset.html create mode 100644 app/templates/crispy-daisyui/uni_form.html create mode 100644 app/templates/crispy-daisyui/uni_formset.html create mode 100644 app/templates/crispy-daisyui/whole_uni_form.html create mode 100644 app/templates/crispy-daisyui/whole_uni_formset.html create mode 100644 app/templates/yearly_overview/pages/yearly_overview_base.html create mode 100644 frontend/package-lock.json diff --git a/.gitignore b/.gitignore index 7b6caf3..5ab3c7c 100644 --- a/.gitignore +++ b/.gitignore @@ -160,3 +160,5 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. .idea/ + +node_modules/ \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..1c0cfda --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "djlint.showInstallError": false, + "files.associations": { + "*.css": "tailwindcss" + }, + "tailwindCSS.experimental.configFile": "frontend/src/styles/tailwind.css", +} \ No newline at end of file diff --git a/app/WYGIWYH/settings.py b/app/WYGIWYH/settings.py index cf5db80..12dd32c 100644 --- a/app/WYGIWYH/settings.py +++ b/app/WYGIWYH/settings.py @@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/5.1/ref/settings/ """ import os +import re import sys from pathlib import Path @@ -46,7 +47,7 @@ INSTALLED_APPS = [ "django.contrib.sites", "whitenoise.runserver_nostatic", "django.contrib.staticfiles", - "webpack_boilerplate", + "django_vite", "django.contrib.humanize", "django.contrib.postgres", "django_browser_reload", @@ -128,6 +129,14 @@ STORAGES = { WHITENOISE_MANIFEST_STRICT = False + +def immutable_file_test(path, url): + # Match vite (rollup)-generated hashes, à la, `some_file-CSliV9zW.js` + return re.match(r"^.+[.-][0-9a-zA-Z_-]{8,12}\..+$", url) + + +WHITENOISE_IMMUTABLE_FILE_TEST = immutable_file_test + WSGI_APPLICATION = "WYGIWYH.wsgi.application" @@ -289,7 +298,7 @@ STATIC_URL = "static/" STATIC_ROOT = BASE_DIR / "static_files" STATICFILES_DIRS = [ - ROOT_DIR / "frontend/build", + ROOT_DIR / "frontend" / "build", BASE_DIR / "static", ] @@ -305,9 +314,10 @@ CACHES = { } } -WEBPACK_LOADER = { - "MANIFEST_FILE": ROOT_DIR / "frontend/build/manifest.json", -} +DJANGO_VITE_ASSETS_PATH = ROOT_DIR / "frontend" / "build" +DJANGO_VITE_MANIFEST_PATH = DJANGO_VITE_ASSETS_PATH / "manifest.json" +DJANGO_VITE_DEV_MODE = DEBUG +DJANGO_VITE_DEV_SERVER_PORT = 5173 # Default primary key field type # https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field @@ -354,8 +364,12 @@ ACCOUNT_ADAPTER = "allauth.account.adapter.DefaultAccountAdapter" SOCIALACCOUNT_ADAPTER = "allauth.socialaccount.adapter.DefaultSocialAccountAdapter" # CRISPY FORMS -CRISPY_ALLOWED_TEMPLATE_PACKS = ["bootstrap5", "crispy_forms/pure_text"] -CRISPY_TEMPLATE_PACK = "bootstrap5" +CRISPY_ALLOWED_TEMPLATE_PACKS = [ + "bootstrap5", + "crispy_forms/pure_text", + "crispy-daisyui", +] +CRISPY_TEMPLATE_PACK = "crispy-daisyui" SESSION_EXPIRE_AT_BROWSER_CLOSE = False SESSION_COOKIE_AGE = int(os.getenv("SESSION_EXPIRY_TIME", 2678400)) # 31 days diff --git a/app/templates/account_groups/fragments/list.html b/app/templates/account_groups/fragments/list.html index adc7a78..aae721a 100644 --- a/app/templates/account_groups/fragments/list.html +++ b/app/templates/account_groups/fragments/list.html @@ -1,9 +1,9 @@ {% load i18n %} -
-
+
+
{% spaceless %}
{% translate 'Account Groups' %} - -
-
+
+
{% if account_groups %} - +
- - + + {% for account_group in account_groups %} - - + {% endfor %} diff --git a/app/templates/accounts/fragments/account_reconciliation.html b/app/templates/accounts/fragments/account_reconciliation.html index 9189421..1cf5f2a 100644 --- a/app/templates/accounts/fragments/account_reconciliation.html +++ b/app/templates/accounts/fragments/account_reconciliation.html @@ -9,65 +9,60 @@ {% csrf_token %} {{ form.management_form }} -
+
{% for form in form.forms %} -
-

- -

-
-
-
-
- {% translate 'Current balance' %} -
-
- {% currency_display amount=form.current_balance prefix=form.currency_prefix suffix=form.currency_suffix decimal_places=form.currency_decimal_places %} -
+
+ + +
+
+
+ {% translate 'Current balance' %}
-
- {% crispy form %} +
+ {% currency_display amount=form.current_balance prefix=form.currency_prefix suffix=form.currency_suffix decimal_places=form.currency_decimal_places %}
-
-
- {% translate 'Difference' %} -
-
-
+
+
+ {% crispy form %} +
+
+
+ {% translate 'Difference' %}
+
-
{% endfor %}
-
+
- +
diff --git a/app/templates/accounts/fragments/list.html b/app/templates/accounts/fragments/list.html index f5ef5ed..a6b2c6c 100644 --- a/app/templates/accounts/fragments/list.html +++ b/app/templates/accounts/fragments/list.html @@ -1,9 +1,9 @@ {% load i18n %} -
-
+
+
{% spaceless %}
{% translate 'Accounts' %} - -
-
+
+
{% if accounts %} -
{% translate 'Name' %}{% translate 'Name' %}
+
- - - - - - - + + + + + + + {% for account in accounts %} - - - - - - - + + + + + + {% endfor %} diff --git a/app/templates/calendar_view/fragments/list.html b/app/templates/calendar_view/fragments/list.html index 18f6c24..c579beb 100644 --- a/app/templates/calendar_view/fragments/list.html +++ b/app/templates/calendar_view/fragments/list.html @@ -2,40 +2,40 @@ {% load i18n %}
-
-
+
+
{% translate 'MON' %}
-
+
{% translate 'TUE' %}
-
+
{% translate 'WED' %}
-
+
{% translate 'THU' %}
-
+
{% translate 'FRI' %}
-
+
{% translate 'SAT' %}
-
+
{% translate 'SUN' %}
{% for date in dates %} {% if date %} -
-
-
{{ date.date|date:"l"|lower }}
-
{{ date.day }}
+
+
{{ date.date|date:"l"|lower }}
+
{{ date.day }}
-
+
{% for transaction in date.transactions %} {% if transaction.is_paid %} {% if transaction.type == "IN" and not transaction.account.is_asset %} @@ -62,7 +62,7 @@
{% else %} -
+
{% endif %} {% endfor %}
diff --git a/app/templates/calendar_view/pages/calendar.html b/app/templates/calendar_view/pages/calendar.html index acc63da..83b95c5 100644 --- a/app/templates/calendar_view/pages/calendar.html +++ b/app/templates/calendar_view/pages/calendar.html @@ -3,7 +3,6 @@ {% load i18n %} {% load month_name %} {% load static %} -{% load webpack_loader %} {% block title %}{% translate 'Monthly Overview' %} :: {{ month|month_name }}/{{ year }}{% endblock %} @@ -13,28 +12,28 @@ {% endblock %} {% block content %} -
{% translate 'Name' %}{% translate 'Group' %}{% translate 'Currency' %}{% translate 'Exchange Currency' %}{% translate 'Is Asset' %}{% translate 'Archived' %}{% translate 'Name' %}{% translate 'Group' %}{% translate 'Currency' %}{% translate 'Exchange Currency' %}{% translate 'Is Asset' %}{% translate 'Archived' %}
+
- - - + + + {% for category in categories %} - - - + {% endfor %} diff --git a/app/templates/common/fragments/month_year_picker.html b/app/templates/common/fragments/month_year_picker.html index 8ed07d7..3fddec8 100644 --- a/app/templates/common/fragments/month_year_picker.html +++ b/app/templates/common/fragments/month_year_picker.html @@ -7,49 +7,33 @@ {% block body %} {% regroup month_year_data by year as years_list %} - -
- {% for x in years_list %} - -
-
- {% trans 'Today' %} +
+ {% endblock %} diff --git a/app/templates/common/fragments/toasts.html b/app/templates/common/fragments/toasts.html index 84727bc..f917338 100644 --- a/app/templates/common/fragments/toasts.html +++ b/app/templates/common/fragments/toasts.html @@ -2,19 +2,25 @@ {% load toast_bg %} {% if messages %} {% for message in messages %} -
+ {% if formset.readonly and not formset.queryset.exists %} + {% else %} + + {% for field in formset.forms.0 %} + {% if field.label and not field.is_hidden %} + + {% endif %} + {% endfor %} + + {% endif %} + + + + + {% for field in formset.empty_form %} + {% include 'crispy-daisyui/field.html' with tag="td" form_show_labels=False %} + {% endfor %} + + + {% for form in formset %} + {% if form_show_errors and not form.is_extra %} + {% include "crispy-daisyui/errors.html" %} + {% endif %} + + + {% for field in form %} + {% include 'crispy-daisyui/field.html' with tag="td" form_show_labels=False %} + {% endfor %} + + {% endfor %} + +
{% translate 'Name' %}{% translate 'Muted' %}{% translate 'Name' %}{% translate 'Muted' %}
-
- +
+ - {% if not category.owner %} - {% endif %} {% if user == category.owner %} -
{{ category.name }} - {% if category.mute %}{% endif %} + {{ category.name }} + {% if category.mute %}{% endif %}
+ {{ field.label }}{% if field.field.required and not field|is_checkbox %}*{% endif %} +
+ + {% include "crispy-daisyui/inputs.html" %} + +{% if formset_tag %}{% endif %} +{% endspecialspaceless %} diff --git a/app/templates/crispy-daisyui/uni_form.html b/app/templates/crispy-daisyui/uni_form.html new file mode 100644 index 0000000..c585588 --- /dev/null +++ b/app/templates/crispy-daisyui/uni_form.html @@ -0,0 +1,11 @@ +{% load crispy_forms_utils %} + +{% specialspaceless %} + {% if include_media %}{{ form.media }}{% endif %} + {% if form_show_errors %} + {% include "crispy-daisyui/errors.html" %} + {% endif %} + {% for field in form %} + {% include field_template %} + {% endfor %} +{% endspecialspaceless %} diff --git a/app/templates/crispy-daisyui/uni_formset.html b/app/templates/crispy-daisyui/uni_formset.html new file mode 100644 index 0000000..4030be6 --- /dev/null +++ b/app/templates/crispy-daisyui/uni_formset.html @@ -0,0 +1,8 @@ +{% with formset.management_form as form %} + {% include 'crispy-daisyui/uni_form.html' %} +{% endwith %} +{% for form in formset %} +
+ {% include 'crispy-daisyui/uni_form.html' %} +
+{% endfor %} diff --git a/app/templates/crispy-daisyui/whole_uni_form.html b/app/templates/crispy-daisyui/whole_uni_form.html new file mode 100644 index 0000000..f986797 --- /dev/null +++ b/app/templates/crispy-daisyui/whole_uni_form.html @@ -0,0 +1,14 @@ +{% load crispy_forms_utils %} + +{% specialspaceless %} +{% if form_tag %}
{% endif %} + {% if form_method|lower == 'post' and not disable_csrf %} + {% csrf_token %} + {% endif %} + + {% include "crispy-daisyui/display_form.html" %} + + {% include "crispy-daisyui/inputs.html" %} + +{% if form_tag %}
{% endif %} +{% endspecialspaceless %} diff --git a/app/templates/crispy-daisyui/whole_uni_formset.html b/app/templates/crispy-daisyui/whole_uni_formset.html new file mode 100644 index 0000000..1070a88 --- /dev/null +++ b/app/templates/crispy-daisyui/whole_uni_formset.html @@ -0,0 +1,30 @@ +{% load crispy_forms_tags %} +{% load crispy_forms_utils %} + +{% specialspaceless %} +{% if formset_tag %} +
+{% endif %} + {% if formset_method|lower == 'post' and not disable_csrf %} + {% csrf_token %} + {% endif %} + +
+ {{ formset.management_form|crispy }} +
+ + {% include "crispy-daisyui/errors_formset.html" %} + + {% for form in formset %} + {% include "crispy-daisyui/display_form.html" %} + {% endfor %} + + {% if inputs %} +
+ {% for input in inputs %} + {% include "crispy-daisyui/layout/baseinput.html" %} + {% endfor %} +
+ {% endif %} +{% if formset_tag %}
{% endif %} +{% endspecialspaceless %} diff --git a/app/templates/currencies/fragments/list.html b/app/templates/currencies/fragments/list.html index db4d6b2..7648696 100644 --- a/app/templates/currencies/fragments/list.html +++ b/app/templates/currencies/fragments/list.html @@ -1,9 +1,9 @@ {% load i18n %} -
-
+
+
{% spaceless %}
{% translate 'Currencies' %} - -
-
+
+
{% if currencies %} - +
- - - - + + + + {% for currency in currencies %} - - - - + + + {% endfor %} diff --git a/app/templates/dca/fragments/strategy/details.html b/app/templates/dca/fragments/strategy/details.html index 10d9563..e4e6f15 100644 --- a/app/templates/dca/fragments/strategy/details.html +++ b/app/templates/dca/fragments/strategy/details.html @@ -1,13 +1,13 @@ {% load currency_display %} {% load i18n %} -
-
-
+
+
+
{{ strategy.name }}
-
-
- {{ strategy.payment_currency.name }} x {{ strategy.target_currency.name }} +
+
+ {{ strategy.payment_currency.name }} x {{ strategy.target_currency.name }}
{% if strategy.current_price %} @@ -25,13 +25,13 @@
-
-
-
-
+
+
+
+
{% spaceless %} -
{% trans "Entries" %} - {% trans "Entries" %} + -
{% translate 'Code' %}{% translate 'Name' %}{% translate 'Archived' %}{% translate 'Code' %}{% translate 'Name' %}{% translate 'Archived' %}
- {{ currency.code }}{{ currency.name }}{% if currency.is_archived %}{% endif %}{{ currency.code }}{{ currency.name }}{% if currency.is_archived %}{% endif %}
+
+
@@ -59,9 +59,9 @@ {% for entry in entries %} - @@ -127,13 +127,13 @@ -
-
-
-
-
-
{% trans "Total Invested" %}
-
+
+
+
+
+
+
{% trans "Total Invested" %}
+
-
-
-
-
{% trans "Total Received" %}
-
+
+
+
+
{% trans "Total Received" %}
+
-
-
-
-
{% trans "Current Total Value" %}
-
+
+
+
+
{% trans "Current Total Value" %}
+
-
-
-
-
{% trans "Average Entry Price" %}
-
+
+
+
+
{% trans "Average Entry Price" %}
+
-
-
-
-
{% trans "Total P/L" %}
+
+
+
+
{% trans "Total P/L" %}
+ class="tw:text-base-content {% if strategy.total_profit_loss >= 0 %}tw:text-green-400{% else %}tw:text-red-400{% endif %}">
-
-
-
-
{% trans "Total % P/L" %}
+
+
+
+
{% trans "Total % P/L" %}
+ class="tw:text-base-content {% if strategy.total_profit_loss >= 0 %}tw:text-green-400{% else %}tw:text-red-400{% endif %}"> {{ strategy.total_profit_loss_percentage|floatformat:2 }}%
-
-
+
-
-
-
{% trans "Performance Over Time" %}
+
+
+
{% trans "Performance Over Time" %}
-
-
+
-
-
-
{% trans "Entry Price vs Current Price" %}
+
+
+
{% trans "Entry Price vs Current Price" %}
-
-
+
-
-
-
{% trans "Investment Frequency" %}
-

+

- {% if entry.profit_loss_percentage > 0 %} - {{ entry.profit_loss_percentage|floatformat:"2g" }}% + {{ entry.profit_loss_percentage|floatformat:"2g" }}% {% elif entry.profit_loss_percentage < 0 %} - {{ entry.profit_loss_percentage|floatformat:"2g" }}% + {{ entry.profit_loss_percentage|floatformat:"2g" }}% {% endif %}
+
- - + + {% for entity in entities %} - - + {% endfor %} diff --git a/app/templates/exchange_rates/fragments/list.html b/app/templates/exchange_rates/fragments/list.html index a3436ab..90090da 100644 --- a/app/templates/exchange_rates/fragments/list.html +++ b/app/templates/exchange_rates/fragments/list.html @@ -1,10 +1,10 @@ {% load currency_display %} {% load i18n %} -
{% translate 'Name' %}{% translate 'Name' %}
-
- +
+ - {% if not entity.owner %} - {% endif %} {% if user == entity.owner %} -
{{ entity.name }}{{ entity.name }}
+
+
- - - - + + + + {% for exchange_rate in page_obj %} - - - - + + + {% endfor %} @@ -52,13 +52,12 @@ {% endif %} {% if page_obj.has_other_pages %} - {% endif %} diff --git a/app/templates/exchange_rates_services/fragments/list.html b/app/templates/exchange_rates_services/fragments/list.html index 5737f35..290707c 100644 --- a/app/templates/exchange_rates_services/fragments/list.html +++ b/app/templates/exchange_rates_services/fragments/list.html @@ -1,10 +1,10 @@ {% load currency_display %} {% load i18n %} -
{% translate 'Date' %}{% translate 'Pairing' %}{% translate 'Rate' %}{% translate 'Date' %}{% translate 'Pairing' %}{% translate 'Rate' %}
- {{ exchange_rate.date|date:"SHORT_DATETIME_FORMAT" }}{{ exchange_rate.from_currency.name }} x {{ exchange_rate.to_currency.name }}1 {{ exchange_rate.from_currency.name }} ≅ {% currency_display amount=exchange_rate.rate prefix=exchange_rate.to_currency.prefix suffix=exchange_rate.to_currency.suffix decimal_places=exchange_rate.to_currency.decimal_places%}{{ exchange_rate.date|date:"SHORT_DATETIME_FORMAT" }}{{ exchange_rate.from_currency.name }} x {{ exchange_rate.to_currency.name }}1 {{ exchange_rate.from_currency.name }} ≅ {% currency_display amount=exchange_rate.rate prefix=exchange_rate.to_currency.prefix suffix=exchange_rate.to_currency.suffix decimal_places=exchange_rate.to_currency.decimal_places%}
+
+
- - - - - - + + + + + + {% for service in services %} - - - - - - + + + + + {% endfor %} diff --git a/app/templates/exchange_rates_services/fragments/table.html b/app/templates/exchange_rates_services/fragments/table.html index 33cb6a9..d7fc880 100644 --- a/app/templates/exchange_rates_services/fragments/table.html +++ b/app/templates/exchange_rates_services/fragments/table.html @@ -1,23 +1,23 @@ {% load currency_display %} {% load i18n %} -
+
{% if page_obj %} -
-
{% translate 'Name' %}{% translate 'Service' %}{% translate 'Targeting' %}{% translate 'Last fetch' %}{% translate 'Name' %}{% translate 'Service' %}{% translate 'Targeting' %}{% translate 'Last fetch' %}
- {% if service.is_active %}{% else %} - {% endif %}{{ service.name }}{{ service.get_service_type_display }}{{ service.target_currencies.count }} {% trans 'currencies' %}, {{ service.target_accounts.count }} {% trans 'accounts' %}{{ service.last_fetch|date:"SHORT_DATETIME_FORMAT" }}{% if service.is_active %}{% else %} + {% endif %}{{ service.name }}{{ service.get_service_type_display }}{{ service.target_currencies.count }} {% trans 'currencies' %}, {{ service.target_accounts.count }} {% trans 'accounts' %}{{ service.last_fetch|date:"SHORT_DATETIME_FORMAT" }}
+
+
- - - - + + + + {% for exchange_rate in page_obj %} - - - - + + + {% endfor %} @@ -52,13 +52,12 @@ {% endif %} {% if page_obj.has_other_pages %} -
+
{% endif %} diff --git a/app/templates/export_app/fragments/export.html b/app/templates/export_app/fragments/export.html index 8a41a9f..217fe0b 100644 --- a/app/templates/export_app/fragments/export.html +++ b/app/templates/export_app/fragments/export.html @@ -5,8 +5,8 @@ {% block title %}{% translate 'Export' %}{% endblock %} {% block body %} -
-
+
+ {% crispy form %}
diff --git a/app/templates/export_app/fragments/restore.html b/app/templates/export_app/fragments/restore.html index c158a75..8431906 100644 --- a/app/templates/export_app/fragments/restore.html +++ b/app/templates/export_app/fragments/restore.html @@ -5,12 +5,12 @@ {% block title %}{% translate 'Restore' %}{% endblock %} {% block body %} -
+
+ class="show-loading tw:px-1"> {% crispy form %}
diff --git a/app/templates/extends/offcanvas.html b/app/templates/extends/offcanvas.html index 6f5cef9..3d8f627 100644 --- a/app/templates/extends/offcanvas.html +++ b/app/templates/extends/offcanvas.html @@ -1,8 +1,7 @@ {% load i18n %} -{% load webpack_loader %} -
-
{% block title %}{% endblock %}
- +
+
{% block title %}{% endblock %}
+
-
+
+
{% spaceless %}
{% translate 'Import Profiles' %} - - - @@ -25,45 +23,45 @@ {% endspaceless %}
-
-
+
+
{% if profiles %} -
{% translate 'Date' %}{% translate 'Pairing' %}{% translate 'Rate' %}{% translate 'Date' %}{% translate 'Pairing' %}{% translate 'Rate' %}
- {{ exchange_rate.date|date:"SHORT_DATETIME_FORMAT" }}{{ exchange_rate.from_currency.name }} x {{ exchange_rate.to_currency.name }}1 {{ exchange_rate.from_currency.name }} ≅ {% currency_display amount=exchange_rate.rate prefix=exchange_rate.to_currency.prefix suffix=exchange_rate.to_currency.suffix decimal_places=exchange_rate.to_currency.decimal_places%}{{ exchange_rate.date|date:"SHORT_DATETIME_FORMAT" }}{{ exchange_rate.from_currency.name }} x {{ exchange_rate.to_currency.name }}1 {{ exchange_rate.from_currency.name }} ≅ {% currency_display amount=exchange_rate.rate prefix=exchange_rate.to_currency.prefix suffix=exchange_rate.to_currency.suffix decimal_places=exchange_rate.to_currency.decimal_places%}
+
- - - + + + {% for profile in profiles %} - - - + + {% endfor %} diff --git a/app/templates/import_app/fragments/profiles/list_presets.html b/app/templates/import_app/fragments/profiles/list_presets.html index ba22a00..5bc10ef 100644 --- a/app/templates/import_app/fragments/profiles/list_presets.html +++ b/app/templates/import_app/fragments/profiles/list_presets.html @@ -6,28 +6,28 @@ {% block body %} {% if presets %} -
{% translate 'Name' %}{% translate 'Version' %}{% translate 'Name' %}{% translate 'Version' %}
- {{ profile.name }}{{ profile.get_version_display }}{{ profile.name }}{{ profile.get_version_display }}