-
Notifications
You must be signed in to change notification settings - Fork 1
/
items.ex
53 lines (51 loc) · 1.62 KB
/
items.ex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
defmodule Self.Menu.Items do
@behaviour CoreWeb.Menu.ItemsProvider
use CoreWeb, :verified_routes
import CoreWeb.Gettext
@impl true
def values() do
%{
self: %{action: %{type: :http_get, to: ~p"/"}, title: "Self"},
admin: %{
action: %{type: :redirect, to: ~p"/admin/config"},
title: dgettext("eyra-ui", "menu.item.admin")
},
helpdesk: %{
action: %{type: :redirect, to: ~p"/support/helpdesk"},
title: dgettext("eyra-ui", "menu.item.helpdesk")
},
support: %{
action: %{type: :redirect, to: ~p"/support/ticket"},
title: dgettext("eyra-ui", "menu.item.support")
},
desktop: %{
action: %{type: :redirect, to: ~p"/desktop"},
title: dgettext("eyra-ui", "menu.item.desktop")
},
todo: %{
action: %{type: :redirect, to: ~p"/todo"},
title: dgettext("eyra-ui", "menu.item.todo")
},
profile: %{
action: %{type: :redirect, to: ~p"/user/profile"},
title: dgettext("eyra-ui", "menu.item.profile")
},
signout: %{
action: %{type: :http_delete, to: ~p"/user/session"},
title: dgettext("eyra-ui", "menu.item.signout")
},
signin: %{
action: %{type: :http_get, to: ~p"/user/signin"},
title: dgettext("eyra-ui", "menu.item.signin")
},
menu: %{
action: %{type: :click, code: "mobile_menu = !mobile_menu"},
title: dgettext("eyra-ui", "menu.item.menu")
},
projects: %{
action: %{type: :redirect, to: ~p"/project"},
title: dgettext("eyra-ui", "menu.item.projects")
}
}
end
end