This commit is contained in:
@ -9,17 +9,17 @@
|
||||
phx-hook="CtrlEnter"
|
||||
class="flex flex-col justify-start items-stretch space-y-4"
|
||||
>
|
||||
<%= text_input(f, :slug,
|
||||
{text_input(f, :slug,
|
||||
aria_label: gettext("slug"),
|
||||
class: "input input-primary",
|
||||
phx_debounce: 300,
|
||||
phx_hook: "SanitizeTitles",
|
||||
placeholder: gettext("slug"),
|
||||
required: true
|
||||
) %>
|
||||
<%= error_tag(f, :slug) %>
|
||||
)}
|
||||
{error_tag(f, :slug)}
|
||||
|
||||
<%= textarea(f, :content,
|
||||
{textarea(f, :content,
|
||||
id: "context-form-content",
|
||||
class: "input input-primary h-64 min-h-64",
|
||||
phx_update: "ignore",
|
||||
@ -28,32 +28,32 @@
|
||||
aria_label:
|
||||
gettext("use [[note-slug]] to link to a note or [context-slug] to link to a context"),
|
||||
phx_debounce: 300
|
||||
) %>
|
||||
<%= error_tag(f, :content) %>
|
||||
)}
|
||||
{error_tag(f, :content)}
|
||||
|
||||
<%= text_input(f, :tags_string,
|
||||
{text_input(f, :tags_string,
|
||||
aria_label: gettext("tag1,tag2"),
|
||||
class: "input input-primary",
|
||||
id: "tags-input",
|
||||
phx_debounce: 300,
|
||||
phx_hook: "SanitizeTags",
|
||||
placeholder: gettext("tag1,tag2")
|
||||
) %>
|
||||
<%= error_tag(f, :tags_string) %>
|
||||
)}
|
||||
{error_tag(f, :tags_string)}
|
||||
|
||||
<div class="flex justify-center items-stretch space-x-4">
|
||||
<%= select(f, :visibility, Ecto.Enum.values(Memex.Contexts.Context, :visibility),
|
||||
{select(f, :visibility, Ecto.Enum.values(Memex.Contexts.Context, :visibility),
|
||||
class: "grow input input-primary",
|
||||
prompt: gettext("select privacy"),
|
||||
aria_label: gettext("select privacy"),
|
||||
phx_debounce: 300
|
||||
) %>
|
||||
)}
|
||||
|
||||
<%= submit(dgettext("actions", "save"),
|
||||
{submit(dgettext("actions", "save"),
|
||||
phx_disable_with: gettext("saving..."),
|
||||
class: "mx-auto btn btn-primary"
|
||||
) %>
|
||||
)}
|
||||
</div>
|
||||
<%= error_tag(f, :visibility) %>
|
||||
{error_tag(f, :visibility)}
|
||||
</.form>
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="flex flex-col justify-center items-start mx-auto space-y-4 max-w-3xl">
|
||||
<h1 class="text-xl">
|
||||
<%= gettext("contexts") %>
|
||||
{gettext("contexts")}
|
||||
</h1>
|
||||
|
||||
<.form
|
||||
@ -11,18 +11,18 @@
|
||||
phx-submit="search"
|
||||
class="flex flex-col items-stretch self-stretch"
|
||||
>
|
||||
<%= text_input(f, :search_term,
|
||||
{text_input(f, :search_term,
|
||||
class: "input input-primary",
|
||||
value: @search,
|
||||
role: "search",
|
||||
phx_debounce: 300,
|
||||
placeholder: gettext("search")
|
||||
) %>
|
||||
)}
|
||||
</.form>
|
||||
|
||||
<%= if @contexts |> Enum.empty?() do %>
|
||||
<h1 class="self-center text-primary-500">
|
||||
<%= gettext("no contexts found") %>
|
||||
{gettext("no contexts found")}
|
||||
</h1>
|
||||
<% else %>
|
||||
<.live_component
|
||||
@ -37,7 +37,7 @@
|
||||
patch={~p"/contexts/#{context}/edit"}
|
||||
aria-label={dgettext("actions", "edit %{context_slug}", context_slug: context.slug)}
|
||||
>
|
||||
<%= dgettext("actions", "edit") %>
|
||||
{dgettext("actions", "edit")}
|
||||
</.link>
|
||||
<.link
|
||||
:if={@current_user}
|
||||
@ -47,14 +47,14 @@
|
||||
data-confirm={dgettext("prompts", "are you sure?")}
|
||||
aria-label={dgettext("actions", "delete %{context_slug}", context_slug: context.slug)}
|
||||
>
|
||||
<%= dgettext("actions", "delete") %>
|
||||
{dgettext("actions", "delete")}
|
||||
</.link>
|
||||
</:actions>
|
||||
</.live_component>
|
||||
<% end %>
|
||||
|
||||
<.link :if={@current_user} patch={~p"/contexts/new"} class="self-end btn btn-primary">
|
||||
<%= dgettext("actions", "new context") %>
|
||||
{dgettext("actions", "new context")}
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
<div class="flex flex-col justify-center items-stretch mx-auto space-y-4 max-w-3xl">
|
||||
<h1 class="text-xl">
|
||||
<%= @context.slug %>
|
||||
{@context.slug}
|
||||
</h1>
|
||||
|
||||
<div class="flex flex-wrap space-x-1">
|
||||
<.link :for={tag <- @context.tags} navigate={~p"/contexts/#{tag}"} class="link">
|
||||
<%= tag %>
|
||||
{tag}
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
@ -15,30 +15,30 @@
|
||||
:if={@context_backlinks ++ @pipeline_backlinks != []}
|
||||
class="flex flex-wrap justify-end items-center self-end"
|
||||
>
|
||||
<p><%= gettext("Backlinked by:") %></p>
|
||||
<p>{gettext("Backlinked by:")}</p>
|
||||
<.link
|
||||
:for={backlink <- @context_backlinks}
|
||||
class="m-1 hover:underline"
|
||||
patch={~p"/context/#{backlink}"}
|
||||
>
|
||||
<%= gettext("[%{slug}]", slug: backlink.slug) %>
|
||||
{gettext("[%{slug}]", slug: backlink.slug)}
|
||||
</.link>
|
||||
<.link
|
||||
:for={backlink <- @pipeline_backlinks}
|
||||
class="m-1 hover:underline"
|
||||
patch={~p"/pipeline/#{backlink}"}
|
||||
>
|
||||
<%= gettext("[[%{slug}]]", slug: backlink.slug) %>
|
||||
{gettext("[[%{slug}]]", slug: backlink.slug)}
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
<p class="self-end">
|
||||
<%= gettext("Visibility: %{visibility}", visibility: @context.visibility) %>
|
||||
{gettext("Visibility: %{visibility}", visibility: @context.visibility)}
|
||||
</p>
|
||||
|
||||
<div class="flex self-end space-x-4">
|
||||
<.link :if={@current_user} class="btn btn-primary" patch={~p"/context/#{@context}/edit"}>
|
||||
<%= dgettext("actions", "edit") %>
|
||||
{dgettext("actions", "edit")}
|
||||
</.link>
|
||||
<button
|
||||
:if={@current_user}
|
||||
@ -48,7 +48,7 @@
|
||||
data-confirm={dgettext("prompts", "are you sure?")}
|
||||
aria-label={dgettext("actions", "delete %{context_slug}", context_slug: @context.slug)}
|
||||
>
|
||||
<%= dgettext("actions", "delete") %>
|
||||
{dgettext("actions", "delete")}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="mx-auto flex flex-col justify-center items-stretch space-y-8 text-center max-w-3xl">
|
||||
<h1 class="title text-primary-400 text-xl text-left">
|
||||
<%= gettext("faq") %>
|
||||
{gettext("faq")}
|
||||
</h1>
|
||||
|
||||
<hr class="hr" />
|
||||
@ -8,13 +8,13 @@
|
||||
<ul class="flex flex-col justify-center items-stretch space-y-8">
|
||||
<li class="flex flex-col justify-center items-stretch space-y-2">
|
||||
<b class="whitespace-nowrap text-left">
|
||||
<%= gettext("what is this?") %>
|
||||
{gettext("what is this?")}
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext(
|
||||
{gettext(
|
||||
"this is a memex, used to document not just your notes, but also your perspectives and processes."
|
||||
) %>
|
||||
<%= gettext("some things that this memex is very loosely inspired by:") %>
|
||||
)}
|
||||
{gettext("some things that this memex is very loosely inspired by:")}
|
||||
</p>
|
||||
|
||||
<ul class="list-disc flex flex-col justify-center items-center space-y-2">
|
||||
@ -25,7 +25,7 @@
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<%= gettext("memex") %>
|
||||
{gettext("memex")}
|
||||
</.link>
|
||||
</li>
|
||||
<li>
|
||||
@ -35,7 +35,7 @@
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<%= gettext("zettelkasten") %>
|
||||
{gettext("zettelkasten")}
|
||||
</.link>
|
||||
</li>
|
||||
<li>
|
||||
@ -45,7 +45,7 @@
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<%= gettext("org-mode") %>
|
||||
{gettext("org-mode")}
|
||||
</.link>
|
||||
</li>
|
||||
</ul>
|
||||
@ -53,75 +53,75 @@
|
||||
|
||||
<li class="flex flex-col justify-center items-stretch space-y-2">
|
||||
<b class="whitespace-nowrap text-left">
|
||||
<%= gettext("why split up into notes, contexts and pipelines?") %>
|
||||
{gettext("why split up into notes, contexts and pipelines?")}
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext(
|
||||
{gettext(
|
||||
"i really admired the idea of a zettelkasten, especially with org-mode backlinks, however I felt like my notes would immediately become too messy by just putting everything into a single hierarchy."
|
||||
) %>
|
||||
<%= gettext(
|
||||
)}
|
||||
{gettext(
|
||||
"i wanted to separate between a personal dictionary of concepts and then my thought processes that are built off of my experiences and life lessons. these are notes, and contexts, respectively."
|
||||
) %>
|
||||
<%= gettext(
|
||||
)}
|
||||
{gettext(
|
||||
"finally, i wanted to externalize the processes for common situations that use these thought processes at discrete steps. these are pipelines!"
|
||||
) %>
|
||||
)}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-stretch space-y-2">
|
||||
<b class="whitespace-nowrap text-left">
|
||||
<%= gettext("what should my notes be like?") %>
|
||||
{gettext("what should my notes be like?")}
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext(
|
||||
{gettext(
|
||||
"in my opinion, notes should be written by any of the discrete objects or concepts that are meaningful to you in your life."
|
||||
) %>
|
||||
<%= gettext(
|
||||
)}
|
||||
{gettext(
|
||||
"spoons? probably not. a particular brand of spoons that you really like? why not :)"
|
||||
) %>
|
||||
)}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-stretch space-y-2">
|
||||
<b class="whitespace-nowrap text-left">
|
||||
<%= gettext("what should my contexts be like?") %>
|
||||
{gettext("what should my contexts be like?")}
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext("in my opinion, contexts should be like single-topic blog posts.") %>
|
||||
<%= gettext(
|
||||
{gettext("in my opinion, contexts should be like single-topic blog posts.")}
|
||||
{gettext(
|
||||
"for instance, a good context could be what makes some physical designs spark joy for you, and in that context you could link to the spoon note as an example of how it fits nicely into your hand."
|
||||
) %>
|
||||
)}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-stretch space-y-2">
|
||||
<b class="whitespace-nowrap text-left">
|
||||
<%= gettext("what should my pipelines be like?") %>
|
||||
{gettext("what should my pipelines be like?")}
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext(
|
||||
{gettext(
|
||||
"in my opinion, pipelines should be pretty lightweight, and just link to contexts to provide most of the heavy lifting."
|
||||
) %>
|
||||
<%= gettext(
|
||||
)}
|
||||
{gettext(
|
||||
"for instance, a pipeline for buying an object could have a step where you consider how much it sparks joy, and it could link to the physical designs context, maybe with some notes about how it applies in this case."
|
||||
) %>
|
||||
)}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-stretch space-y-2">
|
||||
<b class="whitespace-nowrap text-left">
|
||||
<%= gettext("how many people should i invite?") %>
|
||||
{gettext("how many people should i invite?")}
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext(
|
||||
{gettext(
|
||||
"while memEx fully supports multiple users, each memEx instance should be treated as a single cohesive and collaborative document."
|
||||
) %>
|
||||
<%= gettext(
|
||||
)}
|
||||
{gettext(
|
||||
"note, context and pipeline slugs must be unique, and you are free to link to notes not written by you."
|
||||
) %>
|
||||
<%= gettext(
|
||||
)}
|
||||
{gettext(
|
||||
"so, i'd recommend inviting anyone you'd like to work on your collective memEx. however, when in doubt, hopefully setting up a new instance is easy enough. if it isn't, then feel free to let me know :)"
|
||||
) %>
|
||||
)}
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -1,39 +1,39 @@
|
||||
<div class="flex flex-col justify-center items-stretch mx-auto space-y-4 max-w-lg">
|
||||
<h1 class="text-xl title text-primary-400">
|
||||
<%= gettext("memEx") %>
|
||||
{gettext("memEx")}
|
||||
</h1>
|
||||
|
||||
<ul class="flex flex-col space-y-4">
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("notes:") %>
|
||||
{gettext("notes:")}
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext("document notes about individual items or concepts") %>
|
||||
{gettext("document notes about individual items or concepts")}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("contexts:") %>
|
||||
{gettext("contexts:")}
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext("provide context around a single topic and hotlink to your notes") %>
|
||||
{gettext("provide context around a single topic and hotlink to your notes")}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("pipelines:") %>
|
||||
{gettext("pipelines:")}
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext("document your processes, attaching contexts to each step") %>
|
||||
{gettext("document your processes, attaching contexts to each step")}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center space-y-2 text-right">
|
||||
<.link navigate={~p"/faq"} class="btn btn-primary">
|
||||
<%= gettext("read more on how to use memEx") %>
|
||||
{gettext("read more on how to use memEx")}
|
||||
</.link>
|
||||
</li>
|
||||
</ul>
|
||||
@ -42,42 +42,42 @@
|
||||
|
||||
<ul class="flex flex-col space-y-4">
|
||||
<h2 class="text-lg title text-primary-400">
|
||||
<%= gettext("features") %>
|
||||
{gettext("features")}
|
||||
</h2>
|
||||
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("multi-user:") %>
|
||||
{gettext("multi-user:")}
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext("built with sharing and collaboration in mind") %>
|
||||
{gettext("built with sharing and collaboration in mind")}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("privacy:") %>
|
||||
{gettext("privacy:")}
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext("privacy controls on a per-note, context or pipeline basis") %>
|
||||
{gettext("privacy controls on a per-note, context or pipeline basis")}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("convenient:") %>
|
||||
{gettext("convenient:")}
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext("accessible from any internet-capable device") %>
|
||||
{gettext("accessible from any internet-capable device")}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("backlinks:") %>
|
||||
{gettext("backlinks:")}
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext("view referencing items from the referenced item") %>
|
||||
{gettext("view referencing items from the referenced item")}
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
@ -86,45 +86,45 @@
|
||||
|
||||
<ul class="flex flex-col justify-center space-y-4">
|
||||
<h2 class="text-lg title text-primary-400">
|
||||
<%= gettext("instance information") %>
|
||||
{gettext("instance information")}
|
||||
</h2>
|
||||
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<b>
|
||||
<%= gettext("admins:") %>
|
||||
{gettext("admins:")}
|
||||
</b>
|
||||
<p class="flex flex-col justify-center items-center space-y-2">
|
||||
<%= if @admins |> Enum.empty?() do %>
|
||||
<.link href={~p"/users/register"} class="link">
|
||||
<%= dgettext("prompts", "register to setup memEx") %>
|
||||
{dgettext("prompts", "register to setup memEx")}
|
||||
</.link>
|
||||
<% else %>
|
||||
<.link :for={%{email: email} <- @admins} class="link" href={"mailto:#{email}"}>
|
||||
<%= email %>
|
||||
{email}
|
||||
</.link>
|
||||
<% end %>
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<b><%= gettext("registration:") %></b>
|
||||
<b>{gettext("registration:")}</b>
|
||||
<p>
|
||||
<%= case Accounts.registration_mode() do
|
||||
{case Accounts.registration_mode() do
|
||||
:public -> gettext("public signups")
|
||||
:invite_only -> gettext("invite only")
|
||||
end %>
|
||||
end}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<b><%= gettext("version:") %></b>
|
||||
<b>{gettext("version:")}</b>
|
||||
<.link
|
||||
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><%= @version %></p>
|
||||
<p>{@version}</p>
|
||||
<i class="fas fa-md fa-info-circle"></i>
|
||||
</.link>
|
||||
</li>
|
||||
@ -134,7 +134,7 @@
|
||||
|
||||
<ul class="flex flex-col space-y-2">
|
||||
<h2 class="text-lg title text-primary-400">
|
||||
<%= gettext("get involved") %>
|
||||
{gettext("get involved")}
|
||||
</h2>
|
||||
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
@ -144,7 +144,7 @@
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<p><%= gettext("view the source code") %></p>
|
||||
<p>{gettext("view the source code")}</p>
|
||||
<i class="fas fa-md fa-code"></i>
|
||||
</.link>
|
||||
</li>
|
||||
@ -155,7 +155,7 @@
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<p><%= gettext("help translate") %></p>
|
||||
<p>{gettext("help translate")}</p>
|
||||
<i class="fas fa-md fa-language"></i>
|
||||
</.link>
|
||||
</li>
|
||||
@ -166,7 +166,7 @@
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<p><%= gettext("report bugs or request features") %></p>
|
||||
<p>{gettext("report bugs or request features")}</p>
|
||||
<i class="fas fa-md fa-spider"></i>
|
||||
</.link>
|
||||
</li>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div>
|
||||
<h2 class="mb-8 text-xl text-center title text-primary-400">
|
||||
<%= @title %>
|
||||
{@title}
|
||||
</h2>
|
||||
<.form
|
||||
:let={f}
|
||||
@ -16,38 +16,38 @@
|
||||
:if={@changeset.action && not @changeset.valid?}
|
||||
class="col-span-3 text-center invalid-feedback"
|
||||
>
|
||||
<%= changeset_errors(@changeset) %>
|
||||
{changeset_errors(@changeset)}
|
||||
</div>
|
||||
|
||||
<%= label(f, :name, gettext("name"),
|
||||
{label(f, :name, gettext("name"),
|
||||
class: "title text-lg text-primary-400",
|
||||
phx_debounce: 300
|
||||
) %>
|
||||
<%= text_input(f, :name,
|
||||
)}
|
||||
{text_input(f, :name,
|
||||
class: "input input-primary col-span-2",
|
||||
phx_debounce: 300,
|
||||
required: true
|
||||
) %>
|
||||
<%= error_tag(f, :name, "col-span-3") %>
|
||||
)}
|
||||
{error_tag(f, :name, "col-span-3")}
|
||||
|
||||
<%= label(f, :uses_left, gettext("uses left"),
|
||||
{label(f, :uses_left, gettext("uses left"),
|
||||
class: "title text-lg text-primary-400",
|
||||
phx_debounce: 300
|
||||
) %>
|
||||
<%= number_input(f, :uses_left,
|
||||
)}
|
||||
{number_input(f, :uses_left,
|
||||
min: 0,
|
||||
class: "input input-primary col-span-2",
|
||||
phx_debounce: 300
|
||||
) %>
|
||||
<%= error_tag(f, :uses_left, "col-span-3") %>
|
||||
)}
|
||||
{error_tag(f, :uses_left, "col-span-3")}
|
||||
|
||||
<span class="col-span-3 italic text-center text-primary-500">
|
||||
<%= gettext(~s/leave "uses left" blank to make invite unlimited/) %>
|
||||
{gettext(~s/leave "uses left" blank to make invite unlimited/)}
|
||||
</span>
|
||||
|
||||
<%= submit(dgettext("actions", "save"),
|
||||
{submit(dgettext("actions", "save"),
|
||||
class: "mx-auto btn btn-primary col-span-3",
|
||||
phx_disable_with: dgettext("prompts", "saving...")
|
||||
) %>
|
||||
)}
|
||||
</.form>
|
||||
</div>
|
||||
|
@ -1,15 +1,15 @@
|
||||
<div class="flex flex-col justify-center items-stretch mx-auto space-y-4 max-w-3xl">
|
||||
<h1 class="text-xl title title-primary-500">
|
||||
<%= gettext("invites") %>
|
||||
{gettext("invites")}
|
||||
</h1>
|
||||
|
||||
<%= if @invites |> Enum.empty?() do %>
|
||||
<h1 class="text-xl text-center title text-primary-400">
|
||||
<%= gettext("no invites 😔") %>
|
||||
{gettext("no invites 😔")}
|
||||
</h1>
|
||||
|
||||
<.link patch={~p"/invites/new"} class="ml-auto btn btn-primary">
|
||||
<%= dgettext("actions", "new invite") %>
|
||||
{dgettext("actions", "new invite")}
|
||||
</.link>
|
||||
<% end %>
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
dgettext("actions", "copy invite link for %{invite_name}", invite_name: invite.name)
|
||||
}
|
||||
>
|
||||
<%= dgettext("actions", "copy") %>
|
||||
{dgettext("actions", "copy")}
|
||||
</button>
|
||||
</form>
|
||||
</:code_actions>
|
||||
@ -67,7 +67,7 @@
|
||||
phx-click={if invite.disabled_at, do: "enable_invite", else: "disable_invite"}
|
||||
phx-value-id={invite.id}
|
||||
>
|
||||
<%= if invite.disabled_at, do: gettext("enable"), else: gettext("disable") %>
|
||||
{if invite.disabled_at, do: gettext("enable"), else: gettext("disable")}
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
@ -82,12 +82,12 @@
|
||||
)
|
||||
}
|
||||
>
|
||||
<%= gettext("set unlimited") %>
|
||||
{gettext("set unlimited")}
|
||||
</.link>
|
||||
</.invite_card>
|
||||
|
||||
<.link :if={@invites != []} patch={~p"/invites/new"} class="ml-auto btn btn-primary">
|
||||
<%= dgettext("actions", "create invite") %>
|
||||
{dgettext("actions", "create invite")}
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
<hr class="hr" />
|
||||
|
||||
<h1 class="text-xl title text-primary-400">
|
||||
<%= gettext("admins") %>
|
||||
{gettext("admins")}
|
||||
</h1>
|
||||
|
||||
<div class="flex flex-col justify-center items-stretch space-y-4">
|
||||
@ -123,7 +123,7 @@
|
||||
<hr class="hr" />
|
||||
|
||||
<h1 class="text-xl title text-primary-400">
|
||||
<%= gettext("users") %>
|
||||
{gettext("users")}
|
||||
</h1>
|
||||
|
||||
<div class="flex flex-col justify-center items-stretch space-y-4">
|
||||
|
@ -9,49 +9,49 @@
|
||||
phx-hook="CtrlEnter"
|
||||
class="flex flex-col justify-start items-stretch space-y-4"
|
||||
>
|
||||
<%= text_input(f, :slug,
|
||||
{text_input(f, :slug,
|
||||
aria_label: gettext("slug"),
|
||||
class: "input input-primary",
|
||||
phx_debounce: 300,
|
||||
phx_hook: "SanitizeTitles",
|
||||
placeholder: gettext("slug"),
|
||||
required: true
|
||||
) %>
|
||||
<%= error_tag(f, :slug) %>
|
||||
)}
|
||||
{error_tag(f, :slug)}
|
||||
|
||||
<%= textarea(f, :content,
|
||||
{textarea(f, :content,
|
||||
id: "note-form-content",
|
||||
class: "input input-primary h-64 min-h-64",
|
||||
phx_update: "ignore",
|
||||
placeholder: gettext("use [note-slug] to link to a note"),
|
||||
aria_label: gettext("use [note-slug] to link to a note"),
|
||||
phx_debounce: 300
|
||||
) %>
|
||||
<%= error_tag(f, :content) %>
|
||||
)}
|
||||
{error_tag(f, :content)}
|
||||
|
||||
<%= text_input(f, :tags_string,
|
||||
{text_input(f, :tags_string,
|
||||
aria_label: gettext("tag1,tag2"),
|
||||
class: "input input-primary",
|
||||
id: "tags-input",
|
||||
phx_debounce: 300,
|
||||
phx_hook: "SanitizeTags",
|
||||
placeholder: gettext("tag1,tag2")
|
||||
) %>
|
||||
<%= error_tag(f, :tags_string) %>
|
||||
)}
|
||||
{error_tag(f, :tags_string)}
|
||||
|
||||
<div class="flex justify-center items-stretch space-x-4">
|
||||
<%= select(f, :visibility, Ecto.Enum.values(Memex.Notes.Note, :visibility),
|
||||
{select(f, :visibility, Ecto.Enum.values(Memex.Notes.Note, :visibility),
|
||||
class: "grow input input-primary",
|
||||
prompt: gettext("select privacy"),
|
||||
aria_label: gettext("select privacy"),
|
||||
phx_debounce: 300
|
||||
) %>
|
||||
)}
|
||||
|
||||
<%= submit(dgettext("actions", "save"),
|
||||
{submit(dgettext("actions", "save"),
|
||||
phx_disable_with: gettext("saving..."),
|
||||
class: "mx-auto btn btn-primary"
|
||||
) %>
|
||||
)}
|
||||
</div>
|
||||
<%= error_tag(f, :visibility) %>
|
||||
{error_tag(f, :visibility)}
|
||||
</.form>
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="flex flex-col justify-center items-start mx-auto space-y-4 max-w-3xl">
|
||||
<h1 class="text-xl">
|
||||
<%= gettext("notes") %>
|
||||
{gettext("notes")}
|
||||
</h1>
|
||||
|
||||
<.form
|
||||
@ -11,18 +11,18 @@
|
||||
phx-submit="search"
|
||||
class="flex flex-col items-stretch self-stretch"
|
||||
>
|
||||
<%= text_input(f, :search_term,
|
||||
{text_input(f, :search_term,
|
||||
class: "input input-primary",
|
||||
value: @search,
|
||||
role: "search",
|
||||
phx_debounce: 300,
|
||||
placeholder: gettext("search")
|
||||
) %>
|
||||
)}
|
||||
</.form>
|
||||
|
||||
<%= if @notes |> Enum.empty?() do %>
|
||||
<h1 class="self-center text-primary-500">
|
||||
<%= gettext("no notes found") %>
|
||||
{gettext("no notes found")}
|
||||
</h1>
|
||||
<% else %>
|
||||
<.live_component
|
||||
@ -37,7 +37,7 @@
|
||||
patch={~p"/notes/#{note}/edit"}
|
||||
aria-label={dgettext("actions", "edit %{note_slug}", note_slug: note.slug)}
|
||||
>
|
||||
<%= dgettext("actions", "edit") %>
|
||||
{dgettext("actions", "edit")}
|
||||
</.link>
|
||||
<.link
|
||||
:if={@current_user}
|
||||
@ -47,14 +47,14 @@
|
||||
data-confirm={dgettext("prompts", "are you sure?")}
|
||||
aria-label={dgettext("actions", "delete %{note_slug}", note_slug: note.slug)}
|
||||
>
|
||||
<%= dgettext("actions", "delete") %>
|
||||
{dgettext("actions", "delete")}
|
||||
</.link>
|
||||
</:actions>
|
||||
</.live_component>
|
||||
<% end %>
|
||||
|
||||
<.link :if={@current_user} patch={~p"/notes/new"} class="self-end btn btn-primary">
|
||||
<%= dgettext("actions", "new note") %>
|
||||
{dgettext("actions", "new note")}
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
<div class="flex flex-col justify-center items-stretch mx-auto space-y-4 max-w-3xl">
|
||||
<h1 class="text-xl">
|
||||
<%= @note.slug %>
|
||||
{@note.slug}
|
||||
</h1>
|
||||
|
||||
<div class="flex flex-wrap space-x-1">
|
||||
<.link :for={tag <- @note.tags} navigate={~p"/notes/#{tag}"} class="link">
|
||||
<%= tag %>
|
||||
{tag}
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
@ -15,37 +15,37 @@
|
||||
:if={@note_backlinks ++ @context_backlinks ++ @pipeline_backlinks != []}
|
||||
class="flex flex-wrap justify-end items-center self-end"
|
||||
>
|
||||
<p><%= gettext("Backlinked by:") %></p>
|
||||
<p>{gettext("Backlinked by:")}</p>
|
||||
<.link
|
||||
:for={backlink <- @note_backlinks}
|
||||
class="m-1 hover:underline"
|
||||
patch={~p"/note/#{backlink}"}
|
||||
>
|
||||
<%= gettext("[%{slug}]", slug: backlink.slug) %>
|
||||
{gettext("[%{slug}]", slug: backlink.slug)}
|
||||
</.link>
|
||||
<.link
|
||||
:for={backlink <- @context_backlinks}
|
||||
class="m-1 hover:underline"
|
||||
patch={~p"/context/#{backlink}"}
|
||||
>
|
||||
<%= gettext("[[%{slug}]]", slug: backlink.slug) %>
|
||||
{gettext("[[%{slug}]]", slug: backlink.slug)}
|
||||
</.link>
|
||||
<.link
|
||||
:for={backlink <- @pipeline_backlinks}
|
||||
class="m-1 hover:underline"
|
||||
patch={~p"/pipeline/#{backlink}"}
|
||||
>
|
||||
<%= gettext("[[[%{slug}]]]", slug: backlink.slug) %>
|
||||
{gettext("[[[%{slug}]]]", slug: backlink.slug)}
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
<p class="self-end">
|
||||
<%= gettext("Visibility: %{visibility}", visibility: @note.visibility) %>
|
||||
{gettext("Visibility: %{visibility}", visibility: @note.visibility)}
|
||||
</p>
|
||||
|
||||
<div class="flex self-end space-x-4">
|
||||
<.link :if={@current_user} class="btn btn-primary" patch={~p"/note/#{@note}/edit"}>
|
||||
<%= dgettext("actions", "edit") %>
|
||||
{dgettext("actions", "edit")}
|
||||
</.link>
|
||||
<button
|
||||
:if={@current_user}
|
||||
@ -55,7 +55,7 @@
|
||||
data-confirm={dgettext("prompts", "are you sure?")}
|
||||
aria-label={dgettext("actions", "delete %{note_slug}", note_slug: @note.slug)}
|
||||
>
|
||||
<%= dgettext("actions", "delete") %>
|
||||
{dgettext("actions", "delete")}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -9,17 +9,17 @@
|
||||
phx-hook="CtrlEnter"
|
||||
class="flex flex-col justify-start items-stretch space-y-4"
|
||||
>
|
||||
<%= text_input(f, :slug,
|
||||
{text_input(f, :slug,
|
||||
aria_label: gettext("slug"),
|
||||
class: "input input-primary",
|
||||
phx_debounce: 300,
|
||||
phx_hook: "SanitizeTitles",
|
||||
placeholder: gettext("slug"),
|
||||
required: true
|
||||
) %>
|
||||
<%= error_tag(f, :slug) %>
|
||||
)}
|
||||
{error_tag(f, :slug)}
|
||||
|
||||
<%= textarea(f, :description,
|
||||
{textarea(f, :description,
|
||||
id: "pipeline-form-description",
|
||||
class: "input input-primary h-64 min-h-64",
|
||||
phx_update: "ignore",
|
||||
@ -32,32 +32,32 @@
|
||||
"use [[[note-slug]]] to link to a note or use [[context-slug]] to link to a context or [pipeline-slug] to link to a pipeline"
|
||||
),
|
||||
phx_debounce: 300
|
||||
) %>
|
||||
<%= error_tag(f, :description) %>
|
||||
)}
|
||||
{error_tag(f, :description)}
|
||||
|
||||
<%= text_input(f, :tags_string,
|
||||
{text_input(f, :tags_string,
|
||||
aria_label: gettext("tag1,tag2"),
|
||||
class: "input input-primary",
|
||||
id: "tags-input",
|
||||
phx_debounce: 300,
|
||||
phx_hook: "SanitizeTags",
|
||||
placeholder: gettext("tag1,tag2")
|
||||
) %>
|
||||
<%= error_tag(f, :tags_string) %>
|
||||
)}
|
||||
{error_tag(f, :tags_string)}
|
||||
|
||||
<div class="flex justify-center items-stretch space-x-4">
|
||||
<%= select(f, :visibility, Ecto.Enum.values(Memex.Pipelines.Pipeline, :visibility),
|
||||
{select(f, :visibility, Ecto.Enum.values(Memex.Pipelines.Pipeline, :visibility),
|
||||
class: "grow input input-primary",
|
||||
prompt: gettext("select privacy"),
|
||||
aria_label: gettext("select privacy"),
|
||||
phx_debounce: 300
|
||||
) %>
|
||||
)}
|
||||
|
||||
<%= submit(dgettext("actions", "save"),
|
||||
{submit(dgettext("actions", "save"),
|
||||
phx_disable_with: gettext("saving..."),
|
||||
class: "mx-auto btn btn-primary"
|
||||
) %>
|
||||
)}
|
||||
</div>
|
||||
<%= error_tag(f, :visibility) %>
|
||||
{error_tag(f, :visibility)}
|
||||
</.form>
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="flex flex-col justify-center items-start mx-auto space-y-4 max-w-3xl">
|
||||
<h1 class="text-xl">
|
||||
<%= gettext("pipelines") %>
|
||||
{gettext("pipelines")}
|
||||
</h1>
|
||||
|
||||
<.form
|
||||
@ -11,18 +11,18 @@
|
||||
phx-submit="search"
|
||||
class="flex flex-col items-stretch self-stretch"
|
||||
>
|
||||
<%= text_input(f, :search_term,
|
||||
{text_input(f, :search_term,
|
||||
class: "input input-primary",
|
||||
value: @search,
|
||||
role: "search",
|
||||
phx_debounce: 300,
|
||||
placeholder: gettext("search")
|
||||
) %>
|
||||
)}
|
||||
</.form>
|
||||
|
||||
<%= if @pipelines |> Enum.empty?() do %>
|
||||
<h1 class="self-center text-primary-500">
|
||||
<%= gettext("no pipelines found") %>
|
||||
{gettext("no pipelines found")}
|
||||
</h1>
|
||||
<% else %>
|
||||
<.live_component
|
||||
@ -37,7 +37,7 @@
|
||||
patch={~p"/pipelines/#{pipeline}/edit"}
|
||||
aria-label={dgettext("actions", "edit %{pipeline_slug}", pipeline_slug: pipeline.slug)}
|
||||
>
|
||||
<%= dgettext("actions", "edit") %>
|
||||
{dgettext("actions", "edit")}
|
||||
</.link>
|
||||
<.link
|
||||
:if={@current_user}
|
||||
@ -49,14 +49,14 @@
|
||||
dgettext("actions", "delete %{pipeline_slug}", pipeline_slug: pipeline.slug)
|
||||
}
|
||||
>
|
||||
<%= dgettext("actions", "delete") %>
|
||||
{dgettext("actions", "delete")}
|
||||
</.link>
|
||||
</:actions>
|
||||
</.live_component>
|
||||
<% end %>
|
||||
|
||||
<.link :if={@current_user} patch={~p"/pipelines/new"} class="self-end btn btn-primary">
|
||||
<%= dgettext("actions", "new pipeline") %>
|
||||
{dgettext("actions", "new pipeline")}
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
|
@ -1,34 +1,34 @@
|
||||
<div class="flex flex-col justify-center items-stretch mx-auto space-y-4 max-w-3xl">
|
||||
<h1 class="text-xl">
|
||||
<%= @pipeline.slug %>
|
||||
{@pipeline.slug}
|
||||
</h1>
|
||||
|
||||
<div class="flex flex-wrap space-x-1">
|
||||
<.link :for={tag <- @pipeline.tags} navigate={~p"/pipelines/#{tag}"} class="link">
|
||||
<%= tag %>
|
||||
{tag}
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
<.pipeline_content pipeline={@pipeline} />
|
||||
|
||||
<div :if={@pipeline_backlinks != []} class="flex flex-wrap justify-end items-center self-end">
|
||||
<p><%= gettext("Backlinked by:") %></p>
|
||||
<p>{gettext("Backlinked by:")}</p>
|
||||
<.link
|
||||
:for={backlink <- @pipeline_backlinks}
|
||||
class="m-1 hover:underline"
|
||||
patch={~p"/pipeline/#{backlink}"}
|
||||
>
|
||||
<%= gettext("[%{slug}]", slug: backlink.slug) %>
|
||||
{gettext("[%{slug}]", slug: backlink.slug)}
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
<p class="self-end">
|
||||
<%= gettext("Visibility: %{visibility}", visibility: @pipeline.visibility) %>
|
||||
{gettext("Visibility: %{visibility}", visibility: @pipeline.visibility)}
|
||||
</p>
|
||||
|
||||
<div class="flex self-end pb-4 space-x-4">
|
||||
<.link :if={@current_user} class="btn btn-primary" patch={~p"/pipeline/#{@pipeline}/edit"}>
|
||||
<%= dgettext("actions", "edit") %>
|
||||
{dgettext("actions", "edit")}
|
||||
</.link>
|
||||
<button
|
||||
:if={@current_user}
|
||||
@ -38,25 +38,25 @@
|
||||
data-confirm={dgettext("prompts", "are you sure?")}
|
||||
aria-label={dgettext("actions", "delete %{pipeline_slug}", pipeline_slug: @pipeline.slug)}
|
||||
>
|
||||
<%= dgettext("actions", "delete") %>
|
||||
{dgettext("actions", "delete")}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<hr class="hr" />
|
||||
|
||||
<h2 class="self-center pt-2 text-lg">
|
||||
<%= gettext("steps:") %>
|
||||
{gettext("steps:")}
|
||||
</h2>
|
||||
|
||||
<%= if @steps |> Enum.empty?() do %>
|
||||
<h3 class="self-center text-md text-primary-600">
|
||||
<%= gettext("no steps") %>
|
||||
{gettext("no steps")}
|
||||
</h3>
|
||||
<% else %>
|
||||
<%= for %{id: step_id, position: position, title: title} = step <- @steps do %>
|
||||
<div class="flex justify-between items-center space-x-4">
|
||||
<h3 class="text-md">
|
||||
<%= gettext("%{position}. %{title}", position: position + 1, title: title) %>
|
||||
{gettext("%{position}. %{title}", position: position + 1, title: title)}
|
||||
</h3>
|
||||
|
||||
<%= if @current_user do %>
|
||||
@ -98,7 +98,7 @@
|
||||
patch={~p"/pipeline/#{@pipeline}/#{step_id}"}
|
||||
aria-label={dgettext("actions", "edit %{step_title}", step_title: step.title)}
|
||||
>
|
||||
<%= dgettext("actions", "edit") %>
|
||||
{dgettext("actions", "edit")}
|
||||
</.link>
|
||||
|
||||
<button
|
||||
@ -109,7 +109,7 @@
|
||||
data-confirm={dgettext("prompts", "are you sure?")}
|
||||
aria-label={dgettext("actions", "delete %{step_title}", step_title: step.title)}
|
||||
>
|
||||
<%= dgettext("actions", "delete") %>
|
||||
{dgettext("actions", "delete")}
|
||||
</button>
|
||||
</div>
|
||||
<% end %>
|
||||
@ -124,7 +124,7 @@
|
||||
class="self-end btn btn-primary"
|
||||
patch={~p"/pipeline/#{@pipeline}/add_step"}
|
||||
>
|
||||
<%= dgettext("actions", "add step") %>
|
||||
{dgettext("actions", "add step")}
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
|
@ -9,17 +9,17 @@
|
||||
phx-hook="CtrlEnter"
|
||||
class="flex flex-col justify-start items-stretch space-y-4"
|
||||
>
|
||||
<%= text_input(f, :title,
|
||||
{text_input(f, :title,
|
||||
aria_label: gettext("title"),
|
||||
class: "input input-primary",
|
||||
phx_debounce: 300,
|
||||
phx_hook: "SanitizeTitles",
|
||||
placeholder: gettext("title"),
|
||||
required: true
|
||||
) %>
|
||||
<%= error_tag(f, :title) %>
|
||||
)}
|
||||
{error_tag(f, :title)}
|
||||
|
||||
<%= textarea(f, :content,
|
||||
{textarea(f, :content,
|
||||
id: "step-form-content",
|
||||
class: "input input-primary h-64 min-h-64",
|
||||
phx_update: "ignore",
|
||||
@ -32,14 +32,14 @@
|
||||
"use [[[note-slug]]] to link to a note or use [[context-slug]] to link to a context or [pipeline-slug] to link to a pipeline"
|
||||
),
|
||||
phx_debounce: 300
|
||||
) %>
|
||||
<%= error_tag(f, :content) %>
|
||||
)}
|
||||
{error_tag(f, :content)}
|
||||
|
||||
<div class="flex justify-center items-stretch space-x-4">
|
||||
<%= submit(dgettext("actions", "save"),
|
||||
{submit(dgettext("actions", "save"),
|
||||
phx_disable_with: gettext("saving..."),
|
||||
class: "mx-auto btn btn-primary"
|
||||
) %>
|
||||
)}
|
||||
</div>
|
||||
</.form>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user