diff --git a/app/apps/export_app/forms.py b/app/apps/export_app/forms.py index 1f7d6ed..1581791 100644 --- a/app/apps/export_app/forms.py +++ b/app/apps/export_app/forms.py @@ -159,7 +159,7 @@ class RestoreForm(forms.Form): self.helper.form_method = "post" self.helper.layout = Layout( "zip_file", - HTML("
"), + HTML('
'), "users", "accounts", "currencies", diff --git a/app/templates/account_groups/fragments/list.html b/app/templates/account_groups/fragments/list.html index aea970b..540adb1 100644 --- a/app/templates/account_groups/fragments/list.html +++ b/app/templates/account_groups/fragments/list.html @@ -1,73 +1,72 @@ {% load i18n %} -
+ + +
{% spaceless %} -
{% translate 'Account Groups' %} - - -
+
{% translate 'Account Groups' %}
{% endspaceless %}
-
+
{% if account_groups %} - - - - - - - - - {% for account_group in account_groups %} - - - +
+
{% translate 'Name' %}
+ + + + - {% endfor %} - -
{% translate 'Name' %}
+ + + {% for account_group in account_groups %} + + +
+ + + {% if not account_group.owner %} + + + {% endif %} + {% if user == account_group.owner %} + + + {% endif %} + +
+ + {{ account_group.name }} + + {% endfor %} + + +
{% else %} {% endif %} diff --git a/app/templates/accounts/fragments/list.html b/app/templates/accounts/fragments/list.html index 4431404..6bcf835 100644 --- a/app/templates/accounts/fragments/list.html +++ b/app/templates/accounts/fragments/list.html @@ -1,95 +1,96 @@ {% load i18n %} + +
{% spaceless %} -
{% translate 'Accounts' %} - - -
+
{% translate 'Accounts' %}
{% endspaceless %}
-
+
{% if accounts %} - - - - - - - - - - - - - - - {% for account in accounts %} - - - - - - - - - - {% endfor %} - -
{% translate 'Name' %}{% translate 'Group' %}{% translate 'Currency' %}{% translate 'Exchange Currency' %}{% translate 'Is Asset' %}{% translate 'Archived' %}
+ +
+ + + + + + + + + + + + + + {% for account in accounts %} + + + + + + + + + + {% endfor %} + +
{% translate 'Name' %}{% translate 'Group' %}{% translate 'Currency' %}{% translate 'Exchange Currency' %}{% translate 'Is Asset' %}{% translate 'Archived' %}
+
{% else %} - + {% endif %}
diff --git a/app/templates/categories/fragments/list.html b/app/templates/categories/fragments/list.html index e3e2a73..f0c0517 100644 --- a/app/templates/categories/fragments/list.html +++ b/app/templates/categories/fragments/list.html @@ -1,27 +1,29 @@ {% load i18n %} -
+ + +
{% spaceless %} -
{% translate 'Categories' %} - - -
+
{% translate 'Categories' %}
{% endspaceless %}
-
-
- - +
+
+ +
-
+
diff --git a/app/templates/categories/fragments/table.html b/app/templates/categories/fragments/table.html index 2a4cffa..28b4073 100644 --- a/app/templates/categories/fragments/table.html +++ b/app/templates/categories/fragments/table.html @@ -6,68 +6,70 @@
{% endif %} - {% if categories %} -
+{% if categories %} +
- - - - - - - - - - {% for category in categories %} - - - - +
+
{% translate 'Name' %}{% translate 'Muted' %}
-
- - - - {% if not category.owner %} - - - {% endif %} - {% if user == category.owner %} - - - {% endif %} -
-
{{ category.name }} - {% if category.mute %}{% endif %} -
+ + + + + - {% endfor %} - -
{% translate 'Name' %}{% translate 'Muted' %}
+ + + {% for category in categories %} + + +
+ + + {% if not category.owner %} + + + {% endif %} + {% if user == category.owner %} + + + {% endif %} + +
+ + {{ category.name }} + + {% if category.mute %}{% endif %} + + + {% endfor %} + + +
- {% else %} - - {% endif %} +{% else %} + +{% endif %}
diff --git a/app/templates/crispy-daisyui/errors.html b/app/templates/crispy-daisyui/errors.html index 235958e..77275f4 100644 --- a/app/templates/crispy-daisyui/errors.html +++ b/app/templates/crispy-daisyui/errors.html @@ -1,7 +1,7 @@ {% if form.non_field_errors %}
{% if form_error_title %}

{{ form_error_title }}

{% endif %} -
    +
      {{ form.non_field_errors|unordered_list }}
diff --git a/app/templates/crispy-daisyui/errors_formset.html b/app/templates/crispy-daisyui/errors_formset.html index b398cbf..88e7d5a 100644 --- a/app/templates/crispy-daisyui/errors_formset.html +++ b/app/templates/crispy-daisyui/errors_formset.html @@ -1,9 +1,8 @@ {% if formset.non_form_errors %}
{% if formset_error_title %}

{{ formset_error_title }}

{% endif %} -
    +
      {{ formset.non_form_errors|unordered_list }}
{% endif %} - diff --git a/app/templates/crispy-daisyui/layout/field_file.html b/app/templates/crispy-daisyui/layout/field_file.html index 51be7db..b7fac14 100644 --- a/app/templates/crispy-daisyui/layout/field_file.html +++ b/app/templates/crispy-daisyui/layout/field_file.html @@ -20,7 +20,7 @@
{% endif %}
- + {% include 'crispy-daisyui/layout/help_text_and_errors.html' %}
{% endfor %} diff --git a/app/templates/crispy-daisyui/layout/help_text.html b/app/templates/crispy-daisyui/layout/help_text.html index 0f3c499..4d9be14 100644 --- a/app/templates/crispy-daisyui/layout/help_text.html +++ b/app/templates/crispy-daisyui/layout/help_text.html @@ -1,7 +1,7 @@ {% if field.help_text %} {% if help_text_inline %} - {{ field.help_text|safe}} + {{ field.help_text|safe}} {% else %} -

{{ field.help_text|safe }}

+

{{ field.help_text|safe }}

{% endif %} {% endif %} diff --git a/app/templates/crispy-daisyui/layout/switch.html b/app/templates/crispy-daisyui/layout/switch.html index 9e3c5ff..f45e63d 100644 --- a/app/templates/crispy-daisyui/layout/switch.html +++ b/app/templates/crispy-daisyui/layout/switch.html @@ -4,18 +4,14 @@ {{ field }} {% else %} <{% if tag %}{{ tag }}{% else %}fieldset{% endif %} id="div_{{ field.auto_id }}" class="fieldset mt-2 {% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}"> - {% endif %} diff --git a/app/templates/currencies/fragments/list.html b/app/templates/currencies/fragments/list.html index 4f2b8de..68a6303 100644 --- a/app/templates/currencies/fragments/list.html +++ b/app/templates/currencies/fragments/list.html @@ -1,15 +1,12 @@ {% load i18n %} -
+ + +
{% spaceless %} -
{% translate 'Currencies' %} - - -
+
{% translate 'Currencies' %}
{% endspaceless %}
@@ -17,7 +14,8 @@
{% if currencies %} - +
+
@@ -56,6 +54,7 @@ {% endfor %}
+
{% else %} {% endif %} diff --git a/app/templates/dca/fragments/strategy/details.html b/app/templates/dca/fragments/strategy/details.html index f13ba33..407a2a7 100644 --- a/app/templates/dca/fragments/strategy/details.html +++ b/app/templates/dca/fragments/strategy/details.html @@ -1,8 +1,8 @@ {% load currency_display %} {% load i18n %} + url="{% url 'dca_entry_add' strategy_id=strategy.id %}" + hx_target="#generic-offcanvas">
@@ -12,7 +12,8 @@
- {{ strategy.payment_currency.name }} x {{ strategy.target_currency.name }} + {{ strategy.payment_currency.name }} x {{ strategy.target_currency.name }}
{% if strategy.current_price %} @@ -21,17 +22,17 @@ :prefix="strategy.payment_currency.prefix" :suffix="strategy.payment_currency.suffix" :decimal_places="strategy.payment_currency.decimal_places"> - • {{ strategy.current_price.1|date:"SHORT_DATETIME_FORMAT" }} + • {{ strategy.current_price.1|date:"SHORT_DATETIME_FORMAT" }} - {% else %} + {% else %}
{% trans "No exchange rate available" %}
- {% endif %} + {% endif %}
-
+
@@ -121,7 +122,7 @@
-
+
@@ -207,9 +208,8 @@
-
-
{ @@ -276,17 +278,15 @@ } }) end"> -
-
-
{% trans "Performance Over Time" %}
- -
+
+
+
{% trans "Performance Over Time" %}
+
-
-
-
-
-
{% trans "Entry Price vs Current Price" %}
- -
+
+
+
{% trans "Entry Price vs Current Price" %}
+
-
-
-
-
-
{% trans "Investment Frequency" %}
-

- {% trans "The straighter the blue line, the more consistent your DCA strategy is." %} -

- -
+ type: 'line', + data: { + labels: {{ investment_frequency.labels|safe }}, + datasets: [{ + label: '{% trans "Days Between Investments" %}', + data: {{ investment_frequency.intervals_line|safe }}, + borderColor: 'rgba(54, 162, 235, 1)', + backgroundColor: 'rgba(54, 162, 235, 0.1)', + fill: false, + tension: 0 + }] + }, + options: { + responsive: true, + scales: { + x: { + grid: { + display: true + }, + title: { + display: false, + }, + ticks: { + display: false + } + }, + y: { + beginAtZero: false, + title: { + display: false + } + } + }, + plugins: { + tooltip: { + mode: 'index', + intersect: false + }, + legend: { + display: false, + }, + title: { + display: false, + } + } + } + }) + end"> +
+
+
{% trans "Investment Frequency" %}
+

+ {% trans "The straighter the blue line, the more consistent your DCA strategy is." %} +

+
diff --git a/app/templates/entities/fragments/list.html b/app/templates/entities/fragments/list.html index 9ef07e3..535862a 100644 --- a/app/templates/entities/fragments/list.html +++ b/app/templates/entities/fragments/list.html @@ -1,27 +1,29 @@ {% load i18n %} -
+ + +
{% spaceless %} -
{% translate 'Entities' %} - - -
+
{% translate 'Entities' %}
{% endspaceless %}
-
-
- - +
+
+ +
-
+
diff --git a/app/templates/entities/fragments/table.html b/app/templates/entities/fragments/table.html index 0dac44d..74abf2c 100644 --- a/app/templates/entities/fragments/table.html +++ b/app/templates/entities/fragments/table.html @@ -7,61 +7,63 @@ hx-swap="outerHTML"> {% endif %} {% if entities %} -
+
- - - - - - - - - {% for entity in entities %} - - - +
+
{% translate 'Name' %}
-
- - - - {% if not entity.owner %} - - - {% endif %} - {% if user == entity.owner %} - - - {% endif %} -
-
{{ entity.name }}
+ + + + - {% endfor %} - -
{% translate 'Name' %}
+ + + {% for entity in entities %} + + +
+ + + {% if not entity.owner %} + + + {% endif %} + {% if user == entity.owner %} + + + {% endif %} + +
+ + {{ entity.name }} + + {% endfor %} + + +
{% else %} diff --git a/app/templates/exchange_rates/fragments/list.html b/app/templates/exchange_rates/fragments/list.html index 924bf17..2661c1d 100644 --- a/app/templates/exchange_rates/fragments/list.html +++ b/app/templates/exchange_rates/fragments/list.html @@ -1,32 +1,28 @@ {% load currency_display %} {% load i18n %} -
+ + +
{% spaceless %} -
{% translate 'Exchange Rates' %} - - -
+
{% translate 'Exchange Rates' %}
{% endspaceless %}
-
-
- +
+
+ + {% for pair in pairings %} - + {% endfor %}
diff --git a/app/templates/exchange_rates/fragments/table.html b/app/templates/exchange_rates/fragments/table.html index 277d172..2ae8fae 100644 --- a/app/templates/exchange_rates/fragments/table.html +++ b/app/templates/exchange_rates/fragments/table.html @@ -37,9 +37,9 @@ _="install prompt_swal">
- {{ 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 string=True %} {% endfor %} diff --git a/app/templates/extends/offcanvas.html b/app/templates/extends/offcanvas.html index e6ec37a..8662f7d 100644 --- a/app/templates/extends/offcanvas.html +++ b/app/templates/extends/offcanvas.html @@ -1,5 +1,5 @@ {% load i18n %} -
+
{% block title %}{% endblock %}
diff --git a/app/templates/includes/scripts/hyperscript/init_tom_select.html b/app/templates/includes/scripts/hyperscript/init_tom_select.html index 7a860b5..9c011c2 100644 --- a/app/templates/includes/scripts/hyperscript/init_tom_select.html +++ b/app/templates/includes/scripts/hyperscript/init_tom_select.html @@ -3,6 +3,7 @@ init set selects to +
-
+
diff --git a/app/templates/tags/fragments/table.html b/app/templates/tags/fragments/table.html index ad526c3..9145c26 100644 --- a/app/templates/tags/fragments/table.html +++ b/app/templates/tags/fragments/table.html @@ -7,61 +7,63 @@ hx-swap="outerHTML"> {% endif %} {% if tags %} -
+
- - - - - - - - - {% for tag in tags %} - - - +
+
{% translate 'Name' %}
-
- - - - {% if not tag.owner %} - - - {% endif %} - {% if user == tag.owner %} - - - {% endif %} -
-
{{ tag.name }}
+ + + + - {% endfor %} - -
{% translate 'Name' %}
+ + + {% for tag in tags %} + + +
+ + + {% if not tag.owner %} + + + {% endif %} + {% if user == tag.owner %} + + + {% endif %} + +
+ + {{ tag.name }} + + {% endfor %} + + +
{% else %} diff --git a/frontend/src/js/_tooltip.js b/frontend/src/js/_tooltip.js index 2c9ebf3..3d9a65a 100644 --- a/frontend/src/js/_tooltip.js +++ b/frontend/src/js/_tooltip.js @@ -1,4 +1,4 @@ -import tippy from 'tippy.js'; +import { delegate } from 'tippy.js'; import 'tippy.js/dist/tippy.css'; import 'tippy.js/themes/light-border.css'; @@ -13,10 +13,15 @@ function initiateTooltips() { theme = 'dark'; } - tippy('[data-tippy-content]', { + delegate(document.body, { + target: '[data-tippy-content]', theme: theme, - zIndex: 1050, + zIndex: 1100, + content(reference) { + return reference.getAttribute('data-tippy-content'); + }, }); } -window.initiateTooltips = initiateTooltips; \ No newline at end of file +// Call it once on page load +initiateTooltips(); diff --git a/frontend/src/styles/_offcanvas.scss b/frontend/src/styles/_offcanvas.scss index 3657a24..0971ab1 100644 --- a/frontend/src/styles/_offcanvas.scss +++ b/frontend/src/styles/_offcanvas.scss @@ -9,7 +9,7 @@ $offcanvas-z-index: 1090 !default; $offcanvas-backdrop-z-index: 1040 !default; $offcanvas-width: 400px !default; $offcanvas-height: 30vh !default; -$offcanvas-padding: 0.5rem !default; +$offcanvas-padding: 1rem !default; $offcanvas-transition-duration: 0.3s !default; $offcanvas-backdrop-opacity: 0.5 !default; @@ -66,7 +66,7 @@ $breakpoints: ( --offcanvas-padding-x: #{$offcanvas-padding}; --offcanvas-padding-y: #{$offcanvas-padding}; --offcanvas-color: var(--color-base-content); - --offcanvas-bg: var(--color-base-300); + --offcanvas-bg: var(--root-bg); --offcanvas-border-width: var(--border); --offcanvas-border-color: var(--color-base-100); --offcanvas-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); @@ -323,4 +323,4 @@ $breakpoints: ( .offcanvas-size-sm { --offcanvas-width: min(95vw, 250px); -} \ No newline at end of file +} diff --git a/frontend/src/styles/tailwind.css b/frontend/src/styles/tailwind.css index 0b15a0b..e3b4f78 100644 --- a/frontend/src/styles/tailwind.css +++ b/frontend/src/styles/tailwind.css @@ -148,7 +148,7 @@ /* Card Data Display Styles */ .card-data-section { - @apply space-y-1; + @apply space-y-2; } .card-data-row { @@ -176,6 +176,20 @@ @layer components { + .card { + @apply bg-base-100; + } + + .card .card-header { + @apply bg-base-200; + @apply p-2; + } + + .card .card-footer { + @apply bg-base-200; + @apply p-2; + } + .fab { @layer daisyui.component { > :nth-child(n+7) {