mirror of
https://github.com/gethomepage/homepage.git
synced 2026-02-06 12:02:01 +00:00
Merge branch 'main' into dev
This commit is contained in:
commit
4450a6e1d0
@ -19,7 +19,7 @@ Provide the `API_TOKEN` (f.k.a. `SYNC_api_token`) as the `key` in your config.
|
||||
```yaml
|
||||
widget:
|
||||
type: netalertx
|
||||
url: http://ip:port # backend port
|
||||
url: http://ip:port # use backend port for widget version 2+
|
||||
key: yournetalertxapitoken
|
||||
version: 2 # optional, default is 1
|
||||
```
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "homepage",
|
||||
"version": "1.9.0",
|
||||
"version": "1.10.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
|
||||
@ -339,7 +339,7 @@ describe("pages/index Index routing + SWR branches", () => {
|
||||
localStorage.setItem("hash", "old-hash");
|
||||
|
||||
const fetchSpy = vi.fn(async () => ({ ok: true }));
|
||||
// eslint-disable-next-line no-global-assign
|
||||
|
||||
fetch = fetchSpy;
|
||||
|
||||
let reloadSpy;
|
||||
|
||||
@ -277,7 +277,7 @@ describe("components/quicklaunch", () => {
|
||||
const fetchSpy = vi.fn(async () => ({
|
||||
json: async () => ["test", ["test 1", "test 2", "test 3", "test 4", "test 5"]],
|
||||
}));
|
||||
// eslint-disable-next-line no-global-assign
|
||||
|
||||
fetch = fetchSpy;
|
||||
|
||||
renderWithProviders(<Wrapper />, {
|
||||
@ -315,7 +315,6 @@ describe("components/quicklaunch", () => {
|
||||
|
||||
expect(input).toHaveValue("test 1");
|
||||
|
||||
// eslint-disable-next-line no-global-assign
|
||||
fetch = originalFetch;
|
||||
});
|
||||
|
||||
|
||||
@ -32,7 +32,13 @@ vi.mock("@headlessui/react", async () => {
|
||||
const ctx = useContext(ListboxContext);
|
||||
const content = typeof children === "function" ? children({ active: false }) : children;
|
||||
return (
|
||||
<div role="option" data-provider={value?.name} onClick={() => ctx?.onChange?.(value)} {...props}>
|
||||
<div
|
||||
role="option"
|
||||
data-provider={value?.name}
|
||||
aria-selected={ctx?.value === value}
|
||||
onClick={() => ctx?.onChange?.(value)}
|
||||
{...props}
|
||||
>
|
||||
{content}
|
||||
</div>
|
||||
);
|
||||
@ -166,7 +172,7 @@ describe("components/widgets/search", () => {
|
||||
const fetchSpy = vi.fn(async () => ({
|
||||
json: async () => ["hel", ["hello", "help", "helm", "helium", "held"]],
|
||||
}));
|
||||
// eslint-disable-next-line no-global-assign
|
||||
|
||||
fetch = fetchSpy;
|
||||
|
||||
renderWithProviders(<Search options={{ provider: ["google"], showSearchSuggestions: true, target: "_self" }} />, {
|
||||
@ -192,7 +198,7 @@ describe("components/widgets/search", () => {
|
||||
expect(openSpy).toHaveBeenCalledWith("https://www.google.com/search?q=hello", "_self");
|
||||
|
||||
openSpy.mockRestore();
|
||||
// eslint-disable-next-line no-global-assign
|
||||
|
||||
fetch = originalFetch;
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user