3 Commits

  1. 11
      CHANGELOG.md
  2. 2
      lib/mirage/notes.ex
  3. 2
      lib/mirage_web/live/link_live/index.ex
  4. 3
      lib/mirage_web/live/link_live/index.html.leex
  5. 1
      lib/mirage_web/live/note_live/index.html.leex
  6. 1
      lib/mirage_web/templates/topic/index.html.eex
  7. 2
      mix.exs

11
CHANGELOG.md

@ -5,6 +5,17 @@ See [Conventional Commits](Https://conventionalcommits.org) for commit guideline
<!-- changelog -->
## [v0.58.0](https://git.inhji.de/inhji/mirage/compare/v0.57.0...v0.58.0) (2021-02-24)
### Features:
* show up to 100 notes
* show amount of notes, links, topics
## [v0.57.0](https://git.inhji.de/inhji/mirage/compare/v0.56.2...v0.57.0) (2021-02-24)

2
lib/mirage/notes.ex

@ -47,7 +47,7 @@ defmodule Mirage.Notes do
def list_notes do
q =
from n in Note,
limit: 10,
limit: 100,
select: n,
order_by: [desc: :inserted_at],
preload: ^@note_preloads

2
lib/mirage_web/live/link_live/index.ex

@ -6,7 +6,7 @@ defmodule MirageWeb.LinkLive.Index do
@impl true
def mount(_params, _session, socket) do
{:ok, assign(socket, :notes_links, Links.list_links())}
{:ok, assign(socket, :links, Links.list_links())}
end
@impl true

3
lib/mirage_web/live/link_live/index.html.leex

@ -1,5 +1,6 @@
<header class="hero">
<h1>Listing Links</h1>
<p><%= Enum.count(@links) %> Links</p>
</header>
<%= if @live_action in [:new, :edit] do %>
@ -12,7 +13,7 @@
<% end %>
<section class="bg-content width-full grid cards wrap">
<%= for link <- @notes_links do %>
<%= for link <- @links do %>
<%= live_redirect to: Routes.link_show_path(@socket, :show, link), class: "col card", id: "link-#{link.id}" do %>
<strong><%= link.title %></strong>
<p><%= link.domain || link.url %></p>

1
lib/mirage_web/live/note_live/index.html.leex

@ -4,6 +4,7 @@
<header class="hero">
<h1>Listing Notes</h1>
<p><%= Enum.count(@notes) %> Notes</p>
<%= if @current_user do %>
<span><%= live_patch "New Note", to: Routes.note_index_path(@socket, :new), class: "button" %></span>
<% end %>

1
lib/mirage_web/templates/topic/index.html.eex

@ -1,5 +1,6 @@
<header class="hero">
<h1>Listing Topics</h1>
<p><%= Enum.count(@topics) %> Topics</p>
</header>
<div class="tags width-full bg-content">

2
mix.exs

@ -1,7 +1,7 @@
defmodule Mirage.MixProject do
use Mix.Project
@version "0.57.0"
@version "0.58.0"
def project do
[

Loading…
Cancel
Save