File tree Expand file tree Collapse file tree 4 files changed +25
-7
lines changed
Expand file tree Collapse file tree 4 files changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { loadAll } from "./lib/settings";
55
66import Charter from "./hooks/charter" ;
77import Completer from "./hooks/completer" ;
8+ import HistoryBack from "./hooks/history_back" ;
89import Instantiator from "./hooks/instantiator" ;
910import Refresher from "./hooks/refresher" ;
1011import Relativize from "./hooks/relativize" ;
@@ -15,6 +16,7 @@ import Tippy from "./hooks/tippy";
1516const hooks = {
1617 Charter,
1718 Completer,
19+ HistoryBack,
1820 Instantiator,
1921 Refresher,
2022 Relativize,
Original file line number Diff line number Diff line change 1+ const HistoryBack = {
2+ mounted ( ) {
3+ this . el . addEventListener ( "click" , ( event ) => {
4+ event . preventDefault ( ) ;
5+
6+ window . history . back ( ) ;
7+ } ) ;
8+ } ,
9+ } ;
10+
11+ export default HistoryBack ;
Original file line number Diff line number Diff line change @@ -9,16 +9,16 @@ defmodule Oban.Web.Jobs.DetailComponent do
99 ~H"""
1010 < div id = "job-details " >
1111 < div class = "flex justify-between items-center px-3 py-4 border-b border-gray-200 dark:border-gray-700 " >
12- < . link
13- patch = { oban_path ( :jobs , @ params ) }
12+ < button
1413 id = "back-link "
15- class = "flex items-center hover:text-blue-500 "
14+ class = "flex items-center hover:text-blue-500 cursor-pointer bg-transparent border-0 p-0 "
1615 data-title = "Back to jobs "
17- phx-hook = "Tippy "
16+ phx-hook = "HistoryBack "
17+ type = "button "
1818 >
1919 < Icons . arrow_left class = "w-5 h-5 " />
2020 < span class = "text-lg font-bold ml-2 " > Job Details</ span >
21- </ . link >
21+ </ button >
2222
2323 < div class = "flex " >
2424 <%= if can? ( :cancel_jobs , @ access ) and cancelable? ( @ job ) do %>
Original file line number Diff line number Diff line change @@ -61,10 +61,15 @@ defmodule Oban.Web.Queues.DetailComponent do
6161 ~H"""
6262 < div id = "queue-details " >
6363 < div class = "flex justify-between items-center px-3 py-6 " >
64- < . link patch = { oban_path ( :queues ) } id = "back-link " class = "flex items-center hover:text-blue-500 " >
64+ < button
65+ id = "back-link "
66+ class = "flex items-center hover:text-blue-500 cursor-pointer bg-transparent border-0 p-0 "
67+ phx-hook = "HistoryBack "
68+ type = "button "
69+ >
6570 < Icons . arrow_left class = "w-5 h-5 " />
6671 < span class = "text-lg capitalize font-bold ml-2 " > { @ queue } Queue</ span >
67- </ . link >
72+ </ button >
6873 </ div >
6974
7075 < table class = "table-fixed w-full bg-blue-50 dark:bg-blue-300 dark:bg-opacity-25 " >
You can’t perform that action at this time.
0 commit comments