Compare commits

...
Author SHA1 Message Date
StandardNotes CI 9dc51f51b2 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
2022-10-23 06:28:39 +00:00
Aman Harwara f1f0d65dd5 Merge branch 'main' of github.com:standardnotes/app 2022-10-23 11:30:09 +05:30
Aman Harwara 47b3286235 fix: new note button on mobile when no account 2022-10-23 11:29:46 +05:30
StandardNotes CI 166953de20 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
2022-10-23 05:40:52 +00:00
Aman Harwara b98f5e2d02 fix: link autocomplete input keyboard navigation (#1859) 2022-10-23 10:41:19 +05:30
StandardNotes CI 5dd3d521cb chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
2022-10-22 12:35:16 +00:00
Aman Harwara fc6c6bad2c fix: hide items list button on desktop 2022-10-22 17:35:37 +05:30
StandardNotes CI e9bf7d336b chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2022-10-21 18:42:09 +00:00
Aman Harwara e63b4f0592 fix: new tag creation 2022-10-21 23:35:27 +05:30
StandardNotes CI ac28b29d65 chore(release): publish
- @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected].7
 - @standardnotes/[email protected].7
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2022-10-21 16:52:42 +00:00
Mo 18235751d4 ci: ios fix 2022-10-21 11:22:04 -05:00
Mo cbd0063926 feat: ability to favorite tags + customize icon (#1858) 2022-10-21 11:11:31 -05:00
StandardNotes CI 3b048a31aa chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2022-10-21 14:06:04 +00:00
Aman Harwara 4a2dc1ef7a chore: lint 2022-10-21 18:59:07 +05:30
Aman Harwara 21f725bb2a feat: "create new note" floating button on mobile (#1857) 2022-10-21 18:36:55 +05:30
StandardNotes CI 173bacdfa3 chore(release): publish
- @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
2022-10-21 13:01:13 +00:00
Karol Sójko c503d781ae fix(web): event observer interface import 2022-10-21 14:31:07 +02:00
Karol Sójko 9fb85cd77a fix: refactor application event observing on web 2022-10-21 14:28:11 +02:00
StandardNotes CI bd40a49484 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
2022-10-21 12:07:49 +00:00
Aman Harwara 4a1612c7dc fix: item selection/unselection on deleting 2022-10-21 17:09:24 +05:30
Aman Harwara d3ed4391b7 fix: template note getting unselected after typing 2022-10-21 16:58:28 +05:30
StandardNotes CI 856e499d89 chore(release): publish
- @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
2022-10-21 08:55:09 +00:00
Karol Sójko 4f0805d5b0 feat(api): add accepting invites by the client 2022-10-21 10:24:49 +02:00
Karol Sójko 401a35f4db fix(ui-services): add route type getter 2022-10-21 10:15:13 +02:00
Karol Sójko 83b484002c feat: add accepting subscription invite route type 2022-10-21 10:05:52 +02:00
StandardNotes CI 30310dbb45 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
2022-10-21 07:23:34 +00:00
Aman Harwara c6e3580678 fix: tag collapse/expand not persisting 2022-10-21 12:24:46 +05:30
Aman Harwara ea285a36d8 Merge branch 'main' of github.com:standardnotes/app 2022-10-21 12:18:22 +05:30
Aman Harwara 1addaf4c39 fix: default auto-dark theme 2022-10-21 12:17:58 +05:30
StandardNotes CI 92bba942f1 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
2022-10-21 06:45:01 +00:00
Aman Harwara f71e6fe703 fix: improve plaintext editor performance on mobile (#1855) 2022-10-21 11:49:23 +05:30
StandardNotes CI 143b528b73 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2022-10-20 18:35:14 +00:00
Mo 5d202a823e Revert "feat: ability to favorite tags (#1852)"
This reverts commit 4f3b258363.
2022-10-20 13:00:22 -05:00
StandardNotes CI 8d7d577b1c chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2022-10-20 15:23:16 +00:00
Aman Harwara 76f23e13ec fix: mobx warnings and react render phase set state error 2022-10-20 20:24:56 +05:30
Mo 4f3b258363 feat: ability to favorite tags (#1852) 2022-10-20 09:28:35 -05:00
StandardNotes CI 9cc3304741 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2022-10-20 13:54:34 +00:00
Aman Harwara 4432f1cb4c feat: persist selected tag & note locally (#1851) 2022-10-20 18:56:59 +05:30
StandardNotes CI 6c47f95748 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2022-10-20 11:34:22 +00:00
Aman Harwara 57fab4f670 fix: "Forgot passcode" and "Switch workspace" lock screen options not working on mobile (#1850) 2022-10-20 16:26:21 +05:30
StandardNotes CI fb7b9350b2 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2022-10-20 09:09:38 +00:00
Aman Harwara fb72c2fdae fix: help & feedback links on mobile (#1849) 2022-10-20 14:10:23 +05:30
Aman Harwara 050fa9cabc feat: make sans-serif font default 2022-10-20 13:36:00 +05:30
Aman Harwara a8535cfa23 fix: make tags non-tabbable 2022-10-20 13:34:28 +05:30
Aman Harwara 27bb4ebdae fix: remove tinted border from change note type button 2022-10-20 13:29:59 +05:30
Aman Harwara 60a8e8b92b fix: links for template notes 2022-10-20 13:06:38 +05:30
Aman Harwara 1f07d9fa17 Merge branch 'main' of github.com:standardnotes/app 2022-10-20 12:45:03 +05:30
Aman Harwara d333d4f188 fix: file not linking to note when uploaded by dragging on note 2022-10-20 12:44:50 +05:30
StandardNotes CI 7e3d7a8825 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2022-10-19 21:18:20 +00:00
Aman Harwara e99c7b7c51 feat: improved file drag-n-drop experience (#1848) 2022-10-20 02:18:52 +05:30
StandardNotes CI 0282a7958a chore(release): publish
- @standardnotes/[email protected].5
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2022-10-19 20:15:08 +00:00
Mo 4030953b00 fix: issue with not being able to unlink a file from a note (#1836) 2022-10-19 14:36:30 -05:00
Mo ba9a9f8d01 ci: conditional (skip e2e) 2022-10-19 06:56:52 -05:00
Mo 80e76ee52c ci: conditional (skip e2e) 2022-10-19 06:56:00 -05:00
StandardNotes CI bbebfb42fd chore(release): publish
- @standardnotes/[email protected].4
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected].9
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2022-10-18 16:21:13 +00:00
Mo 9954bdc29f feat: authorize notes for listed (#1823) 2022-10-18 10:49:30 -05:00
Aman Harwara e4de9c1be7 fix: hide dynamic panels & focused mode options on mobile 2022-10-18 21:02:41 +05:30
Mo 07ffc01ede refactor: add redundant protection checks (#1822) 2022-10-18 10:15:14 -05:00
Aman Harwara eec7ae1589 fix: use mobx action for setting state 2022-10-18 20:30:39 +05:30
Aman Harwara 361f773f2c fix: editor width on mobile 2022-10-18 20:20:01 +05:30
Aman Harwara 5ffd37d447 fix: context menu opening when swiping up from bottom on iOS 2022-10-18 20:04:36 +05:30
Mo 2b66ff82ee refactor: note editor relationships (#1821) 2022-10-18 08:59:24 -05:00
Mo c83dc48d3f ci: pr linking (skip e2e) 2022-10-18 06:39:33 -05:00
StandardNotes CI 8dc7eaf3a4 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].8
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2022-10-18 09:00:14 +00:00
Aman Harwara e40cd157b6 fix: remove switch to classic mx option 2022-10-18 13:54:45 +05:30
Mo 66805fa552 ci: no PRs if depandabot (skip e2e) 2022-10-17 17:00:47 -05:00
StandardNotes CI 3527b1ff38 chore(release): publish
- @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected].7
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2022-10-17 20:39:15 +00:00
Mo fc00b5c499 Revert "chore: remove deprecated editors folder"
This reverts commit a042cd7972.
2022-10-17 15:04:30 -05:00
Mo bb8ac49052 Revert "chore: fix code editor build"
This reverts commit 79fb734a72.
2022-10-17 15:04:23 -05:00
Mo 79fb734a72 chore: fix code editor build 2022-10-17 14:22:26 -05:00
Mo a042cd7972 chore: remove deprecated editors folder 2022-10-17 10:45:09 -05:00
Mo d52fdae0b3 feat: starred notes (#1813) 2022-10-17 10:22:58 -05:00
StandardNotes CI 0082a76b19 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].2
2022-10-17 13:44:54 +00:00
Karol Sójko 3f7d4a4cd9 feat: add workspaces workflow e2e tests (#1810)
* feat: add workspaces workflow e2e tests

* fix: collection finding data for assertions
2022-10-17 15:07:30 +02:00
StandardNotes CI a17ed963cd chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
2022-10-14 15:11:18 +00:00
Mo dd55c63955 fix(desktop): plugin installation 2022-10-14 09:35:37 -05:00
StandardNotes CI a3a8acdd55 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2022-10-14 13:47:22 +00:00
Mo b849c122d6 fix: android build 2022-10-14 08:18:51 -05:00
Aman Harwara d0c413cd15 fix: don't render editor view on mobile if editor pane not selected (#1790) 2022-10-14 18:33:43 +05:30
Karol Sójko 0dad616c5c chore: restore publishing workflow until further fixes 2022-10-14 14:35:56 +02:00
Karol Sójko 3f87f223a3 chore: add components node module binding to cache 2022-10-14 14:12:49 +02:00
Karol Sójko dc96b38c52 chore: fix docker publishing image step 2022-10-14 13:51:13 +02:00
Karol Sójko 38385dee90 chore: allow reruns of yarn install for yarn non pnp resolution 2022-10-14 13:46:08 +02:00
Karol Sójko 0738342cd6 chore: add caching only root node_modules 2022-10-14 13:44:53 +02:00
Karol Sójko 2000435ed5 chore: remove node_modules symlinks from cache dir 2022-10-14 13:38:35 +02:00
Karol Sójko cff1a753ad chore: fix multiple paths yml syntax 2022-10-14 13:10:30 +02:00
Karol Sójko 846648ba25 chore: fix setup node order in publish workflow 2022-10-14 13:07:00 +02:00
Karol Sójko b8a758180e Revert "chore: merge yarn and build cache"
This reverts commit 84bb2db048.
2022-10-14 13:05:18 +02:00
Karol Sójko 84bb2db048 chore: merge yarn and build cache 2022-10-14 13:04:23 +02:00
Karol Sójko 2a7d7c94f5 chore: yarn cache syntax 2022-10-14 12:59:11 +02:00
Karol Sójko dd2a19f33d chore: improve publishing workflow 2022-10-14 12:56:14 +02:00
StandardNotes CI 5cc471cfd5 chore(release): publish
- @standardnotes/[email protected].4
 - @standardnotes/[email protected]
2022-10-13 23:18:12 +00:00
Mo d9d44c7d7c chore: fix android build 2022-10-13 17:48:06 -05:00
StandardNotes CI 638ce849b5 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2022-10-13 21:24:19 +00:00
Mo 1a2dde2e0e feat: soft biometrics lock (#1793) 2022-10-13 15:48:36 -05:00
263 changed files with 4075 additions and 2670 deletions
+3
View File
@@ -1,4 +1,7 @@
{
"extends": ["./node_modules/@standardnotes/config/src/.eslintrc"],
"rules": {
"max-classes-per-file": ["error", 1]
},
"ignorePatterns": [".eslintrc.js", "*.webpack.*.js", "webpack-defaults.js", "jest.config.js", "__mocks__", "**/**/coverage"]
}
+12
View File
@@ -36,11 +36,23 @@ jobs:
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Find open PR
uses: juliangruber/find-pull-request-action@v1
id: find-pull-request
with:
branch: ${{ steps.extract_branch.outputs.branch }}
- run: echo "Pull Request ${number} (${sha})"
env:
number: ${{ steps.find-pull-request.outputs.number }}
sha: ${{ steps.find-pull-request.outputs.head-sha }}
- uses: peter-evans/create-pull-request@v4
if: startsWith(github.event.head_commit.message, 'chore(deps)') == false && startsWith(github.event.head_commit.message, 'chore(deps-dev)') == false
with:
token: ${{ secrets.CI_PAT_TOKEN }}
branch: ${{ github.ref }}
base: main
title: ${{ steps.extract_branch.outputs.branch }}
body: "Public PR: https://github.com/standardnotes/app/pull/${{ steps.find-pull-request.outputs.number }}"
assignees: ${{ github.actor }}
reviewers: ${{ github.actor }}
@@ -70,6 +70,8 @@ jobs:
packages/mobile/android/app/build/outputs/apk/prod/release/app-prod-release.apk
ios:
env:
ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD: true
defaults:
run:
working-directory: packages/mobile
@@ -49,6 +49,8 @@ jobs:
with:
path: packages/mobile
ios:
env:
ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD: true
defaults:
run:
working-directory: packages/mobile
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -66,7 +66,7 @@
"css-loader": "^6.7.1",
"eslint": "^8.17.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.0",
"husky": "^8.0.1",
"lint-staged": "^13.0.1",
"npm-check-updates": "^14.1.1",
"prettier": "^2.6.2",
+28
View File
@@ -3,6 +3,34 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.17.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/api
## [1.17.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
### Bug Fixes
* refactor application event observing on web ([9fb85cd](https://github.com/standardnotes/app/commit/9fb85cd77a627364738a9c21706431d2a01e9c44))
# [1.17.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
### Features
* **api:** add accepting invites by the client ([4f0805d](https://github.com/standardnotes/app/commit/4f0805d5b078e5a3524f5d6699b45dfd7e3456f3))
## [1.16.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-19)
**Note:** Version bump only for package @standardnotes/api
## [1.16.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-18)
**Note:** Version bump only for package @standardnotes/api
## [1.16.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-17)
**Note:** Version bump only for package @standardnotes/api
## [1.16.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-13)
**Note:** Version bump only for package @standardnotes/api
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api",
"version": "1.16.2",
"version": "1.17.2",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -2,4 +2,5 @@ export enum SubscriptionApiOperations {
Inviting,
CancelingInvite,
ListingInvites,
AcceptingInvite,
}
@@ -1,5 +1,6 @@
import { Invitation } from '@standardnotes/models'
import { SubscriptionInviteAcceptResponse } from '../../Response/Subscription/SubscriptionInviteAcceptResponse'
import { SubscriptionInviteCancelResponse } from '../../Response/Subscription/SubscriptionInviteCancelResponse'
import { SubscriptionInviteListResponse } from '../../Response/Subscription/SubscriptionInviteListResponse'
import { SubscriptionInviteResponse } from '../../Response/Subscription/SubscriptionInviteResponse'
@@ -24,6 +25,9 @@ describe('SubscriptionApiService', () => {
subscriptionServer.listInvites = jest.fn().mockReturnValue({
data: { invitations: [{} as jest.Mocked<Invitation>] },
} as jest.Mocked<SubscriptionInviteListResponse>)
subscriptionServer.acceptInvite = jest.fn().mockReturnValue({
data: { success: true },
} as jest.Mocked<SubscriptionInviteAcceptResponse>)
})
it('should invite a user', async () => {
@@ -160,4 +164,48 @@ describe('SubscriptionApiService', () => {
expect(error).not.toBeNull()
})
it('should accept an invite', async () => {
const response = await createService().acceptInvite('1-2-3')
expect(response).toEqual({
data: {
success: true,
},
})
expect(subscriptionServer.acceptInvite).toHaveBeenCalledWith({
inviteUuid: '1-2-3',
})
})
it('should not accept an invite if it is already accepting', async () => {
const service = createService()
Object.defineProperty(service, 'operationsInProgress', {
get: () => new Map([[SubscriptionApiOperations.AcceptingInvite, true]]),
})
let error = null
try {
await service.acceptInvite('1-2-3')
} catch (caughtError) {
error = caughtError
}
expect(error).not.toBeNull()
})
it('should not accept an invite if the server fails', async () => {
subscriptionServer.acceptInvite = jest.fn().mockImplementation(() => {
throw new Error('Oops')
})
let error = null
try {
await createService().acceptInvite('1-2-3')
} catch (caughtError) {
error = caughtError
}
expect(error).not.toBeNull()
})
})
@@ -6,9 +6,11 @@ import { SubscriptionServerInterface } from '../../Server/Subscription/Subscript
import { SubscriptionInviteResponse } from '../../Response/Subscription/SubscriptionInviteResponse'
import { SubscriptionInviteListResponse } from '../../Response/Subscription/SubscriptionInviteListResponse'
import { SubscriptionInviteCancelResponse } from '../../Response/Subscription/SubscriptionInviteCancelResponse'
import { SubscriptionInviteAcceptResponse } from '../../Response/Subscription/SubscriptionInviteAcceptResponse'
import { SubscriptionApiServiceInterface } from './SubscriptionApiServiceInterface'
import { SubscriptionApiOperations } from './SubscriptionApiOperations'
import { Uuid } from '@standardnotes/common'
export class SubscriptionApiService implements SubscriptionApiServiceInterface {
private operationsInProgress: Map<SubscriptionApiOperations, boolean>
@@ -78,4 +80,24 @@ export class SubscriptionApiService implements SubscriptionApiServiceInterface {
throw new ApiCallError(ErrorMessage.GenericFail)
}
}
async acceptInvite(inviteUuid: Uuid): Promise<SubscriptionInviteAcceptResponse> {
if (this.operationsInProgress.get(SubscriptionApiOperations.AcceptingInvite)) {
throw new ApiCallError(ErrorMessage.GenericInProgress)
}
this.operationsInProgress.set(SubscriptionApiOperations.AcceptingInvite, true)
try {
const response = await this.subscriptionServer.acceptInvite({
inviteUuid,
})
this.operationsInProgress.set(SubscriptionApiOperations.AcceptingInvite, false)
return response
} catch (error) {
throw new ApiCallError(ErrorMessage.GenericFail)
}
}
}
@@ -1,5 +1,6 @@
import { Uuid } from '@standardnotes/common'
import { SubscriptionInviteAcceptResponse } from '../../Response/Subscription/SubscriptionInviteAcceptResponse'
import { SubscriptionInviteCancelResponse } from '../../Response/Subscription/SubscriptionInviteCancelResponse'
import { SubscriptionInviteListResponse } from '../../Response/Subscription/SubscriptionInviteListResponse'
import { SubscriptionInviteResponse } from '../../Response/Subscription/SubscriptionInviteResponse'
@@ -8,4 +9,5 @@ export interface SubscriptionApiServiceInterface {
invite(inviteeEmail: string): Promise<SubscriptionInviteResponse>
listInvites(): Promise<SubscriptionInviteListResponse>
cancelInvite(inviteUuid: Uuid): Promise<SubscriptionInviteCancelResponse>
acceptInvite(inviteUuid: Uuid): Promise<SubscriptionInviteAcceptResponse>
}
@@ -1,10 +1,6 @@
import { Uuid } from '@standardnotes/common'
import { ApiEndpointParam } from '../ApiEndpointParam'
import { ApiVersion } from '../../Api/ApiVersion'
export type SubscriptionInviteAcceptRequestParams = {
[ApiEndpointParam.ApiVersion]: ApiVersion.v0
inviteUuid: Uuid
[additionalParam: string]: unknown
}
@@ -1,3 +1 @@
export type SubscriptionInviteAcceptResponseBody = {
success: boolean
}
export type SubscriptionInviteAcceptResponseBody = { success: true } | { success: false; message: string }
+7
View File
@@ -3,6 +3,13 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.7.21](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-18)
### Reverts
* Revert "chore: remove deprecated editors folder" ([fc00b5c](https://github.com/standardnotes/app/commit/fc00b5c4996045750589c3e08c139d5d39bf4140))
* Revert "chore: fix code editor build" ([bb8ac49](https://github.com/standardnotes/app/commit/bb8ac49052136b3f688f19df5c71c2c32a85ed51))
## [2.7.20](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-13)
**Note:** Version bump only for package @standardnotes/components-meta
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/components-meta",
"version": "2.7.20",
"version": "2.7.21",
"private": true,
"author": "Standard Notes.",
"main": "dist",
+102
View File
@@ -3,6 +3,108 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.23.240](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-23)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.239](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-23)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.238](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-22)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.237](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.236](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.235](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.234](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.233](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.232](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.231](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.230](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.229](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-20)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.228](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-20)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.227](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-20)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.226](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-20)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.225](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-20)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.224](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-19)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.223](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-19)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.222](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-18)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.221](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-18)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.220](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-17)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.219](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-17)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.218](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-14)
### Bug Fixes
* **desktop:** plugin installation ([dd55c63](https://github.com/standardnotes/app/commit/dd55c63955fd71a4d4ea0c83144873a53412c341))
## [3.23.217](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-14)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.216](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-13)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.215](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-13)
**Note:** Version bump only for package @standardnotes/desktop
@@ -10,8 +10,9 @@ import {
deleteDir,
deleteDirContents,
ensureDirectoryExists,
extractNestedZip,
extractZip,
FileDoesNotExist,
moveDirContents,
readJSONFile,
} from '../Utils/FileUtils'
import { timeout } from '../Utils/Utils'
@@ -267,6 +268,30 @@ async function checkForUpdate(webContents: Electron.WebContents, mapping: Mappin
}
}
/**
* Some plugin zips may be served directly from GitHub's Releases feature, which automatically generates a zip file.
* However, the actual assets end up being nested inside a root level folder within that zip.
* We can detect if we have a legacy nested structure if after unzipping the zip we end up with
* only 1 entry and that entry is a folder.
*/
async function usesLegacyNestedFolderStructure(dir: string) {
const fileNames = await fs.promises.readdir(dir)
if (fileNames.length > 1) {
return false
}
const stat = fs.lstatSync(path.join(dir, fileNames[0]))
return stat.isDirectory()
}
async function unnestLegacyStructure(dir: string) {
const fileNames = await fs.promises.readdir(dir)
const sourceDir = path.join(dir, fileNames[0])
const destDir = dir
await moveDirContents(sourceDir, destDir)
}
async function installComponent(
webContents: Electron.WebContents,
mapping: MappingFileHandler,
@@ -312,7 +337,12 @@ async function installComponent(
])
logMessage('Extracting', paths.downloadPath, 'to', paths.absolutePath)
await extractNestedZip(paths.downloadPath, paths.absolutePath)
await extractZip(paths.downloadPath, paths.absolutePath)
const legacyStructure = await usesLegacyNestedFolderStructure(paths.absolutePath)
if (legacyStructure) {
await unnestLegacyStructure(paths.absolutePath)
}
let main = 'index.html'
try {
@@ -169,31 +169,37 @@ export async function moveDirContents(srcDir: string, destDir: string): Promise<
)
}
export async function extractNestedZip(source: string, dest: string): Promise<void> {
export async function extractZip(source: string, dest: string): Promise<void> {
return new Promise((resolve, reject) => {
yauzl.open(source, { lazyEntries: true, autoClose: true }, (err, zipFile) => {
let cancelled = false
const tryReject = (err: Error) => {
if (!cancelled) {
cancelled = true
reject(err)
}
}
if (err) {
return tryReject(err)
}
if (!zipFile) {
return tryReject(new Error('zipFile === undefined'))
}
zipFile.readEntry()
zipFile.on('close', resolve)
zipFile.on('entry', (entry) => {
if (cancelled) {
return
}
if (entry.fileName.endsWith('/')) {
/** entry is a directory, skip and read next entry */
const isEntryDirectory = entry.fileName.endsWith('/')
if (isEntryDirectory) {
zipFile.readEntry()
return
}
@@ -202,21 +208,19 @@ export async function extractNestedZip(source: string, dest: string): Promise<vo
if (cancelled) {
return
}
if (err) {
return tryReject(err)
}
if (!stream) {
return tryReject(new Error('stream === undefined'))
}
stream.on('error', tryReject)
const filepath = path.join(
dest,
/**
* Remove the first element of the entry's path, which is the base
* directory we want to ignore
*/
entry.fileName.substring(entry.fileName.indexOf('/') + 1),
)
const filepath = path.join(dest, entry.fileName)
try {
await ensureDirectoryExists(path.dirname(filepath))
} catch (error: any) {
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/desktop",
"main": "./app/dist/index.js",
"version": "3.23.215",
"version": "3.23.240",
"license": "AGPL-3.0-or-later",
"author": "Standard Notes.",
"private": true,
+2 -2
View File
@@ -4,7 +4,7 @@ import path from 'path'
import {
deleteDir,
ensureDirectoryExists,
extractNestedZip,
extractZip,
FileDoesNotExist,
moveDirContents,
readJSONFile,
@@ -25,7 +25,7 @@ test.afterEach(async () => {
})
test('extracts a zip and unnests the folders by one level', async (t) => {
await extractNestedZip(path.join(dataPath, 'zip-file.zip'), zipFileDestination)
await extractZip(path.join(dataPath, 'zip-file.zip'), zipFileDestination)
t.deepEqual(await fs.readdir(zipFileDestination), ['package.json', 'test-file.txt'])
})
+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.
## [1.18.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/encryption
## [1.18.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-19)
**Note:** Version bump only for package @standardnotes/encryption
## [1.18.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-18)
**Note:** Version bump only for package @standardnotes/encryption
## [1.18.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-17)
**Note:** Version bump only for package @standardnotes/encryption
## [1.18.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-13)
**Note:** Version bump only for package @standardnotes/encryption
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/encryption",
"version": "1.18.1",
"version": "1.18.5",
"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.53.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-18)
**Note:** Version bump only for package @standardnotes/features
## [1.53.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-13)
**Note:** Version bump only for package @standardnotes/features
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/features",
"version": "1.53.1",
"version": "1.53.2",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -5,4 +5,5 @@ export enum NoteType {
RichText = 'rich-text',
Spreadsheet = 'spreadsheet',
Task = 'task',
Plain = 'plain-text',
}
+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.
## [1.24.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/filepicker
## [1.24.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-19)
**Note:** Version bump only for package @standardnotes/filepicker
## [1.24.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-18)
**Note:** Version bump only for package @standardnotes/filepicker
## [1.24.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-17)
**Note:** Version bump only for package @standardnotes/filepicker
## [1.24.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-13)
**Note:** Version bump only for package @standardnotes/filepicker
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/filepicker",
"version": "1.24.3",
"version": "1.24.7",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+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.
## [1.11.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/files
## [1.11.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-19)
**Note:** Version bump only for package @standardnotes/files
## [1.11.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-18)
**Note:** Version bump only for package @standardnotes/files
## [1.11.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-17)
**Note:** Version bump only for package @standardnotes/files
## [1.11.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-13)
**Note:** Version bump only for package @standardnotes/files
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/files",
"version": "1.11.3",
"version": "1.11.7",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+104
View File
@@ -3,6 +3,110 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.43.27](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-23)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.26](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-23)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.25](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-22)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.24](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.23](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.22](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.21](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.20](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.19](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.18](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.17](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-20)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-20)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-20)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-20)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-20)
### Bug Fixes
* help & feedback links on mobile ([#1849](https://github.com/standardnotes/app/issues/1849)) ([fb72c2f](https://github.com/standardnotes/app/commit/fb72c2fdae277cb4e348ce5ee550f0545f281dcd))
## [3.43.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-19)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-19)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-18)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-18)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-17)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-17)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-14)
### Bug Fixes
* android build ([b849c12](https://github.com/standardnotes/app/commit/b849c122d62e023dbfd6d3fb0399ddffaacd689b))
## [3.43.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-13)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-13)
**Note:** Version bump only for package @standardnotes/mobile
## [3.43.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-13)
**Note:** Version bump only for package @standardnotes/mobile
-6
View File
@@ -83,12 +83,6 @@ project.ext.react = [
apply from: "../../node_modules/react-native/react.gradle"
project.ext.vectoricons = [
iconFontNames: [ 'Ionicons.ttf' ] // Name of the font files you want to copy
]
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
@@ -49,6 +49,10 @@
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https"/>
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="mailto"/>
</intent>
</queries>
</manifest>
@@ -8,20 +8,36 @@ import android.content.res.Configuration;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
public class MainActivity extends ReactActivity {
@Override
@Override
protected String getMainComponentName() {
return "StandardNotes";
}
@Override
protected void onCreate(Bundle savedInstance) {
super.onCreate(null);
}
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new SNReactActivityDelegate(this, getMainComponentName());
}
public static class SNReactActivityDelegate extends ReactActivityDelegate {
public SNReactActivityDelegate(ReactActivity activity, String mainComponentName) {
super(activity, mainComponentName);
}
@Override
protected ReactRootView createRootView() {
ReactRootView reactRootView = new ReactRootView(getContext());
return reactRootView;
}
@Override
protected Bundle getLaunchOptions() {
String packageName = this.getContext().getPackageName();
@@ -31,10 +47,7 @@ public class MainActivity extends ReactActivity {
}
}
@Override
protected String getMainComponentName() {
return "StandardNotes";
}
// Fix for Dark theme subscriptions https://github.com/facebook/react-native/issues/28823#issuecomment-642032481
@Override
@@ -43,16 +56,6 @@ public class MainActivity extends ReactActivity {
getReactInstanceManager().onConfigurationChanged(this, newConfig);
}
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new SNReactActivityDelegate(this, getMainComponentName()) {
@Override
protected ReactRootView createRootView() {
return new RNGestureHandlerEnabledRootView(MainActivity.this);
}
};
}
/*
On back button press, background app instead of quitting it
https://github.com/facebook/react-native/issues/13775
@@ -74,6 +74,7 @@
<array>
<string>http</string>
<string>https</string>
<string>mailto</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
@@ -52,6 +52,7 @@
<array>
<string>http</string>
<string>https</string>
<string>mailto</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/mobile",
"version": "3.43.2",
"version": "3.43.27",
"author": "Standard Notes.",
"private": true,
"license": "AGPL-3.0-or-later",
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.30.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-21)
### Features
* ability to favorite tags + customize icon ([#1858](https://github.com/standardnotes/app/issues/1858)) ([cbd0063](https://github.com/standardnotes/app/commit/cbd0063926a416c23225242a4a1796712b6b224e))
## [1.29.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-19)
### Bug Fixes
* issue with not being able to unlink a file from a note ([#1836](https://github.com/standardnotes/app/issues/1836)) ([4030953](https://github.com/standardnotes/app/commit/4030953b00ad609dc2b0f5b66cfd971d449f6121))
# [1.29.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-18)
### Features
* authorize notes for listed ([#1823](https://github.com/standardnotes/app/issues/1823)) ([9954bdc](https://github.com/standardnotes/app/commit/9954bdc29f9de2a42c4539d55749991d86a72943))
# [1.28.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-17)
### Features
* starred notes ([#1813](https://github.com/standardnotes/app/issues/1813)) ([d52fdae](https://github.com/standardnotes/app/commit/d52fdae0b359b4768855ae030ac13d1c16f2312a))
## [1.27.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-10-13)
**Note:** Version bump only for package @standardnotes/models
+2 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/models",
"version": "1.27.1",
"version": "1.30.0",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -25,6 +25,7 @@
"@types/jest": "^28.1.5",
"@types/lodash": "^4.14.182",
"@typescript-eslint/eslint-plugin": "^5.30.0",
"eslint": "*",
"eslint-plugin-prettier": "*",
"jest": "^28.1.2",
"ts-jest": "^28.0.5",
@@ -13,6 +13,7 @@ export interface ItemContent {
trashed?: boolean
pinned?: boolean
archived?: boolean
starred?: boolean
locked?: boolean
appData?: AppData
}
@@ -21,6 +21,7 @@ export class DecryptedItem<C extends ItemContent = ItemContent>
public readonly pinned: boolean = false
public readonly archived: boolean = false
public readonly locked: boolean = false
public readonly starred: boolean = false
constructor(payload: DecryptedPayloadInterface<C>) {
super(payload)
@@ -32,6 +33,7 @@ export class DecryptedItem<C extends ItemContent = ItemContent>
this.updatedAtString = dateToLocalizedString(this.userModifiedDate)
this.protected = useBoolean(this.payload.content.protected, false)
this.trashed = useBoolean(this.payload.content.trashed, false)
this.starred = useBoolean(this.payload.content.starred, false)
this.pinned = this.getAppDomainValueWithDefault(AppDataField.Pinned, false)
this.archived = this.getAppDomainValueWithDefault(AppDataField.Archived, false)
this.locked = this.getAppDomainValueWithDefault(AppDataField.Locked, false)
@@ -22,6 +22,7 @@ export interface DecryptedItemInterface<C extends ItemContent = ItemContent>
readonly pinned: boolean
readonly archived: boolean
readonly locked: boolean
readonly starred: boolean
readonly userModifiedDate: Date
readonly references: ContentReference[]
@@ -78,6 +78,10 @@ export class DecryptedItemMutator<C extends ItemContent = ItemContent> extends I
this.mutableContent.trashed = trashed
}
set starred(starred: boolean) {
this.mutableContent.starred = starred
}
public set pinned(pinned: boolean) {
this.setAppDataItem(AppDataField.Pinned, pinned)
}
@@ -8,6 +8,6 @@ export enum AppDataField {
NotAvailableOnMobile = 'notAvailableOnMobile',
MobileActive = 'mobileActive',
LastSize = 'lastSize',
PrefersPlainEditor = 'prefersPlainEditor',
LegacyPrefersPlainEditor = 'prefersPlainEditor',
ComponentInstallError = 'installError',
}
@@ -5,6 +5,7 @@ import { FillItemContent } from '../../Abstract/Content/ItemContent'
import { SNComponent } from './Component'
import { ComponentContent } from './ComponentContent'
import { PayloadTimestampDefaults } from '../../Abstract/Payload'
import { NoteType } from '@standardnotes/features'
describe('component model', () => {
it('valid hosted url should ignore url', () => {
@@ -46,4 +47,42 @@ describe('component model', () => {
expect(component.hasValidHostedUrl()).toBe(true)
expect(component.hosted_url).toBe('http://foo.com')
})
it('should return noteType as specified in package_info', () => {
const component = new SNComponent(
new DecryptedPayload(
{
uuid: String(Math.random()),
content_type: ContentType.Component,
content: FillItemContent({
package_info: {
note_type: NoteType.Authentication,
},
} as ComponentContent),
...PayloadTimestampDefaults(),
},
PayloadSource.Constructor,
),
)
expect(component.noteType).toEqual(NoteType.Authentication)
})
it('should return plain as noteType if no note type defined in package_info', () => {
const component = new SNComponent(
new DecryptedPayload(
{
uuid: String(Math.random()),
content_type: ContentType.Component,
content: FillItemContent({
package_info: {},
} as ComponentContent),
...PayloadTimestampDefaults(),
},
PayloadSource.Constructor,
),
)
expect(component.noteType).toEqual(NoteType.Plain)
})
})
@@ -7,6 +7,7 @@ import {
ComponentFlag,
ComponentPermission,
FindNativeFeature,
NoteType,
} from '@standardnotes/features'
import { AppDataField } from '../../Abstract/Item/Types/AppDataField'
import { ComponentContent, ComponentInterface } from './ComponentContent'
@@ -177,6 +178,10 @@ export class SNComponent extends DecryptedItem<ComponentContent> implements Comp
return this.package_info as ThirdPartyFeatureDescription
}
public get noteType(): NoteType {
return this.package_info.note_type || NoteType.Plain
}
public get isDeprecated(): boolean {
let flags: string[] = this.package_info.flags ?? []
flags = flags.map((flag: string) => flag.toLowerCase())
@@ -4,7 +4,8 @@ import { DecryptedPayloadInterface } from '../../Abstract/Payload/Interfaces/Dec
import { FileMetadata } from './FileMetadata'
import { FileProtocolV1 } from './FileProtocolV1'
import { SortableItem } from '../../Runtime/Collection/CollectionSort'
import { ConflictStrategy } from '../../Abstract/Item'
import { ConflictStrategy, ItemInterface } from '../../Abstract/Item'
import { ContentType } from '@standardnotes/common'
type EncryptedBytesLength = number
type DecryptedBytesLength = number
@@ -31,6 +32,8 @@ export type FileContentSpecialized = FileContentWithoutSize & FileMetadata & Siz
export type FileContent = FileContentSpecialized & ItemContent
export const isFile = (x: ItemInterface): x is FileItem => x.content_type === ContentType.File
export class FileItem
extends DecryptedItem<FileContent>
implements FileContentWithoutSize, Sizes, FileProtocolV1, FileMetadata, SortableItem
@@ -29,14 +29,9 @@ describe('SNNote Tests', () => {
expect(note.preview_html).toBeFalsy()
})
it('should set mobilePrefersPlainEditor when given a valid choice', () => {
const selected = createNote({
mobilePrefersPlainEditor: true,
})
it('should not set default value for note type if none is provided', () => {
const note = createNote({})
const unselected = createNote()
expect(selected.mobilePrefersPlainEditor).toBeTruthy()
expect(unselected.mobilePrefersPlainEditor).toBe(undefined)
expect(note.noteType).toBe(undefined)
})
})
@@ -1,7 +1,8 @@
import { AppDataField } from './../../Abstract/Item/Types/AppDataField'
import { ContentType } from '@standardnotes/common'
import { FeatureIdentifier, NoteType } from '@standardnotes/features'
import { DecryptedItem } from '../../Abstract/Item/Implementations/DecryptedItem'
import { ItemInterface } from '../../Abstract/Item/Interfaces/ItemInterface'
import { AppDataField } from '../../Abstract/Item/Types/AppDataField'
import { DecryptedPayloadInterface } from '../../Abstract/Payload/Interfaces/DecryptedPayload'
import { NoteContent, NoteContentSpecialized } from './NoteContent'
@@ -10,12 +11,15 @@ export const isNote = (x: ItemInterface): x is SNNote => x.content_type === Cont
export class SNNote extends DecryptedItem<NoteContent> implements NoteContentSpecialized {
public readonly title: string
public readonly text: string
public readonly mobilePrefersPlainEditor?: boolean
public readonly hidePreview: boolean = false
public readonly preview_plain: string
public readonly preview_html: string
public readonly prefersPlainEditor: boolean
public readonly spellcheck?: boolean
public readonly noteType?: NoteType
public readonly authorizedForListed: boolean
/** The package_info.identifier of the editor (not its uuid), such as org.standardnotes.advanced-markdown */
public readonly editorIdentifier?: FeatureIdentifier | string
constructor(payload: DecryptedPayloadInterface<NoteContent>) {
super(payload)
@@ -26,9 +30,15 @@ export class SNNote extends DecryptedItem<NoteContent> implements NoteContentSpe
this.preview_html = String(this.payload.content.preview_html || '')
this.hidePreview = Boolean(this.payload.content.hidePreview)
this.spellcheck = this.payload.content.spellcheck
this.noteType = this.payload.content.noteType
this.editorIdentifier = this.payload.content.editorIdentifier
this.authorizedForListed = this.payload.content.authorizedForListed || false
this.prefersPlainEditor = this.getAppDomainValueWithDefault(AppDataField.PrefersPlainEditor, false)
this.mobilePrefersPlainEditor = this.payload.content.mobilePrefersPlainEditor
if (!this.noteType) {
const prefersPlain = this.getAppDomainValueWithDefault(AppDataField.LegacyPrefersPlainEditor, false)
if (prefersPlain) {
this.noteType = NoteType.Plain
}
}
}
}
@@ -1,13 +1,16 @@
import { FeatureIdentifier, NoteType } from '@standardnotes/features'
import { ItemContent } from '../../Abstract/Content/ItemContent'
export interface NoteContentSpecialized {
title: string
text: string
mobilePrefersPlainEditor?: boolean
hidePreview?: boolean
preview_plain?: string
preview_html?: string
spellcheck?: boolean
noteType?: NoteType
editorIdentifier?: FeatureIdentifier | string
authorizedForListed?: boolean
}
export type NoteContent = NoteContentSpecialized & ItemContent
@@ -0,0 +1,24 @@
import { NoteMutator } from './NoteMutator'
import { createNote } from './../../Utilities/Test/SpecUtils'
import { MutationType } from '../../Abstract/Item'
import { FeatureIdentifier, NoteType } from '@standardnotes/features'
describe('note mutator', () => {
it('sets noteType', () => {
const note = createNote({})
const mutator = new NoteMutator(note, MutationType.NoUpdateUserTimestamps)
mutator.noteType = NoteType.Authentication
const result = mutator.getResult()
expect(result.content.noteType).toEqual(NoteType.Authentication)
})
it('sets editorIdentifier', () => {
const note = createNote({})
const mutator = new NoteMutator(note, MutationType.NoUpdateUserTimestamps)
mutator.editorIdentifier = FeatureIdentifier.MarkdownProEditor
const result = mutator.getResult()
expect(result.content.editorIdentifier).toEqual(FeatureIdentifier.MarkdownProEditor)
})
})
@@ -1,10 +1,10 @@
import { AppDataField } from '../../Abstract/Item/Types/AppDataField'
import { NoteContent } from './NoteContent'
import { DecryptedItemMutator } from '../../Abstract/Item/Mutator/DecryptedItemMutator'
import { SNNote } from './Note'
import { NoteToNoteReference } from '../../Abstract/Reference/NoteToNoteReference'
import { ContentType } from '@standardnotes/common'
import { ContentReferenceType } from '../../Abstract/Item'
import { FeatureIdentifier, NoteType } from '@standardnotes/features'
export class NoteMutator extends DecryptedItemMutator<NoteContent> {
set title(title: string) {
@@ -27,14 +27,22 @@ export class NoteMutator extends DecryptedItemMutator<NoteContent> {
this.mutableContent.preview_html = preview_html
}
set prefersPlainEditor(prefersPlainEditor: boolean) {
this.setAppDataItem(AppDataField.PrefersPlainEditor, prefersPlainEditor)
}
set spellcheck(spellcheck: boolean) {
this.mutableContent.spellcheck = spellcheck
}
set noteType(noteType: NoteType) {
this.mutableContent.noteType = noteType
}
set editorIdentifier(identifier: FeatureIdentifier | string | undefined) {
this.mutableContent.editorIdentifier = identifier
}
set authorizedForListed(authorizedForListed: boolean) {
this.mutableContent.authorizedForListed = authorizedForListed
}
toggleSpellcheck(): void {
if (this.mutableContent.spellcheck == undefined) {
this.mutableContent.spellcheck = false
@@ -1,40 +1,33 @@
import { DecryptedItem } from '../../Abstract/Item/Implementations/DecryptedItem'
import { PredicateInterface, PredicateJsonForm } from '../../Runtime/Predicate/Interface'
import { PredicateInterface } from '../../Runtime/Predicate/Interface'
import { predicateFromJson } from '../../Runtime/Predicate/Generators'
import { ItemContent } from '../../Abstract/Content/ItemContent'
import { DecryptedPayloadInterface } from '../../Abstract/Payload/Interfaces/DecryptedPayload'
import { SystemViewId } from './SystemViewId'
import { EmojiString, IconType } from '../../Utilities/Icon/IconType'
import { SmartViewDefaultIconName, systemViewIcon } from './SmartViewIcons'
import { SmartViewContent } from './SmartViewContent'
export const SMART_TAG_DSL_PREFIX = '!['
export enum SystemViewId {
AllNotes = 'all-notes',
Files = 'files',
ArchivedNotes = 'archived-notes',
TrashedNotes = 'trashed-notes',
UntaggedNotes = 'untagged-notes',
}
export interface SmartViewContent extends ItemContent {
title: string
predicate: PredicateJsonForm
}
export function isSystemView(view: SmartView): boolean {
return Object.values(SystemViewId).includes(view.uuid as SystemViewId)
}
/**
* A tag that defines a predicate that consumers can use
* to retrieve a dynamic list of items.
*/
export class SmartView extends DecryptedItem<SmartViewContent> {
public readonly predicate!: PredicateInterface<DecryptedItem>
public readonly title: string
public readonly iconString: IconType | EmojiString
constructor(payload: DecryptedPayloadInterface<SmartViewContent>) {
super(payload)
this.title = String(this.content.title || '')
if (isSystemView(this)) {
this.iconString = systemViewIcon(this.uuid as SystemViewId)
} else {
this.iconString = this.payload.content.iconString || SmartViewDefaultIconName
}
try {
this.predicate = this.content.predicate && predicateFromJson(this.content.predicate)
} catch (error) {
@@ -1,6 +1,8 @@
import { DecryptedPayload } from './../../Abstract/Payload/Implementations/DecryptedPayload'
import { SNNote } from '../Note/Note'
import { SmartViewContent, SmartView, SystemViewId } from './SmartView'
import { SmartView } from './SmartView'
import { SmartViewContent } from './SmartViewContent'
import { SystemViewId } from './SystemViewId'
import { ItemWithTags } from '../../Runtime/Display/Search/ItemWithTags'
import { ContentType } from '@standardnotes/common'
import { FillItemContent } from '../../Abstract/Content/ItemContent'
@@ -74,10 +76,22 @@ export function BuildSmartViews(
}),
)
const starred = new SmartView(
new DecryptedPayload({
uuid: SystemViewId.StarredNotes,
content_type: ContentType.SmartView,
...PayloadTimestampDefaults(),
content: FillItemContent<SmartViewContent>({
title: 'Starred',
predicate: starredNotesPredicate(options).toJson(),
}),
}),
)
if (supportsFileNavigation) {
return [notes, files, archived, trash, untagged]
return [notes, starred, files, archived, trash, untagged]
} else {
return [notes, archived, trash, untagged]
return [notes, starred, archived, trash, untagged]
}
}
@@ -177,3 +191,22 @@ function untaggedNotesPredicate(options: FilterDisplayOptions) {
return predicate
}
function starredNotesPredicate(options: FilterDisplayOptions) {
const subPredicates: Predicate<SNNote>[] = [
new Predicate('starred', '=', true),
new Predicate('content_type', '=', ContentType.Note),
]
if (options.includeTrashed === false) {
subPredicates.push(new Predicate('trashed', '=', false))
}
if (options.includeProtected === false) {
subPredicates.push(new Predicate('protected', '=', false))
}
if (options.includePinned === false) {
subPredicates.push(new Predicate('pinned', '=', false))
}
const predicate = new CompoundPredicate('and', subPredicates)
return predicate
}
@@ -0,0 +1,6 @@
import { TagContent } from './../Tag/TagContent'
import { PredicateJsonForm } from '../../Runtime/Predicate/Interface'
export interface SmartViewContent extends TagContent {
predicate: PredicateJsonForm
}
@@ -0,0 +1,17 @@
import { SystemViewId } from './SystemViewId'
import { IconType } from '../../Utilities/Icon/IconType'
export const SmartViewIcons: Record<SystemViewId, IconType> = {
[SystemViewId.AllNotes]: 'notes',
[SystemViewId.Files]: 'folder',
[SystemViewId.ArchivedNotes]: 'archive',
[SystemViewId.TrashedNotes]: 'trash',
[SystemViewId.UntaggedNotes]: 'hashtag-off',
[SystemViewId.StarredNotes]: 'star-filled',
}
export function systemViewIcon(id: SystemViewId): IconType {
return SmartViewIcons[id]
}
export const SmartViewDefaultIconName: IconType = 'restore'
@@ -0,0 +1,8 @@
export enum SystemViewId {
AllNotes = 'all-notes',
Files = 'files',
ArchivedNotes = 'archived-notes',
TrashedNotes = 'trashed-notes',
UntaggedNotes = 'untagged-notes',
StarredNotes = 'starred-notes',
}
@@ -1,2 +1,4 @@
export * from './SmartView'
export * from './SmartViewBuilder'
export * from './SystemViewId'
export * from './SmartViewContent'
@@ -1,10 +1,11 @@
import { PayloadSource } from './../../Abstract/Payload/Types/PayloadSource'
import { DecryptedPayload } from './../../Abstract/Payload/Implementations/DecryptedPayload'
import { SNTag, TagContent } from './Tag'
import { SNTag } from './Tag'
import { ContentType } from '@standardnotes/common'
import { FillItemContent } from '../../Abstract/Content/ItemContent'
import { ContentReference } from '../../Abstract/Reference/ContentReference'
import { PayloadTimestampDefaults } from '../../Abstract/Payload'
import { TagContent } from './TagContent'
const randUuid = () => String(Math.random())

Some files were not shown because too many files have changed in this diff Show More