Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions app/assets/javascripts/Components/ApplicationGroupView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { WebApplication } from '@/UIModels/Application'
import { Component } from 'preact'
import { ApplicationView } from '@/Components/ApplicationView'
import { WebOrDesktopDevice } from '@/Device/WebOrDesktopDevice'
import { ApplicationGroupEvent, Runtime } from '@standardnotes/snjs'
import { ApplicationGroupEvent, Runtime, ApplicationGroupEventData, DeinitSource } from '@standardnotes/snjs'
import { unmountComponentAtNode, findDOMNode } from 'preact/compat'
import { DialogContent, DialogOverlay } from '@reach/dialog'
import { isDesktopApplication } from '@/Utils'
Expand All @@ -19,6 +19,7 @@ type Props = {
type State = {
activeApplication?: WebApplication
dealloced?: boolean
deallocSource?: DeinitSource
deviceDestroyed?: boolean
}

Expand Down Expand Up @@ -49,11 +50,14 @@ export class ApplicationGroupView extends Component<Props, State> {

this.applicationObserverRemover = this.group.addEventObserver((event, data) => {
if (event === ApplicationGroupEvent.PrimaryApplicationSet) {
this.application = data?.primaryApplication as WebApplication
const castData = data as ApplicationGroupEventData[ApplicationGroupEvent.PrimaryApplicationSet]

this.application = castData.application as WebApplication
this.setState({ activeApplication: this.application })
} else if (event === ApplicationGroupEvent.DeviceWillRestart) {
this.setState({ dealloced: true })
const castData = data as ApplicationGroupEventData[ApplicationGroupEvent.DeviceWillRestart]

this.setState({ dealloced: true, deallocSource: castData.source })
}
})

Expand Down Expand Up @@ -107,7 +111,8 @@ export class ApplicationGroupView extends Component<Props, State> {
}

if (this.state.dealloced) {
return renderDialog('Switching workspace...')
const message = this.state.deallocSource === DeinitSource.Lock ? 'Locking workspace...' : 'Switching workspace...'
return renderDialog(message)
}

if (!this.group || !this.state.activeApplication || this.state.activeApplication.dealloced) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export class ExtensionsLatestVersions {
}

const versionMap: Map<string, string> = new Map()
collectFeatures(response.CORE_PLAN?.features as FeatureDescription[], versionMap)
collectFeatures(response.PLUS_PLAN?.features as FeatureDescription[], versionMap)
collectFeatures(response.PRO_PLAN?.features as FeatureDescription[], versionMap)

Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"test": "jest --config app/assets/javascripts/jest.config.js",
"test:coverage": "yarn test --coverage",
"prepare": "husky install",
"postinstall": "yarn run ncu -loglevel verbose --packageFile package.json"
"postinstall": "yarn run ncu -loglevel verbose --packageFile package.json",
"upgrade:snjs": "ncu -u '@standardnotes/*' && yarn"
},
"devDependencies": {
"@babel/core": "^7.17.9",
Expand Down Expand Up @@ -69,11 +70,11 @@
"@reach/tooltip": "^0.16.2",
"@reach/visually-hidden": "^0.16.0",
"@standardnotes/components": "1.8.1",
"@standardnotes/filepicker": "1.14.6",
"@standardnotes/filepicker": "1.14.7",
"@standardnotes/icons": "^1.1.7",
"@standardnotes/sncrypto-web": "1.9.2",
"@standardnotes/snjs": "2.108.4",
"@standardnotes/stylekit": "5.26.0",
"@standardnotes/snjs": "2.109.1",
"@standardnotes/stylekit": "5.27.0",
"@zip.js/zip.js": "^2.4.10",
"mobx": "^6.5.0",
"mobx-react-lite": "^3.3.0",
Expand Down
Loading