Current section
43 Versions
Jump to
Current section
43 Versions
Compare versions
14
files changed
+55
additions
-32
deletions
| @@ -1,5 +1,9 @@ | |
| 1 1 | # CHANGELOG |
| 2 2 | |
| 3 | + ## v0.4.0 (2020-11-20) |
| 4 | + |
| 5 | + * Require LiveView v0.15.0 |
| 6 | + |
| 3 7 | ## v0.3.6 (2020-10-28) |
| 4 8 | |
| 5 9 | * Ensure socket info component displays correctly |
| @@ -62,7 +62,7 @@ | |
| 62 62 | {<<"name">>,<<"phoenix_live_view">>}, |
| 63 63 | {<<"optional">>,false}, |
| 64 64 | {<<"repository">>,<<"hexpm">>}, |
| 65 | - {<<"requirement">>,<<"~> 0.14.3">>}], |
| 65 | + {<<"requirement">>,<<"~> 0.15.0">>}], |
| 66 66 | [{<<"app">>,<<"telemetry_metrics">>}, |
| 67 67 | {<<"name">>,<<"telemetry_metrics">>}, |
| 68 68 | {<<"optional">>,false}, |
| @@ -78,4 +78,4 @@ | |
| 78 78 | {<<"optional">>,true}, |
| 79 79 | {<<"repository">>,<<"hexpm">>}, |
| 80 80 | {<<"requirement">>,<<"~> 0.4.1 or ~> 0.5">>}]]}. |
| 81 | - {<<"version">>,<<"0.3.6">>}. |
| 81 | + {<<"version">>,<<"0.4.0">>}. |
| @@ -4,9 +4,9 @@ defmodule Phoenix.LiveDashboard.CardUsageComponent do | |
| 4 4 | def render(assigns) do |
| 5 5 | ~L""" |
| 6 6 | <div class="card progress-section mb-4"> |
| 7 | - <%= live_component @socket, Phoenix.LiveDashboard.TitleBarComponent, class: "card-body", percent: percentage(@usage, @limit) do %> |
| 7 | + <%= live_component @socket, Phoenix.LiveDashboard.TitleBarComponent, dom_id: "#{@dom_id}-title-bar", class: "card-body", percent: percentage(@usage, @limit), csp_nonces: @csp_nonces do %> |
| 8 8 | <div> |
| 9 | - <%= @inner_content.([]) %> |
| 9 | + <%= render_block @inner_block, [] %> |
| 10 10 | </div> |
| 11 11 | <div> |
| 12 12 | <small class="text-muted pr-2"> |
| @@ -36,7 +36,7 @@ defmodule Phoenix.LiveDashboard.ChartComponent do | |
| 36 36 | <div class="col-xl-6 col-xxl-4 col-xxxl-3 charts-col"> |
| 37 37 | <div id="chart-<%= @id %>" class="card"> |
| 38 38 | <div class="card-body"> |
| 39 | - <div phx-hook="PhxChartComponent" id="chart-<%= @id %>--datasets" style="display:none;"> |
| 39 | + <div phx-hook="PhxChartComponent" id="chart-<%= @id %>--datasets" hidden> |
| 40 40 | <%= for {x, y, z} <- @data do %> |
| 41 41 | <span data-x="<%= x || @label %>" data-y="<%= y %>" data-z="<%= z %>"></span> |
| 42 42 | <% end %> |
| @@ -9,7 +9,8 @@ defmodule Phoenix.LiveDashboard.ColorBarComponent do | |
| 9 9 | ~L""" |
| 10 10 | <div class="progress flex-grow-1 mb-3"> |
| 11 11 | <span class="progress-title"><%= @title %></span> |
| 12 | - <%= for {name, value, color, _desc} <- @data do %> |
| 12 | + <%= for {{name, value, color, _desc}, index} <- Enum.with_index(@data) do %> |
| 13 | + <style nonce="<%= @csp_nonces.style %>">#<%= "#{@dom_id}-progress-#{index}" %>{width:<%= value %>%}</style> |
| 13 14 | <div |
| 14 15 | title="<%= name %> - <%= format_percent(value) %>" |
| 15 16 | class="progress-bar bg-gradient-<%= color %>" |
| @@ -19,7 +20,7 @@ defmodule Phoenix.LiveDashboard.ColorBarComponent do | |
| 19 20 | aria-valuemax="100" |
| 20 21 | data-name="<%= name %>" |
| 21 22 | data-empty="<%= empty?(value) %>" |
| 22 | - style="width: <%= value %>%"> |
| 23 | + id="<%= "#{@dom_id}-progress-#{index}" %>"> |
| 23 24 | </div> |
| 24 25 | <% end %> |
| 25 26 | </div> |
Loading more files…