-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ux/views: factored the {dead} screen out of {stop}
- Loading branch information
Showing
4 changed files
with
61 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// -*- web -*- | ||
// | ||
// michael a.g. aïvázis <michael.aivazis@para-sim.com> | ||
// (c) 1998-2023 all rights reserved | ||
|
||
|
||
// externals | ||
import React from 'react' | ||
// locals | ||
import styles from './styles' | ||
|
||
|
||
// show the dead screen | ||
export const Dead = () => { | ||
// render | ||
return ( | ||
<section style={styles.stop}> | ||
<div style={styles.placeholder}> | ||
<a href="/" style={styles.link}>qed</a> | ||
{" "} | ||
has shut down; please close this window | ||
</div> | ||
</section> | ||
) | ||
} | ||
|
||
|
||
// end of file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// -*- web -*- | ||
// | ||
// michael a.g. aïvázis <michael.aivazis@para-sim.com> | ||
// (c) 1998-2023 all rights reserved | ||
|
||
|
||
// externals | ||
import React from 'react' | ||
|
||
// locals | ||
// components | ||
import { Dead } from './dead' | ||
|
||
|
||
// kill the server | ||
export const Stop = () => { | ||
// ask the server to shut down | ||
fetch('stop').catch( | ||
// and swallow any errors | ||
() => null | ||
) | ||
// render the dead screen | ||
return ( | ||
<Dead /> | ||
) | ||
} | ||
|
||
|
||
// end of file |