refactor: application dependency management (#2363)
This commit is contained in:
@@ -42,7 +42,7 @@ const AdvancedOptions: FunctionComponent<Props> = ({
|
||||
|
||||
if (!identifier) {
|
||||
if (privateUsername?.length > 0) {
|
||||
application.alertService.alert('Unable to compute private username.').catch(console.error)
|
||||
application.alerts.alert('Unable to compute private username.').catch(console.error)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ const GeneralAccountMenu: FunctionComponent<Props> = ({
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
application.alertService.alert(STRING_GENERIC_SYNC_ERROR).catch(console.error)
|
||||
application.alerts.alert(STRING_GENERIC_SYNC_ERROR).catch(console.error)
|
||||
})
|
||||
.finally(() => {
|
||||
setIsSyncingInProgress(false)
|
||||
|
||||
@@ -43,7 +43,7 @@ const WorkspaceSwitcherMenu: FunctionComponent<Props> = ({
|
||||
}, [mainApplicationGroup])
|
||||
|
||||
const signoutAll = useCallback(async () => {
|
||||
const confirmed = await viewControllerManager.application.alertService.confirm(
|
||||
const confirmed = await viewControllerManager.application.alerts.confirm(
|
||||
'Are you sure you want to sign out of all workspaces on this device?',
|
||||
undefined,
|
||||
'Sign out all',
|
||||
|
||||
@@ -322,7 +322,7 @@ const ChallengeModal: FunctionComponent<Props> = ({
|
||||
<Button
|
||||
className="flex min-w-76 items-center justify-center"
|
||||
onClick={() => {
|
||||
application.alertService
|
||||
application.alerts
|
||||
.confirm(
|
||||
'If you forgot your local passcode, your only option is to clear your local data from this device and sign back in to your account.',
|
||||
'Forgot passcode?',
|
||||
|
||||
@@ -119,7 +119,7 @@ const ChangeEditorMenu: FunctionComponent<ChangeEditorMenuProps> = ({
|
||||
}
|
||||
|
||||
if (note.locked) {
|
||||
application.alertService.alert(STRING_EDIT_LOCKED_ATTEMPT).catch(console.error)
|
||||
application.alerts.alert(STRING_EDIT_LOCKED_ATTEMPT).catch(console.error)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ const ChangeEditorMenu: FunctionComponent<ChangeEditorMenuProps> = ({
|
||||
closeMenu,
|
||||
onSelect,
|
||||
premiumModal,
|
||||
application.alertService,
|
||||
application.alerts,
|
||||
application.componentManager,
|
||||
setDisableClickOutside,
|
||||
currentFeature,
|
||||
|
||||
@@ -64,7 +64,7 @@ const ChangeEditorMultipleMenu = ({ application, notes, setDisableClickOutside }
|
||||
}
|
||||
|
||||
if (hasSelectedLockedNotes) {
|
||||
void application.alertService.alert(STRING_EDIT_LOCKED_ATTEMPT)
|
||||
void application.alerts.alert(STRING_EDIT_LOCKED_ATTEMPT)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ const ChangeEditorMultipleMenu = ({ application, notes, setDisableClickOutside }
|
||||
}
|
||||
},
|
||||
[
|
||||
application.alertService,
|
||||
application.alerts,
|
||||
application.componentManager,
|
||||
hasSelectedLockedNotes,
|
||||
notes,
|
||||
|
||||
@@ -329,7 +329,7 @@ class Footer extends AbstractComponent<Props, State> {
|
||||
this.setState({
|
||||
newUpdateAvailable: false,
|
||||
})
|
||||
this.application.alertService.alert(STRING_NEW_UPDATE_READY).catch(console.error)
|
||||
this.application.alerts.alert(STRING_NEW_UPDATE_READY).catch(console.error)
|
||||
}
|
||||
|
||||
betaMessageClickHandler = () => {
|
||||
|
||||
@@ -543,7 +543,7 @@ class NoteView extends AbstractComponent<NoteViewProps, State> {
|
||||
}
|
||||
|
||||
hasAvailableExtensions() {
|
||||
return this.application.actionsManager.extensionsInContextOfItem(this.note).length > 0
|
||||
return this.application.actions.extensionsInContextOfItem(this.note).length > 0
|
||||
}
|
||||
|
||||
showSavingStatus() {
|
||||
@@ -636,12 +636,12 @@ class NoteView extends AbstractComponent<NoteViewProps, State> {
|
||||
|
||||
async deleteNote(permanently: boolean) {
|
||||
if (this.controller.isTemplateNote) {
|
||||
this.application.alertService.alert(STRING_DELETE_PLACEHOLDER_ATTEMPT).catch(console.error)
|
||||
this.application.alerts.alert(STRING_DELETE_PLACEHOLDER_ATTEMPT).catch(console.error)
|
||||
return
|
||||
}
|
||||
|
||||
if (this.note.locked) {
|
||||
this.application.alertService.alert(STRING_DELETE_LOCKED_ATTEMPT).catch(console.error)
|
||||
this.application.alerts.alert(STRING_DELETE_LOCKED_ATTEMPT).catch(console.error)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ const ListedMenuItem: FunctionComponent<ListedMenuItemProps> = ({
|
||||
|
||||
setIsRunning(true)
|
||||
|
||||
await application.actionsManager.runAction(action, note)
|
||||
await application.actions.runAction(action, note)
|
||||
|
||||
setIsRunning(false)
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ const ConfirmOtherSessionsSignOut = observer(({ application, viewControllerManag
|
||||
const confirm = useCallback(() => {
|
||||
application.revokeAllOtherSessions().catch(console.error)
|
||||
closeDialog()
|
||||
application.alertService
|
||||
application.alerts
|
||||
.alert('You have successfully revoked your sessions from other devices.', undefined, 'Finish')
|
||||
.catch(console.error)
|
||||
}, [application, closeDialog])
|
||||
|
||||
@@ -137,16 +137,16 @@ class PasswordWizard extends AbstractComponent<Props, State> {
|
||||
const currentPassword = this.state.formData.currentPassword
|
||||
const newPass = this.state.formData.newPassword
|
||||
if (!currentPassword || currentPassword.length === 0) {
|
||||
this.application.alertService.alert('Please enter your current password.').catch(console.error)
|
||||
this.application.alerts.alert('Please enter your current password.').catch(console.error)
|
||||
return false
|
||||
}
|
||||
|
||||
if (!newPass || newPass.length === 0) {
|
||||
this.application.alertService.alert('Please enter a new password.').catch(console.error)
|
||||
this.application.alerts.alert('Please enter a new password.').catch(console.error)
|
||||
return false
|
||||
}
|
||||
if (newPass !== this.state.formData.newPasswordConfirmation) {
|
||||
this.application.alertService.alert('Your new password does not match its confirmation.').catch(console.error)
|
||||
this.application.alerts.alert('Your new password does not match its confirmation.').catch(console.error)
|
||||
this.setFormDataState({
|
||||
status: undefined,
|
||||
}).catch(console.error)
|
||||
@@ -154,7 +154,7 @@ class PasswordWizard extends AbstractComponent<Props, State> {
|
||||
}
|
||||
|
||||
if (!this.application.getUser()?.email) {
|
||||
this.application.alertService
|
||||
this.application.alerts
|
||||
.alert("We don't have your email stored. Please sign out then log back in to fix this issue.")
|
||||
.catch(console.error)
|
||||
this.setFormDataState({
|
||||
@@ -165,7 +165,7 @@ class PasswordWizard extends AbstractComponent<Props, State> {
|
||||
|
||||
const success = await this.application.validateAccountPassword(this.state.formData.currentPassword as string)
|
||||
if (!success) {
|
||||
this.application.alertService
|
||||
this.application.alerts
|
||||
.alert('The current password you entered is not correct. Please try again.')
|
||||
.catch(console.error)
|
||||
}
|
||||
@@ -213,7 +213,7 @@ class PasswordWizard extends AbstractComponent<Props, State> {
|
||||
|
||||
dismiss = () => {
|
||||
if (this.state.processing) {
|
||||
this.application.alertService.alert('Cannot close window until pending tasks are complete.').catch(console.error)
|
||||
this.application.alerts.alert('Cannot close window until pending tasks are complete.').catch(console.error)
|
||||
} else {
|
||||
this.props.dismissModal()
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ const ChangeEmail: FunctionComponent<Props> = ({ onCloseDialog, application }) =
|
||||
|
||||
useBeforeUnload()
|
||||
|
||||
const applicationAlertService = application.alertService
|
||||
const applicationAlertService = application.alerts
|
||||
|
||||
const validateCurrentPassword = useCallback(async () => {
|
||||
if (!currentPassword || currentPassword.length === 0) {
|
||||
|
||||
@@ -35,7 +35,7 @@ const Email: FunctionComponent<Props> = ({ application }: Props) => {
|
||||
await application.settings.updateSetting(settingName, payload, false)
|
||||
return true
|
||||
} catch (e) {
|
||||
application.alertService.alert(STRING_FAILED_TO_UPDATE_USER_SETTING).catch(console.error)
|
||||
application.alerts.alert(STRING_FAILED_TO_UPDATE_USER_SETTING).catch(console.error)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ const InvitationsList = ({ subscriptionState, application }: Props) => {
|
||||
|
||||
const handleCancel = async (invitationUuid: string) => {
|
||||
if (lockContinue) {
|
||||
application.alertService.alert('Cancelation already in progress.').catch(console.error)
|
||||
application.alerts.alert('Cancelation already in progress.').catch(console.error)
|
||||
|
||||
return
|
||||
}
|
||||
@@ -36,7 +36,7 @@ const InvitationsList = ({ subscriptionState, application }: Props) => {
|
||||
setLockContinue(false)
|
||||
|
||||
if (!success) {
|
||||
application.alertService
|
||||
application.alerts
|
||||
.alert('Could not cancel invitation. Please try again or contact support if the issue persists.')
|
||||
.catch(console.error)
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ const Invite: FunctionComponent<Props> = ({ onCloseDialog, application, subscrip
|
||||
|
||||
const validateInviteeEmail = useCallback(async () => {
|
||||
if (!isEmailValid(inviteeEmail)) {
|
||||
application.alertService
|
||||
application.alerts
|
||||
.alert('The email you entered has an invalid format. Please review your input and try again.')
|
||||
.catch(console.error)
|
||||
|
||||
@@ -42,15 +42,15 @@ const Invite: FunctionComponent<Props> = ({ onCloseDialog, application, subscrip
|
||||
}
|
||||
|
||||
return true
|
||||
}, [application.alertService, inviteeEmail])
|
||||
}, [application.alerts, inviteeEmail])
|
||||
|
||||
const handleDialogClose = useCallback(() => {
|
||||
if (lockContinue) {
|
||||
application.alertService.alert('Cannot close window until pending tasks are complete.').catch(console.error)
|
||||
application.alerts.alert('Cannot close window until pending tasks are complete.').catch(console.error)
|
||||
} else {
|
||||
onCloseDialog()
|
||||
}
|
||||
}, [application.alertService, lockContinue, onCloseDialog])
|
||||
}, [application.alerts, lockContinue, onCloseDialog])
|
||||
|
||||
const resetProgressState = () => {
|
||||
setSubmitButtonTitle(SubmitButtonTitles.Default)
|
||||
@@ -91,7 +91,7 @@ const Invite: FunctionComponent<Props> = ({ onCloseDialog, application, subscrip
|
||||
|
||||
const success = await processInvite()
|
||||
if (!success) {
|
||||
application.alertService
|
||||
application.alerts
|
||||
.alert('An error occurred while sending the invite. Please try again or contact support if the issue persists.')
|
||||
.catch(console.error)
|
||||
|
||||
@@ -104,7 +104,7 @@ const Invite: FunctionComponent<Props> = ({ onCloseDialog, application, subscrip
|
||||
setSubmitButtonTitle(SubmitButtonTitles.Finish)
|
||||
setCurrentStep(Steps.FinishStep)
|
||||
}, [
|
||||
application.alertService,
|
||||
application.alerts,
|
||||
currentStep,
|
||||
handleDialogClose,
|
||||
isContinuing,
|
||||
|
||||
@@ -26,7 +26,7 @@ const Sync: FunctionComponent<Props> = ({ application }: Props) => {
|
||||
})
|
||||
setIsSyncingInProgress(false)
|
||||
if (response && (response as any).error) {
|
||||
application.alertService.alert(STRING_GENERIC_SYNC_ERROR).catch(console.error)
|
||||
application.alerts.alert(STRING_GENERIC_SYNC_ERROR).catch(console.error)
|
||||
} else {
|
||||
setLastSyncDate(formatLastSyncDate(application.sync.getLastSyncDate() as Date))
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ const DataBackups = ({ application, viewControllerManager }: Props) => {
|
||||
|
||||
const readFile = async (file: File): Promise<any> => {
|
||||
if (file.type === 'application/zip') {
|
||||
application.alertService.alert(STRING_IMPORTING_ZIP_FILE).catch(console.error)
|
||||
application.alerts.alert(STRING_IMPORTING_ZIP_FILE).catch(console.error)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ const DataBackups = ({ application, viewControllerManager }: Props) => {
|
||||
const data = JSON.parse(e.target?.result as string)
|
||||
resolve(data)
|
||||
} catch (e) {
|
||||
application.alertService.alert(STRING_INVALID_IMPORT_FILE).catch(console.error)
|
||||
application.alerts.alert(STRING_INVALID_IMPORT_FILE).catch(console.error)
|
||||
}
|
||||
}
|
||||
reader.readAsText(file)
|
||||
@@ -146,7 +146,7 @@ const DataBackups = ({ application, viewControllerManager }: Props) => {
|
||||
return
|
||||
}
|
||||
|
||||
if (application.encryptionService.supportedVersions().includes(version)) {
|
||||
if (application.encryption.supportedVersions().includes(version)) {
|
||||
await performImport(data)
|
||||
} else {
|
||||
setIsImportDataLoading(false)
|
||||
|
||||
@@ -72,7 +72,7 @@ const EmailBackups = ({ application }: Props) => {
|
||||
await application.settings.updateSetting(settingName, payload, false)
|
||||
return true
|
||||
} catch (e) {
|
||||
application.alertService.alert(STRING_FAILED_TO_UPDATE_USER_SETTING).catch(console.error)
|
||||
application.alerts.alert(STRING_FAILED_TO_UPDATE_USER_SETTING).catch(console.error)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,14 +50,14 @@ const BackupsDropZone: FunctionComponent<Props> = ({ application }) => {
|
||||
const result = await application.files.readBackupFileAndSaveDecrypted(binaryFile, decryptedFileItem, fileSystem)
|
||||
|
||||
if (result === 'success') {
|
||||
void application.alertService.alert(
|
||||
void application.alerts.alert(
|
||||
`<strong>${decryptedFileItem.name}</strong> has been successfully decrypted and saved to your chosen directory.`,
|
||||
)
|
||||
setBinaryFile(undefined)
|
||||
setDecryptedFileItem(undefined)
|
||||
setDroppedFile(undefined)
|
||||
} else if (result === 'failed') {
|
||||
void application.alertService.alert(
|
||||
void application.alerts.alert(
|
||||
'Unable to save file to local directory. This may be caused by failure to decrypt, or failure to save the file locally.',
|
||||
)
|
||||
}
|
||||
@@ -74,7 +74,7 @@ const BackupsDropZone: FunctionComponent<Props> = ({ application }) => {
|
||||
}
|
||||
|
||||
if (type === 'binary') {
|
||||
void application.alertService.alert('Please drag the metadata file instead of the encrypted data file.')
|
||||
void application.alerts.alert('Please drag the metadata file instead of the encrypted data file.')
|
||||
return
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ const BackupsDropZone: FunctionComponent<Props> = ({ application }) => {
|
||||
console.error(error)
|
||||
}
|
||||
},
|
||||
[application.alertService, application.files],
|
||||
[application.alerts, application.files],
|
||||
)
|
||||
|
||||
const handleDragOver = useCallback((event: DragEvent) => {
|
||||
|
||||
@@ -41,7 +41,7 @@ const OfflineSubscription: FunctionComponent<Props> = ({ application, onSuccess
|
||||
|
||||
if (homeServerEnabled) {
|
||||
if (!homeServerIsRunning) {
|
||||
await application.alertService.alert('Please start your home server before activating offline features.')
|
||||
await application.alerts.alert('Please start your home server before activating offline features.')
|
||||
|
||||
return
|
||||
}
|
||||
@@ -53,7 +53,7 @@ const OfflineSubscription: FunctionComponent<Props> = ({ application, onSuccess
|
||||
|
||||
const serverActivationResult = await homeServer.activatePremiumFeatures(signedInUser.email)
|
||||
if (serverActivationResult.isFailed()) {
|
||||
await application.alertService.alert(serverActivationResult.getError())
|
||||
await application.alerts.alert(serverActivationResult.getError())
|
||||
|
||||
return
|
||||
}
|
||||
@@ -62,7 +62,7 @@ const OfflineSubscription: FunctionComponent<Props> = ({ application, onSuccess
|
||||
const result = await application.features.setOfflineFeaturesCode(activationCode)
|
||||
|
||||
if (result instanceof ClientDisplayableError) {
|
||||
await application.alertService.alert(result.text)
|
||||
await application.alerts.alert(result.text)
|
||||
|
||||
return
|
||||
}
|
||||
@@ -85,7 +85,7 @@ const OfflineSubscription: FunctionComponent<Props> = ({ application, onSuccess
|
||||
}
|
||||
|
||||
const handleRemoveClick = async () => {
|
||||
application.alertService
|
||||
application.alerts
|
||||
.confirm(
|
||||
STRING_REMOVE_OFFLINE_KEY_CONFIRMATION,
|
||||
'Remove offline key?',
|
||||
@@ -99,7 +99,7 @@ const OfflineSubscription: FunctionComponent<Props> = ({ application, onSuccess
|
||||
}
|
||||
})
|
||||
.catch((err: string) => {
|
||||
application.alertService.alert(err).catch(console.error)
|
||||
application.alerts.alert(err).catch(console.error)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ const PackagesPreferencesSection: FunctionComponent<Props> = ({
|
||||
}, [confirmableExtension, confirmableEnd])
|
||||
|
||||
const uninstallExtension = async (extension: AnyPackageType) => {
|
||||
application.alertService
|
||||
application.alerts
|
||||
.confirm(
|
||||
'Are you sure you want to uninstall this plugin? Note that plugins managed by your subscription will automatically be re-installed on application restart.',
|
||||
'Uninstall Extension?',
|
||||
@@ -58,7 +58,7 @@ const PackagesPreferencesSection: FunctionComponent<Props> = ({
|
||||
}
|
||||
})
|
||||
.catch((err: string) => {
|
||||
application.alertService.alert(err).catch(console.error)
|
||||
application.alerts.alert(err).catch(console.error)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ const Listed = ({ application }: Props) => {
|
||||
const requestAccount = async () => {
|
||||
const account = await application.listed.requestNewListedAccount()
|
||||
if (account) {
|
||||
const openSettings = await application.alertService.confirm(
|
||||
const openSettings = await application.alerts.confirm(
|
||||
'Your new Listed blog has been successfully created!' +
|
||||
' You can publish a new post to your blog from Standard Notes via the' +
|
||||
' <i>Actions</i> menu in the editor pane. Open your blog settings to begin setting it up.',
|
||||
@@ -47,7 +47,7 @@ const Listed = ({ application }: Props) => {
|
||||
if (openSettings) {
|
||||
const info = await application.listed.getListedAccountInfo(account)
|
||||
if (info) {
|
||||
application.deviceInterface.openUrl(info?.settings_url)
|
||||
application.device.openUrl(info?.settings_url)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ const BiometricsLock = ({ application }: Props) => {
|
||||
|
||||
const hasBiometricsSupport = async () => {
|
||||
const hasBiometricsAvailable = await (
|
||||
application.deviceInterface as MobileDeviceInterface
|
||||
application.device as MobileDeviceInterface
|
||||
).getDeviceBiometricsAvailability?.()
|
||||
setSupportsBiometrics(hasBiometricsAvailable)
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ const ErroredItems: FunctionComponent = () => {
|
||||
}
|
||||
|
||||
const deleteItems = async (items: EncryptedItemInterface[]): Promise<void> => {
|
||||
const confirmed = await application.alertService.confirm(
|
||||
const confirmed = await application.alerts.confirm(
|
||||
`Are you sure you want to permanently delete ${items.length} item(s)?`,
|
||||
undefined,
|
||||
'Delete',
|
||||
@@ -58,7 +58,7 @@ const ErroredItems: FunctionComponent = () => {
|
||||
const errorOrTrue = application.canAttemptDecryptionOfItem(item)
|
||||
|
||||
if (errorOrTrue instanceof ClientDisplayableError) {
|
||||
void application.alertService.showErrorAlert(errorOrTrue)
|
||||
void application.alerts.showErrorAlert(errorOrTrue)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ const MultitaskingPrivacy = ({ application }: Props) => {
|
||||
setHasScreenshotPrivacy(enable)
|
||||
|
||||
application.protections.setMobileScreenshotPrivacyEnabled(enable)
|
||||
;(application.deviceInterface as MobileDeviceInterface).setAndroidScreenshotPrivacy(enable)
|
||||
;(application.device as MobileDeviceInterface).setAndroidScreenshotPrivacy(enable)
|
||||
}
|
||||
|
||||
const screenshotPrivacyFeatureText = isIOS() ? 'Multitasking Privacy' : 'Multitasking/Screenshot Privacy'
|
||||
|
||||
@@ -24,7 +24,7 @@ const Privacy: FunctionComponent<Props> = ({ application }: Props) => {
|
||||
await application.settings.updateSetting(settingName, payload, false)
|
||||
return true
|
||||
} catch (e) {
|
||||
application.alertService.alert(STRING_FAILED_TO_UPDATE_USER_SETTING).catch(console.error)
|
||||
application.alerts.alert(STRING_FAILED_TO_UPDATE_USER_SETTING).catch(console.error)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,18 +51,10 @@ const EditContactModal: FunctionComponent<Props> = ({ onCloseDialog, fromInvite,
|
||||
onAddContact?.(contact)
|
||||
handleDialogClose()
|
||||
} else {
|
||||
void application.alertService.alert('Unable to create contact. Please try again.')
|
||||
void application.alerts.alert('Unable to create contact. Please try again.')
|
||||
}
|
||||
}
|
||||
}, [
|
||||
editingContact,
|
||||
application.contacts,
|
||||
application.alertService,
|
||||
name,
|
||||
collaborationID,
|
||||
handleDialogClose,
|
||||
onAddContact,
|
||||
])
|
||||
}, [editingContact, application.contacts, application.alerts, name, collaborationID, handleDialogClose, onAddContact])
|
||||
|
||||
const modalActions = useMemo(
|
||||
(): ModalAction[] => [
|
||||
|
||||
@@ -92,7 +92,7 @@ const CreateAccount: FunctionComponent<Props> = ({ viewControllerManager, applic
|
||||
void viewControllerManager.purchaseFlowController.openPurchaseFlow()
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
application.alertService.alert(err as string).catch(console.error)
|
||||
application.alerts.alert(err as string).catch(console.error)
|
||||
} finally {
|
||||
setIsCreatingAccount(false)
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ const SignIn: FunctionComponent<Props> = ({ viewControllerManager, application }
|
||||
setOtherErrorMessage('Invalid email or password.')
|
||||
setPassword('')
|
||||
} else {
|
||||
application.alertService.alert(err as string).catch(console.error)
|
||||
application.alerts.alert(err as string).catch(console.error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ const SuperNoteConverter = ({
|
||||
}, [isSeamlessConvert, confirmConvert])
|
||||
|
||||
const convertAsIs = useCallback(async () => {
|
||||
const confirmed = await application.alertService.confirm(
|
||||
const confirmed = await application.alerts.confirm(
|
||||
spaceSeparatedStrings(
|
||||
"This option is useful if you want to edit the note's content which is in Super's JSON format directly.",
|
||||
'This format is not human-readable. If you want to convert the note to a human-readable format, please use the "Convert" option instead.',
|
||||
|
||||
@@ -60,7 +60,7 @@ export const SuperNoteImporter: FunctionComponent<Props> = ({ note, application,
|
||||
}, [isSeamlessConvert, confirmConvert])
|
||||
|
||||
const convertAsIs = useCallback(async () => {
|
||||
const confirmed = await application.alertService.confirm(
|
||||
const confirmed = await application.alerts.confirm(
|
||||
spaceSeparatedStrings(
|
||||
"This option is useful if you switched this note's type from Super to another plaintext-based format, and want to return to Super.",
|
||||
'To use this option, the preview in the convert window should display a language format known as JSON.',
|
||||
|
||||
@@ -32,7 +32,7 @@ const TagsSection: FunctionComponent<Props> = ({ viewControllerManager }) => {
|
||||
|
||||
const runMigration = useCallback(async () => {
|
||||
if (
|
||||
await viewControllerManager.application.alertService.confirm(
|
||||
await viewControllerManager.application.alerts.confirm(
|
||||
'<i>Introducing native, built-in nested tags without requiring the legacy Folders extension.</i><br/></br> ' +
|
||||
" To get started, we'll need to migrate any tags containing a dot character to the new system.<br/></br> " +
|
||||
' This migration will convert any tags with dots appearing in their name into a natural' +
|
||||
|
||||
Reference in New Issue
Block a user