fix: options page (#131)
* fix: options page * chore: rename title of options page --------- Co-authored-by: Razboy20 <razboy20@gmail.com>
This commit is contained in:
1
options.html
Symbolic link
1
options.html
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
src/pages/options/index.html
|
||||||
@@ -25,7 +25,7 @@ const manifest = defineManifest(async () => ({
|
|||||||
name: `${packageJson.displayName ?? packageJson.name}${mode === 'development' ? ' (dev)' : ''}`,
|
name: `${packageJson.displayName ?? packageJson.name}${mode === 'development' ? ' (dev)' : ''}`,
|
||||||
version: `${major}.${minor}.${patch}.${label}`,
|
version: `${major}.${minor}.${patch}.${label}`,
|
||||||
description: packageJson.description,
|
description: packageJson.description,
|
||||||
options_page: 'src/pages/options/index.html',
|
options_page: 'options.html',
|
||||||
background: { service_worker: 'src/pages/background/background.ts' },
|
background: { service_worker: 'src/pages/background/background.ts' },
|
||||||
permissions: ['storage', 'unlimitedStorage', 'background', 'scripting'],
|
permissions: ['storage', 'unlimitedStorage', 'background', 'scripting'],
|
||||||
host_permissions: process.env.MODE === 'development' ? [...HOST_PERMISSIONS, '<all_urls>'] : HOST_PERMISSIONS,
|
host_permissions: process.env.MODE === 'development' ? [...HOST_PERMISSIONS, '<all_urls>'] : HOST_PERMISSIONS,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="theme-color" content="#000000" />
|
<meta name="theme-color" content="#000000" />
|
||||||
<title>Popup</title>
|
<title>UTRP Options</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export default function PopupMain(): JSX.Element {
|
|||||||
));
|
));
|
||||||
|
|
||||||
const handleOpenOptions = async () => {
|
const handleOpenOptions = async () => {
|
||||||
const url = chrome.runtime.getURL('/src/pages/options/index.html');
|
const url = chrome.runtime.getURL('/options.html');
|
||||||
await openTabFromContentScript(url);
|
await openTabFromContentScript(url);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -136,6 +136,10 @@ export default defineConfig({
|
|||||||
target: 'http://localhost:5173',
|
target: 'http://localhost:5173',
|
||||||
rewrite: path => path.replace('calendar', 'src/pages/calendar/index'),
|
rewrite: path => path.replace('calendar', 'src/pages/calendar/index'),
|
||||||
},
|
},
|
||||||
|
'/options.html': {
|
||||||
|
target: 'http://localhost:5173',
|
||||||
|
rewrite: path => path.replace('options', 'src/pages/options/index'),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
@@ -143,6 +147,7 @@ export default defineConfig({
|
|||||||
input: {
|
input: {
|
||||||
debug: 'src/pages/debug/index.html',
|
debug: 'src/pages/debug/index.html',
|
||||||
calendar: 'src/pages/calendar/index.html',
|
calendar: 'src/pages/calendar/index.html',
|
||||||
|
options: 'src/pages/options/index.html',
|
||||||
},
|
},
|
||||||
// output: {
|
// output: {
|
||||||
// entryFileNames: `[name].js`, // otherwise it will add the hash
|
// entryFileNames: `[name].js`, // otherwise it will add the hash
|
||||||
|
|||||||
Reference in New Issue
Block a user