mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-25 07:52:59 +03:00
tile: handle hung chads better
This commit is contained in:
parent
d02d25bfa3
commit
e8d6e28ae8
@ -160,6 +160,10 @@ export const mockCharges: Charges = _.reduce(
|
||||
return acc;
|
||||
}
|
||||
|
||||
if (desk === 'calls') {
|
||||
return { ...acc, [desk]: { ...val, chad: { hung: 'glob failed' } } };
|
||||
}
|
||||
|
||||
return { ...acc, [desk]: { ...val, chad } };
|
||||
},
|
||||
{} as Charges
|
||||
|
@ -22,6 +22,7 @@ export const Tile: FunctionComponent<TileProps> = ({ charge, desk }) => {
|
||||
const { lightText, tileColor, menuColor, suspendColor, suspendMenuColor } = useTileColor(color);
|
||||
const loading = 'install' in chad;
|
||||
const suspended = 'suspend' in chad;
|
||||
const hung = 'hung' in chad;
|
||||
const active = chadIsRunning(chad);
|
||||
const link = getAppHref(href);
|
||||
const backgroundColor = active ? tileColor || 'purple' : suspendColor;
|
||||
@ -64,7 +65,11 @@ export const Tile: FunctionComponent<TileProps> = ({ charge, desk }) => {
|
||||
>
|
||||
<h3 className="mix-blend-hard-light">{title}</h3>
|
||||
{!active && (
|
||||
<span className="text-gray-400">{suspended ? 'Suspended' : 'Installing'}</span>
|
||||
<span className={hung ? 'text-orange-500' : 'text-gray-400'}>
|
||||
{suspended && 'Suspended'}
|
||||
{loading && 'Installing'}
|
||||
{hung && 'Errored'}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
{image && !loading && (
|
||||
|
Loading…
Reference in New Issue
Block a user