ash_admin icon indicating copy to clipboard operation
ash_admin copied to clipboard

Allow Adding high level links

Open pshoukry opened this issue 1 year ago • 5 comments

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 avatar May 01 '24 19:05 pshoukry

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

pshoukry avatar May 02 '24 08:05 pshoukry

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.

zachdaniel avatar May 02 '24 13:05 zachdaniel

@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

pshoukry avatar May 02 '24 13:05 pshoukry

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

zachdaniel avatar May 02 '24 13:05 zachdaniel

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 ;)

pshoukry avatar May 02 '24 13:05 pshoukry