Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Clean up and expand css styles.
James Cole062c2323e3fb
diff --git a/app/Http/Middleware/SecureHeaders.php b/app/Http/Middleware/SecureHeaders.phpindex e2330184a9..0f11608812 100644--- a/app/Http/Middleware/SecureHeaders.php+++ b/app/Http/Middleware/SecureHeaders.php@@ -58,8 +58,9 @@ class SecureHeaders"default-src 'none'","object-src 'none'",sprintf("script-src 'unsafe-eval' 'strict-dynamic' 'nonce-%1s'", $nonce),- "style-src 'unsafe-inline' 'self'",+ sprintf("style-src 'self' 'nonce-%1s'", $nonce),"base-uri 'self'",+ "form-action 'self'","font-src 'self' data:",sprintf("connect-src 'self' %s", $trackingScriptSrc),sprintf("img-src 'self' data: 'nonce-%1s' ", $nonce),@@ -71,9 +72,10 @@ class SecureHeaders$csp = ["default-src 'none'","object-src 'none'",- sprintf("script-src 'unsafe-eval' 'strict-dynamic' 'nonce-%1s' https://firefly.sd.internal/_debugbar/assets", $nonce),- "style-src 'unsafe-inline' 'self' https://10.0.0.15:5173/",+ sprintf("script-src 'unsafe-eval' 'strict-dynamic' 'nonce-%1s'", $nonce),+ sprintf("style-src 'self' 'nonce-%1s' https://10.0.0.15:5173/", $nonce),"base-uri 'self'",+ "form-action 'self'","font-src 'self' data: https://10.0.0.15:5173/",sprintf("connect-src 'self' %s https://10.0.0.15:5173/ wss://10.0.0.15:5173/", $trackingScriptSrc),sprintf("img-src 'self' data: 'nonce-%1s'", $nonce),@@ -89,7 +91,7 @@ class SecureHeaders$customUrl = $logoutUrl;}- if (null !== $route && 'oauth/authorize' !== $route->uri) {+ if ('' !== $customUrl && null !== $route && 'oauth/authorize' !== $route->uri) {$csp[] = sprintf("form-action 'self' %s", $customUrl);}diff --git a/public/v1/css/firefly.css b/public/v1/css/firefly.cssindex b9a59bec5e..4c0f75b8af 100644--- a/public/v1/css/firefly.css+++ b/public/v1/css/firefly.css@@ -22,6 +22,10 @@.no-margin-pagination {padding-bottom:0;padding-top:0;}.no-margin-pagination ul.pagination {margin:0 !important;}+/** new classes because of CSP */+.wide-chart {width:100%;height:400px;}+.low-chart {width:100%;height:200px;}+/* TODO find out where this is used. */input.ti-new-tag-input {font-size: 14px !important;diff --git a/resources/views/accounts/show.twig b/resources/views/accounts/show.twigindex 190d0f630b..9929d9b8ff 100644--- a/resources/views/accounts/show.twig+++ b/resources/views/accounts/show.twig@@ -39,7 +39,7 @@</div><div class="box-body"><div>- <canvas id="overview-chart" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="overview-chart" class="wide-chart" height="400" width="100%"></canvas></div></div></div>diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twigindex 84b4c347bb..fa625bfed5 100644--- a/resources/views/bills/show.twig+++ b/resources/views/bills/show.twig@@ -162,7 +162,7 @@<h3 class="box-title">{{ 'chart'|_ }}</h3></div><div class="box-body">- <canvas id="bill-overview" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="bill-overview" class="wide-chart" height="400" width="100%"></canvas></div></div></div>diff --git a/resources/views/budgets/show.twig b/resources/views/budgets/show.twigindex 5b2915d575..1580124988 100644--- a/resources/views/budgets/show.twig+++ b/resources/views/budgets/show.twig@@ -27,7 +27,7 @@</div></div><div class="box-body">- <canvas id="budgetOverview" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="budgetOverview" class="wide-chart" height="400" width="100%"></canvas></div>{% if budgetLimit %}<div class="box-footer">diff --git a/resources/views/categories/show.twig b/resources/views/categories/show.twigindex b0b0788130..17417afe52 100644--- a/resources/views/categories/show.twig+++ b/resources/views/categories/show.twig@@ -16,7 +16,7 @@</h3></div><div class="box-body">- <canvas id="specific-period" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="specific-period" class="wide-chart" height="400" width="100%"></canvas></div></div></div>@@ -28,7 +28,7 @@</h3></div><div class="box-body">- <canvas id="category-everything" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="category-everything" class="wide-chart" height="400" width="100%"></canvas></div></div></div>@@ -43,7 +43,7 @@</h3></div><div class="box-body">- <canvas id="category-everything" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="category-everything" class="wide-chart" height="400" width="100%"></canvas></div></div></div>diff --git a/resources/views/index.twig b/resources/views/index.twigindex 58ad2587cb..185aff30b1 100644--- a/resources/views/index.twig+++ b/resources/views/index.twig@@ -14,7 +14,7 @@title="{{ 'yourAccounts'|_ }}">{{ 'yourAccounts'|_ }}</a></h3></div><div class="box-body">- <canvas id="accounts-chart" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="accounts-chart" class="wide-chart" height="400" width="100%"></canvas></div><div class="box-footer"><a href="{{ route('accounts.index',['asset']) }}" class="btn btn-default button-sm"><span@@ -29,7 +29,7 @@title="{{ 'budgetsAndSpending'|_ }}">{{ 'budgetsAndSpending'|_ }}</a></h3></div><div class="box-body">- <canvas id="budgets-chart" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="budgets-chart" class="wide-chart" height="400" width="100%"></canvas></div><div class="box-footer"><a href="{{ route('budgets.index') }}" class="btn btn-default button-sm">@@ -46,7 +46,7 @@</div><div class="box-body">- <canvas id="categories-chart" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="categories-chart" class="wide-chart" height="400" width="100%"></canvas></div><div class="box-footer"><a href="{{ route('categories.index') }}" class="btn btn-default button-sm">@@ -138,7 +138,7 @@</div><div class="box-body"><div style="width:100%;margin:0 auto;">- <canvas id="bills-chart" style="width:100%;height:200px;" height="200"></canvas>+ <canvas id="bills-chart" class="low-chart" height="200"></canvas></div></div><div class="box-footer">@@ -164,7 +164,7 @@</h3></div><div class="box-body">- <canvas id="expense-accounts-chart" style="width:100%;height:400px;" height="400"+ <canvas id="expense-accounts-chart" class="wide-chart" height="400"width="100%"></canvas></div><div class="box-footer">@@ -180,7 +180,7 @@</div><div class="box-body">- <canvas id="revenue-accounts-chart" style="width:100%;height:400px;" height="400"+ <canvas id="revenue-accounts-chart" class="wide-chart" height="400"width="100%"></canvas></div><div class="box-footer">diff --git a/resources/views/layout/default.twig b/resources/views/layout/default.twigindex 81841ebff8..9925f67d47 100644--- a/resources/views/layout/default.twig+++ b/resources/views/layout/default.twig@@ -131,13 +131,13 @@</li><li>- <span style="color:#fff;padding: 15px;display: block;line-height: 20px;">+ <span nonce="{{ JS_NONCE }}" style="color:#fff;padding: 15px;display: block;line-height: 20px;"><span id="daterange"></span></span></li><li class="dropdown user user-menu">- <span style="cursor:default;color:#fff;padding: 15px;display: block;line-height: 20px;">+ <span nonce="{{ JS_NONCE }}" style="cursor:default;color:#fff;padding: 15px;display: block;line-height: 20px;"><span class="hidden-xs">{{ Auth.user.email }}</span></span></li>diff --git a/resources/views/piggy-banks/show.twig b/resources/views/piggy-banks/show.twigindex 4620b4a670..15c21cad3f 100644--- a/resources/views/piggy-banks/show.twig+++ b/resources/views/piggy-banks/show.twig@@ -12,7 +12,7 @@<h3 class="box-title">{{ 'events'|_ }}</h3></div><div class="box-body">- <canvas id="piggy-bank-history" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="piggy-bank-history" class="wide-chart" height="400" width="100%"></canvas></div></div></div>diff --git a/resources/views/reports/budget/month.twig b/resources/views/reports/budget/month.twigindex 4ac028ac98..194abfb622 100644--- a/resources/views/reports/budget/month.twig+++ b/resources/views/reports/budget/month.twig@@ -110,7 +110,7 @@<h3 class="box-title">{{ 'expenses'|_ }} ({{ budget.name }})</h3></div><div class="box-body">- <canvas class="main_budget_canvas" data-url="{{ route('chart.budget.main', [accountIds, budget.id, start.format('Ymd'), end.format('Ymd')]) }}" id="in-out-chart-{{ budget.id }}" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas class="main_budget_canvas" data-url="{{ route('chart.budget.main', [accountIds, budget.id, start.format('Ymd'), end.format('Ymd')]) }}" id="in-out-chart-{{ budget.id }}" class="wide-chart" height="400" width="100%"></canvas></div></div></div>diff --git a/resources/views/reports/category/month.twig b/resources/views/reports/category/month.twigindex 99631ead05..14d6d2b706 100644--- a/resources/views/reports/category/month.twig+++ b/resources/views/reports/category/month.twig@@ -148,7 +148,7 @@<h3 class="box-title">{{ 'income_and_expenses'|_ }} ({{ category.name }})</h3></div><div class="box-body">- <canvas class="main_category_canvas" data-url="{{ route('chart.category.main', [accountIds, category.id, start.format('Ymd'), end.format('Ymd')]) }}" id="in-out-chart-{{ category.id }}" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas class="main_category_canvas" data-url="{{ route('chart.category.main', [accountIds, category.id, start.format('Ymd'), end.format('Ymd')]) }}" id="in-out-chart-{{ category.id }}" class="wide-chart" height="400" width="100%"></canvas></div></div></div>diff --git a/resources/views/reports/default/month.twig b/resources/views/reports/default/month.twigindex 346f20d521..2d5d1b7dba 100644--- a/resources/views/reports/default/month.twig+++ b/resources/views/reports/default/month.twig@@ -14,7 +14,7 @@<h3 class="box-title">{{ 'accountBalances'|_ }}</h3></div><div class="box-body">- <canvas id="account-balances-chart" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="account-balances-chart" class="wide-chart" height="400" width="100%"></canvas></div></div></div>diff --git a/resources/views/reports/default/multi-year.twig b/resources/views/reports/default/multi-year.twigindex fc2e5a00b5..1f8ac1110f 100644--- a/resources/views/reports/default/multi-year.twig+++ b/resources/views/reports/default/multi-year.twig@@ -14,7 +14,7 @@<h3 class="box-title">{{ 'incomeVsExpenses'|_ }}</h3></div><div class="box-body">- <canvas id="income-expenses-chart" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="income-expenses-chart" class="wide-chart" height="400" width="100%"></canvas></div></div></div>@@ -89,7 +89,7 @@<h3 class="box-title">{{ 'net_worth'|_ }}</h3></div><div class="box-body">- <canvas id="net-worth" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="net-worth" class="wide-chart" height="400" width="100%"></canvas></div><div class="box-footer"><small>@@ -128,7 +128,7 @@</div><div class="box-body"><p id="budget_help" class="text-muted text-center">{{ 'budget_chart_click'|_ }}</p>- <canvas id="budget_chart" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="budget_chart" class="wide-chart" height="400" width="100%"></canvas></div></div></div>@@ -177,7 +177,7 @@</div><div class="box-body"><p id="category_help" class="text-muted text-center">{{ 'category_chart_click'|_ }}</p>- <canvas id="category_chart" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="category_chart" class="wide-chart" height="400" width="100%"></canvas></div></div></div>diff --git a/resources/views/reports/default/year.twig b/resources/views/reports/default/year.twigindex eb7198d562..1dd2cb0f17 100644--- a/resources/views/reports/default/year.twig+++ b/resources/views/reports/default/year.twig@@ -14,7 +14,7 @@<h3 class="box-title">{{ 'incomeVsExpenses'|_ }}</h3></div><div class="box-body">- <canvas id="income-expenses-chart" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="income-expenses-chart" class="wide-chart" height="400" width="100%"></canvas></div></div></div>@@ -88,7 +88,7 @@<h3 class="box-title">{{ 'net_worth'|_ }}</h3></div><div class="box-body">- <canvas id="net-worth" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="net-worth" class="wide-chart" height="400" width="100%"></canvas></div><div class="box-footer"><small>@@ -126,7 +126,7 @@</div><div class="box-body"><p id="budget_help" class="text-muted text-center">{{ 'budget_chart_click'|_ }}</p>- <canvas id="budget_chart" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="budget_chart" class="wide-chart" height="400" width="100%"></canvas></div></div></div>@@ -175,7 +175,7 @@</div><div class="box-body"><p id="category_help" class="text-muted text-center">{{ 'category_chart_click'|_ }}</p>- <canvas id="category_chart" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ <canvas id="category_chart" class="wide-chart" height="400" width="100%"></canvas></div></div></div>diff --git a/resources/views/reports/double/report.twig b/resources/views/reports/double/report.twigindex ca6016fef2..348eae6b8b 100644--- a/resources/views/reports/double/report.twig+++ b/resources/views/reports/double/report.twig@@ -123,7 +123,7 @@<div class="box-body"><canvas class="main_double_canvas"data-url="{{ route('chart.double.main', [accountIds, account.id, start.format('Ymd'), end.format('Ymd')]) }}"- id="in-out-chart-{{ account.id }}" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ id="in-out-chart-{{ account.id }}" class="wide-chart" height="400" width="100%"></canvas></div></div></div>diff --git a/resources/views/reports/tag/month.twig b/resources/views/reports/tag/month.twigindex 9e06bcb200..b906a0c6ed 100644--- a/resources/views/reports/tag/month.twig+++ b/resources/views/reports/tag/month.twig@@ -176,7 +176,7 @@<div class="box-body"><canvas class="main_tag_canvas"data-url="{{ route('chart.tag.main', [accountIds, tag.id, start.format('Ymd'), end.format('Ymd')]) }}"- id="in-out-chart-{{ tag.id }}" style="width:100%;height:400px;" height="400" width="100%"></canvas>+ id="in-out-chart-{{ tag.id }}" class="wide-chart" height="400" width="100%"></canvas></div><div class="box-footer"><p class="text-info"><em>{{ 'tag_report_chart_single_tag'|_ }}</em></p>