diff --git a/lib/lsg_web/endpoint.ex b/lib/lsg_web/endpoint.ex index b0cf9c5..a401f54 100644 --- a/lib/lsg_web/endpoint.ex +++ b/lib/lsg_web/endpoint.ex @@ -1,62 +1,62 @@ defmodule NolaWeb.Endpoint do use Sentry.PlugCapture use Phoenix.Endpoint, otp_app: :nola # Serve at "/" the static files from "priv/static" directory. # # You should set gzip to true if you are running phoenix.digest # when deploying your static files in production. plug Plug.Static, at: "/", from: :nola, gzip: false, only: ~w(assets css js fonts images favicon.ico robots.txt) # Code reloading can be explicitly enabled under the # :code_reloader configuration of your endpoint. if 42==43 && code_reloading? do socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket plug Phoenix.LiveReloader plug Phoenix.CodeReloader end plug Plug.RequestId plug Plug.Logger plug Plug.Parsers, parsers: [:urlencoded, :multipart, :json], pass: ["*/*"], json_decoder: Jason plug Sentry.PlugContext plug Plug.MethodOverride plug Plug.Head @session_options [store: :cookie, - key: "_lsg_key", + key: "_nola_key", signing_salt: "+p7K3wrj"] socket "/live", Phoenix.LiveView.Socket, websocket: [connect_info: [session: @session_options]] # The session will be stored in the cookie and signed, # this means its contents can be read but not tampered with. # Set :encryption_salt if you would also like to encrypt it. plug Plug.Session, @session_options plug NolaWeb.Router @doc """ Callback invoked for dynamically configuring the endpoint. It receives the endpoint configuration and checks if configuration should be loaded from the system environment. """ def init(_key, config) do if config[:load_from_system_env] do port = System.get_env("PORT") || raise "expected the PORT environment variable to be set" {:ok, Keyword.put(config, :http, [:inet6, port: port])} else {:ok, config} end end end diff --git a/lib/lsg_web/live/chat_live.html.heex b/lib/lsg_web/live/chat_live.html.heex index fc1f582..29cd6a1 100644 --- a/lib/lsg_web/live/chat_live.html.heex +++ b/lib/lsg_web/live/chat_live.html.heex @@ -1,91 +1,91 @@

<%= @network %> <%= @chan %>

Disconnected :'(

Oh no error >:(

    <%= for message <- @backlog do %> <%= if is_map(message) && Map.get(message, :__struct__) == IRC.Message do %>
  • -
  • <% end %> <%= if is_binary(message) do %>
  • <%= message %>
  • <% end %> <%= if is_map(message) && Map.get(message, :type) do %>
  • - + * * * -
  • <% end %> <% end %>
<.form let={f} id={"form-#{@counter}"} for={:message} phx-submit="send" class="w-full px-4 pt-4">
<%= text_input f, :text, class: "focus:ring-indigo-500 focus:border-indigo-500 block w-full border rounded-md pl-4 sm:text-sm border-gray-300", autofocus: true, 'phx-hook': "AutoFocus", autocomplete: "off", placeholder: "Don't be shy, say something…" %> <%= submit content_tag(:span, "Send"), class: "-ml-px relative inline-flex items-center space-x-2 px-4 py-2 border border-gray-300 text-sm font-medium rounded-r-md text-gray-700 bg-gray-50 hover:bg-gray-100 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500"%>
diff --git a/lib/lsg_web/lsg_web.ex b/lib/lsg_web/lsg_web.ex index da622c7..906e961 100644 --- a/lib/lsg_web/lsg_web.ex +++ b/lib/lsg_web/lsg_web.ex @@ -1,99 +1,99 @@ defmodule NolaWeb do @moduledoc """ The entrypoint for defining your web interface, such as controllers, views, channels and so on. This can be used in your application as: use NolaWeb, :controller use NolaWeb, :view The definitions below will be executed for every view, controller, etc, so keep them short and clean, focused on imports, uses and aliases. Do NOT define functions inside the quoted expressions below. Instead, define any helper function in modules and import those modules here. """ def format_chan("##") do "♯♯" end def format_chan("#") do "♯" end def format_chan("#"<>chan) do chan end def format_chan(chan = "!"<>_), do: chan def reformat_chan("♯") do "#" end def reformat_chan("♯♯") do "##" end def reformat_chan(chan = "!"<>_), do: chan def reformat_chan(chan) do "#"<>chan end def controller do quote do use Phoenix.Controller, namespace: NolaWeb import Plug.Conn import NolaWeb.Router.Helpers import NolaWeb.Gettext alias NolaWeb.Router.Helpers, as: Routes end end def view do quote do - use Phoenix.View, root: "lib/lsg_web/templates", + use Phoenix.View, root: "lib/nola_web/templates", namespace: NolaWeb # Import convenience functions from controllers import Phoenix.Controller, only: [get_flash: 2, view_module: 1] # Use all HTML functionality (forms, tags, etc) use Phoenix.HTML import NolaWeb.Router.Helpers import NolaWeb.ErrorHelpers import NolaWeb.Gettext import Phoenix.LiveView.Helpers alias NolaWeb.Router.Helpers, as: Routes end end def router do quote do use Phoenix.Router import Plug.Conn import Phoenix.Controller import Phoenix.LiveView.Router end end def channel do quote do use Phoenix.Channel import NolaWeb.Gettext end end @doc """ When used, dispatch to the appropriate controller/view/etc. """ defmacro __using__(which) when is_atom(which) do apply(__MODULE__, which, []) end end diff --git a/lib/lsg_web/templates/alcoolog/index.html.eex b/lib/lsg_web/templates/alcoolog/index.html.eex index 263da95..5a5423a 100644 --- a/lib/lsg_web/templates/alcoolog/index.html.eex +++ b/lib/lsg_web/templates/alcoolog/index.html.eex @@ -1,205 +1,205 @@ <%= if @stats == [] do %>

CATASTROPHE! Personne n'a bu!!!!

<% end %> <%= if @stats == %{} do %>

ENCORE PIRE! Aucune boisson enregistrée!

<% else %>

Classement 15 jours

Historique

<%= for {{{{account, date}, points, _active, cl, deg, nom, comment, _meta}, nick}, index} <- Enum.with_index(@drinks) do %> <% class = if(Integer.is_even(index), do: "bg-gray-50", else: "bg-white") %> <% date = DateTime.from_unix!(date, :millisecond) %> <% end %>
date nick    
- <%= LSGWeb.LayoutView.format_time(date, false) %> + <%= NolaWeb.LayoutView.format_time(date, false) %> <%= link nick, to: alcoolog_path(@conn, :nick, @network, nick) %> <%= cl %>cl <%= deg %>° <%= comment||"" %>
<% end %> <%= if @conn.assigns.account && (@network || @channel) do %> <%= link("alcoolog global", to: alcoolog_path(@conn, :index)) %> <% end %> diff --git a/lib/lsg_web/templates/alcoolog/user.html.eex b/lib/lsg_web/templates/alcoolog/user.html.eex index 8907f9a..d7f716b 100644 --- a/lib/lsg_web/templates/alcoolog/user.html.eex +++ b/lib/lsg_web/templates/alcoolog/user.html.eex @@ -1,170 +1,170 @@ <%= if @stats.active > 0 do %>

<% rising_class = if @stats.rising, do: "teal", else: "red" %> <%= @stats.trend_symbol %> <%= Float.round(@stats.active, 4) %> g/l <%= @stats.last_cl %>cl @ <%= @stats.last_deg %>° <%= if @stats.last_descr && @stats.last_descr != "" do %> <%= @stats.last_descr %> <% end %> - <%= LSGWeb.LayoutView.format_time(@stats.last_at) %> + <%= NolaWeb.LayoutView.format_time(@stats.last_at) %>

a commencé il y a <%= @stats.since_s %> — sobre dans <%= @stats.sober_in_s %>

<% else %>

est sobre!

dernier verre <%= @stats.last_cl %>cl @ <%= @stats.last_deg %>° <%= if @stats.last_descr && @stats.last_descr != "" do %> <%= @stats.last_descr %> <% end %> - <%= LSGWeb.LayoutView.format_time(@stats.last_at) %> + <%= NolaWeb.LayoutView.format_time(@stats.last_at) %>

<% end %>

Historique

<%= for {%{at: date, cl: cl, deg: deg, description: comment}, index} <- Enum.with_index(@history) do %> <% class = if(Integer.is_even(index), do: "bg-gray-50", else: "bg-white") %> <% end %>
date    
- <%= LSGWeb.LayoutView.format_time(date, false) %> + <%= NolaWeb.LayoutView.format_time(date, false) %> <%= cl %>cl <%= deg %>° <%= comment||"" %>
diff --git a/lib/lsg_web/templates/irc/index.html.eex b/lib/lsg_web/templates/irc/index.html.eex index 6cc3128..182624d 100644 --- a/lib/lsg_web/templates/irc/index.html.eex +++ b/lib/lsg_web/templates/irc/index.html.eex @@ -1,44 +1,44 @@ <%= if @members != [] do %> <% end %>
<%= for {identifier, help} <- @commands do %> <%= if help do %>
-
<%= LSGWeb.LayoutView.liquid_markdown(@conn, help) %>
+
<%= NolaWeb.LayoutView.liquid_markdown(@conn, help) %>
<% end %> <% end %>



Légende:
entre < >: argument obligatoire,
entre [ ]: argument optionel; [1 | ]: argument optionel avec valeur par défaut.




- running beautte version <%= LSG.version() %> — git + running beautte version <%= Nola.version() %> — git

diff --git a/lib/lsg_web/templates/irc/txts.html.eex b/lib/lsg_web/templates/irc/txts.html.eex index 68d35f5..aff0c5d 100644 --- a/lib/lsg_web/templates/irc/txts.html.eex +++ b/lib/lsg_web/templates/irc/txts.html.eex @@ -1,49 +1,49 @@

<%= @lines %> lignes dans <%= @files %> fichiers Aide Fichiers système

-
<%= LSGWeb.LayoutView.liquid_markdown(@conn, @doc) %>
+
<%= NolaWeb.LayoutView.liquid_markdown(@conn, @doc) %>

Fichiers système

diff --git a/lib/lsg_web/templates/layout/app.html.eex b/lib/lsg_web/templates/layout/app.html.eex index b918ca5..956793f 100644 --- a/lib/lsg_web/templates/layout/app.html.eex +++ b/lib/lsg_web/templates/layout/app.html.eex @@ -1,126 +1,126 @@

<%= if n = @conn.assigns[:network] do %><%= n %> › <% end %> - <%= if c = @conn.assigns[:chan] do %><%= c %> › <% end %> + <%= if c = @conn.assigns[:chan] do %><%= c %> › <% end %> <%= for({name, href} <- Enum.uniq(@conn.assigns[:breadcrumbs]||[]), do: [link(name, to: href), raw(" › ")]) %> <%= @conn.assigns[:title] %>

<%= @inner_content %>
diff --git a/lib/lsg_web/templates/page/user.html.eex b/lib/lsg_web/templates/page/user.html.eex index 6eeb39d..de9f718 100644 --- a/lib/lsg_web/templates/page/user.html.eex +++ b/lib/lsg_web/templates/page/user.html.eex @@ -1,43 +1,43 @@

channels

connections

account

irc auths: