Skip to content
Merged

Dev #164

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
26 changes: 26 additions & 0 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Secrets & environment
.env
.env.*
!.env.example

# Build artifacts
bin
.cache
uploads

# IDE & editor
.idea
.vscode
*.swp
*.swo
*~

# Docker config
Dockerfile
.dockerignore

# Docs & misc
*.md
*.log
.DS_Store
Makefile
27 changes: 27 additions & 0 deletions frontend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Secrets & environment
.env
.env.*
!.env.example

# Dependencies & build output
node_modules
dist
coverage
*.tsbuildinfo
.eslintcache

# IDE & editor
.idea
.vscode
*.swp
*.swo
*~

# Docker config
Dockerfile
.dockerignore

# Docs & misc
*.md
*.log
.DS_Store
60 changes: 30 additions & 30 deletions frontend/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'
import pluginVue from 'eslint-plugin-vue'
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginVue from "eslint-plugin-vue";

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs['flat/recommended'],
...pluginVue.configs["flat/recommended"],
{
files: ['**/*.vue'],
files: ["**/*.vue"],
languageOptions: {
parserOptions: {
parser: tseslint.parser,
},
globals: {
HTMLElement: 'readonly',
HTMLStyleElement: 'readonly',
HTMLCanvasElement: 'readonly',
HTMLImageElement: 'readonly',
document: 'readonly',
window: 'readonly',
requestAnimationFrame: 'readonly',
cancelAnimationFrame: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
console: 'readonly',
Image: 'readonly',
HTMLElement: "readonly",
HTMLStyleElement: "readonly",
HTMLCanvasElement: "readonly",
HTMLImageElement: "readonly",
document: "readonly",
window: "readonly",
requestAnimationFrame: "readonly",
cancelAnimationFrame: "readonly",
setTimeout: "readonly",
clearTimeout: "readonly",
setInterval: "readonly",
clearInterval: "readonly",
console: "readonly",
Image: "readonly",
},
},
},
{
files: ['**/*.vue'],
files: ["**/*.vue"],
rules: {
'no-undef': 'off',
"no-undef": "off",
},
},
{
files: ['env.d.ts'],
files: ["env.d.ts"],
rules: {
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
"@typescript-eslint/no-empty-object-type": "off",
"@typescript-eslint/no-explicit-any": "off",
},
},
{
rules: {
'vue/max-attributes-per-line': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/html-self-closing': 'off',
'vue/attributes-order': 'off',
"vue/max-attributes-per-line": "off",
"vue/singleline-html-element-content-newline": "off",
"vue/html-self-closing": "off",
"vue/attributes-order": "off",
},
},
{
ignores: ['dist/', 'node_modules/'],
ignores: ["dist/", "node_modules/", "public/"],
},
)
);
11 changes: 9 additions & 2 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sunset Beach</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<meta name="theme-color" content="#f2b8c8">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="manifest" href="/manifest.json">
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<link rel="icon" type="image/png" sizes="192x192" href="/icons/icon-192.png">
<link rel="apple-touch-icon" href="/icons/icon-192.png">
<title>MomShell</title>
</head>
<body>
<div id="app"></div>
Expand Down
5 changes: 5 additions & 0 deletions frontend/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/public/icons/icon-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/public/icons/icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/public/icons/icon-maskable-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions frontend/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "MomShell - 贝壳回响",
"short_name": "MomShell",
"description": "亲密关系成长平台",
"start_url": "/",
"display": "standalone",
"orientation": "any",
"background_color": "#f5e0c8",
"theme_color": "#f2b8c8",
"icons": [
{ "src": "/icons/icon-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "/icons/icon-512.png", "sizes": "512x512", "type": "image/png" },
{ "src": "/icons/icon-maskable-512.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable" }
]
}
31 changes: 31 additions & 0 deletions frontend/public/sw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* eslint-disable no-undef */
const CACHE_NAME = "momshell-v1";
const PRECACHE_URLS = ["/", "/index.html"];

self.addEventListener("install", (event) => {
event.waitUntil(
caches.open(CACHE_NAME).then((cache) => cache.addAll(PRECACHE_URLS)),
);
self.skipWaiting();
});

self.addEventListener("activate", (event) => {
event.waitUntil(
caches
.keys()
.then((keys) =>
Promise.all(
keys.filter((k) => k !== CACHE_NAME).map((k) => caches.delete(k)),
),
),
);
self.clients.claim();
});

self.addEventListener("fetch", (event) => {
if (event.request.mode === "navigate") {
event.respondWith(
fetch(event.request).catch(() => caches.match("/index.html")),
);
}
});
29 changes: 29 additions & 0 deletions frontend/src/components/overlay/AiMemoryPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -578,4 +578,33 @@ async function onClearHistory() {
background: rgba(255, 255, 255, 0.14);
color: var(--text-primary);
}

/* ── Mobile ── */
@media (max-width: 768px) {
.ai-memory-panel {
padding: 24px 16px 20px;
}

.panel-title {
font-size: 20px;
}

.facts-list {
max-height: 55dvh;
max-height: 55vh;
}

.fact-card {
padding: 12px;
}

.fact-delete {
min-width: 44px;
min-height: 44px;
}

.fact-text {
font-size: 13px;
}
}
</style>
22 changes: 22 additions & 0 deletions frontend/src/components/overlay/AuthPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -271,4 +271,26 @@ async function onRegister() {
font-size: 13px;
line-height: 1.6;
}

/* ── Mobile ── */
@media (max-width: 768px) {
.auth-panel {
padding: 24px 16px 20px;
}

.auth-input {
font-size: 16px;
padding: 14px 16px;
}

.auth-tab {
font-size: 13px;
min-height: 44px;
}

.auth-submit {
min-height: 48px;
font-size: 16px;
}
}
</style>
Loading
Loading