UnexpectedError: adjust visual, add selectable
This commit is contained in:
		
							parent
							
								
									147c9fbce1
								
							
						
					
					
						commit
						df5a976ec3
					
				
					 1 changed files with 32 additions and 3 deletions
				
			
		| 
						 | 
					@ -42,6 +42,29 @@ const UnexpectedError: Component<{ error?: any }> = (props) => {
 | 
				
			||||||
        calc(var(--safe-area-inset-bottom) + 20px)
 | 
					        calc(var(--safe-area-inset-bottom) + 20px)
 | 
				
			||||||
        calc(var(--safe-area-inset-left) + 20px);
 | 
					        calc(var(--safe-area-inset-left) + 20px);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    details {
 | 
				
			||||||
 | 
					      max-width: 100vw;
 | 
				
			||||||
 | 
					      max-width: 100dvw;
 | 
				
			||||||
 | 
					      overflow: auto;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      & * {
 | 
				
			||||||
 | 
					        user-select: all;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      summary {
 | 
				
			||||||
 | 
					        position: sticky;
 | 
				
			||||||
 | 
					        left: 0;
 | 
				
			||||||
 | 
					        top: 0;
 | 
				
			||||||
 | 
					        user-select: none;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    .actions {
 | 
				
			||||||
 | 
					      margin-top: 20px;
 | 
				
			||||||
 | 
					      margin-bottom: 20px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  `;
 | 
					  `;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
| 
						 | 
					@ -52,8 +75,11 @@ const UnexpectedError: Component<{ error?: any }> = (props) => {
 | 
				
			||||||
        You can restart the app to see if this guy is gone. If you meet this guy
 | 
					        You can restart the app to see if this guy is gone. If you meet this guy
 | 
				
			||||||
        repeatly, please report to us.
 | 
					        repeatly, please report to us.
 | 
				
			||||||
      </p>
 | 
					      </p>
 | 
				
			||||||
      <div>
 | 
					      <div class="actions">
 | 
				
			||||||
        <Button onClick={() => (window.location.replace("/"))}>
 | 
					        <Button
 | 
				
			||||||
 | 
					          onClick={() => window.location.replace("/")}
 | 
				
			||||||
 | 
					          variant="contained"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
          Restart App
 | 
					          Restart App
 | 
				
			||||||
        </Button>
 | 
					        </Button>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
| 
						 | 
					@ -61,7 +87,10 @@ const UnexpectedError: Component<{ error?: any }> = (props) => {
 | 
				
			||||||
        <summary>
 | 
					        <summary>
 | 
				
			||||||
          {errorMsg.loading ? "Generating " : " "}Technical Infomation
 | 
					          {errorMsg.loading ? "Generating " : " "}Technical Infomation
 | 
				
			||||||
        </summary>
 | 
					        </summary>
 | 
				
			||||||
        <pre>{errorMsg()}</pre>
 | 
					        <pre>
 | 
				
			||||||
 | 
					          On: {window.location.href} <br />
 | 
				
			||||||
 | 
					          {errorMsg()}
 | 
				
			||||||
 | 
					        </pre>
 | 
				
			||||||
      </details>
 | 
					      </details>
 | 
				
			||||||
    </main>
 | 
					    </main>
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue