Files
standardnotes-app-web/app/assets/javascripts/components/ComponentView/OfflineRestricted.tsx
Vardan Hakobyan b898e886a5 feat: remove broadcasting Extensions Manager events from ComponentView (#703)
* feat: remove `broadcast` from `ComponentView`

As "Extensions Manager" is removed, the related events' broadcasting is not needed anymore

* fix: restore `manualDealloc`
2021-10-25 17:08:37 +04:00

59 lines
2.0 KiB
TypeScript

import { FunctionalComponent } from 'preact';
interface IProps {
isReloading: boolean;
reloadStatus: () => void;
}
export const OfflineRestricted: FunctionalComponent<IProps> = ({
isReloading,
reloadStatus
}) => {
return (
<div className={'sn-component'}>
<div className={'sk-panel static'}>
<div className={'sk-panel-content'}>
<div className={'sk-panel-section stretch'}>
<div className={'sk-panel-column'} />
<div className={'sk-h1 sk-bold'}>
You have restricted this extension to be used offline only.
</div>
<div className={'sk-subtitle'}>
Offline extensions are not available in the Web app.
</div>
<div className={'sk-panel-row'} />
<div className={'sk-panel-row'}>
<div className={'sk-panel-column'}>
<div className={'sk-p'}>
You can either:
</div>
<ul>
<li className={'sk-p'}>
<span className={'font-bold'}>
Enable the Hosted option for this extension by opening the 'Extensions' menu and{' '}
toggling 'Use hosted when local is unavailable' under this extension's options.{' '}
Then press Reload below.
</span>
</li>
<li className={'sk-p'}>
<span className={'font-bold'}>Use the Desktop application.</span>
</li>
</ul>
</div>
</div>
<div className={'sk-panel-row'}>
{isReloading ?
<div className={'sk-spinner info small'} />
:
<button className={'sn-button small info'} onClick={() => reloadStatus()}>
Reload
</button>
}
</div>
</div>
</div>
</div>
</div>
);
};