Files
SnowLuma/webui
手瓜一十雪 ac1ddee54e Add QQ avatar proxy and render avatars
Add a /avatar/:uin proxy endpoint that fetches QQ avatars (fetchQqAvatar) and caches them server-side (30d TTL) with browser-cache headers (30d max-age, immutable). Validate UINs and handle upstream failures (502 if no cache), and log failures. Update ConfigPage and OverviewPage to render avatar <img> from /avatar/:uin (referrerPolicy=no-referrer) and adjust styles (overflow-hidden, object-cover) to replace initial-letter placeholders with actual avatars.
2026-05-02 20:11:11 +08:00
..
2026-05-02 19:06:29 +08:00
2026-05-02 19:06:29 +08:00
2026-05-02 19:06:29 +08:00
2026-05-02 19:06:29 +08:00
2026-05-02 19:06:29 +08:00
2026-05-02 19:06:29 +08:00
2026-05-02 19:06:29 +08:00
2026-05-02 19:06:29 +08:00
2026-05-02 19:06:29 +08:00
2026-05-02 19:06:29 +08:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])