Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(project): update domain #2096

Merged
merged 2 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"editor.formatOnSave": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.addMissingImports": true
"source.fixAll.eslint": "explicit",
"source.addMissingImports": "explicit"
},
"i18n-ally.localesPaths": ["./packages/flat-i18n/locales/"],
"i18n-ally.enabledFrameworks": ["react", "i18next"],
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<div align="center">
<h1>Agora Flat</h1>
<p>Project flat is the Web, Windows and macOS client of <a href="https://flat.whiteboard.agora.io/en/">Agora Flat</a> open source classroom.</p>
<p>Project flat is the Web, Windows and macOS client of <a href="https://flat.agora.io/">Agora Flat</a> open source classroom.</p>
<p><a href="./docs/readme/README-zh.md">中文</a></p>
<img src="./assets/flat-showcase-en.png">
</div>
Expand Down Expand Up @@ -134,8 +134,8 @@ Licensed under the [MIT license](LICENSE).

When using the Flat or other GitHub logos, be sure to follow the [GitHub logo guidelines][github-logo].

[flat-homepage]: https://flat.whiteboard.agora.io/en/#download
[flat-web]: https://flat-web.whiteboard.agora.io/
[flat-homepage]: https://flat.agora.io/#download
[flat-web]: https://web.flat.agora.io/
[flat-server]: https://github.com/netless-io/flat-server
[flat-android]: https://github.com/netless-io/flat-android
[flat-storybook]: https://netless-io.github.io/flat/
Expand Down
2 changes: 1 addition & 1 deletion config/CN/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FLAT_SERVER_DOMAIN=flat-api-dev.whiteboard.agora.io
UPDATE_DOMAIN=https://flat-storage.oss-cn-hangzhou.aliyuncs.com/versions
FLAT_WEB_DOMAIN=flat-web-dev.whiteboard.agora.io

FLAT_DOWNLOAD_URL=https://flat.whiteboard.agora.io/#download
FLAT_DOWNLOAD_URL=https://www.flat.shengwang.cn/#download
FEEDBACK_URL=https://www.yuque.com/leooel/ec1kmm/vmsolg

CLOUD_RECORDING_DEFAULT_AVATAR=https://flat-storage.oss-cn-hangzhou.aliyuncs.com/flat-resources/cloud-recording/default-avatar.jpg
Expand Down
6 changes: 3 additions & 3 deletions config/CN/.env.production
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FLAT_SERVER_DOMAIN=flat-api.whiteboard.agora.io
FLAT_SERVER_DOMAIN=api.flat.shengwang.cn
UPDATE_DOMAIN=https://flat-storage.oss-cn-hangzhou.aliyuncs.com/versions
FLAT_WEB_DOMAIN=flat-web.whiteboard.agora.io
FLAT_WEB_DOMAIN=web.flat.shengwang.cn

FLAT_DOWNLOAD_URL=https://flat.whiteboard.agora.io/#download
FLAT_DOWNLOAD_URL=https://www.flat.shengwang.cn/#download
FEEDBACK_URL=https://www.yuque.com/leooel/ec1kmm/vmsolg

CLOUD_RECORDING_DEFAULT_AVATAR=https://flat-storage.oss-cn-hangzhou.aliyuncs.com/flat-resources/cloud-recording/default-avatar.jpg
Expand Down
4 changes: 2 additions & 2 deletions desktop/renderer-app/src/constants/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export const FLAT_WEB_DOMAIN = process.env.FLAT_WEB_DOMAIN;

export const FLAT_WEB_BASE_URL = `https://${FLAT_WEB_DOMAIN}`;

export const PRIVACY_URL_CN = "https://flat.whiteboard.agora.io/privacy.html";
export const PRIVACY_URL_CN = "https://www.flat.shengwang.cn/privacy.html";
export const PRIVACY_URL_EN = "https://flat.whiteboard.agora.io/en/privacy.html";

export const SERVICE_URL_CN = "https://flat.whiteboard.agora.io/service.html";
export const SERVICE_URL_CN = "https://www.flat.shengwang.cn/service.html";
export const SERVICE_URL_EN = "https://flat.whiteboard.agora.io/en/service.html";
6 changes: 3 additions & 3 deletions docs/readme/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<div align="center">
<h1>Agora Flat</h1>
<p>项目 flat 是 <a href="https://flat.whiteboard.agora.io/">Agora Flat</a> 开源教室的 Web 端、Windows 客户端与 macOS 客户端。</p>
<p>项目 flat 是 <a href="https://www.flat.shengwang.cn/">Agora Flat</a> 开源教室的 Web 端、Windows 客户端与 macOS 客户端。</p>
<img src="/assets/flat-showcase.png">
</div>

Expand Down Expand Up @@ -140,8 +140,8 @@ cd ./web/flat-web/ && pnpm start
当使用 Flat 或其他 GitHub 徽标时,请务必遵循 [GitHub 徽标指南][github-logo]。

[join-flat-slack]: https://github.com/netless-io/flat/issues/926
[flat-homepage]: https://flat.whiteboard.agora.io/#download
[flat-web]: https://flat-web.whiteboard.agora.io/
[flat-homepage]: https://www.flat.shengwang.cn/#download
[flat-web]: https://web.flat.shengwang.cn/
[flat-server]: https://github.com/netless-io/flat-server
[flat-android]: https://github.com/netless-io/flat-android
[flat-storybook]: https://netless-io.github.io/flat/
Expand Down
8 changes: 4 additions & 4 deletions packages/flat-pages/src/constants/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ export const NODE_ENV = process.env.NODE_ENV;

export const FLAT_DOWNLOAD_URL = process.env.FLAT_DOWNLOAD_URL;

export const PRIVACY_URL_CN = "https://flat.whiteboard.agora.io/privacy.html";
export const PRIVACY_URL = "https://flat.whiteboard.agora.io/privacy.html";
export const PRIVACY_URL_CN = "https://www.flat.shengwang.cn/privacy.html";
export const PRIVACY_URL = "https://flat.whiteboard.agora.io/en/privacy.html";

export const SERVICE_URL_CN = "https://flat.whiteboard.agora.io/service.html";
export const SERVICE_URL = "https://flat.whiteboard.agora.io/service.html";
export const SERVICE_URL_CN = "https://www.flat.shengwang.cn/service.html";
export const SERVICE_URL = "https://flat.whiteboard.agora.io/en/service.html";

export const FLAT_WEB_BASE_URL = `https://${process.env.FLAT_WEB_DOMAIN}`;
4 changes: 2 additions & 2 deletions packages/flat-pages/src/utils/use-login-check.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useContext, useEffect, useState } from "react";
import { RouteNameType, useReplaceHistory } from "./routes";
import { GlobalStoreContext } from "../components/StoreProvider";
import { loginCheck } from "@netless/flat-server-api";
import { loginCheck, COOKIE_DOMAIN } from "@netless/flat-server-api";
import { errorTips } from "flat-components";

export function useLoginCheck(): boolean {
Expand Down Expand Up @@ -60,5 +60,5 @@ export function useLoginCheck(): boolean {

export function saveJWTToken(token: string): void {
const maxAge = 60 * 60 * 24 * 29; // 29 days
document.cookie = `flatJWTToken=${token}; SameSite=Lax; domain=whiteboard.agora.io; max-age=${maxAge}`;
document.cookie = `flatJWTToken=${token}; SameSite=Lax; domain=${COOKIE_DOMAIN}; max-age=${maxAge}`;
}
4 changes: 4 additions & 0 deletions packages/flat-server-api/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ export const SERVER_DOMAINS = process.env.FLAT_SERVER_DOMAINS as unknown as Reco

export const CURRENT_SERVER_DOMAIN = process.env.FLAT_SERVER_DOMAIN;

export const COOKIE_DOMAIN = CURRENT_SERVER_DOMAIN
? CURRENT_SERVER_DOMAIN.slice(CURRENT_SERVER_DOMAIN.indexOf(".") + 1)
: "";

export const FLAT_SERVER_BASE_URL = `https://${CURRENT_SERVER_DOMAIN}`;

export const FLAT_SERVER_BASE_URL_V1 = `https://${CURRENT_SERVER_DOMAIN}/v1`;
Expand Down
2 changes: 1 addition & 1 deletion packages/flat-stores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"prettier": "^2.7.1",
"react": "^17.0.2",
"typescript": "^4.8.3",
"white-web-sdk": "npm:[email protected].47"
"white-web-sdk": "npm:[email protected].48"
},
"dependencies": {
"@netless/flat-i18n": "workspace:*",
Expand Down
3 changes: 2 additions & 1 deletion packages/flat-stores/src/global-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
ServerRegionConfigResult,
createOrGetPmi,
listPmi,
COOKIE_DOMAIN,
} from "@netless/flat-server-api";
import { autorun, runInAction } from "mobx";
import { autoPersistStore } from "./utils/auto-persist-store";
Expand Down Expand Up @@ -252,7 +253,7 @@ export class GlobalStore {
this.roomHistory = [];
this.pmi = null;
this.pmiRoomList = null;
document.cookie = "flatJWTToken=; SameSite=Lax; domain=whiteboard.agora.io; max-age=0";
document.cookie = `flatJWTToken=; SameSite=Lax; domain=${COOKIE_DOMAIN}; max-age=0`;
};

public hideRecordHintTips = (): void => {
Expand Down
56 changes: 28 additions & 28 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion service-providers/fastboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@netless/window-manager": "1.0.0-canary.79",
"side-effect-manager": "^1.2.1",
"value-enhancer": "^1.3.2",
"white-web-sdk": "npm:[email protected].47"
"white-web-sdk": "npm:[email protected].48"
},
"devDependencies": {
"prettier": "^2.7.1",
Expand Down