From dbe2d91dd9f4cfb35020dd937a49a7f2e9cb785a Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Thu, 27 Oct 2022 19:35:42 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=B0=86widget=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E5=88=B0apps=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {client => apps}/widget/.gitignore | 0 {client => apps}/widget/.yarnrc | 0 {client => apps}/widget/demo/.gitignore | 0 {client => apps}/widget/demo/index.html | 5 ++++- {client => apps}/widget/demo/package.json | 0 {client => apps}/widget/demo/yarn.lock | 0 {client => apps}/widget/package.json | 2 +- {client => apps}/widget/src/index.ts | 6 +++--- {client => apps}/widget/tsconfig.json | 2 +- client/widget/yarn.lock | 8 -------- pnpm-lock.yaml | 12 +++++++++--- 11 files changed, 18 insertions(+), 17 deletions(-) rename {client => apps}/widget/.gitignore (100%) rename {client => apps}/widget/.yarnrc (100%) rename {client => apps}/widget/demo/.gitignore (100%) rename {client => apps}/widget/demo/index.html (75%) rename {client => apps}/widget/demo/package.json (100%) rename {client => apps}/widget/demo/yarn.lock (100%) rename {client => apps}/widget/package.json (93%) rename {client => apps}/widget/src/index.ts (96%) rename {client => apps}/widget/tsconfig.json (80%) delete mode 100644 client/widget/yarn.lock diff --git a/client/widget/.gitignore b/apps/widget/.gitignore similarity index 100% rename from client/widget/.gitignore rename to apps/widget/.gitignore diff --git a/client/widget/.yarnrc b/apps/widget/.yarnrc similarity index 100% rename from client/widget/.yarnrc rename to apps/widget/.yarnrc diff --git a/client/widget/demo/.gitignore b/apps/widget/demo/.gitignore similarity index 100% rename from client/widget/demo/.gitignore rename to apps/widget/demo/.gitignore diff --git a/client/widget/demo/index.html b/apps/widget/demo/index.html similarity index 75% rename from client/widget/demo/index.html rename to apps/widget/demo/index.html index d15601cd..bc02ab6f 100644 --- a/client/widget/demo/index.html +++ b/apps/widget/demo/index.html @@ -12,7 +12,10 @@ diff --git a/client/widget/demo/package.json b/apps/widget/demo/package.json similarity index 100% rename from client/widget/demo/package.json rename to apps/widget/demo/package.json diff --git a/client/widget/demo/yarn.lock b/apps/widget/demo/yarn.lock similarity index 100% rename from client/widget/demo/yarn.lock rename to apps/widget/demo/yarn.lock diff --git a/client/widget/package.json b/apps/widget/package.json similarity index 93% rename from client/widget/package.json rename to apps/widget/package.json index 8fe13c38..c02d5413 100644 --- a/client/widget/package.json +++ b/apps/widget/package.json @@ -15,6 +15,6 @@ "release": "yarn publish --patch" }, "devDependencies": { - "typescript": "^4.4.4" + "typescript": "^4.8.2" } } diff --git a/client/widget/src/index.ts b/apps/widget/src/index.ts similarity index 96% rename from client/widget/src/index.ts rename to apps/widget/src/index.ts index 85468ad0..6bb182e1 100644 --- a/client/widget/src/index.ts +++ b/apps/widget/src/index.ts @@ -4,14 +4,14 @@ export interface TailchatWidgetOptions { */ host?: string; groupId: string; - channelId: string; + panelId: string; widgetStyle?: Partial; iconStyle?: Partial; frameStyle?: Partial; } const defaultTailchatWidgetOptions: Partial = { - host: 'https://nightly.paw.msgbyte.com/', + host: 'https://nightly.paw.msgbyte.com', }; const defaultWidgetStyle: Partial = { @@ -50,7 +50,7 @@ const closeIconSvg = `