diff --git a/frontend/src/components/DeckyErrorBoundary.tsx b/frontend/src/components/DeckyErrorBoundary.tsx index 7a8d2b31..3568de00 100644 --- a/frontend/src/components/DeckyErrorBoundary.tsx +++ b/frontend/src/components/DeckyErrorBoundary.tsx @@ -1,4 +1,4 @@ -import { sleep } from '@decky/ui'; +import { joinClassNames, sleep } from '@decky/ui'; import { FunctionComponent, useEffect, useReducer, useState } from 'react'; import { uninstallPlugin } from '../plugin'; @@ -20,6 +20,26 @@ declare global { } } +const classes = { + root: 'deckyErrorBoundary', + likelyOccurred: 'likely-occured-msg', + panel: 'panel-section', + panelHeader: 'panel-header', + trace: 'trace', + rowList: 'row-list', + rowItem: 'row-item', + buttonDescRow: 'button-description-row', + flexRowWGap: 'flex-row', + marginBottom: 'margin-bottom', + swipePrompt: 'swipe-prompt', +}; + +const vars = { + scrollBarwidth: '18px', + rootMarginLeft: '15px', + panelXPadding: '20px', +}; + export const startSSH = DeckyBackend.callable('utilities/start_ssh'); export const starrCEFForwarding = DeckyBackend.callable('utilities/allow_remote_debugging'); @@ -64,39 +84,132 @@ const DeckyErrorBoundary: FunctionComponent = ({ error, <> -
-

- ⚠️ An error occured while rendering this content. -

-
+      
+
+ An error occurred while rendering this content. +
+
           
             {identifier && `Error Reference: ${identifier}`}
             {versionInfo?.current && `\nDecky Version: ${versionInfo.current}`}
           
         
-

This error likely occured in {errorSource}.

+
+ This error likely occurred in {errorSource}. +
{actionLog?.length > 0 && (
             
@@ -106,172 +219,202 @@ const DeckyErrorBoundary: FunctionComponent = ({ error,
           
)} {actionsEnabled && ( - <> -

Actions:

-

Use the touch screen.

-
- - -
-
- - +
+
+
Actions
+
+ Use the touch screen. Solutions are listed in the recommended order. If you are still experiencing issues, please post in the #loader-support channel at decky.xyz/discord. +
- {debugAllowed && ( -
- +
+
+ Retry the action or restart +
+ + + +
- )} - { -
- {updateProgress > -1 - ? 'Update in progress... ' + updateProgress + '%' - : updateProgress == -2 - ? 'Update complete. Restarting...' - : 'Changing your Decky Loader branch and/or \n checking for updates might help!\n'} - {updateProgress == -1 && ( -
- + {wasCausedByPlugin && ( +
+ Disable or uninstall the suspected plugin +
+ {/**temp placeholder for plugin disable functionality*/} + {/* */}
- )} -
- } - {wasCausedByPlugin && ( -
- {'\n'} +
+ )} + {/**temp placeholder for plugin disable functionality*/} + {/*
+ Disable all plugins and restart Decky + +
*/} + { +
+ {updateProgress > -1 + ? 'Update in progress... ' + updateProgress + '%' + : updateProgress == -2 + ? 'Update complete. Restarting...' + : 'Check for Decky updates'} + { +
+ {updateProgress == -1 && ( + <> + + + + )} +
+ } +
+ } +
+ Disable Decky until next boot
- )} - + {debugAllowed && ( +
+ Enable remote debugging and SSH until next boot (for developers) + +
+ )} +
+
)} - -
-          
-            {error.error.stack}
-            {'\n\n'}
-            Component Stack:
-            {error.info.componentStack}
-          
-        
+ {actionsEnabled && ( +
+ + Swipe to scroll + +
+ )} +
+
Trace
+
+            
+              {error.error.stack}
+              {'\n\n'}
+              Component Stack:
+              {error.info.componentStack}
+            
+          
+
);