diff --git a/src/lib/components/atoms/TerminalWindow.svelte b/src/lib/components/atoms/TerminalWindow.svelte deleted file mode 100644 index daaca16..0000000 --- a/src/lib/components/atoms/TerminalWindow.svelte +++ /dev/null @@ -1,29 +0,0 @@ -
-hhh -
- - \ No newline at end of file diff --git a/src/lib/components/atoms/TreeMenuButton.svelte b/src/lib/components/atoms/TreeMenuButton.svelte index 6dac8a5..5cd92da 100644 --- a/src/lib/components/atoms/TreeMenuButton.svelte +++ b/src/lib/components/atoms/TreeMenuButton.svelte @@ -1,14 +1,15 @@
- (current = current === name ? false : name) && window.scrollTo({ top: 0, behavior: 'smooth' })} + (selectedPkg = selectedPkg === name ? false : name) && + window.scrollTo({ top: 0, behavior: 'smooth' })} >
{name}
diff --git a/src/lib/components/molecules/ContributorHost.svelte b/src/lib/components/molecules/ContributorHost.svelte index 4fff872..09b3070 100644 --- a/src/lib/components/molecules/ContributorHost.svelte +++ b/src/lib/components/molecules/ContributorHost.svelte @@ -2,7 +2,7 @@ import type { Contributor } from 'src/data/types'; import ContributorButton from '../atoms/ContributorPerson.svelte'; - export let contribs: Contributor[]; + export let contributors: Contributor[]; export let repo: string; let repo_name = repo @@ -12,6 +12,7 @@ .replace(/api/g, 'API') .replace(/(?:^|\s)\S/g, (x) => x.toUpperCase()); + // Yes let usersIwantToExplodeSoBadly = ['semantic-release-bot']; @@ -24,7 +25,7 @@
- {#each contribs as { login, avatar_url, html_url }} + {#each contributors as { login, avatar_url, html_url }} {#if !usersIwantToExplodeSoBadly.includes(login)} {/if} diff --git a/src/lib/components/molecules/PatchCell.svelte b/src/lib/components/molecules/PatchCell.svelte index f81c310..0036012 100644 --- a/src/lib/components/molecules/PatchCell.svelte +++ b/src/lib/components/molecules/PatchCell.svelte @@ -4,7 +4,6 @@ import type { CompatiblePackage, Patch } from 'src/data/types'; export let patch: Patch; - export let current; const hasPatchOptions = !!patch.options.length; let expanded: boolean = false; @@ -109,7 +108,7 @@ transition: all 2s var(--bezier-one); background-color: var(--grey-six); padding: 1.25rem; - border-radius: 8px; + border-radius: 12px; } .patch-container:active { diff --git a/src/routes/contributors/+page.svelte b/src/routes/contributors/+page.svelte index 7fe6520..2566ea1 100644 --- a/src/routes/contributors/+page.svelte +++ b/src/routes/contributors/+page.svelte @@ -21,9 +21,9 @@

Want to show up here? Become a contributor

- {#each $repositories as { contributors: contribs, name }} + {#each $repositories as { contributors, name: repo }}
- +
{/each}
diff --git a/src/routes/patches/+page.svelte b/src/routes/patches/+page.svelte index f4f2162..afa8758 100644 --- a/src/routes/patches/+page.svelte +++ b/src/routes/patches/+page.svelte @@ -13,26 +13,24 @@ $: ({ patches, packages } = $api_patches); - let current: boolean = false; + let selectedPkg: boolean = false; let searchTerm: string; let searchTermFiltered: string; let timeout: any = null; - const debounce = () => { - clearTimeout(timeout); - timeout = setTimeout(() => { - searchTermFiltered = searchTerm - ?.replace(/\./g, '') - .replace(/\s/g, '') - .replace(/-/g, '') - .toLowerCase(); - }, 500); - }; + function filterByPackage(selectedPkg: string | boolean, packageList: any) { + for (let i = 0; i < packageList.length; i++) { + if (packageList[i].name === selectedPkg) { + return true; + } + } + } function search(patch: Patch) { - function checkPkgName(findTerm: string | boolean, array: any) { - for (let i = 0; i < array.length; i++) { - if (array[i].name.replace(/\./g, '').includes(findTerm)) { + function checkPkgName(selectedPkg: string | boolean, packageList: any) { + // Basically the same function as before lol + for (let i = 0; i < packageList.length; i++) { + if (packageList[i].name.replace(/\./g, '').includes(selectedPkg)) { return true; } } @@ -45,14 +43,18 @@ ); } - function filterByPackage(findTerm: string | boolean, array: any) { - for (let i = 0; i < array.length; i++) { - if (array[i].name === findTerm) { - return true; - } - } - return false; - } + // Make sure we don't have filter the patches after every key press + const debounce = () => { + clearTimeout(timeout); + timeout = setTimeout(() => { + // Filter search term for better results (i.e. " Unl O-ck" and "unlock" gives the same results) + searchTermFiltered = searchTerm + ?.replace(/\./g, '') + .replace(/\s/g, '') + .replace(/-/g, '') + .toLowerCase(); + }, 500); + }; @@ -64,10 +66,12 @@