Commit Graph

148 Commits

Author SHA1 Message Date
CatsJuice 0450fcea8b fix(core): sidebar scrollbar is coverd by resize handle (#8307)
close AF-1236
2024-09-19 06:25:08 +00:00
forehalo a387e4ac07 refactor: migrate environment to BUILD_CONFIG (#8206) 2024-09-13 07:58:20 +00:00
forehalo 25969a34e8 refactor: avoid runtime config object (#8202) 2024-09-13 07:27:11 +00:00
JimmFly 8e71815e46 fix(component): windows client does not have app controls on some pages (#8176)
close AF-1266
2024-09-12 06:35:55 +00:00
EYHN f4db4058f8 feat(core): make permission and invoice offline available (#8123) 2024-09-05 15:11:27 +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
pengx17 2ac803c73f feat(mobile): sign in page (#8039)
fix AF-1237
2024-09-04 03:58:54 +00:00
pengx17 d00f86c3ce fix(core): handle modal overlay click event correctly (#8063)
1. overlay click + hide is brought back. this is because modal (ormobile menu)'s `onPointerDownOutside` is bound to document.body. Code in https://github.com/toeverything/AFFiNE/blob/e58af08f6325c7c2c6cbd3325e954fd7d2ab6859/packages/frontend/core/src/modules/explorer/views/tree/node.tsx#L353-L356 will stop the event from bubbling to the document element.
2. when Menu's set to modal=true, the parent is set to pointer-events: none as well. changed menu to modal false instead.

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/3e50281f-839d-4463-af00-dff2fce8202b.png)
2024-09-03 12:00:00 +00:00
forehalo e33aa35f7e refactor(core): auth (#7999)
closes AF-753 AF-1227
2024-09-03 09:03:43 +00:00
EYHN b96ad57568 feat(core): import template (#8000) 2024-08-29 04:01:35 +00:00
darkskygit dde45748d9 feat: filter out empty workpace in sidebar list (#7960)
fix PD-1567
2024-08-28 08:43:44 +00:00
Don Isaac dbcfd24ed8 fix: remove unused variables (#7968) 2024-08-26 14:23:56 +08:00
JimmFly 920afa7bf1 feat(core): adjust share menu ui (#7931)
https://github.com/user-attachments/assets/6538c046-3872-4c98-a389-81b86a2978a4
2024-08-23 02:07:51 +00:00
forehalo 0ba516866f fix(server): change password with token should be public (#7855) 2024-08-14 03:34:35 +00:00
Cats Juice f8e51112aa fix(core): sidebar renaming menu pos (#7798) 2024-08-09 17:06:55 +08:00
pengx17 00ee2a8852 fix(electron): always show traffic light for mac (#7773)
fix AF-1209, fix PD-1550
2024-08-07 08:44:35 +00:00
CatsJuice 3d855647c7 refactor(component): refactor the implementation of Button and IconButton (#7716)
## Button
- Remove props withoutHoverStyle
   refactor hover impl with independent layer, so that hover-color won't affect the background even if is overridden outside
- Update `type` (renamed to `variant`):
  - remove `processing` and `warning`
  - rename `default` with `secondary`
- Remove `shape` props
- Remove `icon` and `iconPosition`, replaced with `prefix: ReactNode` and `suffix: ReactNode`
- Integrate tooltip for more convenient usage
- New Storybook document
- Focus style

## IconButton
- A Wrapper base on `<Button />`
- Override Button size and variant
  - size: `'12' | '14' | '16' | '20' | '24' | number`
     These presets size are referenced from the design system.
  - variant:  `'plain' | 'solid' | 'danger' | 'custom'`
- Inset icon via Button 's prefix

## Fix
- fix some button related issues
- close AF-1159, AF-1160, AF-1161, AF-1162, AF-1163, AF-1158, AF-1157

## Storybook

![CleanShot 2024-08-03 at 14.57.20@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/f5a76110-35d0-4082-a940-efc12bed87b0.png)
2024-08-05 02:57:23 +00:00
L-Sun 33fc00f8c7 chore(core): set read-only mode on mobile device (#7651)
Close [BS-795](https://linear.app/affine-design/issue/BS-795/affine-mobile-设置只读模式)

- Set read-only mode on mobile device
- Add mobile only support read-only warning toast
- remove `user-select: none` so that user can select text in read-only mode
2024-08-01 05:22:50 +00:00
CatsJuice 083123cdfb fix(component): adjust renaming style (#7654) 2024-07-31 02:26:34 +00:00
CatsJuice 12a2f929f8 fix(component): stop renaming modal propagation & input auto focus (#7653)
close AF-1125
2024-07-31 02:26:30 +00:00
pengx17 1efc1d0f5b feat(electron): multi tabs support (#7440)
use https://www.electronjs.org/docs/latest/api/web-contents-view to serve different tab views
added tabs view manager in electron to handle multi-view actions and events.

fix AF-1111
fix AF-999
fix PD-1459
fix AF-964
PD-1458
2024-07-29 11:05:22 +00:00
EYHN 54da85ec62 feat(core): init organize (#7456) 2024-07-26 04:35:32 +00:00
EYHN 98281a6394 refactor(component): adjust confirm modal api (#7589) 2024-07-24 08:18:33 +00:00
EYHN 5dd7382693 refactor(core): workbench (#7355)
Merge the right sidebar logic into the workbench. this can simplify our logic.

Previously we had 3 modules

* workbench
* right-sidebar (Control sidebar open&close)
* multi-tab-sidebar (Control tabs)

Now everything is managed in Workbench.

# Behavioral changes

The sidebar button is always visible and can be opened at any time.
If there is no content to display,  will be `No Selection`

![CleanShot 2024-06-28 at 14.00.41.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/g3jz87HxbjOJpXV3FPT7/d74b3a60-2299-452e-877e-188186fe5ee5.png)

Elements in the sidebar can now be defined as`unmountOnInactive=false`. Inactive sidebars are marked with `display: none` but not unmount, so the `ChatPanel` can always remain in the DOM and user input will be retained even if the sidebar is closed.
2024-07-12 04:11:05 +00:00
CatsJuice 13a2562282 feat(core): believer subscription UI (#7431)
feat(core): switch ai and cloud plans position

feat(core): impl lifetime subscription ui

feat(core): adapt ui for lifetime status

feat(core): add believer card in billing page
2024-07-08 08:31:22 +00:00
liuyi 08fa356a02 fix(core): not found info in workspace page is not in center (#7362) 2024-06-27 10:15:21 +00:00
forehalo 7b3673ae82 chore: assign todos (#7297) 2024-06-21 07:54:14 +00:00
EYHN 7c0a686cd9 refactor(i18n): new hook api (#7273)
# NEW HOOK API

`useI18n`: same as `useAFFiNEI18N`, with additional APIs

```ts
import { useI18n } from '@affine/i18n'

const i18n = useI18n()
i18n['hello world']() -> 你好世界
```

# NEW GLOBAL i18n Instance

`I18n`: use i18n capabilities outside of React

```ts
import { I18n } from '@affine/i18n'

I18n['hello world']() -> 你好世界
```

# NEW TYPES

`I18nKeys` -> all i18n keys

`I18nString` -> An i18n message (key&options)
transfer and store i18n text outside of React
```ts
const msg: I18nString = {
  key: 'helloworld',
  options: {
    arg1: '123'
  }
}

I18n.t(msg) -> 你好世界123
```

before:

```ts
registerCommand('open-page', {
  name: t('command.open-page')
  // ^- translation happens here,
})
```

after:

```ts
registerCommand('open-page', {
  name: { key: 'command.open-page' }
  // ^- store I18nString here, translate when the command render to UI
})
```
2024-06-20 02:19:41 +00:00
L-Sun 09201d42a0 chore: bump up @blocksuite/icons version (#7233) 2024-06-18 17:07:11 +08:00
fundon 5b8b2bbf48 fix(component): banner should not affect the editor layout (#7128)
Same as #6605
2024-06-03 02:13:24 +00:00
EYHN b356ddbe6e fix(core): fix ui flashing (#7056) 2024-05-27 08:05:20 +00:00
pengx17 0c175ada31 fix: remove dnd for workspace list (#6754)
fix TOV-399
2024-04-30 14:57:38 +00:00
fundon 5437c6567b fix(component): banner should not affect the editor layout (#6605)
https://github.com/toeverything/AFFiNE/assets/27926/6aacb16c-02ca-4693-afe8-628bef507811
2024-04-18 13:16:10 +00:00
EYHN 06fda3b62c feat(infra): framework 2024-04-17 15:09:09 +08:00
JimmFly f6fcbd8ea9 fix(core): signIn page style (#6582) 2024-04-16 12:56:12 +00:00
JimmFly 6ea20e477b feat(core): add sign in to not found page (#6496)
close AFF-211
2024-04-10 07:27:02 +00:00
EYHN 939fa9cef0 fix(component): sign up password max length notify (#6467)
The input `maxLength` causes password to be automatically truncated without notice user.
2024-04-10 06:20:21 +00:00
CatsJuice 3e9e2ce93b feat(core): pricing plans ai subscription ui (#6449) 2024-04-03 08:04:30 +00:00
CatsJuice 9127bfae67 refactor(core): replace all notification relies on jotai (#6417)
- remove all notification that implemented with jotai and replaced with new `notify`
- Add some notify presets:
  - `notify.error`
  - `notify.success`
  - `notify.warning`
2024-04-02 03:19:07 +00:00
CatsJuice f4e1e23120 feat(core): add cloud usage in sidebar avatar menu (#6400)
- Extract logic of getting cloud storage usage information into new hook
- Move `<StorageProgress />`: `component` → `core`
- Set minimum progress `0.5%`
- Add cloud usage progress bar in sidebar user avatar's dropdown

![CleanShot 2024-03-29 at 17.10.04@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/1fe9371a-a870-49a1-b4bb-b923c2fa4fe6.png)
2024-04-01 07:41:20 +00:00
CatsJuice 35715ab1d8 feat(core): sidebar local workspace enable cloud directly (#6366)
- Add a new hook `useEnableClould`, remove `<EnableAffineClouldModal />`
- Sidebar local workspace list item support enable AFFiNE Cloud
2024-03-29 02:08:09 +00:00
CatsJuice d14552b5af fix(core): sidebar workspace list can't scroll on mobile (#6370) 2024-03-29 01:25:13 +00:00
CatsJuice 710edd28db feat(core): open restore history confirm modal with hook (#6343) 2024-03-27 13:30:36 +00:00
fundon 8ee9f6ec05 chore: improve password error message (#6255)
chore: improve error message

chore: add password minlength & maxlength i18n

chore: check max length

fix: i18n variables

feat: add CredentialsRequirementType
2024-03-26 07:15:06 +00:00
CatsJuice 0731872347 feat(core): refactor sidebar header (#6251)
- Add user avatar
- Move sign-out/user settings link from workspace-modal to user avatar modal
- Modify the style of workspace list items
- Modify gap of navigation buttons
- Animate Syncing/Offline/...

![CleanShot 2024-03-22 at 10.22.38.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/7305f561-a85b-4ec6-89c2-27e2f1b63c85.gif)
2024-03-26 06:10:38 +00:00
CatsJuice b2f34d17a2 feat(core): adjust app sidebar's style (#6162) 2024-03-25 10:25:48 +00:00
EYHN f2adbdaba4 style: enable import-x/no-duplicates (#6279) 2024-03-25 03:55:33 +00:00
Fangdun Tsai 8301d82548 fix(core): sync list titles in sidebar (#6157) 2024-03-18 14:39:28 +08:00
liuyi fb3a0e7b8f refactor(server): auth (#5895)
Remove `next-auth` and implement our own Authorization/Authentication system from scratch.

## Server

- [x] tokens
  - [x] function
  - [x] encryption

- [x] AuthController
  - [x] /api/auth/sign-in
  - [x] /api/auth/sign-out
  - [x] /api/auth/session
  - [x] /api/auth/session (WE SUPPORT MULTI-ACCOUNT!)

- [x] OAuthPlugin
  - [x] OAuthController
  - [x] /oauth/login
  - [x] /oauth/callback
  - [x] Providers
    - [x] Google
    - [x] GitHub

## Client

- [x] useSession
- [x] cloudSignIn
- [x] cloudSignOut

## NOTE:

Tests will be adding in the future
2024-03-12 10:00:09 +00:00
Jason fc9bf9cd8a chore(component): simplify code (#6056) 2024-03-11 14:04:16 +08:00