Merge branch 'release/3.9.6'
This commit is contained in:
@@ -11,12 +11,15 @@ export const UrlMissing: FunctionalComponent<IProps> = ({ componentName }) => {
|
||||
<div className={'sk-panel-content'}>
|
||||
<div className={'sk-panel-section stretch'}>
|
||||
<div className={'sk-panel-section-title'}>
|
||||
This extension is not installed correctly.
|
||||
This extension is missing its URL property.
|
||||
</div>
|
||||
<p>Please uninstall {componentName}, then re-install it.</p>
|
||||
<p>
|
||||
This issue can occur if you access Standard Notes using an older version of the app.{' '}
|
||||
Ensure you are running at least version 2.1 on all platforms.
|
||||
In order to access your note immediately,
|
||||
please switch from {componentName} to the Plain Editor.
|
||||
</p>
|
||||
<br/>
|
||||
<p>
|
||||
Please contact help@standardnotes.com to remedy this issue.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -189,6 +189,7 @@ export const ComponentView: FunctionalComponent<IProps> = observer(
|
||||
}, [component, handleIframeLoadTimeout, loadTimeout]);
|
||||
|
||||
useEffect(() => {
|
||||
reloadStatus();
|
||||
if (!iframeRef.current) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ContentType, SNComponent } from '@standardnotes/snjs';
|
||||
import { ButtonType, ContentType, SNComponent } from '@standardnotes/snjs';
|
||||
import { Button } from '@/components/Button';
|
||||
import { DecoratedInput } from '@/components/DecoratedInput';
|
||||
import { WebApplication } from '@/ui_models/application';
|
||||
@@ -35,8 +35,22 @@ export const Extensions: FunctionComponent<{
|
||||
}, [confirmableExtension, confirmableEnd]);
|
||||
|
||||
const uninstallExtension = async (extension: SNComponent) => {
|
||||
await application.deleteItem(extension);
|
||||
setExtensions(loadExtensions(application));
|
||||
application.alertService.confirm(
|
||||
'Are you sure you want to uninstall this extension? Note that extensions managed by your subscription will automatically be re-installed on application restart.',
|
||||
'Uninstall Extension?',
|
||||
'Uninstall',
|
||||
ButtonType.Danger,
|
||||
'Cancel'
|
||||
)
|
||||
.then(async (shouldRemove: boolean) => {
|
||||
if (shouldRemove) {
|
||||
await application.deleteItem(extension);
|
||||
setExtensions(loadExtensions(application));
|
||||
}
|
||||
})
|
||||
.catch((err: string) => {
|
||||
application.alertService.alert(err);
|
||||
});
|
||||
};
|
||||
|
||||
const submitExtensionUrl = async (url: string) => {
|
||||
@@ -72,50 +86,51 @@ export const Extensions: FunctionComponent<{
|
||||
return (
|
||||
<div>
|
||||
{visibleExtensions.length > 0 &&
|
||||
<div>
|
||||
{
|
||||
visibleExtensions
|
||||
.sort((e1, e2) => e1.name.toLowerCase().localeCompare(e2.name.toLowerCase()))
|
||||
.map((extension, i) => (
|
||||
<ExtensionItem
|
||||
application={application}
|
||||
extension={extension}
|
||||
latestVersion={extensionsLatestVersions.getVersion(extension)}
|
||||
first={i === 0}
|
||||
uninstall={uninstallExtension}
|
||||
toggleActivate={toggleActivateExtension} />
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div>
|
||||
{
|
||||
visibleExtensions
|
||||
.sort((e1, e2) => e1.name.toLowerCase().localeCompare(e2.name.toLowerCase()))
|
||||
.map((extension, i) => (
|
||||
<ExtensionItem
|
||||
key={extension.uuid}
|
||||
application={application}
|
||||
extension={extension}
|
||||
latestVersion={extensionsLatestVersions.getVersion(extension)}
|
||||
first={i === 0}
|
||||
uninstall={uninstallExtension}
|
||||
toggleActivate={toggleActivateExtension} />
|
||||
))
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
<div>
|
||||
{!confirmableExtension &&
|
||||
<PreferencesSegment>
|
||||
<Title>Install Custom Extension</Title>
|
||||
<div className="min-h-2" />
|
||||
<DecoratedInput
|
||||
placeholder={'Enter Extension URL'}
|
||||
text={customUrl}
|
||||
onChange={(value) => { setCustomUrl(value); }}
|
||||
/>
|
||||
<div className="min-h-2" />
|
||||
<Button
|
||||
className="min-w-20"
|
||||
type="normal"
|
||||
label="Install"
|
||||
onClick={() => submitExtensionUrl(customUrl)}
|
||||
/>
|
||||
</PreferencesSegment>
|
||||
<PreferencesSegment>
|
||||
<Title>Install Custom Extension</Title>
|
||||
<div className="min-h-2" />
|
||||
<DecoratedInput
|
||||
placeholder={'Enter Extension URL'}
|
||||
text={customUrl}
|
||||
onChange={(value) => { setCustomUrl(value); }}
|
||||
/>
|
||||
<div className="min-h-2" />
|
||||
<Button
|
||||
className="min-w-20"
|
||||
type="normal"
|
||||
label="Install"
|
||||
onClick={() => submitExtensionUrl(customUrl)}
|
||||
/>
|
||||
</PreferencesSegment>
|
||||
}
|
||||
{confirmableExtension &&
|
||||
<PreferencesSegment>
|
||||
<ConfirmCustomExtension
|
||||
component={confirmableExtension}
|
||||
callback={handleConfirmExtensionSubmit}
|
||||
/>
|
||||
<div ref={confirmableEnd} />
|
||||
</PreferencesSegment>
|
||||
<PreferencesSegment>
|
||||
<ConfirmCustomExtension
|
||||
component={confirmableExtension}
|
||||
callback={handleConfirmExtensionSubmit}
|
||||
/>
|
||||
<div ref={confirmableEnd} />
|
||||
</PreferencesSegment>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -101,7 +101,6 @@ export const ExtensionItem: FunctionComponent<ExtensionItemProps> =
|
||||
};
|
||||
|
||||
const localInstallable = extension.package_info.download_url;
|
||||
const isExternal = !extension.package_info.identifier.startsWith('org.standardnotes.');
|
||||
const installedVersion = extension.package_info.version;
|
||||
const isToggleable = [ComponentArea.EditorStack, ComponentArea.TagsList].includes(extension.area);
|
||||
|
||||
@@ -120,24 +119,22 @@ export const ExtensionItem: FunctionComponent<ExtensionItemProps> =
|
||||
{localInstallable && <AutoUpdateLocal autoupdateDisabled={autoupdateDisabled} toggleAutoupdate={toggleAutoupdate} />}
|
||||
{localInstallable && <UseHosted offlineOnly={offlineOnly} toggleOfllineOnly={toggleOffllineOnly} />}
|
||||
|
||||
{(isToggleable || isExternal) &&
|
||||
<>
|
||||
<div className="min-h-2" />
|
||||
<div className="flex flex-row">
|
||||
{isToggleable && (
|
||||
<>
|
||||
{(extension.active ? (
|
||||
<Button className="min-w-20" type="normal" label="Deactivate" onClick={() => toggleActivate!(extension)} />
|
||||
) : (
|
||||
<Button className="min-w-20" type="normal" label="Activate" onClick={() => toggleActivate!(extension)} />
|
||||
))}
|
||||
<div className="min-w-3" />
|
||||
</>
|
||||
)}
|
||||
{isExternal && <Button className="min-w-20" type="normal" label="Uninstall" onClick={() => uninstall(extension)} />}
|
||||
</div>
|
||||
</>
|
||||
}
|
||||
<>
|
||||
<div className="min-h-2" />
|
||||
<div className="flex flex-row">
|
||||
{isToggleable && (
|
||||
<>
|
||||
{(extension.active ? (
|
||||
<Button className="min-w-20" type="normal" label="Deactivate" onClick={() => toggleActivate!(extension)} />
|
||||
) : (
|
||||
<Button className="min-w-20" type="normal" label="Activate" onClick={() => toggleActivate!(extension)} />
|
||||
))}
|
||||
<div className="min-w-3" />
|
||||
</>
|
||||
)}
|
||||
<Button className="min-w-20" type="normal" label="Uninstall" onClick={() => uninstall(extension)} />
|
||||
</div>
|
||||
</>
|
||||
</PreferencesSegment >
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "standard-notes-web",
|
||||
"version": "3.9.3",
|
||||
"version": "3.9.4",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -72,7 +72,7 @@
|
||||
"@reach/listbox": "^0.16.2",
|
||||
"@standardnotes/features": "1.8.1",
|
||||
"@standardnotes/sncrypto-web": "1.5.3",
|
||||
"@standardnotes/snjs": "2.17.7",
|
||||
"@standardnotes/snjs": "2.17.9",
|
||||
"mobx": "^6.3.5",
|
||||
"mobx-react-lite": "^3.2.1",
|
||||
"preact": "^10.5.15",
|
||||
|
||||
@@ -2199,10 +2199,10 @@
|
||||
buffer "^6.0.3"
|
||||
libsodium-wrappers "^0.7.9"
|
||||
|
||||
"@standardnotes/snjs@2.17.7":
|
||||
version "2.17.7"
|
||||
resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.17.7.tgz#10f56e46d6a992e84da94fb7b9ec8dfc8a9a8da3"
|
||||
integrity sha512-7BxEywqhIfYHfkKDlS466vMeWPznXwXrQVj21eKG4ibiAyYhuTXRUYhnCwZKdloNm9Wl0iChJXuiWfev2+tGqg==
|
||||
"@standardnotes/snjs@2.17.9":
|
||||
version "2.17.9"
|
||||
resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.17.9.tgz#9e7402252c6acda6471cc9d887516f17b6bd2cb2"
|
||||
integrity sha512-Hi57vIByRD5qEOFfQrq/qILH5qRgngyn57qhHE2yKDsX//CTDsdqKGKVZbG0W54rQ+JxYUfjAuBPR/pxIVTi6w==
|
||||
dependencies:
|
||||
"@standardnotes/auth" "^3.8.1"
|
||||
"@standardnotes/common" "^1.2.1"
|
||||
|
||||
Reference in New Issue
Block a user