Files
SnowLuma/packages/webui
DrSmoothl ba899782fe feat(webui): mask the access token and add copy + visibility buttons
The adapter edit dialog now ships a dedicated TokenField for the
access-token slot instead of reusing the plain text Field. It:

  - defaults to a password-style input so the value stays out of
    casual screen reads / screenshots,
  - exposes an Eye / EyeOff button that flips the input type rather
    than masking the string, so paste / autocomplete still behave like
    a native password field,
  - exposes a Copy button that pushes the current value to
    navigator.clipboard, flashing a check icon for ~1.4 s on success,
    and disables itself when the value is empty,
  - falls back to a transient textarea + document.execCommand('copy')
    for non-secure-context environments (LAN HTTP outside localhost),
    routed through a local alias so the deprecation warning on the
    live signature doesn't fire at the call site.
2026-05-18 14:47:33 +08:00
..
2026-05-03 14:02:29 +08:00
2026-05-03 14:02:29 +08:00
2026-05-18 13:31:17 +08:00
2026-05-03 14:02:29 +08:00
2026-05-03 14:02: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...
    },
  },
])