Skip to content

Commit

Permalink
fix: options page (#131)
Browse files Browse the repository at this point in the history
* fix: options page

* chore: rename title of options page

---------

Co-authored-by: Razboy20 <[email protected]>
  • Loading branch information
Lukas-Zenick and Razboy20 authored Mar 9, 2024
1 parent 10eb9e4 commit dc100b5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions options.html
2 changes: 1 addition & 1 deletion src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const manifest = defineManifest(async () => ({
name: `${packageJson.displayName ?? packageJson.name}${mode === 'development' ? ' (dev)' : ''}`,
version: `${major}.${minor}.${patch}.${label}`,
description: packageJson.description,
options_page: 'src/pages/options/index.html',
options_page: 'options.html',
background: { service_worker: 'src/pages/background/background.ts' },
permissions: ['storage', 'unlimitedStorage', 'background', 'scripting'],
host_permissions: process.env.MODE === 'development' ? [...HOST_PERMISSIONS, '<all_urls>'] : HOST_PERMISSIONS,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/options/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<title>Popup</title>
<title>UTRP Options</title>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion src/views/components/PopupMain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function PopupMain(): JSX.Element {
));

const handleOpenOptions = async () => {
const url = chrome.runtime.getURL('/src/pages/options/index.html');
const url = chrome.runtime.getURL('/options.html');
await openTabFromContentScript(url);
};

Expand Down
5 changes: 5 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,18 @@ export default defineConfig({
target: 'http://localhost:5173',
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: {
rollupOptions: {
input: {
debug: 'src/pages/debug/index.html',
calendar: 'src/pages/calendar/index.html',
options: 'src/pages/options/index.html',
},
// output: {
// entryFileNames: `[name].js`, // otherwise it will add the hash
Expand Down

0 comments on commit dc100b5

Please sign in to comment.