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