[WIP] add settings sidebar entry and placeholder page

This commit is contained in:
Kieran Eglin 2024-04-04 14:34:03 -07:00
parent 24875eaeac
commit 24b3bfb038
No known key found for this signature in database
GPG key ID: 193984967FCF432D
5 changed files with 29 additions and 6 deletions

View file

@ -24,6 +24,7 @@
<.sidebar_item icon="hero-home" text="Home" href={~p"/"} />
<.sidebar_item icon="hero-tv" text="Sources" href={~p"/sources"} />
<.sidebar_item icon="hero-adjustments-vertical" text="Media Profiles" href={~p"/media_profiles"} />
<.sidebar_item icon="hero-cog-6-tooth" text="Settings" href={~p"/settings"} />
</ul>
</div>
</nav>
@ -38,12 +39,7 @@
target="_blank"
href="https://github.com/kieraneglin/pinchflat/wiki"
/>
<.sidebar_item
icon="hero-code-bracket"
text="Github"
target="_blank"
href="https://github.com/kieraneglin/pinchflat"
/>
<.sidebar_item icon="hero-cog" text="Github" target="_blank" href="https://github.com/kieraneglin/pinchflat" />
<li>
<span
class={[

View file

@ -0,0 +1,11 @@
defmodule PinchflatWeb.Settings.SettingController do
use PinchflatWeb, :controller
import Ecto.Query, warn: false
alias Pinchflat.Repo
def edit(conn, _params) do
render(conn, "edit.html")
end
end

View file

@ -0,0 +1,13 @@
defmodule PinchflatWeb.Settings.SettingHTML do
use PinchflatWeb, :html
embed_templates "setting_html/*"
# @doc """
# Renders a setting form.
# """
# attr :changeset, Ecto.Changeset, required: true
# attr :action, :string, required: true
# def setting_form(assigns)
end

View file

@ -0,0 +1 @@
<h1>TEST</h1>

View file

@ -27,6 +27,8 @@ defmodule PinchflatWeb.Router do
pipe_through :browser
get "/", Pages.PageController, :home
get "/settings", Settings.SettingController, :edit
resources "/settings", Settings.SettingController, only: [:update], singleton: true
resources "/media_profiles", MediaProfiles.MediaProfileController
resources "/search", Searches.SearchController, only: [:show], singleton: true