diff --git a/assets/js/app.js b/assets/js/app.js index 3be1c37b..5eaaf1d1 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -168,7 +168,7 @@ Hooks.StoreRecentBrainstorming = { recentBrainstormings[brainstormingId] = { id: brainstormingId, - admin_url_id: this.el.dataset.adminUrlId, + admin_url_id: this.el.dataset.adminUrlId || recentBrainstormings?.brainstormingId?.admin_url_id, name: this.el.dataset.name, last_accessed_at: this.el.dataset.lastAccessedAt } diff --git a/lib/mindwendel_web/components/layouts.ex b/lib/mindwendel_web/components/layouts.ex index f49e777e..7539a80e 100644 --- a/lib/mindwendel_web/components/layouts.ex +++ b/lib/mindwendel_web/components/layouts.ex @@ -18,6 +18,11 @@ defmodule MindwendelWeb.Layouts do Brainstormings.list_brainstormings_for(user.id, limit) end + def brainstorming_url(id, admin_url_id) do + admin_url_id = admin_url_id || "" + ~p"/brainstormings/#{id}/##{admin_url_id}" + end + def admin_view(current_view) do current_view == MindwendelWeb.Admin.BrainstormingLive.Edit end diff --git a/lib/mindwendel_web/templates/layout/app.html.heex b/lib/mindwendel_web/templates/layout/app.html.heex index d4128ec8..24e05dc9 100644 --- a/lib/mindwendel_web/templates/layout/app.html.heex +++ b/lib/mindwendel_web/templates/layout/app.html.heex @@ -47,11 +47,14 @@ {gettext("Your brainstormings")}