Commit Graph
100 Commits
Author SHA1 Message Date
EYHNand砍砍 3cf4bcf651 feat(ios): add intelligents button (#9281)
Co-authored-by: 砍砍 <git@qaq.wiki>
2024-12-24 07:51:11 +00:00
EYHN 129f94ee78 refactor(core): move infra modules to core (#9207) 2024-12-23 04:54:00 +00:00
EYHN cddef4c2f6 fix(admin): fix the admin app (#9233) 2024-12-23 03:06:31 +00:00
EYHN f788fdd0a4 fix(core): revalidate quota and subscription when subscribing (#9220) 2024-12-20 09:31:52 +00:00
EYHN cbaf35df0b feat(nbstore): add nbstore worker (#9185) 2024-12-20 08:01:23 +00:00
EYHN f8e7abd018 fix(core): indexer data loss (#9216) 2024-12-20 06:10:50 +00:00
EYHN 30588783ef fix(mobile): disable blob sync on mobile (#9200) 2024-12-19 03:54:34 +00:00
EYHN 64b017dc1b feat(nbstore): remove async on connection api (#9187)
We should not use async on `connect` and `disconnect`, for `WebSocketConnection` will never connect when offline.

We should handle the connection status of each storage in sync, using the `connection.waitForConnect`

This PR also puts the connection reference count on the `connect` and disconnect`
2024-12-18 03:59:49 +00:00
EYHN 3fddf050a4 feat(nbstore): add doc sync state (#9131) 2024-12-18 03:59:47 +00:00
EYHN 8374346b2e feat(core): lazy load doc card (#9192) 2024-12-18 03:40:33 +00:00
EYHN c31e9fdff4 fix(core): fix no page root error (#9190) 2024-12-18 03:39:48 +00:00
EYHN ffa0231cf5 feat(nbstore): add awareness storage&sync&frontend (#9016) 2024-12-17 04:37:15 +00:00
EYHN b36b398957 fix(infra): memory leak (#9013) 2024-12-16 16:55:49 +00:00
EYHN 9a66c97f52 feat(ios): add some apis for native (#9173) 2024-12-16 09:18:39 +00:00
EYHN 91089ff5a2 fix(core): fix sign in with email (#9108) 2024-12-12 02:48:36 +00:00
EYHN 0c0722c650 feat(nbstore): add blob sync frontend (#9084) 2024-12-11 12:39:26 +00:00
EYHN 331e674e8b feat(nbstore): add doc sync frontend (#9070) 2024-12-11 07:53:25 +00:00
EYHN 18d65dff0e fix(core): share page show 404 (#9083) 2024-12-10 07:43:31 +00:00
EYHN 35edf389b5 feat(nbstore): better doc sync logic (#9037) 2024-12-10 06:49:21 +00:00
EYHN 7225f59138 feat(nbstore): add blob sync (#8996) 2024-12-07 08:05:04 +00:00
EYHN f54f6e88cb feat(nbstore): new doc sync engine (#8918) 2024-12-07 08:05:02 +00:00
EYHN f96f08dcec fix(core): oauth callback (#9029) 2024-12-06 00:45:32 +00:00
EYHN b637a62785 fix(ios): fix login (#9011) 2024-12-04 05:19:41 +00:00
EYHN 8963826463 feat(core): desktop multiple server support (#8979) 2024-12-03 05:51:09 +00:00
EYHN 84210dd197 fix(infra): fix fractional indexing edge cases (#8978) 2024-12-02 05:31:07 +00:00
EYHN cee5d02f71 feat(core): add markdown preview for backlinks (#8883) 2024-12-02 03:42:07 +00:00
EYHN 6e25243868 refactor(infra): refactor copilot client (#8813) 2024-11-27 06:44:47 +00:00
EYHN 6b4a1aa917 refactor(core): initial multiple servers infra (#8745)
This is the initial refactoring of affine to support multiple servers, but many more changes are needed to make multi-server actually work.
2024-11-27 06:44:46 +00:00
EYHN 3f4cb5be40 fix(core): improve doc meta performance (#8913) 2024-11-27 14:18:06 +08:00
EYHN 76eabf644c fix(core): fix auth session not revalidating as expected (#8886) 2024-11-21 09:57:25 +00:00
EYHN a4c749b882 refactor(core): independent app fallback for mobile (#8884) 2024-11-21 09:38:01 +00:00
EYHN c712e87114 fix(core): warning when open center peek (#8819) 2024-11-14 09:04:38 +00:00
EYHN 17c247af53 fix(core): speed up navigation performance (#8794)
add some memo...
2024-11-12 13:22:59 +00:00
EYHN 51b00c476c fix(core): remember scroll position switch mode (#8771) 2024-11-12 06:05:51 +00:00
EYHN 9239eed6a7 fix(core): fix delete doc property description (#8772) 2024-11-11 06:48:04 +00:00
EYHN 2aceed8824 fix(infra): retry search and aggregate on indexeddb (#8767) 2024-11-11 02:32:29 +00:00
EYHN 73d0e64c20 fix(core): fix infinite retry when workspace not found (#8679) 2024-11-08 09:34:15 +00:00
EYHN 14d2214248 chore(infra): remove unused code (#8736) 2024-11-08 09:17:48 +00:00
EYHN 4977055a2e fix(ios): fix mobile blob storage (#8702) 2024-11-05 11:16:00 +00:00
EYHN 902635e60f refactor(core): desktop project struct (#8334) 2024-11-05 11:00:33 +08:00
EYHN 12e3cf1d07 refactor(core): set edgeless theme on doc created (#8670) 2024-11-04 04:38:03 +00:00
EYHN 1f6cce2f5e fix(core): fix copy block link (#8650) 2024-10-31 17:15:46 +00:00
EYHN 8f95cc7b80 fix(infra): orm create override optional (#8627) 2024-10-29 09:18:14 +00:00
EYHN 7699296f11 feat(core): captcha service (#8616) 2024-10-28 18:06:52 +00:00
EYHN 542fde6c68 fix(infra): indexer missing data (#8578) 2024-10-23 01:44:24 +00:00
EYHN 6ecdc8db7a feat(infra): opti indexer performance (#8557) 2024-10-22 06:41:07 +00:00
EYHN b8cb504fa4 feat(core): adjust app sidebar (#8572) 2024-10-22 04:55:05 +00:00
EYHN 6a9a7d8b39 fix(core): fix mobile edition flag (#8571) 2024-10-22 04:29:07 +00:00
EYHN 7cd4028176 feat(core): adjust doc property style (#8561) 2024-10-21 09:41:45 +00:00
EYHN 42b3e069f9 feat(core): use contain strict optimizing performance (#8553) 2024-10-21 06:42:08 +00:00
EYHN db374f7feb feat(core): build config for ios android (#8555) 2024-10-21 05:39:04 +00:00
EYHN 01c3a3b4c0 feat(infra): collect more data to indexer (#8528) 2024-10-19 20:22:26 +08:00
EYHN ee641f0377 fix(infra): fix built in property order error (#8524) 2024-10-17 05:15:09 +00:00
EYHN 140ac723e6 refactor(core): adapter to new journal and property (#8508)
remove old WorkspacePropertyAdapter
add JournalService
2024-10-16 08:46:38 +00:00
EYHN e7dcf63c77 refactor(core): rename doc property component name (#8500) 2024-10-16 02:11:46 +00:00
EYHN 24e0c5797c refactor(core): doc property (#8465)
doc property upgraded to use orm.

The visibility of the property are simplified to three types: `always show`, `always hide`, `hide when empty`, and the default is `always show`.

![CleanShot 2024-10-14 at 15 34 52](https://github.com/user-attachments/assets/748b8b80-061f-4d6a-8579-52e59df717c2)

Added a sidebar view to manage properties
![CleanShot 2024-10-14 at 15 35 58](https://github.com/user-attachments/assets/bffa9b1a-a1a5-4708-b2e8-4963120f3af9)

new property ui in workspace settings
![CleanShot 2024-10-14 at 15 36 44](https://github.com/user-attachments/assets/572d8dcc-9b3d-462a-9bcc-5f5fa8e622da)

Property lists can be collapsed
![CleanShot 2024-10-14 at 15 37 59](https://github.com/user-attachments/assets/2b20be1a-8141-478a-8fe7-405aff6d04fd)
2024-10-15 10:17:12 +00:00
EYHN bfeb05ca45 fix(core): data loss on enable cloud (#8452) 2024-10-08 09:24:26 +00:00
EYHN 67f7a4de9c fix(electron): fix windows userspace loss (#8450) 2024-10-08 07:05:37 +00:00
EYHN c26df2e069 feat(infra): doc properties by orm (#8382)
create new orm table docConfiguration

move primary store to docConfiguration
2024-10-07 12:25:47 +00:00
EYHN 4295f5e7c1 fix(core): open page info modal error (#8396) 2024-09-26 06:36:41 +00:00
EYHN 73876f60fc feat(core): adjust offline mode description (#8365) 2024-09-24 05:58:15 +00:00
EYHN 096f50b83b chore(i18n): cleanup i18n file (#8318) 2024-09-20 06:25:17 +00:00
EYHN 7184d8348f fix(core): fix web login (#8312) 2024-09-19 16:24:05 +00:00
EYHN 5d57f53a06 fix(core): adjust feature flag (#8309) 2024-09-19 15:26:33 +08:00
EYHN 9a01da76e1 feat: sync i18n with crowdin (#8293) 2024-09-19 05:30:18 +00:00
EYHN fab23d226d refactor(core): clear build config (#8268)
remove build config

allowLocalWorkspace -> FeatureFlag
enablePreloading -> removed
enableNewSettingUnstableApi -> removed
enableExperimentalFeature -> removed
enableThemeEditor -> FeatureFlag

remove some unused code
2024-09-18 06:33:25 +00:00
EYHN 714b7b863e fix(electron): fix electron script path (#8278) 2024-09-18 12:14:56 +08:00
EYHN e9fce6f58a fix(electron): fix electron windows build path (#8272) 2024-09-18 11:06:56 +08:00
EYHN ed63602f01 refactor: remove unused deps (#8259)
auto removed by https://knip.dev/features/auto-fix
2024-09-14 14:52:50 +00:00
EYHN 3d80725c1a refactor(core): move mobile components to core (#8258) 2024-09-14 05:51:14 +00:00
EYHN 5e56ec65e3 refactor(core): adjust core struct (#8218)
packages/frontend/core/src

hooks -> components/hooks
atoms -> components/atoms
layouts -> components/layouts
providers -> components/providers
mixpanel -> @affine/track
~~shared~~
~~unexpected-application-state~~
2024-09-13 11:31:21 +00:00
EYHN 58db654b07 fix(core): share mode page reference (#8238) 2024-09-13 11:06:19 +00:00
EYHN 6fde967a6d feat(core): remove loop animations (#8242) 2024-09-13 09:54:24 +00:00
EYHN 561f96bb71 feat(core): load ydoc on demand (#8241) 2024-09-13 07:45:49 +00:00
EYHN cc5a6e6d40 refactor: new project struct (#8199)
packages/frontend/web -> packages/frontend/apps/web
packages/frontend/mobile -> packages/frontend/apps/mobile
packages/frontend/electron -> packages/frontend/apps/electron
2024-09-12 07:42:57 +00:00
EYHN 3999b04cf1 feat(core): download template from snapshot url (#8211) 2024-09-12 06:21:52 +00:00
EYHN 85aa73bcf6 fix(core): disconnect ws when user logout (#8188) 2024-09-11 07:55:42 +00:00
EYHN d93c3b3719 feat(core): user data db (#7930) 2024-09-11 07:55:37 +00:00
EYHN 498a69af53 feat(core): move enable ai to feature flag (#8195) 2024-09-11 07:42:07 +00:00
EYHN 8c191e6baa feat(core): preview template & snapshot import (#8193) 2024-09-11 07:11:33 +00:00
EYHN f009371e06 fix(core): fix menu shaking (#8187) 2024-09-11 03:42:13 +00:00
EYHN 0cdc486f1f fix(core): reduce state refresh (#8181) 2024-09-10 06:21:15 +00:00
EYHN 702c03539f fix(core): fix member list fallback size (#8133) 2024-09-06 02:38:30 +00:00
EYHN 52cd6102cb fix: fix download fonts script (#8125) 2024-09-06 00:37:57 +08:00
EYHN 74cd175d37 feat(core): invoice service (#8124) 2024-09-05 23:56:58 +08:00
EYHN f4db4058f8 feat(core): make permission and invoice offline available (#8123) 2024-09-05 15:11:27 +00:00
EYHN 691bfed185 feat(core): selector for editorSetting hooks (#8108) 2024-09-05 08:44:11 +00:00
EYHN 2524491bd1 fix(env): is mobile flag (#8005)
only 'mobile' entry has isMobile = true flag
2024-09-04 09:21:36 +00:00
EYHN eb16c273ee feat(core): apply default doc mode setting (#8083) 2024-09-04 08:31:36 +00:00
EYHN 01b2339173 refactor(core): better block link (#8082) 2024-09-04 08:13:22 +00:00
EYHN 2799e8cd43 fix(electron): fix ci (#8085) 2024-09-04 08:00:09 +00:00
EYHN fb64bc7e55 feat(core): indexer upgrade (#8062) 2024-09-04 07:31:03 +00:00
EYHN 51f3566bec fix(core): fix menu bugs (#8074) 2024-09-04 07:19:09 +00:00
EYHN a6484018ef refactor(core): refactor editor query string selector (#8058)
The editor selector is the information for locating a block, which can automatically focus on a certain content when a user opens a document.

```
export type EditorSelector = {
  blockIds?: string[];
  elementIds?: string[];
};
```

The selector can be set from multiple places, such as passing it in the center peek parameter, or passing it in the query part of the URL.

This pr decoupled the selector from the query string and now available at `editorService.editor.selector$`
2024-09-03 06:37:58 +00:00
EYHN 02f0d7aa08 feat(component): dropdown menu auto avoid collisions (#8013)
<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/g3jz87HxbjOJpXV3FPT7/7f9d21cc-7b2f-4dc1-801c-e69d5e6d0750.mp4">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/g3jz87HxbjOJpXV3FPT7/7f9d21cc-7b2f-4dc1-801c-e69d5e6d0750.mp4">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/g3jz87HxbjOJpXV3FPT7/7f9d21cc-7b2f-4dc1-801c-e69d5e6d0750.mp4">CleanShot 2024-08-29 at 14.49.58.mp4</video>
2024-09-03 02:12:16 +00:00
EYHN b96ad57568 feat(core): import template (#8000) 2024-08-29 04:01:35 +00:00
EYHN 3e810eb043 fix(core): no share page in desktop (#7983) 2024-08-27 12:37:30 +00:00
EYHN 9ea4aaaf37 refactor(infra): remove setimmediate (#7975) 2024-08-26 11:57:24 +00:00
EYHN bc86f0a672 feat(core): editor setting service (#7956)
define editor setting schema in `packages/frontend/core/src/modules/editor-settting/schema.ts`

e.g.

```ts
const BSEditorSettingSchema = z.object({
  connector: z.object({
    stroke: z
      .union([
        z.string(),
        z.object({
          dark: z.string(),
          light: z.string(),
        }),
      ])
      .default('#000000'), // default is necessary
  }),
});
```

schema can be defined in a nested way. EditorSetting api is in flat way:

editorSetting api:

```ts
editorSetting.settings$ === {
  'connector.stroke': '#000000'
}
editorSetting.set('connector.stroke', '#000')
```

and use `expandFlattenObject` function can restore the flattened structure to a nested structure. nested structure is required by blocksuite

```ts
editorSetting.settings$.map(expandFlattenObject) === {
  connector: {
    stroke: '#000000'
  }
}
```
2024-08-26 08:19:24 +00:00
EYHN 4bc4a58a30 feat(infra): add convenience api to get workspace from doc (#7934) 2024-08-22 11:22:04 +00:00