Compare commits

..

21 commits
v0.2.0 ... main

Author SHA1 Message Date
a97c65320d
chore: bump to 0.2.3
All checks were successful
Checks / check (push) Successful in -6m24s
Build and Push Docker Image / Build and Push Image (push) Successful in -5m28s
2024-12-26 21:18:13 +02:00
b5caa37646
fix: change email to vavakado.xyz
All checks were successful
Checks / check (push) Successful in -6m25s
Build and Push Docker Image / Build and Push Image (push) Successful in -5m26s
2024-12-26 21:02:49 +02:00
72abc0114f
fix: switch to brevo 2024-12-26 20:58:02 +02:00
8b14bc0db6
fix: add needed deps 2024-12-26 20:48:56 +02:00
96cd2af9ac
style: mix format
All checks were successful
Checks / check (push) Successful in -6m27s
Build and Push Docker Image / Build and Push Image (push) Successful in -6m20s
2024-12-26 20:40:57 +02:00
207c11f2cc
Revert 2 commits
Some checks failed
Checks / check (push) Failing after -6m32s
Build and Push Docker Image / Build and Push Image (push) Successful in -7m0s
b0797d2 'fix: don't copy from chatgpt'
7ba1305 'deploy: add elastic email'

elasticemail doesn't work on free tier😭😭😭
2024-12-26 20:31:59 +02:00
b0797d241d
fix: don't copy from chatgpt
Some checks failed
Checks / check (push) Failing after -6m31s
Build and Push Docker Image / Build and Push Image (push) Successful in -6m37s
2024-12-26 20:16:16 +02:00
7ba1305c88
deploy: add elastic email
Some checks failed
Checks / check (push) Failing after -6m31s
Build and Push Docker Image / Build and Push Image (push) Successful in -6m39s
2024-12-26 20:02:09 +02:00
6172e477b1
style: underline when hover on event in calendar
Some checks failed
Checks / check (push) Failing after -6m20s
Build and Push Docker Image / Build and Push Image (push) Successful in -6m16s
2024-12-25 17:58:32 +02:00
6e7e799a82
feat: sort on load 2024-12-25 17:47:53 +02:00
d9f13671d3
feat: make exams on the calendar sortable 2024-12-25 17:45:18 +02:00
08c8c0f0f7
chore: bump to 0.2.2
All checks were successful
Checks / check (push) Successful in -6m20s
Build and Push Docker Image / Build and Push Image (push) Successful in -5m27s
2024-12-23 19:46:03 +02:00
1ccab387a9
fix: wrong day of the week + calendar not updating
Some checks failed
Build and Push Docker Image / Build and Push Image (push) Waiting to run
Checks / check (push) Has been cancelled
2024-12-23 19:45:10 +02:00
92715e9a97
chore: bump to 0.2.1
All checks were successful
Checks / check (push) Successful in -6m19s
Build and Push Docker Image / Build and Push Image (push) Successful in -5m23s
2024-12-23 19:10:23 +02:00
3deeafd084
style(calendar): make the size persistent
All checks were successful
Checks / check (push) Successful in -6m13s
Build and Push Docker Image / Build and Push Image (push) Successful in -6m9s
2024-12-23 19:02:18 +02:00
9a41ca7e98
style: mix format
All checks were successful
Checks / check (push) Successful in -6m22s
Build and Push Docker Image / Build and Push Image (push) Successful in -6m16s
2024-12-23 00:13:58 +02:00
4ef23a5ec9
fix: dark mode for calendar
Some checks failed
Build and Push Docker Image / Build and Push Image (push) Waiting to run
Checks / check (push) Has been cancelled
2024-12-23 00:13:29 +02:00
a724826a59
style: mix format 2024-12-23 00:10:10 +02:00
c60a5e0f12
fix: wrong day of the week
Some checks failed
Checks / check (push) Failing after -6m21s
Build and Push Docker Image / Build and Push Image (push) Successful in -6m4s
2024-12-22 22:53:56 +02:00
223939da6f
feat: calendar view
Some checks failed
Checks / check (push) Failing after -6m20s
Build and Push Docker Image / Build and Push Image (push) Has been cancelled
2024-12-22 22:52:30 +02:00
d5f7ddf250
chore: update README
All checks were successful
Checks / check (push) Successful in -5m35s
Build and Push Docker Image / Build and Push Image (push) Successful in -6m50s
2024-12-22 22:18:23 +02:00
15 changed files with 229 additions and 60 deletions

View file

@ -9,12 +9,8 @@ To start your Phoenix server:
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html).
## TODO
## Learn more
- Official website: https://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Forum: https://elixirforum.com/c/phoenix-forum
- Source: https://github.com/phoenixframework/phoenix
- [ ] Add tests
- [ ] Add a proper readme
- [ ] Add a calendar view

View file

@ -122,4 +122,7 @@ if config_env() == :prod do
# config :swoosh, :api_client, Swoosh.ApiClient.Hackney
#
# See https://hexdocs.pm/swoosh/Swoosh.html#module-installation for details.
config :exmr, Exmr.Mailer,
adapter: Swoosh.Adapters.Brevo,
api_key: System.get_env("BREVO_EMAIL_API_KEY")
end

View file

@ -8,7 +8,7 @@ defmodule Exmr.Users.UserNotifier do
email =
new()
|> to(recipient)
|> from({"Exmr", "contact@example.com"})
|> from({"Exmr", "contact@vavakado.xyz"})
|> subject(subject)
|> text_body(body)

View file

@ -436,7 +436,7 @@ defmodule ExmrWeb.CoreComponents do
~H"""
<header class={[@actions != [] && "flex items-center justify-between gap-6", @class]}>
<div>
<h1 class="text-lg font-semibold leading-8 text-zinc-800 dark:text-zinc-200">
<h1 class="text-lg font-semibold leading-none text-zinc-800 dark:text-zinc-200">
{render_slot(@inner_block)}
</h1>
<p :if={@subtitle != []} class="mt-2 text-sm leading-6 text-zinc-600 dark:text-zinc-100">

View file

@ -8,10 +8,12 @@ defmodule ExmrWeb.ExamLive.Index do
def mount(_params, _session, socket) do
socket =
socket
|> assign(:exams, Exams.list_exams())
|> assign(:sort_by, "date")
|> assign(:exams, sort_items(Exams.list_exams(), "date"))
|> assign(:live_action, :index)
|> assign(exam: %{})
|> assign(events: Enum.group_by(Exams.list_exams(), & &1.date))
|> assign(current_month: Date.utc_today())
{:ok, socket}
end
@ -44,6 +46,7 @@ defmodule ExmrWeb.ExamLive.Index do
socket =
socket
|> assign(:exams, [exam | socket.assigns.exams])
|> assign(events: Enum.group_by(Exams.list_exams(), & &1.date))
{:noreply, socket}
end
@ -58,6 +61,7 @@ defmodule ExmrWeb.ExamLive.Index do
|> update(:exams, fn exams ->
Enum.reject(exams, fn l -> l.id == exam.id end)
end)
|> assign(events: Enum.group_by(Exams.list_exams(), & &1.date))
{:noreply, socket}
end

View file

@ -1,12 +1,19 @@
<.header>
{gettext("Listing Exams")}
<div>
<button phx-click="sort" phx-value-by="subject" class="font-light">
<button
phx-click="sort"
phx-value-by="subject"
class="font-light text-xs md:text-sm lg:text-base"
>
{gettext("Sort by Subject")}
</button>
<a>|</a>
<button phx-click="sort" phx-value-by="date" class="font-light">
<a class="invisible lg:visible">|</a>
<button
phx-click="sort"
phx-value-by="date"
class="font-light text-xs md:text-sm lg:text-base"
>
{gettext("Sort by Date")}
</button>
</div>
@ -22,10 +29,10 @@
<div class="divide-y">
<div :for={exam <- @exams} class="py-2 flex gap-2">
<div class="grow">
<div class="font-bold">{exam.subject}</div>
<div class="font-sm">
<div class="font-bold text-xs md:text-sm lg:text-base">{exam.subject}</div>
<div class="text-xs md:text-sm lg:text-base">
{exam.date} |
<b>
<b class="text-xs md:text-sm lg:text-base">
{case Date.diff(exam.date, Date.utc_today()) do
0 -> gettext("Today")
1 -> gettext("Tommorow")
@ -38,14 +45,14 @@
<button
phx-click="edit"
phx-value-id={exam.id}
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-3 rounded-md"
class="bg-blue-500 hover:bg-blue-700 text-white font-bold p-1 text-xs md:text-sm lg:py-2 lg:px-3 rounded-md"
>
{gettext("Edit")}
</button>
<button
phx-click="remove"
phx-value-id={exam.id}
class="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-3 rounded-md"
class="bg-red-500 hover:bg-red-700 text-white font-bold p-1 text-xs md:text-sm lg:py-2 lg:px-3 rounded-md"
>
{gettext("Remove")}
</button>
@ -62,3 +69,61 @@
patch={~p"/exams"}
/>
</.modal>
<div>
<!-- Navigation -->
<!-- <div class="flex justify-between mb-4"> -->
<!-- <button phx-click="previous_month" class="px-2 py-1 bg-blue-200">Previous</button> -->
<!-- <h2>{@current_month |> Date.to_string() |> String.replace("-", " ")}</h2> -->
<!-- <button phx-click="next_month" class="px-2 py-1 bg-blue-200">Next</button> -->
<!-- </div> -->
<!-- Calendar -->
<div class="grid grid-cols-7 gap-1" id="calendar-container" phx-update="replace">
<!-- Weekdays -->
<%= for weekday <- ~w(#{gettext("Sun")} #{gettext("Mon")} #{gettext("Tue")} #{gettext("Wed")} #{gettext("Thu")}
#{gettext("Fri")} #{gettext("Sat")}) do %>
<div class="font-bold text-center">{weekday}</div>
<% end %>
<!-- Empty spaces for previous month -->
<%= for _ <- 1..(Date.day_of_week(Date.new!(@current_month.year, @current_month.month, 1))) do %>
<div></div>
<% end %>
<!-- Days of the month -->
<%= for day <- 1..Date.days_in_month(@current_month) do %>
<% {:ok, date} = Date.new(@current_month.year, @current_month.month, day) %>
<div
id={"day-#{Date.to_string(date)}"}
class={[
"border rounded p-0.5 md:p-2 lg:p-3 w-full h-12 md:h-20 hover:scale-125 transition-transform ease-in-out duration-100",
@current_month == date &&
"bg-zinc-200 dark:bg-zinc-800 border-green-500 dark:border-green-300",
@current_month != date &&
"bg-white dark:bg-zinc-950 dark:border-zinc-400 "
]}
>
<div class="text-xs md:text-sm lg:text-base font-bold">{day}</div>
<!-- Render events for the current day -->
<%= if Map.has_key?(@events, date) do %>
<ul class="text-xs">
<%= for event <- @events[date] do %>
<li id={"event-#{event.id}"}>
<button
phx-click="edit"
phx-value-id={event.id}
class="hover:border-b hover:border-solid border-none border-green-700 dark:border-green-300"
>
{event.subject}
</button>
</li>
<% end %>
</ul>
<% end %>
</div>
<% end %>
</div>
</div>

View file

@ -4,7 +4,7 @@ defmodule Exmr.MixProject do
def project do
[
app: :exmr,
version: "0.2.0",
version: "0.2.3",
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
@ -57,6 +57,7 @@ defmodule Exmr.MixProject do
{:telemetry_metrics, "~> 1.0"},
{:telemetry_poller, "~> 1.0"},
{:gettext, "~> 0.20"},
{:gen_smtp, "~> 1.2"},
{:jason, "~> 1.2"},
{:dns_cluster, "~> 0.1.1"},
{:bandit, "~> 1.5"}

View file

@ -16,6 +16,7 @@
"file_system": {:hex, :file_system, "1.0.1", "79e8ceaddb0416f8b8cd02a0127bdbababe7bf4a23d2a395b983c1f8b3f73edd", [:mix], [], "hexpm", "4414d1f38863ddf9120720cd976fce5bdde8e91d8283353f0e31850fa89feb9e"},
"finch": {:hex, :finch, "0.19.0", "c644641491ea854fc5c1bbaef36bfc764e3f08e7185e1f084e35e0672241b76d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.6.2 or ~> 1.7", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 1.1", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "fc5324ce209125d1e2fa0fcd2634601c52a787aff1cd33ee833664a5af4ea2b6"},
"floki": {:hex, :floki, "0.37.0", "b83e0280bbc6372f2a403b2848013650b16640cd2470aea6701f0632223d719e", [:mix], [], "hexpm", "516a0c15a69f78c47dc8e0b9b3724b29608aa6619379f91b1ffa47109b5d0dd3"},
"gen_smtp": {:hex, :gen_smtp, "1.2.0", "9cfc75c72a8821588b9b9fe947ae5ab2aed95a052b81237e0928633a13276fd3", [:rebar3], [{:ranch, ">= 1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "5ee0375680bca8f20c4d85f58c2894441443a743355430ff33a783fe03296779"},
"gettext": {:hex, :gettext, "0.26.2", "5978aa7b21fada6deabf1f6341ddba50bc69c999e812211903b169799208f2a8", [:mix], [{:expo, "~> 0.5.1 or ~> 1.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "aa978504bcf76511efdc22d580ba08e2279caab1066b76bb9aa81c4a1e0a32a5"},
"heroicons": {:git, "https://github.com/tailwindlabs/heroicons.git", "88ab3a0d790e6a47404cba02800a6b25d2afae50", [tag: "v2.1.1", sparse: "optimized", depth: 1]},
"hpax": {:hex, :hpax, "1.0.1", "c857057f89e8bd71d97d9042e009df2a42705d6d690d54eca84c8b29af0787b0", [:mix], [], "hexpm", "4e2d5a4f76ae1e3048f35ae7adb1641c36265510a2d4638157fbcb53dda38445"},
@ -35,6 +36,7 @@
"plug": {:hex, :plug, "1.16.1", "40c74619c12f82736d2214557dedec2e9762029b2438d6d175c5074c933edc9d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a13ff6b9006b03d7e33874945b2755253841b238c34071ed85b0e86057f8cddc"},
"plug_crypto": {:hex, :plug_crypto, "2.1.0", "f44309c2b06d249c27c8d3f65cfe08158ade08418cf540fd4f72d4d6863abb7b", [:mix], [], "hexpm", "131216a4b030b8f8ce0f26038bc4421ae60e4bb95c5cf5395e1421437824c4fa"},
"postgrex": {:hex, :postgrex, "0.19.3", "a0bda6e3bc75ec07fca5b0a89bffd242ca209a4822a9533e7d3e84ee80707e19", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "d31c28053655b78f47f948c85bb1cf86a9c1f8ead346ba1aa0d0df017fa05b61"},
"ranch": {:hex, :ranch, "2.1.0", "2261f9ed9574dcfcc444106b9f6da155e6e540b2f82ba3d42b339b93673b72a3", [:make, :rebar3], [], "hexpm", "244ee3fa2a6175270d8e1fc59024fd9dbc76294a321057de8f803b1479e76916"},
"swoosh": {:hex, :swoosh, "1.17.3", "5cda7bff6bc1121cc5b58db8ed90ef33261b373425ae3e32dd599688037a0482", [:mix], [{:bandit, ">= 1.0.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:cowboy, "~> 1.1 or ~> 2.4", [hex: :cowboy, repo: "hexpm", optional: true]}, {:ex_aws, "~> 2.1", [hex: :ex_aws, repo: "hexpm", optional: true]}, {:finch, "~> 0.6", [hex: :finch, repo: "hexpm", optional: true]}, {:gen_smtp, "~> 0.13 or ~> 1.0", [hex: :gen_smtp, repo: "hexpm", optional: true]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mail, "~> 0.2", [hex: :mail, repo: "hexpm", optional: true]}, {:mime, "~> 1.1 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mua, "~> 0.2.3", [hex: :mua, repo: "hexpm", optional: true]}, {:multipart, "~> 0.4", [hex: :multipart, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, ">= 1.0.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:req, "~> 0.5 or ~> 1.0", [hex: :req, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "14ad57cfbb70af57323e17f569f5840a33c01f8ebc531dd3846beef3c9c95e55"},
"tailwind": {:hex, :tailwind, "0.2.4", "5706ec47182d4e7045901302bf3a333e80f3d1af65c442ba9a9eed152fb26c2e", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}], "hexpm", "c6e4a82b8727bab593700c998a4d98cf3d8025678bfde059aed71d0000c3e463"},
"telemetry": {:hex, :telemetry, "1.3.0", "fedebbae410d715cf8e7062c96a1ef32ec22e764197f70cda73d82778d61e7a2", [:rebar3], [], "hexpm", "7015fc8919dbe63764f4b4b87a95b7c0996bd539e0d499be6ec9d7f3875b79e6"},

View file

@ -31,7 +31,7 @@ msgstr ""
msgid "Built using Phoenix LiveView, Ecto, and TailwindCSS by @vavakado"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:43
#: lib/exmr_web/live/exam_live/index.html.heex:50
#, elixir-autogen, elixir-format
msgid "Edit"
msgstr ""
@ -51,13 +51,13 @@ msgstr ""
msgid "Hang in there while we get back on track"
msgstr ""
#: lib/exmr_web/live/exam_live/index.ex:32
#: lib/exmr_web/live/exam_live/index.html.heex:16
#: lib/exmr_web/live/exam_live/index.ex:34
#: lib/exmr_web/live/exam_live/index.html.heex:23
#, elixir-autogen, elixir-format
msgid "New Exam"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:50
#: lib/exmr_web/live/exam_live/index.html.heex:57
#, elixir-autogen, elixir-format
msgid "Remove"
msgstr ""
@ -67,12 +67,12 @@ msgstr ""
msgid "Something went wrong!"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:10
#: lib/exmr_web/live/exam_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "Sort by Date"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:5
#: lib/exmr_web/live/exam_live/index.html.heex:9
#, elixir-autogen, elixir-format
msgid "Sort by Subject"
msgstr ""
@ -82,12 +82,12 @@ msgstr ""
msgid "Success!"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:30
#: lib/exmr_web/live/exam_live/index.html.heex:37
#, elixir-autogen, elixir-format
msgid "Today"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:32
#: lib/exmr_web/live/exam_live/index.html.heex:39
#, elixir-autogen, elixir-format
msgid "Tomorrow"
msgid_plural "%{count} days left"
@ -212,14 +212,14 @@ msgstr ""
msgid "Saving..."
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:33
#: lib/exmr_web/live/exam_live/index.html.heex:40
#, elixir-autogen, elixir-format
msgid "Yesterday"
msgid_plural "%{count} days passed"
msgstr[0] ""
msgstr[1] ""
#: lib/exmr_web/live/exam_live/index.html.heex:31
#: lib/exmr_web/live/exam_live/index.html.heex:38
#, elixir-autogen, elixir-format
msgid "Tommorow"
msgstr ""
@ -233,3 +233,38 @@ msgstr ""
#, elixir-autogen, elixir-format
msgid "Register"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:85
#, elixir-autogen, elixir-format
msgid "Fri"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:84
#, elixir-autogen, elixir-format
msgid "Mon"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:85
#, elixir-autogen, elixir-format
msgid "Sat"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:84
#, elixir-autogen, elixir-format
msgid "Sun"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:84
#, elixir-autogen, elixir-format
msgid "Thu"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:84
#, elixir-autogen, elixir-format
msgid "Tue"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:84
#, elixir-autogen, elixir-format
msgid "Wed"
msgstr ""

View file

@ -31,7 +31,7 @@ msgstr ""
msgid "Built using Phoenix LiveView, Ecto, and TailwindCSS by @vavakado"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:43
#: lib/exmr_web/live/exam_live/index.html.heex:50
#, elixir-autogen, elixir-format
msgid "Edit"
msgstr ""
@ -51,13 +51,13 @@ msgstr ""
msgid "Hang in there while we get back on track"
msgstr ""
#: lib/exmr_web/live/exam_live/index.ex:32
#: lib/exmr_web/live/exam_live/index.html.heex:16
#: lib/exmr_web/live/exam_live/index.ex:34
#: lib/exmr_web/live/exam_live/index.html.heex:23
#, elixir-autogen, elixir-format
msgid "New Exam"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:50
#: lib/exmr_web/live/exam_live/index.html.heex:57
#, elixir-autogen, elixir-format
msgid "Remove"
msgstr ""
@ -67,12 +67,12 @@ msgstr ""
msgid "Something went wrong!"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:10
#: lib/exmr_web/live/exam_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "Sort by Date"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:5
#: lib/exmr_web/live/exam_live/index.html.heex:9
#, elixir-autogen, elixir-format
msgid "Sort by Subject"
msgstr ""
@ -82,12 +82,12 @@ msgstr ""
msgid "Success!"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:30
#: lib/exmr_web/live/exam_live/index.html.heex:37
#, elixir-autogen, elixir-format
msgid "Today"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:32
#: lib/exmr_web/live/exam_live/index.html.heex:39
#, elixir-autogen, elixir-format
msgid "Tomorrow"
msgid_plural "%{count} days left"
@ -212,14 +212,14 @@ msgstr ""
msgid "Saving..."
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:33
#: lib/exmr_web/live/exam_live/index.html.heex:40
#, elixir-autogen, elixir-format
msgid "Yesterday"
msgid_plural "%{count} days passed"
msgstr[0] ""
msgstr[1] ""
#: lib/exmr_web/live/exam_live/index.html.heex:31
#: lib/exmr_web/live/exam_live/index.html.heex:38
#, elixir-autogen, elixir-format, fuzzy
msgid "Tommorow"
msgstr ""
@ -233,3 +233,38 @@ msgstr ""
#, elixir-autogen, elixir-format
msgid "Register"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:85
#, elixir-autogen, elixir-format
msgid "Fri"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:84
#, elixir-autogen, elixir-format
msgid "Mon"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:85
#, elixir-autogen, elixir-format
msgid "Sat"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:84
#, elixir-autogen, elixir-format
msgid "Sun"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:84
#, elixir-autogen, elixir-format
msgid "Thu"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:84
#, elixir-autogen, elixir-format
msgid "Tue"
msgstr ""
#: lib/exmr_web/live/exam_live/index.html.heex:84
#, elixir-autogen, elixir-format
msgid "Wed"
msgstr ""

View file

@ -13,7 +13,7 @@ msgid ""
msgstr ""
"Project-Id-Version: unnamed project\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2024-12-14 00:27+0200\n"
"PO-Revision-Date: 2024-12-23 19:01+0200\n"
"Last-Translator: Vladimir Rubin <vavakado@proton.me>\n"
"Language-Team: Russian\n"
"Language: ru\n"
@ -42,7 +42,7 @@ msgstr ""
"Создано с использованием Phoenix LiveView, Ecto и TailwindCSS в исполнении "
"@vavakado"
#: lib/exmr_web/live/exam_live/index.html.heex:43
#: lib/exmr_web/live/exam_live/index.html.heex:50
msgid "Edit"
msgstr "Изменить"
@ -58,12 +58,12 @@ msgstr "Экзамены"
msgid "Hang in there while we get back on track"
msgstr "Держитесь, пока мы не вернемся в строй"
#: lib/exmr_web/live/exam_live/index.ex:32
#: lib/exmr_web/live/exam_live/index.html.heex:16
#: lib/exmr_web/live/exam_live/index.ex:34
#: lib/exmr_web/live/exam_live/index.html.heex:23
msgid "New Exam"
msgstr "Новый экзамен"
#: lib/exmr_web/live/exam_live/index.html.heex:50
#: lib/exmr_web/live/exam_live/index.html.heex:57
msgid "Remove"
msgstr "Удалить"
@ -71,11 +71,11 @@ msgstr "Удалить"
msgid "Something went wrong!"
msgstr "Что-то пошло не так!"
#: lib/exmr_web/live/exam_live/index.html.heex:10
#: lib/exmr_web/live/exam_live/index.html.heex:17
msgid "Sort by Date"
msgstr "Сортировать по дате"
#: lib/exmr_web/live/exam_live/index.html.heex:5
#: lib/exmr_web/live/exam_live/index.html.heex:9
msgid "Sort by Subject"
msgstr "Сортировать по предмету"
@ -83,11 +83,11 @@ msgstr "Сортировать по предмету"
msgid "Success!"
msgstr "Успех!"
#: lib/exmr_web/live/exam_live/index.html.heex:30
#: lib/exmr_web/live/exam_live/index.html.heex:37
msgid "Today"
msgstr "Сегодня"
#: lib/exmr_web/live/exam_live/index.html.heex:32
#: lib/exmr_web/live/exam_live/index.html.heex:39
msgid "Tomorrow"
msgid_plural "%{count} days left"
msgstr[0] "%{count} день остался"
@ -194,14 +194,14 @@ msgstr "Сохранить экзамен"
msgid "Saving..."
msgstr "Сохранение..."
#: lib/exmr_web/live/exam_live/index.html.heex:33
#: lib/exmr_web/live/exam_live/index.html.heex:40
msgid "Yesterday"
msgid_plural "%{count} days passed"
msgstr[0] "%{count} день прошёл"
msgstr[1] "%{count} дня прошло"
msgstr[2] "%{count} дней прошло"
#: lib/exmr_web/live/exam_live/index.html.heex:31
#: lib/exmr_web/live/exam_live/index.html.heex:38
msgid "Tommorow"
msgstr "Завтра"
@ -212,3 +212,31 @@ msgstr "Зайти в аккаунт"
#: lib/exmr_web/components/layouts/root.html.heex:51
msgid "Register"
msgstr "Зарегестрироваться"
#: lib/exmr_web/live/exam_live/index.html.heex:85
msgid "Fri"
msgstr "Пт"
#: lib/exmr_web/live/exam_live/index.html.heex:84
msgid "Mon"
msgstr "Пн"
#: lib/exmr_web/live/exam_live/index.html.heex:85
msgid "Sat"
msgstr "Сб"
#: lib/exmr_web/live/exam_live/index.html.heex:84
msgid "Sun"
msgstr "Вс"
#: lib/exmr_web/live/exam_live/index.html.heex:84
msgid "Thu"
msgstr "Чт"
#: lib/exmr_web/live/exam_live/index.html.heex:84
msgid "Tue"
msgstr "Вт"
#: lib/exmr_web/live/exam_live/index.html.heex:84
msgid "Wed"
msgstr "Ср"

View file

@ -8,7 +8,7 @@ defmodule Exmr.UsersTest do
describe "get_user_by_email/1" do
test "does not return the user if the email does not exist" do
refute Users.get_user_by_email("unknown@example.com")
refute Users.get_user_by_email("unknown@vavakado.xyz")
end
test "returns the user if the email exists" do
@ -19,7 +19,7 @@ defmodule Exmr.UsersTest do
describe "get_user_by_email_and_password/2" do
test "does not return the user if the email does not exist" do
refute Users.get_user_by_email_and_password("unknown@example.com", "hello world!")
refute Users.get_user_by_email_and_password("unknown@vavakado.xyz", "hello world!")
end
test "does not return the user if the password is not valid" do
@ -182,14 +182,14 @@ defmodule Exmr.UsersTest do
test "sends token through notification", %{user: user} do
token =
extract_user_token(fn url ->
Users.deliver_user_update_email_instructions(user, "current@example.com", url)
Users.deliver_user_update_email_instructions(user, "current@vavakado.xyz", url)
end)
{:ok, token} = Base.url_decode64(token, padding: false)
assert user_token = Repo.get_by(UserToken, token: :crypto.hash(:sha256, token))
assert user_token.user_id == user.id
assert user_token.sent_to == user.email
assert user_token.context == "change:current@example.com"
assert user_token.context == "change:current@vavakado.xyz"
end
end
@ -223,7 +223,7 @@ defmodule Exmr.UsersTest do
end
test "does not update email if user email changed", %{user: user, token: token} do
assert Users.update_user_email(%{user | email: "current@example.com"}, token) == :error
assert Users.update_user_email(%{user | email: "current@vavakado.xyz"}, token) == :error
assert Repo.get!(User, user.id).email == user.email
assert Repo.get_by(UserToken, user_id: user.id)
end

View file

@ -54,7 +54,7 @@ defmodule ExmrWeb.UserConfirmationInstructionsLiveTest do
{:ok, conn} =
lv
|> form("#resend_confirmation_form", user: %{email: "unknown@example.com"})
|> form("#resend_confirmation_form", user: %{email: "unknown@vavakado.xyz"})
|> render_submit()
|> follow_redirect(conn, ~p"/")

View file

@ -52,7 +52,7 @@ defmodule ExmrWeb.UserForgotPasswordLiveTest do
{:ok, conn} =
lv
|> form("#reset_password_form", user: %{"email" => "unknown@example.com"})
|> form("#reset_password_form", user: %{"email" => "unknown@vavakado.xyz"})
|> render_submit()
|> follow_redirect(conn, "/")

View file

@ -4,7 +4,7 @@ defmodule Exmr.UsersFixtures do
entities via the `Exmr.Users` context.
"""
def unique_user_email, do: "user#{System.unique_integer()}@example.com"
def unique_user_email, do: "user#{System.unique_integer()}@vavakado.xyz"
def valid_user_password, do: "hello world!"
def valid_user_attributes(attrs \\ %{}) do