diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index f80d334591..98be545ece 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,2 +1,3 @@
**/project.json @darkskygit
**/pnpm-lock.yaml @darkskygit
+**/en.json @JimmFly
\ No newline at end of file
diff --git a/.github/workflows/languages-sync.yml b/.github/workflows/languages-sync.yml
new file mode 100644
index 0000000000..3cacc35749
--- /dev/null
+++ b/.github/workflows/languages-sync.yml
@@ -0,0 +1,63 @@
+name: Languages Sync
+
+on:
+ push:
+ branches: ['master']
+ paths:
+ - 'packages/i18n/**'
+ - '.github/workflows/languages-sync.yml'
+ pull_request:
+ branches: ['master']
+ paths:
+ - 'packages/i18n/**'
+ - '.github/workflows/languages-sync.yml'
+ workflow_dispatch:
+
+# Cancels all previous workflow runs for pull requests that have not completed.
+# See https://docs.github.com/en/actions/using-jobs/using-concurrency
+concurrency:
+ # The concurrency group contains the workflow name and the branch name for
+ # pull requests or the commit hash for any other events.
+ group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
+ cancel-in-progress: true
+
+jobs:
+ main:
+ strategy:
+ matrix:
+ node-version: [18]
+ os: [ubuntu-latest]
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Use pnpm
+ uses: pnpm/action-setup@v2
+ with:
+ version: 7
+
+ - name: Use Node.js ${{ matrix.node-version }}
+ # https://github.com/actions/setup-node
+ uses: actions/setup-node@v3
+ with:
+ node-version: ${{ matrix.node-version }}
+ cache: 'pnpm'
+
+ - name: Install node modules
+ run: pnpm install
+
+ - name: Check Language Key
+ if: github.ref != 'refs/heads/master'
+ working-directory: ./packages/i18n
+ run: pnpm run sync-languages:check
+ env:
+ TOLGEE_API_KEY: ${{ secrets.TOLGEE_API_KEY }}
+
+ - name: Sync Languages
+ if: github.ref == 'refs/heads/master'
+ working-directory: ./packages/i18n
+ run: pnpm run sync-languages
+ env:
+ TOLGEE_API_KEY: ${{ secrets.TOLGEE_API_KEY }}
diff --git a/package.json b/package.json
index fb1cff44e3..9ba3fb02b0 100644
--- a/package.json
+++ b/package.json
@@ -20,7 +20,8 @@
"test:unit": "playwright test --config=playwright.config.unit.ts",
"postinstall": "husky install",
"notify": "node --experimental-modules scripts/notify.mjs",
- "check:ci": "pnpm lint & pnpm test"
+ "check:ci": "pnpm lint & pnpm test",
+ "update:blocksuite": "pnpm i --filter @affine/app --filter @affine/datacenter @blocksuite/blocks@nightly @blocksuite/store@nightly && pnpm i --filter @affine/app @blocksuite/editor@nightly"
},
"lint-staged": {
"*": "prettier --write --ignore-unknown",
diff --git a/packages/app/next.config.js b/packages/app/next.config.js
index b71ade0105..2e54ff005a 100644
--- a/packages/app/next.config.js
+++ b/packages/app/next.config.js
@@ -12,11 +12,12 @@ const EDITOR_VERSION = enableDebugLocal
const profileTarget = {
ac: '100.85.73.88:12001',
dev: '100.77.180.48:11001',
+ test: '100.77.180.48:11001',
+ stage: '',
+ pro: 'http://pathfinder.affine.pro',
local: '127.0.0.1:3000',
};
-// 100.77.180.48:11001
-
const getRedirectConfig = profile => {
const target = profileTarget[profile || 'dev'] || profileTarget['dev'];
diff --git a/packages/app/package.json b/packages/app/package.json
index aece2897f9..31fa964621 100644
--- a/packages/app/package.json
+++ b/packages/app/package.json
@@ -11,10 +11,10 @@
"dependencies": {
"@affine/datacenter": "workspace:*",
"@affine/i18n": "workspace:*",
- "@blocksuite/blocks": "0.3.1-20230109032243-37ad3ba",
- "@blocksuite/editor": "0.3.1-20230109032243-37ad3ba",
+ "@blocksuite/blocks": "0.4.0-20230111171650-bc63456",
+ "@blocksuite/editor": "0.4.0-20230111171650-bc63456",
"@blocksuite/icons": "^2.0.2",
- "@blocksuite/store": "0.3.1-20230109032243-37ad3ba",
+ "@blocksuite/store": "0.4.0-20230111171650-bc63456",
"@emotion/css": "^11.10.0",
"@emotion/react": "^11.10.4",
"@emotion/server": "^11.10.0",
diff --git a/packages/app/public/globals.css b/packages/app/public/globals.css
index aa58d38563..ca43c3fec8 100644
--- a/packages/app/public/globals.css
+++ b/packages/app/public/globals.css
@@ -166,9 +166,9 @@ a:visited {
input {
border: none;
-moz-appearance: none;
- -webkit-appearance: none; /*解决ios上按钮的圆角问题*/
- border-radius: 0; /*解决ios上输入框圆角问题*/
- outline: medium; /*去掉鼠标点击的默认黄色边框*/
+ -webkit-appearance: none; /*Solve the rounded corners of buttons on ios*/
+ border-radius: 0; /*Solve the problem of rounded corners of the input box on ios*/
+ outline: medium; /*Remove the default yellow border on mouse click*/
background-color: transparent;
}
diff --git a/packages/app/src/components/404/index.tsx b/packages/app/src/components/404/index.tsx
index 8ed4232807..36f1b90a34 100644
--- a/packages/app/src/components/404/index.tsx
+++ b/packages/app/src/components/404/index.tsx
@@ -1,10 +1,24 @@
import { NotFoundTitle, PageContainer } from './styles';
import { useTranslation } from '@affine/i18n';
+import { Button } from '@/ui/button';
+import { useRouter } from 'next/router';
export const NotfoundPage = () => {
const { t } = useTranslation();
+ const router = useRouter();
return (
+
+
Copyright © 2022 Toeverything
+Copyright © {year} Toeverything
diff --git a/packages/app/src/components/create-workspace/index.tsx b/packages/app/src/components/create-workspace/index.tsx index 7b473afbfb..9a26b56863 100644 --- a/packages/app/src/components/create-workspace/index.tsx +++ b/packages/app/src/components/create-workspace/index.tsx @@ -16,11 +16,15 @@ interface ModalProps { export const CreateWorkspaceModal = ({ open, onClose }: ModalProps) => { const [workspaceName, setWorkspaceName] = useState(''); + const [loading, setLoading] = useState(false); const { createWorkspace } = useWorkspaceHelper(); const router = useRouter(); const handleCreateWorkspace = async () => { + setLoading(true); const workspace = await createWorkspace(workspaceName); + if (workspace && workspace.id) { + setLoading(false); router.replace(`/workspace/${workspace.id}`); onClose(); } else { @@ -37,9 +41,8 @@ export const CreateWorkspaceModal = ({ open, onClose }: ModalProps) => { return ({t('Workspace description')}
++ Workspace is your virtual space to capture, create and plan as + just one person or together as a team. +
{ setWorkspaceName(value); }} > - {/*Looks like you are browsing on a mobile device.
-- We are still working on mobile support and recommend you use a - desktop device. -
+{t('mobile device')}
+{t('mobile device description')}
Tips: Click Add to Favourites/Trash and the page will appear here.
-(Designer is grappling with designing)
+ {listType === 'all' &&{t('emptyAllPages')}
} + {listType === 'favorite' &&{t('emptyFavourite')}
} + {listType === 'trash' &&{t('emptyTrash')}
} +{t('still designed')}
+
+
+
+
+
Crete or import
+- Tips:Workspace is your virtual space to capture, create and plan - as just one person or together as a team. -
+ {/*+ {t('Tips')} + {t('Workspace description')} +
*/}{workspace.name} Is Comming
+
+ {{ workspace: workspace.name }}
+
+ Is Comming
+ {workspace.name ?? 'Affine'} is Cloud Workspace. All
- data will be synchronized and saved to the AFFiNE
+ {{ workspaceName: workspace.name ?? 'Affine' }}
+ is Cloud Workspace. All data will be synchronised and saved to
+ the AFFiNE
+ {workspace.provider}
-