From ddeb6c177642108434ecabe95e50820f42e2cd9d Mon Sep 17 00:00:00 2001 From: LH_R Date: Sun, 7 Jan 2024 14:31:18 +0800 Subject: [PATCH 1/2] feat: dynamic loading clarity --- index.html | 7 ------- src/main.tsx | 13 +++++++++++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index b1ff9cd..5fe2ee4 100644 --- a/index.html +++ b/index.html @@ -11,12 +11,5 @@
- diff --git a/src/main.tsx b/src/main.tsx index fe4fa7e..b355232 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -4,6 +4,19 @@ import App from './App' import './index.css' import './i18n' +if (import.meta.env.PROD) { + const script = document.createElement('script') + script.textContent = ` + (function(c,l,a,r,i,t,y){ + c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; + t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; + y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); + })(window, document, "clarity", "script", "k06rclje17"); + ` + script.async = true + document.body.appendChild(script) +} + ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( From e296fa980b0c40f698096575b7e3c0b179aa85d3 Mon Sep 17 00:00:00 2001 From: LH_R Date: Sun, 7 Jan 2024 14:33:13 +0800 Subject: [PATCH 2/2] docs: update version --- CHANGELOG.md | 6 ++++++ package.json | 2 +- src/store/files.ts | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d363663..caca77e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 1.1.0 + +### Feat + +- dynamic loading clarity + # 1.0.0 ### Feat diff --git a/package.json b/package.json index b8dc3d3..364867c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "paint-board", "private": true, - "version": "1.0.0", + "version": "1.1.0", "type": "module", "scripts": { "dev": "vite", diff --git a/src/store/files.ts b/src/store/files.ts index 74922db..9cfce0c 100644 --- a/src/store/files.ts +++ b/src/store/files.ts @@ -49,7 +49,7 @@ interface FileAction { } const initId = uuidv4() -export const BOARD_VERSION = '1.0.0' +export const BOARD_VERSION = '1.1.0' const useFileStore = create()( persist(