Skip to content

Commit 2cd8ebd

Browse files
committed
refactor(site): split homepage components and data
1 parent ccb8542 commit 2cd8ebd

45 files changed

Lines changed: 5507 additions & 4661 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"repo": "vixcpp/vix",
3-
"fetched_at": "2026-05-28T09:11:31.536Z",
4-
"stars": 441,
5-
"forks": 32,
6-
"open_issues": 1,
7-
"watchers": 4,
3+
"fetched_at": "2026-06-14T16:49:46.964Z",
4+
"stars": 464,
5+
"forks": 33,
6+
"open_issues": 3,
7+
"watchers": 5,
88
"rate_limit": "public"
99
}

vix-site/src/App.vue

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
</template>
2828

2929
<script setup>
30-
import { inject, computed, onMounted, ref } from "vue";
30+
import { computed, inject, onBeforeUnmount, onMounted, ref } from "vue";
3131
32-
import SiteHeader from "./components/SiteHeader.vue";
33-
import SiteFooter from "./components/SiteFooter.vue";
34-
import PwaUpdateToast from "./components/PwaUpdateToast.vue";
35-
import PwaInstallToast from "./components/PwaInstallToast.vue";
32+
import SiteHeader from "./components/layout/SiteHeader.vue";
33+
import SiteFooter from "./components/layout/SiteFooter.vue";
34+
import PwaInstallToast from "./components/pwa/PwaInstallToast.vue";
35+
import PwaUpdateToast from "./components/pwa/PwaUpdateToast.vue";
3636
3737
const store = inject("pwaToast");
3838
const showPwaToast = computed(() => store?.show?.value === true);
@@ -97,6 +97,7 @@ async function triggerInstall() {
9797
9898
function onBeforeInstallPrompt(e) {
9999
e.preventDefault();
100+
100101
deferredPrompt = e;
101102
canInstall.value = true;
102103
@@ -120,6 +121,11 @@ onMounted(() => {
120121
window.addEventListener("beforeinstallprompt", onBeforeInstallPrompt);
121122
window.addEventListener("appinstalled", onAppInstalled);
122123
});
124+
125+
onBeforeUnmount(() => {
126+
window.removeEventListener("beforeinstallprompt", onBeforeInstallPrompt);
127+
window.removeEventListener("appinstalled", onAppInstalled);
128+
});
123129
</script>
124130
125131
<style scoped>

0 commit comments

Comments
 (0)