use project version on homepage
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
shibao 2022-11-27 21:33:06 -05:00
parent 16c4ae16d3
commit 501eb5d560
5 changed files with 11 additions and 8 deletions

View File

@ -2,6 +2,7 @@
- improve search a whole lot
- improve table information for notes and contexts
- fix some typos
- use project version on homepage
# v0.1.0
- initial release >:3c

View File

@ -3,6 +3,8 @@ defmodule MemexWeb.HomeLive do
Liveview for the main home page
"""
@version Mix.Project.config()[:version]
use MemexWeb, :live_view
alias Memex.Accounts
alias MemexWeb.{Endpoint, FaqLive}
@ -10,6 +12,6 @@ defmodule MemexWeb.HomeLive do
@impl true
def mount(_params, _session, socket) do
admins = Accounts.list_users_by_role(:admin)
{:ok, socket |> assign(page_title: gettext("home"), admins: admins)}
{:ok, socket |> assign(page_title: gettext("home"), admins: admins, version: @version)}
end
end

View File

@ -120,12 +120,12 @@
<li class="flex flex-row justify-center items-center space-x-2">
<b><%= gettext("version:") %></b>
<.link
href="https://gitea.bubbletea.dev/shibao/memex/src/branch/stable/CHANGELOG.md"
href="https://gitea.bubbletea.dev/shibao/memEx/src/branch/stable/changelog.md"
class="flex flex-row justify-center items-center space-x-2 link"
target="_blank"
rel="noopener noreferrer"
>
<p>0.1.0</p>
<p><%= @version %></p>
<i class="fas fa-md fa-info-circle"></i>
</.link>
</li>
@ -140,7 +140,7 @@
<li class="flex flex-col justify-center space-x-2">
<.link
href="https://gitea.bubbletea.dev/shibao/memex"
href="https://gitea.bubbletea.dev/shibao/memEx"
class="flex flex-row justify-center items-center space-x-2 link"
target="_blank"
rel="noopener noreferrer"
@ -151,7 +151,7 @@
</li>
<li class="flex flex-col justify-center space-x-2">
<.link
href="https://weblate.bubbletea.dev/engage/memex"
href="https://weblate.bubbletea.dev/engage/memEx"
class="flex flex-row justify-center items-center space-x-2 link"
target="_blank"
rel="noopener noreferrer"
@ -162,7 +162,7 @@
</li>
<li class="flex flex-col justify-center space-x-2">
<.link
href="https://gitea.bubbletea.dev/shibao/memex/issues/new"
href="https://gitea.bubbletea.dev/shibao/memEx/issues/new"
class="flex flex-row justify-center items-center space-x-2 link"
target="_blank"
rel="noopener noreferrer"

View File

@ -475,7 +475,7 @@ msgstr ""
msgid "%{slug} could not be found"
msgstr ""
#: lib/memex_web/live/home_live.ex:13
#: lib/memex_web/live/home_live.ex:15
#, elixir-autogen, elixir-format
msgid "home"
msgstr ""

View File

@ -464,7 +464,7 @@ msgstr ""
msgid "%{slug} could not be found"
msgstr ""
#: lib/memex_web/live/home_live.ex:13
#: lib/memex_web/live/home_live.ex:15
#, elixir-autogen, elixir-format
msgid "home"
msgstr ""