mirror of
https://github.com/remvze/moodist.git
synced 2025-12-18 09:24:14 +00:00
- 添加 SQLite 数据库支持用户存储 - 实现用户注册和登录 API 端点 - 新增独立的认证按钮组件,位于右上角 - 集成 Zustand 状态管理支持持久化登录状态 - 添加密码哈希和验证功能 - 支持登录表单模态框和用户状态显示 - 启用服务端渲染支持 API 路由
42 lines
1,016 B
JavaScript
42 lines
1,016 B
JavaScript
import { defineConfig } from 'astro/config';
|
|
|
|
import react from '@astrojs/react';
|
|
import AstroPWA from '@vite-pwa/astro';
|
|
|
|
export default defineConfig({
|
|
output: 'server',
|
|
integrations: [
|
|
react(),
|
|
AstroPWA({
|
|
manifest: {
|
|
background_color: '#09090b',
|
|
description: 'Ambient sounds for focus and calm.',
|
|
display: 'standalone',
|
|
icons: [
|
|
...[72, 128, 144, 152, 192, 256, 512].map(size => ({
|
|
sizes: `${size}x${size}`,
|
|
src: `/assets/pwa/${size}.png`,
|
|
type: 'image/png',
|
|
})),
|
|
],
|
|
name: 'Moodist',
|
|
orientation: 'any',
|
|
scope: '/',
|
|
short_name: 'Moodist',
|
|
start_url: '/',
|
|
theme_color: '#09090b',
|
|
},
|
|
registerType: 'prompt',
|
|
workbox: {
|
|
globPatterns: ['**/*'],
|
|
maximumFileSizeToCacheInBytes: Number.MAX_SAFE_INTEGER,
|
|
navigateFallback: '/',
|
|
},
|
|
}),
|
|
],
|
|
vite: {
|
|
define: {
|
|
global: 'globalThis',
|
|
},
|
|
},
|
|
});
|