Skip to content

Commit

Permalink
Merge pull request #131 from Linaro/staging
Browse files Browse the repository at this point in the history
merge search fix and two new apps
  • Loading branch information
marcpems authored Oct 8, 2024
2 parents 2bef74b + a84b8f6 commit 3bd9e17
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 7 deletions.
5 changes: 5 additions & 0 deletions public/icons/PaperCutNG.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/zeroinstall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 29 additions & 5 deletions src/components/Search/PageFind.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const PageFind = ({
compatibility: url.searchParams.get("compatibility")?.split(","),
auto_super_resolution: url.searchParams.get("auto_super_resolution")?.split(","),
page: url.searchParams.get("page"),
searchrun: false,
searchrun: Number(0),
};
});

Expand All @@ -156,7 +156,7 @@ const PageFind = ({
);

const [searchrun, setSearchRun] = createSignal(
pathParams().searchrun ? pathParams().searchrun: Boolean(false)
pathParams().searchrun ? pathParams().searchrun: Number(0)
);

const [search, setSearch] = createSignal<{
Expand Down Expand Up @@ -210,6 +210,22 @@ const PageFind = ({
setSearch(newSearch);
setRequest(newSearch);
setPage(1);
setSearchRun(Number(0));
const url = getQueryParams(newSearch);
window.history.replaceState({}, "", url.toString());
};

const clearSearch2 = () => {
const newSearch = {
query: null,
filters: {
type: [type],
},
};
setSearch(newSearch);
setRequest(newSearch);
setPage(1);
setSearchRun(Number(2));
const url = getQueryParams(newSearch);
window.history.replaceState({}, "", url.toString());
};
Expand Down Expand Up @@ -238,8 +254,16 @@ const PageFind = ({
window.history.replaceState({}, "", url.toString());
setRequest(search());
setPage(1);
setSearchRun(Boolean(true));
};
if (searchrun() === 2 )
{
setSearchRun(0);
createEffect(() => console.log(searchrun));
}
else
{
setSearchRun(1);
}
};

const [results] = createResource<Results, SearchQuery>(request, fetchResults);
const [filterOptions] = createResource(request, fetchFilterOptions);
Expand Down Expand Up @@ -285,7 +309,7 @@ const PageFind = ({
</button>
<button
class="py-2 px-2"
onClick={clearSearch}
onClick={clearSearch2}
aria-label="Clear search query"
>
<ClearIcon />
Expand Down
4 changes: 2 additions & 2 deletions src/components/Search/Results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ const Results = ({
clearSearch: () => void;
setFilter: (filter: string, selection: string, value: boolean) => void;
type: "applications" | "games";
searchRun: Accessor<boolean>
searchRun: Accessor<Number>
}) => {
const [paginatedResults, setPaginatedResults] = createSignal([]);

Expand Down Expand Up @@ -271,7 +271,7 @@ const Results = ({

<Match when={
results().results.length === 0 &&
searchRun() === Boolean(true)
searchRun() === 1
}>
<div class="w-full flex flex-col items-center gap-3 p-10">
<p class="text-center text-xl mb-2">
Expand Down
9 changes: 9 additions & 0 deletions src/content/applications/GoogleDrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: "Google Drive"
categories: ['prod']
compatibility: native
display_result: "Vendor Announced - Launching Soon"
link: https://www.google.com/drive/download/
---
Windows architecture is not supported error is observed during installation.
The web browser interface offers some of the functionality to access cloud file storage.
10 changes: 10 additions & 0 deletions src/content/applications/PaperCutNG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: "PaperCut NG"
categories: ['printers','education']
compatibility: emulation
display_result: "Compatible"
version_from: "1.0.691"
link: https://www.papercut.com/products/ng/
icon: PaperCutNG.svg
---

10 changes: 10 additions & 0 deletions src/content/applications/zeroinstall.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: "Zero Install"
categories: ['utils-tools']
compatibility: emulation
display_result: "Compatible"
version_from: "1.0"
link: https://get.0install.net/#windows
icon: zeroinstall.png
---

0 comments on commit 3bd9e17

Please sign in to comment.