Compare commits

...
Author SHA1 Message Date
StandardNotes CI 68db05581b chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].8
 - @standardnotes/[email protected].2
2023-07-20 15:26:51 +00:00
Aman Harwara 7acf23033d chore: fix blank screen issue on iOS web app 2023-07-20 20:23:31 +05:30
StandardNotes CI 78b87672de chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2023-07-19 14:36:29 +00:00
Aman Harwara 2b0df30ca2 fix: Fixed issue where trying to create new folder on mobile would close navigation pane 2023-07-19 19:35:10 +05:30
StandardNotes CI 58cf0e542f chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2023-07-19 07:34:30 +00:00
Aman Harwara edead7e251 feat: Added Undo/Redo buttons to Super mobile toolbar 2023-07-19 12:37:02 +05:30
StandardNotes CI 166b4f3a5d chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-07-18 14:56:13 +00:00
Aman Harwara 1566c862a5 chore: fix issue when trying to use offline subscription code on desktop 2023-07-18 19:57:08 +05:30
StandardNotes CI 7df9873871 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-07-18 12:51:18 +00:00
Mo 071b345e93 chore: fix snapcraft ci 2023-07-18 07:24:02 -05:00
StandardNotes CI 072e9f803b chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].9
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-07-18 09:26:49 +00:00
Aman Harwara 8ceb6938b3 chore: fix super export option position in menu 2023-07-18 14:14:03 +05:30
StandardNotes CI e7d805b91a chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].7
 - @standardnotes/[email protected].8
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected].7
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected]
2023-07-17 14:57:47 +00:00
Mo eba1289ab9 fix: fixes issue where some accounts were not correctly loading subscription info (#2361) 2023-07-17 09:25:00 -05:00
Mo 7fb33c400c chore: refetch subscription when prefs menu opens (#2360) 2023-07-17 09:04:22 -05:00
Mo a56e1f5398 chore: fix release notes [no ci] 2023-07-17 07:55:51 -05:00
StandardNotes CI bf115b5eca chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].7
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected]
2023-07-16 18:43:53 +00:00
Aman Harwara 5932eb814c fix: Fixed issue where some editors would not open on Android 2023-07-16 23:44:53 +05:30
StandardNotes CI e1f1be96cb chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-07-16 10:44:50 +00:00
Aman Harwara e86dff4e58 chore: release 2023-07-16 15:43:12 +05:30
StandardNotes CI bac665fe1e chore(release): publish
- @standardnotes/[email protected].5
 - @standardnotes/[email protected]
2023-07-16 09:49:29 +00:00
Aman Harwara 10cddeee25 chore: ios project 2023-07-16 14:47:12 +05:30
StandardNotes CI bd7b5a2b99 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-07-15 18:52:03 +00:00
Aman Harwara f64a9b66ca chore: release 2023-07-15 23:50:44 +05:30
Aman Harwara 2662f5abbb chore: ios share provisioning profile 2023-07-15 23:21:13 +05:30
StandardNotes CI 526c70f623 chore(release): publish
- @standardnotes/[email protected].3
 - @standardnotes/[email protected]
2023-07-15 16:16:28 +00:00
Aman Harwara af8aca612a chore: ios ci 2023-07-15 21:17:10 +05:30
StandardNotes CI a890f44cbe chore(release): publish
- @standardnotes/[email protected].2
 - @standardnotes/[email protected]
2023-07-15 14:12:50 +00:00
Aman Harwara 415757cc30 chore: share extension provisioning profile 2023-07-15 19:13:17 +05:30
StandardNotes CI 2a91dd0636 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-07-15 12:04:32 +00:00
Aman Harwara 953870beaf chore: ios ci 2023-07-15 17:03:23 +05:30
73 changed files with 755 additions and 180 deletions
+3 -3
View File
@@ -154,13 +154,14 @@ jobs:
Publish:
runs-on: ubuntu-latest
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
if: ${{ always() }}
needs: [Windows, Mac, Linux]
defaults:
run:
working-directory: packages/desktop
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
@@ -209,6 +210,5 @@ jobs:
continue-on-error: true
run: |
sudo snap install snapcraft --classic
echo "${{ secrets.SNAPCRAFT_LOGIN_FILE }}" >> snapauth.txt
snapcraft login --with=snapauth.txt
snapcraft login
snapcraft upload dist/standard-notes-${{ env.APP_VERSION }}-linux-amd64.snap --release stable,candidate,beta,edge
+6
View File
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.26.29](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-17)
### Bug Fixes
* fixes issue where some accounts were not correctly loading subscription info ([#2361](https://github.com/standardnotes/app/issues/2361)) ([eba1289](https://github.com/standardnotes/app/commit/eba1289ab9da10a545b58572bcf0dde8c050de61))
## [1.26.28](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-13)
**Note:** Version bump only for package @standardnotes/api
+1 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api",
"version": "1.26.28",
"version": "1.26.29",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -39,7 +39,6 @@
"@standardnotes/domain-core": "^1.22.0",
"@standardnotes/models": "workspace:*",
"@standardnotes/responses": "workspace:*",
"@standardnotes/security": "^1.7.6",
"@standardnotes/utils": "workspace:*",
"reflect-metadata": "^0.1.13"
}
@@ -65,13 +65,26 @@ export class FetchRequestHandler implements RequestHandlerInterface {
}
private async runRequest<T>(request: Request, body?: string | Uint8Array | undefined): Promise<HttpResponse<T>> {
const fetchResponse = await fetch(request, {
body,
})
try {
const fetchResponse = await fetch(request, {
body,
})
const response = await this.handleFetchResponse<T>(fetchResponse)
const response = await this.handleFetchResponse<T>(fetchResponse)
return response
return response
} catch (error) {
return {
status: HttpStatusCode.InternalServerError,
headers: new Map<string, string | null>(),
data: {
error: {
message:
'message' in (error as { message: string }) ? (error as { message: string }).message : 'Unknown error',
},
},
}
}
}
private async handleFetchResponse<T>(fetchResponse: Response): Promise<HttpResponse<T>> {
+28 -13
View File
@@ -1,6 +1,6 @@
import { joinPaths, sleep } from '@standardnotes/utils'
import { Environment } from '@standardnotes/models'
import { Session, SessionToken } from '@standardnotes/domain-core'
import { LegacySession, Session, SessionToken } from '@standardnotes/domain-core'
import {
HttpStatusCode,
HttpRequestParams,
@@ -18,7 +18,7 @@ import { FetchRequestHandler } from './FetchRequestHandler'
import { RequestHandlerInterface } from './RequestHandlerInterface'
export class HttpService implements HttpServiceInterface {
private session: Session | null
private session?: Session | LegacySession
private __latencySimulatorMs?: number
private declare host: string
@@ -29,7 +29,6 @@ export class HttpService implements HttpServiceInterface {
private requestHandler: RequestHandlerInterface
constructor(private environment: Environment, private appVersion: string, private snjsVersion: string) {
this.session = null
this.requestHandler = new FetchRequestHandler(this.snjsVersion, this.appVersion, this.environment)
}
@@ -42,12 +41,12 @@ export class HttpService implements HttpServiceInterface {
}
public deinit(): void {
this.session = null
;(this.session as unknown) = undefined
;(this.updateMetaCallback as unknown) = undefined
;(this.refreshSessionCallback as unknown) = undefined
}
setSession(session: Session): void {
setSession(session: Session | LegacySession): void {
this.session = session
}
@@ -59,6 +58,18 @@ export class HttpService implements HttpServiceInterface {
return this.host
}
private getSessionAccessToken(): string | undefined {
if (!this.session) {
return undefined
}
if (this.session instanceof Session) {
return this.session.accessToken.value
} else {
return this.session.accessToken
}
}
async get<T>(path: string, params?: HttpRequestParams, authentication?: string): Promise<HttpResponse<T>> {
if (!this.host) {
throw new Error('Attempting to make network request before host is set')
@@ -68,7 +79,7 @@ export class HttpService implements HttpServiceInterface {
url: joinPaths(this.host, path),
params,
verb: HttpVerb.Get,
authentication: authentication ?? this.session?.accessToken.value,
authentication: authentication ?? this.getSessionAccessToken(),
})
}
@@ -90,7 +101,7 @@ export class HttpService implements HttpServiceInterface {
url: joinPaths(this.host, path),
params,
verb: HttpVerb.Post,
authentication: authentication ?? this.session?.accessToken.value,
authentication: authentication ?? this.getSessionAccessToken(),
})
}
@@ -99,7 +110,7 @@ export class HttpService implements HttpServiceInterface {
url: joinPaths(this.host, path),
params,
verb: HttpVerb.Put,
authentication: authentication ?? this.session?.accessToken.value,
authentication: authentication ?? this.getSessionAccessToken(),
})
}
@@ -108,7 +119,7 @@ export class HttpService implements HttpServiceInterface {
url: joinPaths(this.host, path),
params,
verb: HttpVerb.Patch,
authentication: authentication ?? this.session?.accessToken.value,
authentication: authentication ?? this.getSessionAccessToken(),
})
}
@@ -117,7 +128,7 @@ export class HttpService implements HttpServiceInterface {
url: joinPaths(this.host, path),
params,
verb: HttpVerb.Delete,
authentication: authentication ?? this.session?.accessToken.value,
authentication: authentication ?? this.getSessionAccessToken(),
})
}
@@ -130,7 +141,7 @@ export class HttpService implements HttpServiceInterface {
if (this.inProgressRefreshSessionPromise && !isRefreshRequest) {
await this.inProgressRefreshSessionPromise
httpRequest.authentication = this.session?.accessToken.value
httpRequest.authentication = this.getSessionAccessToken()
}
const response = await this.requestHandler.handleRequest<T>(httpRequest)
@@ -152,7 +163,7 @@ export class HttpService implements HttpServiceInterface {
}
}
httpRequest.authentication = this.session?.accessToken.value
httpRequest.authentication = this.getSessionAccessToken()
return this.runHttp(httpRequest)
}
@@ -161,7 +172,11 @@ export class HttpService implements HttpServiceInterface {
}
private async refreshSession(): Promise<boolean> {
if (this.session === null) {
if (!this.session) {
return false
}
if (this.session instanceof LegacySession) {
return false
}
@@ -1,10 +1,10 @@
import { Session } from '@standardnotes/domain-core'
import { LegacySession, Session } from '@standardnotes/domain-core'
import { HttpRequest, HttpRequestParams, HttpResponse, HttpResponseMeta } from '@standardnotes/responses'
export interface HttpServiceInterface {
setHost(host: string): void
getHost(): string
setSession(session: Session): void
get<T>(path: string, params?: HttpRequestParams, authentication?: string): Promise<HttpResponse<T>>
getExternal<T>(url: string, params?: HttpRequestParams): Promise<HttpResponse<T>>
post<T>(path: string, params?: HttpRequestParams, authentication?: string): Promise<HttpResponse<T>>
@@ -12,9 +12,12 @@ export interface HttpServiceInterface {
patch<T>(path: string, params: HttpRequestParams, authentication?: string): Promise<HttpResponse<T>>
delete<T>(path: string, params?: HttpRequestParams, authentication?: string): Promise<HttpResponse<T>>
runHttp<T>(httpRequest: HttpRequest): Promise<HttpResponse<T>>
setSession(session: Session | LegacySession): void
setCallbacks(
updateMetaCallback: (meta: HttpResponseMeta) => void,
refreshSessionCallback: (session: Session) => void,
): void
deinit(): void
}
@@ -1,5 +1,4 @@
import { ValetTokenOperation } from '@standardnotes/responses'
import { SharedVaultMoveType } from './SharedVaultMoveType'
import { SharedVaultMoveType, ValetTokenOperation } from '@standardnotes/responses'
export type CreateSharedVaultValetTokenParams = {
sharedVaultUuid: string
-1
View File
@@ -18,4 +18,3 @@ export * from './User/UserRegistrationRequestParams'
export * from './User/UserUpdateRequestParams'
export * from './UserRequest/UserRequestRequestParams'
export * from './WebSocket/WebSocketConnectionTokenRequestParams'
export * from './SharedVault/SharedVaultMoveType'
+44
View File
@@ -3,6 +3,50 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.104](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-20)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.103](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-19)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.102](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-19)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.101](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.100](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.99](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.98](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-17)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.97](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-16)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.96](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-16)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.95](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.94](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.93](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/clipper
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/clipper",
"description": "Web clipper browser extension for Standard Notes",
"version": "1.1.93",
"version": "1.1.104",
"private": true,
"scripts": {
"build-mv2": "yarn clean && webpack --config ./webpack.config.prod.js",
+44
View File
@@ -3,6 +3,50 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.108.35](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-20)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.34](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-19)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.33](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-19)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.32](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.31](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.30](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.29](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-17)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.28](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-16)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.27](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-16)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.26](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.25](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.24](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/desktop
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/desktop",
"main": "./app/dist/index.js",
"version": "3.108.24",
"version": "3.108.35",
"license": "AGPL-3.0-or-later",
"author": "Standard Notes.",
"private": true,
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.21.52](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-17)
**Note:** Version bump only for package @standardnotes/encryption
## [1.21.51](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-13)
**Note:** Version bump only for package @standardnotes/encryption
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/encryption",
"version": "1.21.51",
"version": "1.21.52",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.59.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-17)
**Note:** Version bump only for package @standardnotes/features
## [1.59.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-13)
**Note:** Version bump only for package @standardnotes/features
+1 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/features",
"version": "1.59.9",
"version": "1.59.10",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -27,7 +27,6 @@
"dependencies": {
"@standardnotes/common": "^1.50.0",
"@standardnotes/domain-core": "^1.22.0",
"@standardnotes/security": "^1.7.6",
"reflect-metadata": "^0.1.13"
},
"devDependencies": {
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.61](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-17)
**Note:** Version bump only for package @standardnotes/filepicker
## [1.28.60](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-13)
**Note:** Version bump only for package @standardnotes/filepicker
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/filepicker",
"version": "1.28.60",
"version": "1.28.61",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.16.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-17)
**Note:** Version bump only for package @standardnotes/files
## [1.16.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-13)
**Note:** Version bump only for package @standardnotes/files
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/files",
"version": "1.16.6",
"version": "1.16.7",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+56
View File
@@ -3,6 +3,62 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.56.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-20)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-19)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-19)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-17)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-16)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-16)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-16)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/mobile
# [3.56.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
### Features
+1 -1
View File
@@ -2,7 +2,7 @@ storage_mode("git")
# type("development") # The default type, can be: appstore, adhoc, enterprise or development
app_identifier(["com.standardnotes.standardnotes"])
app_identifier(["com.standardnotes.standardnotes", "com.standardnotes.standardnotes.Share-To-SN"])
# For all available options run `fastlane match --help`
# Remove the # in the beginning of the line to enable the other options
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.standardnotes.standardnotes</string>
</array>
</dict>
</plist>
@@ -15,7 +15,7 @@
07CAB7702A618385008FE1EF /* ReceiveSharingIntent.m in Sources */ = {isa = PBXBuildFile; fileRef = 07CAB76F2A618385008FE1EF /* ReceiveSharingIntent.m */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
1C2EEB3B45F4EB07AC795C77 /* BuildFile in Frameworks */ = {isa = PBXBuildFile; };
1C2EEB3B45F4EB07AC795C77 /* (null) in Frameworks */ = {isa = PBXBuildFile; };
33BB1B14071EBE5978EBF3A8 /* libPods-StandardNotes-StandardNotesTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04FCB5A3A3387CA3CFC82AA3 /* libPods-StandardNotes-StandardNotesTests.a */; };
BC8DEA834BF198E8511F04FF /* libPods-StandardNotesDev.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F2D747BE02C2A1BCFEEFD1 /* libPods-StandardNotesDev.a */; };
CD6592A9291EEFCC00C09DC6 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD6592A8291EEFCC00C09DC6 /* StoreKit.framework */; };
@@ -67,6 +67,7 @@
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* StandardNotesTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StandardNotesTests.m; sourceTree = "<group>"; };
04FCB5A3A3387CA3CFC82AA3 /* libPods-StandardNotes-StandardNotesTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-StandardNotes-StandardNotesTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
0780C8AC2A63ECF400DDE846 /* Share To SNRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Share To SNRelease.entitlements"; sourceTree = "<group>"; };
07CAB75B2A618128008FE1EF /* Share To SN.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Share To SN.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
07CAB75D2A618128008FE1EF /* ShareViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareViewController.swift; sourceTree = "<group>"; };
07CAB7602A618128008FE1EF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = "<group>"; };
@@ -122,7 +123,7 @@
buildActionMask = 2147483647;
files = (
CD6592A9291EEFCC00C09DC6 /* StoreKit.framework in Frameworks */,
1C2EEB3B45F4EB07AC795C77 /* BuildFile in Frameworks */,
1C2EEB3B45F4EB07AC795C77 /* (null) in Frameworks */,
DD3D1CE428EC1C8BA0C49211 /* libPods-StandardNotes.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -158,6 +159,7 @@
07CAB75C2A618128008FE1EF /* Share To SN */ = {
isa = PBXGroup;
children = (
0780C8AC2A63ECF400DDE846 /* Share To SNRelease.entitlements */,
07CAB76B2A6182D6008FE1EF /* Share To SNDebug.entitlements */,
07CAB75D2A618128008FE1EF /* ShareViewController.swift */,
07CAB75F2A618128008FE1EF /* MainInterface.storyboard */,
@@ -818,12 +820,14 @@
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "Share To SN/Share To SNRelease.entitlements";
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_STYLE = Manual;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = HKF9BXSN95;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKF9BXSN95;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Share To SN/Info.plist";
@@ -839,6 +843,8 @@
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.standardnotes.standardnotes.Share-To-SN";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.standardnotes.standardnotes.Share-To-SN";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.standardnotes.standardnotes.Share-To-SN";
SKIP_INSTALL = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -8,5 +8,9 @@
</array>
<key>com.apple.developer.default-data-protection</key>
<string>NSFileProtectionComplete</string>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.standardnotes.standardnotes</string>
</array>
</dict>
</plist>
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/mobile",
"version": "3.56.0",
"version": "3.56.14",
"author": "Standard Notes.",
"private": true,
"license": "AGPL-3.0-or-later",
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.46.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-17)
**Note:** Version bump only for package @standardnotes/models
## [1.46.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-13)
**Note:** Version bump only for package @standardnotes/models
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/models",
"version": "1.46.10",
"version": "1.46.11",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+56
View File
@@ -3,6 +3,62 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.386](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-20)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.385](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-19)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.384](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-19)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.383](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.382](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.381](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.380](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-17)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.379](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-16)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.378](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-16)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.377](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-16)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.376](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.375](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.374](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.373](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.372](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/releases
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/releases",
"version": "1.4.372",
"version": "1.4.386",
"license": "AGPL-3.0-or-later",
"main": "dist/releases.json",
"types": "dist/index.d.ts",
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.13.30](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-17)
**Note:** Version bump only for package @standardnotes/responses
## [1.13.29](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-13)
**Note:** Version bump only for package @standardnotes/responses
+1 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/responses",
"version": "1.13.29",
"version": "1.13.30",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -35,7 +35,6 @@
"dependencies": {
"@standardnotes/common": "^1.50.0",
"@standardnotes/features": "workspace:*",
"@standardnotes/security": "^1.7.6",
"reflect-metadata": "^0.1.13"
}
}
@@ -1,4 +1,4 @@
import { ValetTokenOperation } from './ValetTokenOperation'
import { ValetTokenOperation } from '../Temp/ValetTokenOperation'
export type CreateValetTokenPayload = {
operation: ValetTokenOperation
@@ -1 +0,0 @@
export type ValetTokenOperation = 'read' | 'write' | 'delete' | 'move'
@@ -1,4 +1,4 @@
import { Role } from '@standardnotes/security'
import { Role } from '../Temp/Role'
export type DeprecatedResponseMeta = {
auth: {
@@ -1,4 +1,4 @@
import { Role } from '@standardnotes/security'
import { Role } from '../Temp/Role'
export type HttpResponseMeta = {
auth: {
@@ -0,0 +1,4 @@
export type Role = {
uuid: string
name: string
}
@@ -0,0 +1,7 @@
export type Subscription = {
planName: string
endsAt: number
createdAt: number
updatedAt: number
cancelled: boolean
}
@@ -0,0 +1,6 @@
export enum ValetTokenOperation {
Read = 'read',
Write = 'write',
Delete = 'delete',
Move = 'move',
}
@@ -1,4 +1,4 @@
import { Subscription } from '@standardnotes/security'
import { Subscription } from '../Temp/Subscription'
export type GetSubscriptionResponse = {
subscription?: Subscription
+6 -1
View File
@@ -14,6 +14,12 @@ export * from './Auth/SignInResponse'
export * from './Auth/SignOutResponse'
export * from './Auth/User'
/** Temps are awaiting final publish state on server repo */
export * from './Temp/SharedVaultMoveType'
export * from './Temp/Subscription'
export * from './Temp/ValetTokenOperation'
export * from './Temp/Role'
export * from './Error/ClientDisplayableError'
export * from './Files/CloseUploadSessionResponse'
@@ -24,7 +30,6 @@ export * from './Files/DownloadFileChunkResponse'
export * from './Files/StartUploadSessionResponse'
export * from './Files/UploadFileChunkResponse'
export * from './Files/MoveFileResponse'
export * from './Files/ValetTokenOperation'
export * from './Http'
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.63.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-17)
**Note:** Version bump only for package @standardnotes/services
## [1.63.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-14)
**Note:** Version bump only for package @standardnotes/services
+1 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/services",
"version": "1.63.4",
"version": "1.63.5",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -24,7 +24,6 @@
"@standardnotes/files": "workspace:^",
"@standardnotes/models": "workspace:^",
"@standardnotes/responses": "workspace:*",
"@standardnotes/security": "^1.7.5",
"@standardnotes/sncrypto-common": "workspace:^",
"@standardnotes/utils": "workspace:*",
"reflect-metadata": "^0.1.13"
@@ -1,4 +1,4 @@
import { Role } from '@standardnotes/security'
import { Role } from '@standardnotes/responses'
export type MetaReceivedData = {
userUuid: string
@@ -10,7 +10,7 @@ import {
isNote,
NoteContent,
} from '@standardnotes/models'
import { ClientDisplayableError } from '@standardnotes/responses'
import { ClientDisplayableError, ValetTokenOperation } from '@standardnotes/responses'
import {
FilesApiInterface,
FileBackupMetadataFile,
@@ -520,7 +520,7 @@ export class FilesBackupService extends AbstractService implements BackupService
},
})
const token = await this.api.createUserFileValetToken(file.remoteIdentifier, 'read')
const token = await this.api.createUserFileValetToken(file.remoteIdentifier, ValetTokenOperation.Read)
if (token instanceof ClientDisplayableError) {
this.status.removeMessage(messageId)
@@ -1,9 +1,10 @@
import { MutatorClientInterface } from './../Mutator/MutatorClientInterface'
import {
ClientDisplayableError,
ValetTokenOperation,
isClientDisplayableError,
isErrorResponse,
SharedVaultMoveType,
ValetTokenOperation,
} from '@standardnotes/responses'
import {
FileItem,
@@ -47,12 +48,7 @@ import { AbstractService } from '../Service/AbstractService'
import { SyncServiceInterface } from '../Sync/SyncServiceInterface'
import { DecryptItemsKeyWithUserFallback } from '../Encryption/Functions'
import { log, LoggingDomain } from '../Logging'
import {
SharedVaultMoveType,
SharedVaultServer,
SharedVaultServerInterface,
HttpServiceInterface,
} from '@standardnotes/api'
import { SharedVaultServer, SharedVaultServerInterface, HttpServiceInterface } from '@standardnotes/api'
import { ContentType } from '@standardnotes/domain-core'
const OneHundredMb = 100 * 1_000_000
@@ -111,7 +107,7 @@ export class FileService extends AbstractService implements FilesClientInterface
moveOperationType?: SharedVaultMoveType
sharedVaultToSharedVaultMoveTargetUuid?: string
}): Promise<string | ClientDisplayableError> {
if (params.operation !== 'write' && !params.fileUuidRequiredForExistingFiles) {
if (params.operation !== ValetTokenOperation.Write && !params.fileUuidRequiredForExistingFiles) {
throw new Error('File UUID is required for for non-write operations')
}
@@ -139,7 +135,7 @@ export class FileService extends AbstractService implements FilesClientInterface
const valetTokenResult = await this.createSharedVaultValetToken({
sharedVaultUuid: file.shared_vault_uuid ? file.shared_vault_uuid : sharedVault.sharing.sharedVaultUuid,
remoteIdentifier: file.remoteIdentifier,
operation: 'move',
operation: ValetTokenOperation.Move,
fileUuidRequiredForExistingFiles: file.uuid,
moveOperationType: file.shared_vault_uuid ? 'shared-vault-to-shared-vault' : 'user-to-shared-vault',
sharedVaultToSharedVaultMoveTargetUuid: file.shared_vault_uuid ? sharedVault.sharing.sharedVaultUuid : undefined,
@@ -164,7 +160,7 @@ export class FileService extends AbstractService implements FilesClientInterface
const valetTokenResult = await this.createSharedVaultValetToken({
sharedVaultUuid: file.shared_vault_uuid,
remoteIdentifier: file.remoteIdentifier,
operation: 'move',
operation: ValetTokenOperation.Move,
fileUuidRequiredForExistingFiles: file.uuid,
moveOperationType: 'shared-vault-to-user',
})
@@ -190,10 +186,10 @@ export class FileService extends AbstractService implements FilesClientInterface
? await this.createSharedVaultValetToken({
sharedVaultUuid: vault.sharing.sharedVaultUuid,
remoteIdentifier,
operation: 'write',
operation: ValetTokenOperation.Write,
unencryptedFileSizeForUpload: sizeInBytes,
})
: await this.createUserValetToken(remoteIdentifier, 'write', sizeInBytes)
: await this.createUserValetToken(remoteIdentifier, ValetTokenOperation.Write, sizeInBytes)
if (valetTokenResult instanceof ClientDisplayableError) {
return valetTokenResult
@@ -342,10 +338,10 @@ export class FileService extends AbstractService implements FilesClientInterface
? await this.createSharedVaultValetToken({
sharedVaultUuid: file.shared_vault_uuid,
remoteIdentifier: file.remoteIdentifier,
operation: 'read',
operation: ValetTokenOperation.Read,
fileUuidRequiredForExistingFiles: file.uuid,
})
: await this.createUserValetToken(file.remoteIdentifier, 'read')
: await this.createUserValetToken(file.remoteIdentifier, ValetTokenOperation.Read)
if (tokenResult instanceof ClientDisplayableError) {
return tokenResult
@@ -375,10 +371,10 @@ export class FileService extends AbstractService implements FilesClientInterface
? await this.createSharedVaultValetToken({
sharedVaultUuid: file.shared_vault_uuid,
remoteIdentifier: file.remoteIdentifier,
operation: 'delete',
operation: ValetTokenOperation.Delete,
fileUuidRequiredForExistingFiles: file.uuid,
})
: await this.createUserValetToken(file.remoteIdentifier, 'delete')
: await this.createUserValetToken(file.remoteIdentifier, ValetTokenOperation.Delete)
if (tokenResult instanceof ClientDisplayableError) {
return tokenResult
@@ -13,8 +13,12 @@ import { InternalEventBusInterface } from '../Internal/InternalEventBusInterface
import { AbstractService } from '../Service/AbstractService'
import { SubscriptionManagerInterface } from './SubscriptionManagerInterface'
import { AppleIAPReceipt } from './AppleIAPReceipt'
import { AvailableSubscriptions, getErrorFromErrorResponse, isErrorResponse } from '@standardnotes/responses'
import { Subscription } from '@standardnotes/security'
import {
AvailableSubscriptions,
getErrorFromErrorResponse,
isErrorResponse,
Subscription,
} from '@standardnotes/responses'
import { SubscriptionManagerEvent } from './SubscriptionManagerEvent'
export class SubscriptionManager
@@ -170,7 +174,7 @@ export class SubscriptionManager
}
}
private async fetchOnlineSubscription(): Promise<void> {
public async fetchOnlineSubscription(): Promise<void> {
if (!this.sessions.isSignedIn()) {
return
}
@@ -1,8 +1,7 @@
import { ApplicationServiceInterface } from './../Service/ApplicationServiceInterface'
import { Invitation } from '@standardnotes/models'
import { AppleIAPReceipt } from './AppleIAPReceipt'
import { AvailableSubscriptions } from '@standardnotes/responses'
import { Subscription } from '@standardnotes/security'
import { AvailableSubscriptions, Subscription } from '@standardnotes/responses'
import { SubscriptionManagerEvent } from './SubscriptionManagerEvent'
export interface SubscriptionManagerInterface extends ApplicationServiceInterface<SubscriptionManagerEvent, unknown> {
@@ -15,6 +14,7 @@ export interface SubscriptionManagerInterface extends ApplicationServiceInterfac
get isUserSubscriptionExpired(): boolean
get isUserSubscriptionCanceled(): boolean
fetchOnlineSubscription(): Promise<void>
listSubscriptionInvitations(): Promise<Invitation[]>
inviteToSubscription(inviteeEmail: string): Promise<boolean>
cancelInvitation(inviteUuid: string): Promise<boolean>
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.202.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-20)
**Note:** Version bump only for package @standardnotes/snjs
## [2.202.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-17)
### Bug Fixes
* fixes issue where some accounts were not correctly loading subscription info ([#2361](https://github.com/standardnotes/app/issues/2361)) ([eba1289](https://github.com/standardnotes/app/commit/eba1289ab9da10a545b58572bcf0dde8c050de61))
## [2.202.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-16)
### Bug Fixes
* Fixed issue where some editors would not open on Android ([5932eb8](https://github.com/standardnotes/app/commit/5932eb814cbf81568d435afe134b99441d71f930))
## [2.202.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-14)
**Note:** Version bump only for package @standardnotes/snjs
+1 -1
View File
@@ -8,7 +8,7 @@ export function platformFromString(string: string) {
'linux-desktop': Platform.LinuxDesktop,
'windows-web': Platform.WindowsWeb,
'windows-desktop': Platform.WindowsDesktop,
ios: Platform.Ios,
'ios-web': Platform.Ios,
android: Platform.Android,
}
return map[string]
+1 -3
View File
@@ -66,15 +66,13 @@ import {
HttpErrorResponse,
HttpSuccessResponse,
isErrorResponse,
ValetTokenOperation,
MoveFileResponse,
ValetTokenOperation,
} from '@standardnotes/responses'
import { LegacySession, MapperInterface, Session, SessionToken } from '@standardnotes/domain-core'
import { HttpServiceInterface } from '@standardnotes/api'
import { SNRootKeyParams } from '@standardnotes/encryption'
import { PureCryptoInterface } from '@standardnotes/sncrypto-common'
import { isUrlFirstParty, TRUSTED_FEATURE_HOSTS } from '@Lib/Hosts'
import { Paths } from './Paths'
import { DiskStorageService } from '../Storage/DiskStorageService'
@@ -20,7 +20,10 @@ export class GetFeatureUrl {
}
if (uiFeature.isFeatureDescription) {
return this.urlForNativeComponent(uiFeature.asFeatureDescription)
return this.urlForNativeComponent(
uiFeature.asFeatureDescription.identifier,
uiFeature.asFeatureDescription.index_path,
)
}
if (uiFeature.asComponent.offlineOnly) {
@@ -29,6 +32,13 @@ export class GetFeatureUrl {
const url = uiFeature.asComponent.hosted_url || uiFeature.asComponent.legacy_url
if (!url) {
if (uiFeature.asComponent.package_info.identifier && uiFeature.asComponent.package_info.index_path) {
return this.urlForNativeComponent(
uiFeature.asComponent.package_info.identifier,
uiFeature.asComponent.package_info.index_path,
)
}
return undefined
}
@@ -58,13 +68,16 @@ export class GetFeatureUrl {
}
}
private urlForNativeComponent(feature: ComponentFeatureDescription): string {
private urlForNativeComponent(
identifier: ComponentFeatureDescription['identifier'],
index_path: ComponentFeatureDescription['index_path'],
): string {
if (this.isMobile) {
const baseUrlRequiredForThemesInsideEditors = window.location.href.split('/index.html')[0]
return `${baseUrlRequiredForThemesInsideEditors}/web-src/components/assets/${feature.identifier}/${feature.index_path}`
return `${baseUrlRequiredForThemesInsideEditors}/web-src/components/assets/${identifier}/${index_path}`
} else {
const baseUrlRequiredForThemesInsideEditors = window.location.origin
return `${baseUrlRequiredForThemesInsideEditors}/components/assets/${feature.identifier}/${feature.index_path}`
return `${baseUrlRequiredForThemesInsideEditors}/components/assets/${identifier}/${index_path}`
}
}
@@ -11,7 +11,7 @@ jest.mock('@standardnotes/features', () => ({
}))
import { FindNativeFeature } from '@standardnotes/features'
import { Subscription } from '@standardnotes/security'
import { Subscription } from '@standardnotes/responses'
describe('GetFeatureStatusUseCase', () => {
let items: jest.Mocked<ItemManagerInterface>
@@ -1,6 +1,6 @@
import { AnyFeatureDescription, FeatureIdentifier, FindNativeFeature } from '@standardnotes/features'
import { DecryptedItemInterface } from '@standardnotes/models'
import { Subscription } from '@standardnotes/security'
import { Subscription } from '@standardnotes/responses'
import { FeatureStatus, ItemManagerInterface } from '@standardnotes/services'
import { convertTimestampToMilliseconds } from '@standardnotes/utils'
@@ -169,9 +169,7 @@ export class SNSessionManager
private setSession(session: Session | LegacySession, persist = true): void {
this.session = session
if (session instanceof Session) {
this.httpService.setSession(session)
}
this.httpService.setSession(session)
this.apiService.setSession(session, persist)
+17 -5
View File
@@ -51,7 +51,7 @@ describe('files', function () {
await setup({ fakeCrypto: true, subscription: true })
const remoteIdentifier = Utils.generateUuid()
const token = await application.apiService.createUserFileValetToken(remoteIdentifier, 'write')
const token = await application.apiService.createUserFileValetToken(remoteIdentifier, ValetTokenOperation.Write)
expect(token.length).to.be.above(0)
})
@@ -60,7 +60,10 @@ describe('files', function () {
await setup({ fakeCrypto: true, subscription: false })
const remoteIdentifier = Utils.generateUuid()
const tokenOrError = await application.apiService.createUserFileValetToken(remoteIdentifier, 'write')
const tokenOrError = await application.apiService.createUserFileValetToken(
remoteIdentifier,
ValetTokenOperation.Write,
)
expect(isClientDisplayableError(tokenOrError)).to.equal(true)
})
@@ -76,7 +79,10 @@ describe('files', function () {
})
const remoteIdentifier = Utils.generateUuid()
const tokenOrError = await application.apiService.createUserFileValetToken(remoteIdentifier, 'write')
const tokenOrError = await application.apiService.createUserFileValetToken(
remoteIdentifier,
ValetTokenOperation.Write,
)
expect(isClientDisplayableError(tokenOrError)).to.equal(true)
})
@@ -84,12 +90,18 @@ describe('files', function () {
it('creating two upload sessions successively should succeed', async function () {
await setup({ fakeCrypto: true, subscription: true })
const firstToken = await application.apiService.createUserFileValetToken(Utils.generateUuid(), 'write')
const firstToken = await application.apiService.createUserFileValetToken(
Utils.generateUuid(),
ValetTokenOperation.Write,
)
const firstSession = await application.apiService.startUploadSession(firstToken, 'user')
expect(firstSession.uploadId).to.be.ok
const secondToken = await application.apiService.createUserFileValetToken(Utils.generateUuid(), 'write')
const secondToken = await application.apiService.createUserFileValetToken(
Utils.generateUuid(),
ValetTokenOperation.Write,
)
const secondSession = await application.apiService.startUploadSession(secondToken, 'user')
expect(secondSession.uploadId).to.be.ok
+1 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/snjs",
"version": "2.202.5",
"version": "2.202.8",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -44,7 +44,6 @@
"@standardnotes/files": "workspace:*",
"@standardnotes/models": "workspace:*",
"@standardnotes/responses": "workspace:*",
"@standardnotes/security": "^1.7.6",
"@standardnotes/services": "workspace:*",
"@standardnotes/settings": "^1.20.0",
"@standardnotes/sncrypto-common": "workspace:*",
+4 -4
View File
@@ -1,6 +1,6 @@
const path = require('path');
const webpack = require('webpack');
const CircularDependencyPlugin = require('circular-dependency-plugin');
const path = require('path')
const webpack = require('webpack')
const CircularDependencyPlugin = require('circular-dependency-plugin')
module.exports = {
entry: {
@@ -57,4 +57,4 @@ module.exports = {
cwd: process.cwd(),
}),
],
};
}
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-17)
**Note:** Version bump only for package @standardnotes/ui-services
## [1.28.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-14)
**Note:** Version bump only for package @standardnotes/ui-services
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/ui-services",
"version": "1.28.5",
"version": "1.28.6",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+50 -2
View File
@@ -3,6 +3,56 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.167.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-20)
**Note:** Version bump only for package @standardnotes/web
## [3.167.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-19)
### Bug Fixes
* Fixed issue where trying to create new folder on mobile would close navigation pane ([2b0df30](https://github.com/standardnotes/app/commit/2b0df30ca25bd15d7e4c279fa0e586ddec08b821))
# [3.167.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-19)
### Features
* Added Undo/Redo buttons to Super mobile toolbar ([edead7e](https://github.com/standardnotes/app/commit/edead7e2511b6c59843bb5b0336ef89fd3240f77))
## [3.166.19](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)
**Note:** Version bump only for package @standardnotes/web
## [3.166.18](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)
**Note:** Version bump only for package @standardnotes/web
## [3.166.17](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)
**Note:** Version bump only for package @standardnotes/web
## [3.166.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-17)
**Note:** Version bump only for package @standardnotes/web
## [3.166.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-16)
### Bug Fixes
* Fixed issue where some editors would not open on Android ([5932eb8](https://github.com/standardnotes/app/commit/5932eb814cbf81568d435afe134b99441d71f930))
## [3.166.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-16)
**Note:** Version bump only for package @standardnotes/web
## [3.166.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/web
## [3.166.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/web
## [3.166.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)
**Note:** Version bump only for package @standardnotes/web
@@ -121,8 +171,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [3.164.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-03)
### Features
**Note:** Version bump only for package @standardnotes/web
## [3.163.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-02)
+131 -4
View File
@@ -1,5 +1,135 @@
{
"versions": [
{
"version": "3.167.2",
"title": "[3.167.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-20)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.167.1",
"title": "[3.167.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-19)",
"date": null,
"body": "### Bug Fixes\n\n* Fixed issue where trying to create new folder on mobile would close navigation pane ([2b0df30](https://github.com/standardnotes/app/commit/2b0df30ca25bd15d7e4c279fa0e586ddec08b821))",
"parsed": {
"_": [
"Fixed issue where trying to create new folder on mobile would close navigation pane (2b0df30)"
],
"Bug Fixes": [
"Fixed issue where trying to create new folder on mobile would close navigation pane (2b0df30)"
]
}
},
{
"version": "3.167.0",
"title": "[3.167.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-19)",
"date": null,
"body": "### Features\n\n* Added Undo/Redo buttons to Super mobile toolbar ([edead7e](https://github.com/standardnotes/app/commit/edead7e2511b6c59843bb5b0336ef89fd3240f77))",
"parsed": {
"_": [
"Added Undo/Redo buttons to Super mobile toolbar (edead7e)"
],
"Features": [
"Added Undo/Redo buttons to Super mobile toolbar (edead7e)"
]
}
},
{
"version": "3.166.19",
"title": "[3.166.19](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.166.18",
"title": "[3.166.18](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.166.17",
"title": "[3.166.17](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-18)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.166.16",
"title": "[3.166.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-17)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.166.15",
"title": "[3.166.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-16)",
"date": null,
"body": "### Bug Fixes\n\n* Fixed issue where some editors would not open on Android ([5932eb8](https://github.com/standardnotes/app/commit/5932eb814cbf81568d435afe134b99441d71f930))",
"parsed": {
"_": [
"Fixed issue where some editors would not open on Android (5932eb8)"
],
"Bug Fixes": [
"Fixed issue where some editors would not open on Android (5932eb8)"
]
}
},
{
"version": "3.166.14",
"title": "[3.166.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-16)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.166.13",
"title": "[3.166.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.166.12",
"title": "[3.166.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.166.11",
"title": "[3.166.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-15)",
@@ -318,13 +448,10 @@
"version": "3.164.0",
"title": "[3.164.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-03)",
"date": null,
"body": "### Features\n\n**Note:** Version bump only for package @standardnotes/web",
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
],
"Features": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
+2 -2
View File
@@ -1,9 +1,9 @@
{
"name": "@standardnotes/web",
"version": "3.166.11",
"version": "3.167.2",
"license": "AGPL-3.0-or-later",
"main": "dist/app.js",
"author": "Standard Notes",
"author": "Standard Notes.",
"private": true,
"files": [
"dist"
@@ -111,6 +111,7 @@ export const IconNameToSvgMapping = {
password: icons.PasswordIcon,
pencil: icons.PencilIcon,
pin: icons.PinIcon,
redo: icons.RedoIcon,
restore: icons.RestoreIcon,
save: icons.SaveIcon,
search: icons.SearchIcon,
@@ -135,6 +136,7 @@ export const IconNameToSvgMapping = {
tune: icons.TuneIcon,
unarchive: icons.UnarchiveIcon,
underline: icons.UnderlineIcon,
undo: icons.UndoIcon,
unpin: icons.UnpinIcon,
upload: icons.UploadIcon,
user: icons.UserIcon,
@@ -1,6 +1,6 @@
import Icon from '@/Components/Icon/Icon'
import { observer } from 'mobx-react-lite'
import { useState, useEffect, useMemo, useCallback } from 'react'
import { useState, useEffect, useMemo, useCallback, useRef } from 'react'
import { NoteType, Platform, SNNote } from '@standardnotes/snjs'
import {
CHANGE_EDITOR_WIDTH_COMMAND,
@@ -8,6 +8,9 @@ import {
PIN_NOTE_COMMAND,
SHOW_HIDDEN_OPTIONS_KEYBOARD_COMMAND,
STAR_NOTE_COMMAND,
SUPER_EXPORT_HTML,
SUPER_EXPORT_JSON,
SUPER_EXPORT_MARKDOWN,
SUPER_SHOW_MARKDOWN_PREVIEW,
} from '@standardnotes/ui-services'
import ChangeEditorOption from './ChangeEditorOption'
@@ -39,6 +42,8 @@ import { useApplication } from '../ApplicationProvider'
import { MutuallyExclusiveMediaQueryBreakpoints } from '@/Hooks/useMediaQuery'
import AddToVaultMenuOption from '../Vaults/AddToVaultMenuOption'
import { featureTrunkVaultsEnabled } from '@/FeatureTrunk'
import Menu from '../Menu/Menu'
import Popover from '../Popover/Popover'
const iconSize = MenuItemIconSize
const iconClassDanger = `text-danger mr-2 ${iconSize}`
@@ -181,6 +186,9 @@ const NotesOptions = ({
[application],
)
const superExportButtonRef = useRef<HTMLButtonElement>(null)
const [isSuperExportMenuOpen, setIsSuperExportMenuOpen] = useState(false)
const unauthorized = notes.some((note) => !application.isAuthorizedToRenderItem(note))
if (unauthorized) {
return <ProtectedUnauthorizedLabel />
@@ -286,7 +294,48 @@ const NotesOptions = ({
{pinShortcut && <KeyboardShortcutIndicator className="ml-auto" shortcut={pinShortcut} />}
</MenuItem>
)}
{!isOnlySuperNoteSelected && (
{isOnlySuperNoteSelected ? (
<>
<MenuItem
ref={superExportButtonRef}
onClick={() => {
setIsSuperExportMenuOpen((open) => !open)
}}
>
<div className="flex items-center">
<Icon type="download" className={iconClass} />
Export
</div>
<Icon type="chevron-right" className="ml-auto text-neutral" />
</MenuItem>
<Popover
title="Export note"
side="left"
align="start"
open={isSuperExportMenuOpen}
anchorElement={superExportButtonRef.current}
togglePopover={() => {
setIsSuperExportMenuOpen(!isSuperExportMenuOpen)
}}
className="py-1"
>
<Menu a11yLabel={'Super note export menu'} isOpen={isSuperExportMenuOpen}>
<MenuItem onClick={() => commandService.triggerCommand(SUPER_EXPORT_JSON, notes[0].title)}>
<Icon type="code" className={iconClass} />
Export as JSON
</MenuItem>
<MenuItem onClick={() => commandService.triggerCommand(SUPER_EXPORT_MARKDOWN, notes[0].title)}>
<Icon type="markdown" className={iconClass} />
Export as Markdown
</MenuItem>
<MenuItem onClick={() => commandService.triggerCommand(SUPER_EXPORT_HTML, notes[0].title)}>
<Icon type="rich-text" className={iconClass} />
Export as HTML
</MenuItem>
</Menu>
</Popover>
</>
) : (
<>
<MenuItem
onClick={() => {
@@ -1,17 +1,8 @@
import { SNNote } from '@standardnotes/snjs'
import {
PlatformedKeyboardShortcut,
SUPER_EXPORT_HTML,
SUPER_EXPORT_JSON,
SUPER_EXPORT_MARKDOWN,
} from '@standardnotes/ui-services'
import { useRef, useState } from 'react'
import { useCommandService } from '../CommandProvider'
import { PlatformedKeyboardShortcut } from '@standardnotes/ui-services'
import Icon from '../Icon/Icon'
import { KeyboardShortcutIndicator } from '../KeyboardShortcutIndicator/KeyboardShortcutIndicator'
import Menu from '../Menu/Menu'
import MenuItem from '../Menu/MenuItem'
import Popover from '../Popover/Popover'
import HorizontalSeparator from '../Shared/HorizontalSeparator'
import { iconClass } from './ClassNames'
@@ -21,12 +12,7 @@ type Props = {
enableSuperMarkdownPreview: () => void
}
const SuperNoteOptions = ({ note, markdownShortcut, enableSuperMarkdownPreview }: Props) => {
const commandService = useCommandService()
const exportButtonRef = useRef<HTMLButtonElement>(null)
const [isExportMenuOpen, setIsExportMenuOpen] = useState(false)
const SuperNoteOptions = ({ markdownShortcut, enableSuperMarkdownPreview }: Props) => {
return (
<>
<HorizontalSeparator classes="my-2" />
@@ -38,45 +24,6 @@ const SuperNoteOptions = ({ note, markdownShortcut, enableSuperMarkdownPreview }
Show Markdown
{markdownShortcut && <KeyboardShortcutIndicator className="ml-auto" shortcut={markdownShortcut} />}
</MenuItem>
<MenuItem
ref={exportButtonRef}
onClick={() => {
setIsExportMenuOpen((open) => !open)
}}
>
<div className="flex items-center">
<Icon type="download" className={iconClass} />
Export
</div>
<Icon type="chevron-right" className="ml-auto text-neutral" />
</MenuItem>
<Popover
title="Export note"
side="left"
align="start"
open={isExportMenuOpen}
anchorElement={exportButtonRef.current}
togglePopover={() => {
setIsExportMenuOpen(!isExportMenuOpen)
}}
className="py-1"
>
<Menu a11yLabel={'Super note export menu'} isOpen={isExportMenuOpen}>
<MenuItem onClick={() => commandService.triggerCommand(SUPER_EXPORT_JSON, note.title)}>
<Icon type="code" className={iconClass} />
Export as JSON
</MenuItem>
<MenuItem onClick={() => commandService.triggerCommand(SUPER_EXPORT_MARKDOWN, note.title)}>
<Icon type="markdown" className={iconClass} />
Export as Markdown
</MenuItem>
<MenuItem onClick={() => commandService.triggerCommand(SUPER_EXPORT_HTML, note.title)}>
<Icon type="rich-text" className={iconClass} />
Export as HTML
</MenuItem>
</Menu>
</Popover>
</>
)
}
@@ -110,6 +110,7 @@ export const usePaneSwipeGesture = (
const touch = event.touches[0]
startX = touch.clientX
clientX = touch.clientX
const isStartOutOfThreshold =
(direction === 'right' && startX > TouchStartThreshold) ||
@@ -2,15 +2,30 @@ import { Title } from '@/Components/Preferences/PreferencesComponents/Content'
import SubscriptionInformation from './SubscriptionInformation'
import NoSubscription from './NoSubscription'
import { observer } from 'mobx-react-lite'
import { FunctionComponent } from 'react'
import { FunctionComponent, useEffect, useState } from 'react'
import PreferencesGroup from '@/Components/Preferences/PreferencesComponents/PreferencesGroup'
import PreferencesSegment from '@/Components/Preferences/PreferencesComponents/PreferencesSegment'
import { useApplication } from '@/Components/ApplicationProvider'
import { SubscriptionManagerEvent, Subscription } from '@standardnotes/snjs'
const Subscription: FunctionComponent = () => {
const application = useApplication()
const onlineSubscription = application.controllers.subscriptionController.onlineSubscription
const [onlineSubscription, setOnlineSubscription] = useState<Subscription | undefined>(
application.controllers.subscriptionController.onlineSubscription,
)
useEffect(() => {
return application.subscriptions.addEventObserver((event) => {
if (event === SubscriptionManagerEvent.DidFetchSubscription) {
setOnlineSubscription(application.controllers.subscriptionController.onlineSubscription)
}
})
}, [application.subscriptions, application.controllers.subscriptionController])
useEffect(() => {
void application.subscriptions.fetchOnlineSubscription()
}, [application.subscriptions])
return (
<PreferencesGroup>
@@ -36,7 +36,7 @@ const OfflineSubscription: FunctionComponent<Props> = ({ application, onSuccess
const homeServer = application.homeServer
const homeServerEnabled = homeServer && homeServer.isHomeServerEnabled()
const homeServerEnabled = homeServer && (await homeServer.isHomeServerEnabled())
const homeServerIsRunning = homeServerEnabled && (await homeServer.isHomeServerRunning())
if (homeServerEnabled) {
@@ -4,7 +4,17 @@ import useModal from '../../Lexical/Hooks/useModal'
import { InsertTableDialog } from '../../Plugins/TablePlugin'
import { getSelectedNode } from '../../Lexical/Utils/getSelectedNode'
import { sanitizeUrl } from '../../Lexical/Utils/sanitizeUrl'
import { $getSelection, $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'
import {
$getSelection,
$isRangeSelection,
CAN_REDO_COMMAND,
CAN_UNDO_COMMAND,
COMMAND_PRIORITY_CRITICAL,
FORMAT_TEXT_COMMAND,
REDO_COMMAND,
UNDO_COMMAND,
} from 'lexical'
import { mergeRegister } from '@lexical/utils'
import { $isLinkNode, TOGGLE_LINK_COMMAND } from '@lexical/link'
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { GetAlignmentBlocks } from '../Blocks/Alignment'
@@ -64,13 +74,53 @@ const MobileToolbarPlugin = () => {
}
}, [editor])
const [canUndo, setCanUndo] = useState(false)
const [canRedo, setCanRedo] = useState(false)
useEffect(() => {
return mergeRegister(
editor.registerCommand<boolean>(
CAN_UNDO_COMMAND,
(payload) => {
setCanUndo(payload)
return false
},
COMMAND_PRIORITY_CRITICAL,
),
editor.registerCommand<boolean>(
CAN_REDO_COMMAND,
(payload) => {
setCanRedo(payload)
return false
},
COMMAND_PRIORITY_CRITICAL,
),
)
}, [editor])
const items = useMemo(
(): {
name: string
iconName: string
keywords?: string[]
disabled?: boolean
onSelect: () => void
}[] => [
{
name: 'Undo',
iconName: 'undo',
disabled: !canUndo,
onSelect: () => {
editor.dispatchCommand(UNDO_COMMAND, undefined)
},
},
{
name: 'Redo',
iconName: 'redo',
disabled: !canRedo,
onSelect: () => {
editor.dispatchCommand(REDO_COMMAND, undefined)
},
},
{
name: 'Bold',
iconName: 'bold',
@@ -150,7 +200,7 @@ const MobileToolbarPlugin = () => {
GetCollapsibleBlock(editor),
...GetEmbedsBlocks(editor),
],
[application.keyboardService, editor, insertLink, showModal],
[application.keyboardService, canRedo, canUndo, editor, insertLink, showModal],
)
useEffect(() => {
@@ -222,10 +272,11 @@ const MobileToolbarPlugin = () => {
{items.map((item) => {
return (
<button
className="flex items-center justify-center rounded px-3 py-3"
className="flex items-center justify-center rounded px-3 py-3 disabled:opacity-50"
aria-label={item.name}
onClick={item.onSelect}
key={item.name}
disabled={item.disabled}
>
<Icon type={item.iconName} size="medium" className="!text-current [&>path]:!text-current" />
</button>
@@ -1,4 +1,4 @@
import { Subscription } from '@standardnotes/security'
import { Subscription } from '@standardnotes/responses'
import { destroyAllObjectProperties } from '@/Utils'
import {
ApplicationEvent,
+1 -6
View File
@@ -4221,7 +4221,6 @@ __metadata:
"@standardnotes/domain-core": ^1.22.0
"@standardnotes/models": "workspace:*"
"@standardnotes/responses": "workspace:*"
"@standardnotes/security": ^1.7.6
"@standardnotes/utils": "workspace:*"
"@types/jest": ^29.2.3
"@typescript-eslint/eslint-plugin": "*"
@@ -4518,7 +4517,6 @@ __metadata:
dependencies:
"@standardnotes/common": ^1.50.0
"@standardnotes/domain-core": ^1.22.0
"@standardnotes/security": ^1.7.6
"@types/jest": ^29.2.3
"@typescript-eslint/eslint-plugin": "*"
eslint: "*"
@@ -4774,7 +4772,6 @@ __metadata:
dependencies:
"@standardnotes/common": ^1.50.0
"@standardnotes/features": "workspace:*"
"@standardnotes/security": ^1.7.6
"@types/jest": ^29.2.3
"@typescript-eslint/eslint-plugin": "*"
eslint: "*"
@@ -4795,7 +4792,7 @@ __metadata:
languageName: node
linkType: hard
"@standardnotes/security@npm:1.7.6, @standardnotes/security@npm:^1.2.0, @standardnotes/security@npm:^1.7.5, @standardnotes/security@npm:^1.7.6":
"@standardnotes/security@npm:1.7.6, @standardnotes/security@npm:^1.2.0":
version: 1.7.6
resolution: "@standardnotes/security@npm:1.7.6"
dependencies:
@@ -4817,7 +4814,6 @@ __metadata:
"@standardnotes/files": "workspace:^"
"@standardnotes/models": "workspace:^"
"@standardnotes/responses": "workspace:*"
"@standardnotes/security": ^1.7.5
"@standardnotes/sncrypto-common": "workspace:^"
"@standardnotes/utils": "workspace:*"
"@types/jest": ^29.2.3
@@ -4918,7 +4914,6 @@ __metadata:
"@standardnotes/files": "workspace:*"
"@standardnotes/models": "workspace:*"
"@standardnotes/responses": "workspace:*"
"@standardnotes/security": ^1.7.6
"@standardnotes/services": "workspace:*"
"@standardnotes/settings": ^1.20.0
"@standardnotes/sncrypto-common": "workspace:*"