Skip to content

Commit 098f610

Browse files
authored
chore: Merge dev to main (#282)
2 parents a01d3f9 + 377a5ac commit 098f610

File tree

9 files changed

+46
-49
lines changed

9 files changed

+46
-49
lines changed

src/data/RouterEvents.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,24 @@ function makeStore(): Readable<RouterEvent> {
1818
return derived(page, ($page) => {
1919
return { navigating: false, target_url: $page.url };
2020
});
21-
} else {
22-
// On client.
23-
let current = new URL(location.href);
21+
}
2422

25-
// Return store that responds to navigation events.
26-
// The `navigating` store immediately "pushes" `null`.
27-
// This in turn causes this derived store to immediately "push" the current URL.
28-
return derived(navigating, ($nav) => {
29-
let navigating = false;
30-
// $nav is null when navigation finishes.
31-
if ($nav != null && $nav.to != null) {
32-
current = $nav.to.url;
33-
navigating = true;
34-
}
23+
// On client.
24+
let current = new URL(location.href);
3525

36-
return { navigating, target_url: current };
37-
});
38-
}
26+
// Return store that responds to navigation events.
27+
// The `navigating` store immediately "pushes" `null`.
28+
// This in turn causes this derived store to immediately "push" the current URL.
29+
return derived(navigating, ($nav) => {
30+
let navigating = false;
31+
// $nav is null when navigation finishes.
32+
if ($nav != null && $nav.to != null) {
33+
current = $nav.to.url;
34+
navigating = true;
35+
}
36+
37+
return { navigating, target_url: current };
38+
});
3939
}
4040

4141
// Do not subscribe to it outside of components!

src/data/api/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import type {
99
DonationPlatform,
1010
CryptoWallet,
1111
Social,
12-
About,
13-
CompatiblePackage
12+
About
1413
} from '$lib/types';
1514

1615
export type ContributorsData = { contributables: Contributable[] };
@@ -41,20 +40,21 @@ async function patches(): Promise<PatchesData> {
4140
const json = await get_json('v4/patches/list');
4241
const packagesWithCount: { [key: string]: number } = {};
4342

44-
json.forEach((patch) => {
45-
if (!patch.compatiblePackages) return;
43+
for (const patch of json) {
44+
if (!patch.compatiblePackages) continue;
4645

4746
patch.compatiblePackages = Object.keys(patch.compatiblePackages).map((name) => ({
4847
name,
4948
versions: patch.compatiblePackages[name]
5049
}));
51-
});
50+
}
5251

5352
// gets packages and patch count
54-
for (let i = 0; i < json.length; i++) {
55-
json[i].compatiblePackages?.forEach((pkg: CompatiblePackage) => {
53+
for (const { compatiblePackages } of json) {
54+
if (!compatiblePackages) continue;
55+
for (const pkg of compatiblePackages) {
5656
packagesWithCount[pkg.name] = (packagesWithCount[pkg.name] || 0) + 1;
57-
});
57+
}
5858
}
5959

6060
// sort packages by patch count to get most relevant apps on top

src/data/api/settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function set_status_url(apiUrl: string) {
1212
.then((data) => {
1313
if (data?.status) {
1414
localStorage.setItem(STATUS_KEY, data.status);
15-
console.log('status is now ' + localStorage.getItem(STATUS_KEY));
15+
console.log('Status is now:', localStorage.getItem(STATUS_KEY));
1616
}
1717
});
1818
}

src/layout/Hero/HeroSection.svelte

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828
margin-bottom: 2rem;
2929
}
3030
31-
.hero {
32-
padding-bottom: 9rem;
33-
}
34-
3531
.hero-text {
3632
align-items: center;
3733
}

src/layout/Navbar/NavHost.svelte

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,17 +202,10 @@
202202
}
203203
204204
#nav-container {
205+
top: 0;
205206
position: sticky;
206207
z-index: 666;
207208
width: 100%;
208-
209-
&:has(.nav-buttons > li:first-child.selected) {
210-
margin-bottom: 2.65rem;
211-
212-
&:has(.banner) {
213-
margin-bottom: 1.5rem;
214-
}
215-
}
216209
}
217210
218211
nav {

src/routes/+error.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{#if status == 404}
1414
<p>This page received a cease and desist letter from a multi-billion dollar tech company.</p>
1515
<br />
16-
<Button type="filled" href="/">Return Home</Button>
16+
<Button type="filled" href="/">Return home</Button>
1717
{:else}
1818
<p>
1919
{$page.error?.message}
@@ -23,6 +23,9 @@
2323

2424
<style>
2525
section {
26+
display: flex;
27+
flex-direction: column;
28+
width: fit-content;
2629
text-align: center;
2730
margin-top: 10rem;
2831
}

src/routes/+page.svelte

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,15 @@
142142
</div>
143143

144144
<style lang="scss">
145-
.hide-on-scroll {
146-
transition: opacity 0.5s var(--bezier-one);
147-
z-index: -999;
148-
149-
&.hidden {
150-
height: 0;
151-
opacity: 0;
152-
}
145+
.hide-on-scroll.hidden {
146+
z-index: -2;
147+
height: 0;
148+
opacity: 0;
149+
overflow: hidden;
153150
}
151+
154152
main {
153+
padding-block: 2rem;
155154
display: flex;
156155
flex-direction: column;
157156
gap: 1.5rem;

src/routes/download/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
{/if}
107107
</Query>
108108
<Button type="tonal" href="https://github.com/revanced/revanced-manager" target="_blank">
109-
View Source
109+
View source
110110
</Button>
111111
</div>
112112
<div class="screenshot">

src/routes/patches/PatchItem.svelte

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,13 @@
7474
{/if}
7575
{#if patch.compatiblePackages[0].versions.length > 1}
7676
<li class="button">
77-
<Button type="text" on:click={() => (showAllVersions = !showAllVersions)}>
77+
<Button
78+
type="text"
79+
on:click={(e) => {
80+
e.stopPropagation();
81+
showAllVersions = !showAllVersions;
82+
}}
83+
>
7884
<div
7985
class="expand-arrow"
8086
style:transform={showAllVersions ? 'rotate(90deg)' : 'rotate(-90deg)'}
@@ -93,7 +99,7 @@
9399
<span transition:fade={{ easing: quintOut, duration: 1000 }}>
94100
<div class="options" transition:slide={{ easing: quintOut, duration: 500 }}>
95101
{#each options as option}
96-
<div class="option">
102+
<div class="option" on:click|stopPropagation>
97103
<h5 id="option-title">{option.title}</h5>
98104
<h5>
99105
<pre id="option-description">{option.description}</pre>

0 commit comments

Comments
 (0)