Remove sidepanel inline css

This commit is contained in:
wong2
2023-07-10 15:13:56 +08:00
parent d1ba7c7fa7
commit 4e0d114b88
6 changed files with 14 additions and 15 deletions

View File

@@ -8,7 +8,7 @@
"build": "tsc && vite build" "build": "tsc && vite build"
}, },
"devDependencies": { "devDependencies": {
"@crxjs/vite-plugin": "^2.0.0-beta.17", "@crxjs/vite-plugin": "^2.0.0-beta.18",
"@headlessui/tailwindcss": "^0.1.3", "@headlessui/tailwindcss": "^0.1.3",
"@types/lodash-es": "^4.17.7", "@types/lodash-es": "^4.17.7",
"@types/md5": "^2.3.2", "@types/md5": "^2.3.2",

View File

@@ -5,14 +5,6 @@
<meta content="width=device-width,initial-scale=1.0" name="viewport" /> <meta content="width=device-width,initial-scale=1.0" name="viewport" />
<title>ChatHub</title> <title>ChatHub</title>
<script type="module" src="./src/app/theme.ts"></script> <script type="module" src="./src/app/theme.ts"></script>
<style>
html,
body,
#app {
width: 100%;
height: 100%;
}
</style>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

6
src/app/sidepanel.css Normal file
View File

@@ -0,0 +1,6 @@
html,
body,
#app {
width: 100%;
height: 100%;
}

View File

@@ -3,12 +3,13 @@ import { createRoot } from 'react-dom/client'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import Browser from 'webextension-polyfill' import Browser from 'webextension-polyfill'
import premiumIcon from '~/assets/icons/premium.svg' import premiumIcon from '~/assets/icons/premium.svg'
import './base.scss'
import Button from './components/Button' import Button from './components/Button'
import { usePremium } from './hooks/use-premium' import { usePremium } from './hooks/use-premium'
import './i18n' import './i18n'
import SidePanelPage from './pages/SidePanelPage' import SidePanelPage from './pages/SidePanelPage'
import { trackEvent } from './plausible' import { trackEvent } from './plausible'
import './base.scss'
import './sidepanel.css'
function PremiumOnly() { function PremiumOnly() {
const { t } = useTranslation() const { t } = useTranslation()

View File

@@ -9,7 +9,7 @@ export default defineConfig({
plugins: [tsconfigPaths(), react(), crx({ manifest })], plugins: [tsconfigPaths(), react(), crx({ manifest })],
build: { build: {
rollupOptions: { rollupOptions: {
input: ['app.html', 'sidepanel.html'], input: ['app.html'],
}, },
}, },
}) })

View File

@@ -277,10 +277,10 @@
"@babel/helper-validator-identifier" "^7.19.1" "@babel/helper-validator-identifier" "^7.19.1"
to-fast-properties "^2.0.0" to-fast-properties "^2.0.0"
"@crxjs/vite-plugin@^2.0.0-beta.17": "@crxjs/vite-plugin@^2.0.0-beta.18":
version "2.0.0-beta.17" version "2.0.0-beta.18"
resolved "https://registry.yarnpkg.com/@crxjs/vite-plugin/-/vite-plugin-2.0.0-beta.17.tgz#e6d6a57a9e346ae335c3eb5c0c2cc8a75f4d777e" resolved "https://registry.npmmirror.com/@crxjs/vite-plugin/-/vite-plugin-2.0.0-beta.18.tgz#2097f268712172440644cae8dd7668bb3674958f"
integrity sha512-44CavnsY01jvF2uHfRdqA3j6bg6IcVc+ZrSayYS+H7eqb6BHWh619A2jJ3Y0eHVh9H65041ob4g6I1VMxWx4qw== integrity sha512-3jW20cUE04wTTg8HtoQD7bIL4Nhu91pRX4PHazMu2/tzzSTaR4stW5DHRIJOjFuRpOSCNNpyamyXwxS6qOv7Bg==
dependencies: dependencies:
"@rollup/pluginutils" "^4.1.2" "@rollup/pluginutils" "^4.1.2"
"@webcomponents/custom-elements" "^1.5.0" "@webcomponents/custom-elements" "^1.5.0"