File tree Expand file tree Collapse file tree 3 files changed +29
-4
lines changed
packages/app/src/components Expand file tree Collapse file tree 3 files changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -665,7 +665,10 @@ export default function AppNav({ fixed = false }: { fixed?: boolean }) {
665665 { ! isCollapsed && (
666666 < Text size = "xs" px = "lg" py = "xs" fw = "lighter" fs = "italic" >
667667 Dashboards have moved! Try the{ ' ' }
668- < Link href = "/dashboards" > Dashboards page</ Link > .
668+ < Anchor component = { Link } href = "/dashboards" >
669+ Dashboards page
670+ </ Anchor >
671+ .
669672 </ Text >
670673 ) }
671674
Original file line number Diff line number Diff line change @@ -11,10 +11,23 @@ export function DashboardListRow({
1111 dashboard : Dashboard ;
1212 onDelete : ( id : string ) => void ;
1313} ) {
14+ const href = `/dashboards/${ dashboard . id } ` ;
15+
1416 return (
1517 < Table . Tr
1618 style = { { cursor : 'pointer' } }
17- onClick = { ( ) => Router . push ( `/dashboards/${ dashboard . id } ` ) }
19+ onClick = { e => {
20+ if ( e . metaKey || e . ctrlKey ) {
21+ window . open ( href , '_blank' ) ;
22+ } else {
23+ Router . push ( href ) ;
24+ }
25+ } }
26+ onAuxClick = { e => {
27+ if ( e . button === 1 ) {
28+ window . open ( href , '_blank' ) ;
29+ }
30+ } }
1831 >
1932 < Table . Td >
2033 < Text fw = { 500 } size = "sm" >
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import { useQueryState } from 'nuqs';
66import {
77 ActionIcon ,
88 Button ,
9- Card ,
109 Container ,
1110 Flex ,
1211 Group ,
@@ -66,7 +65,7 @@ const PRESET_DASHBOARDS = [
6665
6766export default function DashboardsListPage ( ) {
6867 const brandName = useBrandDisplayName ( ) ;
69- const { data : dashboards , isLoading } = useDashboards ( ) ;
68+ const { data : dashboards , isLoading, isError } = useDashboards ( ) ;
7069 const confirm = useConfirm ( ) ;
7170 const createDashboard = useCreateDashboard ( ) ;
7271 const deleteDashboard = useDeleteDashboard ( ) ;
@@ -108,6 +107,12 @@ export default function DashboardsListPage() {
108107 onSuccess : data => {
109108 Router . push ( `/dashboards/${ data . id } ` ) ;
110109 } ,
110+ onError : ( ) => {
111+ notifications . show ( {
112+ message : 'Failed to create dashboard' ,
113+ color : 'red' ,
114+ } ) ;
115+ } ,
111116 } ,
112117 ) ;
113118 } , [ createDashboard ] ) ;
@@ -223,6 +228,10 @@ export default function DashboardsListPage() {
223228 < Text size = "sm" c = "dimmed" ta = "center" py = "xl" >
224229 Loading dashboards...
225230 </ Text >
231+ ) : isError ? (
232+ < Text size = "sm" c = "red" ta = "center" py = "xl" >
233+ Failed to load dashboards. Please try refreshing the page.
234+ </ Text >
226235 ) : filteredDashboards . length === 0 ? (
227236 < Stack align = "center" gap = "sm" py = "xl" >
228237 < IconLayoutGrid size = { 40 } opacity = { 0.3 } />
You can’t perform that action at this time.
0 commit comments