tiny bit of cleanup
This commit is contained in:
parent
cdbb11b14a
commit
da016f2e03
3 changed files with 365 additions and 361 deletions
|
@ -22,7 +22,6 @@ const useTabs = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Tabs: ParentComponent<{ active?: Setter<string | undefined>, onClose?: CommandType<[string]> }> = (props) => {
|
export const Tabs: ParentComponent<{ active?: Setter<string | undefined>, onClose?: CommandType<[string]> }> = (props) => {
|
||||||
const commandsContext = useCommands();
|
|
||||||
const [active, setActive] = createSignal<string | undefined>(undefined);
|
const [active, setActive] = createSignal<string | undefined>(undefined);
|
||||||
|
|
||||||
createEffect(() => {
|
createEffect(() => {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// @refresh reload
|
// @refresh reload
|
||||||
import { createHandler, StartServer } from "@solidjs/start/server";
|
import { createHandler, StartServer } from "@solidjs/start/server";
|
||||||
import { installIntoGlobal } from "iterator-helpers-polyfill";
|
import { installIntoGlobal } from "iterator-helpers-polyfill";
|
||||||
|
import { isServer } from "solid-js/web";
|
||||||
|
|
||||||
installIntoGlobal();
|
installIntoGlobal();
|
||||||
|
|
||||||
|
@ -26,11 +27,14 @@ export default createHandler(({ nonce }) => {
|
||||||
);
|
);
|
||||||
}, event => {
|
}, event => {
|
||||||
const nonce = crypto.randomUUID();
|
const nonce = crypto.randomUUID();
|
||||||
const base = `'self' 'nonce-${nonce}'`;
|
const isDev = process.env.NODE_ENV === 'development';
|
||||||
|
|
||||||
|
const base = `'self' 'nonce-${nonce}' ${isDev ? `'unsafe-eval'` : ''}`;
|
||||||
|
|
||||||
const policies = {
|
const policies = {
|
||||||
default: base,
|
default: base,
|
||||||
connect: `${base} ws://localhost:*`,
|
connect: `${base} ws://localhost:*`,
|
||||||
|
script: `${base}`,
|
||||||
style: `'self' data: https://fonts.googleapis.com 'unsafe-inline'`,
|
style: `'self' data: https://fonts.googleapis.com 'unsafe-inline'`,
|
||||||
// style: `${base} data: https://fonts.googleapis.com`,
|
// style: `${base} data: https://fonts.googleapis.com`,
|
||||||
font: `${base} https://*.gstatic.com`,
|
font: `${base} https://*.gstatic.com`,
|
||||||
|
|
|
@ -21,6 +21,7 @@ const first = <T>(iterable: Iterable<T>): T | undefined => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
describe('utilities', () => {
|
||||||
describe('splitAt', () => {
|
describe('splitAt', () => {
|
||||||
it('should split the given string at the given index', async () => {
|
it('should split the given string at the given index', async () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
|
@ -427,4 +428,4 @@ describe('map', () => {
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue