Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
.DS_Store
.idea
.vscode
/dist
/build
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

65 changes: 12 additions & 53 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,17 @@

{
"name": "LiveWell+ App Design(1)",
"version": "0.1.0",
"private": true,
"dependencies": {
"@radix-ui/react-accordion": "^1.2.3",
"@radix-ui/react-alert-dialog": "^1.1.6",
"@radix-ui/react-aspect-ratio": "^1.1.2",
"@radix-ui/react-avatar": "^1.1.3",
"@radix-ui/react-checkbox": "^1.1.4",
"@radix-ui/react-collapsible": "^1.1.3",
"@radix-ui/react-context-menu": "^2.2.6",
"@radix-ui/react-dialog": "^1.1.6",
"@radix-ui/react-dropdown-menu": "^2.1.6",
"@radix-ui/react-hover-card": "^1.1.6",
"@radix-ui/react-label": "^2.1.2",
"@radix-ui/react-menubar": "^1.1.6",
"@radix-ui/react-navigation-menu": "^1.2.5",
"@radix-ui/react-popover": "^1.1.6",
"@radix-ui/react-progress": "^1.1.2",
"@radix-ui/react-radio-group": "^1.2.3",
"@radix-ui/react-scroll-area": "^1.2.3",
"@radix-ui/react-select": "^2.1.6",
"@radix-ui/react-separator": "^1.1.2",
"@radix-ui/react-slider": "^1.2.3",
"@radix-ui/react-slot": "^1.1.2",
"@radix-ui/react-switch": "^1.1.3",
"@radix-ui/react-tabs": "^1.1.3",
"@radix-ui/react-toggle": "^1.1.2",
"@radix-ui/react-toggle-group": "^1.1.2",
"@radix-ui/react-tooltip": "^1.1.8",
"class-variance-authority": "^0.7.1",
"clsx": "*",
"cmdk": "^1.1.1",
"embla-carousel-react": "^8.6.0",
"input-otp": "^1.4.2",
"lucide-react": "^0.487.0",
"motion": "*",
"next-themes": "^0.4.6",
"react": "^18.3.1",
"react-day-picker": "^8.10.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.55.0",
"react-resizable-panels": "^2.1.7",
"recharts": "^2.15.2",
"sonner": "^2.0.3",
"tailwind-merge": "*",
"vaul": "^1.1.2"
},
"devDependencies": {
"@types/node": "^20.10.0",
"@vitejs/plugin-react-swc": "^3.10.2",
"vite": "6.3.5"
},
"name": "LiveWell+ App Design(1)",
"version": "0.1.0",
"private": true,
"dependencies": {
"lucide-vue-next": "^0.487.0",
"vue": "^3.5.13"
},
"devDependencies": {
"@types/node": "^20.10.0",
"@vitejs/plugin-vue": "^5.2.1",
"vite": "6.3.5"
},
"scripts": {
"dev": "vite",
"build": "vite build"
Expand Down
55 changes: 0 additions & 55 deletions src/App.tsx

This file was deleted.

58 changes: 58 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<template>
<div class="min-h-screen bg-gradient-to-b from-[#FAF9F6] to-[#F1EEE9] flex items-center justify-center p-4">
<div class="relative w-full max-w-[390px] h-[844px] bg-white rounded-[3rem] shadow-2xl overflow-hidden border-8 border-gray-800">
<div class="absolute top-0 left-1/2 -translate-x-1/2 w-40 h-7 bg-gray-800 rounded-b-3xl z-50" />

<div class="relative h-full bg-gradient-to-b from-[#FAF9F6] to-[#F1EEE9] overflow-y-auto">
<transition name="fade-slide" mode="out-in">
<component :is="currentComponent" :key="activeTab" />
</transition>
</div>

<BottomNavigation :active-tab="activeTab" @change="handleTabChange" />
</div>
</div>
</template>

<script setup lang="ts">
import { computed, ref } from 'vue';
import BottomNavigation from './components/BottomNavigation.vue';
import SocialPage from './components/SocialPage.vue';
import TaskPage from './components/TaskPage.vue';
import HealthPage from './components/HealthPage.vue';
import StatusPage from './components/StatusPage.vue';

const activeTab = ref<'social' | 'tasks' | 'health' | 'status'>('social');

const pages = {
social: SocialPage,
tasks: TaskPage,
health: HealthPage,
status: StatusPage,
} as const;

const currentComponent = computed(() => pages[activeTab.value]);

function handleTabChange(tab: keyof typeof pages) {
activeTab.value = tab;
}
</script>

<style scoped>
.fade-slide-enter-active,
.fade-slide-leave-active {
transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-slide-enter-from,
.fade-slide-leave-to {
opacity: 0;
transform: translateY(20px);
}

.fade-slide-leave-from,
.fade-slide-enter-to {
opacity: 1;
transform: translateY(0);
}
</style>
74 changes: 0 additions & 74 deletions src/components/BottomNavigation.tsx

This file was deleted.

58 changes: 58 additions & 0 deletions src/components/BottomNavigation.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<template>
<div class="fixed bottom-0 left-0 right-0 bg-white/80 backdrop-blur-xl border-t border-gray-200/50 shadow-[0_-3px_15px_rgba(0,0,0,0.08)]">
<div class="flex items-center justify-around h-20 max-w-md mx-auto px-6">
<button
v-for="tab in tabs"
:key="tab.id"
type="button"
class="relative flex flex-col items-center justify-center gap-1 flex-1 py-2 transition-all"
@click="$emit('change', tab.id)"
>
<div class="relative">
<div
class="w-12 h-12 rounded-2xl flex items-center justify-center transition-all"
:class="tab.id === activeTab ? 'bg-gradient-to-br from-[#A3B18A] to-[#7E8C77] shadow-lg' : 'bg-transparent'"
>
<component
:is="tab.icon"
class="w-6 h-6 transition-colors"
:class="tab.id === activeTab ? 'text-white' : 'text-gray-400'"
:stroke-width="2"
/>
</div>
<div
v-if="tab.id === activeTab"
class="absolute -bottom-1 left-1/2 -translate-x-1/2 w-1 h-1 bg-[#A3B18A] rounded-full"
/>
</div>
<span
class="transition-colors"
:class="tab.id === activeTab ? 'text-[#A3B18A]' : 'text-gray-400'"
style="font-size: 0.75rem"
>
{{ tab.label }}
</span>
</button>
</div>
</div>
</template>

<script setup lang="ts">
import { computed } from 'vue';
import { MessageCircle, CheckSquare, Heart, TrendingUp } from 'lucide-vue-next';

type TabId = 'social' | 'tasks' | 'health' | 'status';

const props = defineProps<{ activeTab: TabId }>();

defineEmits<{ change: [tab: TabId] }>();

const tabs = [
{ id: 'social' as const, label: '社交', icon: MessageCircle },
{ id: 'tasks' as const, label: '任务', icon: CheckSquare },
{ id: 'health' as const, label: '健康', icon: Heart },
{ id: 'status' as const, label: '状态', icon: TrendingUp },
];

const activeTab = computed(() => props.activeTab);
</script>
Loading