Skip to content

Commit 0f06b3f

Browse files
committed
update filters
1 parent a6f9bb5 commit 0f06b3f

22 files changed

+583
-26
lines changed

package-lock.json

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515
"@tauri-apps/api": "^1.4.0",
1616
"@vueuse/core": "^10.3.0",
1717
"axios": "^1.4.0",
18+
"nprogress": "^0.2.0",
1819
"vue": "^3.3.4",
1920
"vue-router": "^4.2.4"
2021
},
2122
"devDependencies": {
2223
"@tauri-apps/cli": "^1.4.0",
24+
"@types/nprogress": "^0.2.0",
2325
"@vitejs/plugin-vue": "^4.2.3",
2426
"autoprefixer": "^10.4.14",
2527
"postcss": "^8.4.27",

src/App.vue

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,53 @@
11
<script setup lang="ts">
2-
import { ref, onMounted } from "vue"
2+
import { ref, provide } from "vue"
33
import TitleBar from "./components/native/TitleBar.vue"
44
import Dialog from "./components/Dialog.vue"
5+
import TopLinks from "./components/TopLinks.vue"
56
6-
import { useApi } from "./composables/useApi"
7+
import { UpdateFeatureFunctionalKey } from "./tokens"
78
8-
const isOpen = ref(true)
9-
const { getSpirit } = useApi()
9+
const isOpenModelDialog = ref(false)
10+
const selectedFeature = ref("")
1011
11-
onMounted(async () => {
12-
const data = await getSpirit({ hash: "79bdd5fd" })
12+
const featureUpdateFn = (featureIndex: string) => {
13+
selectedFeature.value = featureIndex
14+
console.log("Top: feature change to", featureIndex)
15+
}
1316
14-
console.log(data)
15-
})
17+
provide(UpdateFeatureFunctionalKey, { featureUpdateFn })
1618
</script>
1719

1820
<template>
1921
<div id="app-main">
20-
<Dialog v-model:isOpen="isOpen" />
2122
<TitleBar />
23+
<Dialog v-model:isOpen="isOpenModelDialog" />
24+
<TopLinks />
25+
26+
<router-view id="context" v-slot="{ Component }">
27+
<keep-alive>
28+
<component :is="Component" :key="$route.fullPath" />
29+
</keep-alive>
30+
</router-view>
2231
</div>
2332
</template>
2433

2534
<style scoped lang="postcss">
35+
@font-face {
36+
src: url("./assets/SourceHanSerifCN-VF.ttf");
37+
font-family: "SourceHanSerifCN";
38+
}
39+
2640
#app-main {
27-
@apply w-[500px] h-[600px]
28-
border border-slate-500
29-
bg-slate-50 dark:bg-slate-800
41+
@apply relative w-[500px] min-h-[600px]
42+
border border-slate-400
43+
bg-slate-50 dark:bg-slate-700
3044
text-slate-700 dark:text-slate-100
3145
transition-all duration-200 ease-in-out;
46+
47+
font-family: "SourceHanSerifCN";
48+
}
49+
50+
#context {
51+
@apply relative flex w-full h-full flex-col justify-center items-center px-4;
3252
}
3353
</style>

src/assets/SourceHanSerifCN-VF.ttf

24 MB
Binary file not shown.

src/assets/hf.jpg

-1.52 MB
Binary file not shown.

src/assets/tailwindcss.png

1.32 KB
Loading

src/assets/tauri.png

2.94 KB
Loading

src/assets/typescript.png

3.37 KB
Loading

src/assets/vscode.png

112 KB
Loading

src/components/Dialog.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script lang="ts" setup>
2-
import {} from "vue"
32
import {
43
TransitionRoot,
54
TransitionChild,
@@ -36,7 +35,7 @@ function closeModal() {
3635
/>
3736
</TransitionChild>
3837

39-
<div class="fixed inset-0 overflow-y-auto">
38+
<div class="fixed inset-x-0 overflow-y-auto translate-y-4 inset-y-4">
4039
<div
4140
class="flex items-center justify-center min-h-full p-4 text-center"
4241
>

0 commit comments

Comments
 (0)