ash-project / ash_admin

A super-admin UI dashboard for Ash Framework applications, built with Phoenix LiveView.
https://hexdocs.pm/ash_admin
MIT License
106 stars 48 forks source link

Allow Adding high level links #136

Open pshoukry opened 7 months ago

pshoukry commented 7 months ago

Is your feature request related to a problem? Please describe. It is currently not possible to add a link in the app for example to logout the admin user.

Describe the solution you'd like Add a configuration that would allow dynamically adding links top most level again example ( sign out, settings, etc)

Describe alternatives you've considered A way to override the default template ?

Express the feature either with a change to resource syntax, or with a change to the resource interface

For example

  admin do
    links do
       link :settings, "/settings"
    end
  end
pshoukry commented 7 months ago

On Second thoughts, I think there should be a specifc AshAdmin module with those configurations.

zachdaniel commented 7 months ago

Yeah, so in the long run we need to create something like this:

defmodule MyApp.AdminUI do
  use AshAdmin.UI

  ...
end

Which we could put custom links in at that point. We would also use that to then explicitly configure the domains and resources. You could then have multiple admin UIs w/ different configurations.

pshoukry commented 7 months ago

@zachdaniel I am learning a bit of spark and will try to tackle this one along with file uploads in ash admin ;) .. hopefully will have a couple of PRs soon

zachdaniel commented 7 months ago

That sounds great! I put it on the roadmap for "someday", but would be very happy to see it done much earlier <3

pshoukry commented 7 months ago

one of my clients need it ... can't think of a better reason to make it happen now .. will give it a shot .. if it wasn't for that it would have been at the top of my someday too as it looks like a good first ticket for me to try .. will check spark .. make an attempt and see your feedback .. I am sure I will learn something getting it working if i can ;)