mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-27 13:29:15 +07:00
🔧 chore: update ESLint rules to be commented out, enhance manifest for development mode, and adjust Welcome component username prop
This commit is contained in:
12
.vscode/settings.json
vendored
12
.vscode/settings.json
vendored
@@ -7,12 +7,12 @@
|
||||
"editor.formatOnSave": true,
|
||||
// don't show errors, but fix when save and git pre commit
|
||||
"eslint.rules.customizations": [
|
||||
{ "rule": "import/order", "severity": "off" },
|
||||
{ "rule": "prettier/prettier", "severity": "off" },
|
||||
{ "rule": "react/jsx-sort-props", "severity": "off" },
|
||||
{ "rule": "sort-keys-fix/sort-keys-fix", "severity": "off" },
|
||||
{ "rule": "simple-import-sort/exports", "severity": "off" },
|
||||
{ "rule": "typescript-sort-keys/interface", "severity": "off" }
|
||||
// { "rule": "import/order", "severity": "off" },
|
||||
// { "rule": "prettier/prettier", "severity": "off" },
|
||||
// { "rule": "react/jsx-sort-props", "severity": "off" },
|
||||
// { "rule": "sort-keys-fix/sort-keys-fix", "severity": "off" },
|
||||
// { "rule": "simple-import-sort/exports", "severity": "off" },
|
||||
// { "rule": "typescript-sort-keys/interface", "severity": "off" }
|
||||
],
|
||||
"eslint.validate": [
|
||||
// vscode eslint not 插件兼容性有问题
|
||||
|
||||
@@ -59,7 +59,7 @@ const Welcome = memo<{ mobile?: boolean }>(({ mobile }) => {
|
||||
i18n.language === 'en-US'
|
||||
? formatEnglishNumber(Number(data?.duration || 1))
|
||||
: formatIntergerNumber(Number(data?.duration || 1)),
|
||||
name: nickname || username,
|
||||
username: nickname || username,
|
||||
}}
|
||||
/>
|
||||
{!mobile && <FluentEmoji emoji={'🫶'} size={32} type={'anim'} />}
|
||||
|
||||
@@ -1,10 +1,34 @@
|
||||
import { BRANDING_LOGO_URL, BRANDING_NAME } from '@lobechat/business-const';
|
||||
import { kebabCase } from 'es-toolkit/compat';
|
||||
import type { MetadataRoute } from 'next';
|
||||
|
||||
import { manifestModule } from '@/server/manifest';
|
||||
const manifest = async (): Promise<MetadataRoute.Manifest> => {
|
||||
// Skip heavy module compilation in development
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
return {
|
||||
background_color: '#000000',
|
||||
description: 'LobeChat Development',
|
||||
display: 'standalone',
|
||||
icons: [
|
||||
{
|
||||
sizes: '192x192',
|
||||
src: '/icons/icon-192x192.png',
|
||||
type: 'image/png',
|
||||
},
|
||||
],
|
||||
name: 'LobeChat',
|
||||
short_name: 'LobeChat',
|
||||
start_url: '/agent',
|
||||
theme_color: '#000000',
|
||||
};
|
||||
}
|
||||
|
||||
const manifest = (): MetadataRoute.Manifest | any => {
|
||||
const [{ BRANDING_LOGO_URL, BRANDING_NAME }, { kebabCase }, { manifestModule }] =
|
||||
await Promise.all([
|
||||
import('@lobechat/business-const'),
|
||||
import('es-toolkit/compat'),
|
||||
import('@/server/manifest'),
|
||||
]);
|
||||
|
||||
// @ts-expect-error - manifestModule.generate returns extended manifest with custom properties
|
||||
return manifestModule.generate({
|
||||
description: `${BRANDING_NAME} brings you the best UI experience for ChatGPT, Claude, Gemini, and OLLaMA.`,
|
||||
icons: [
|
||||
|
||||
@@ -53,12 +53,14 @@ export enum SettingsTabs {
|
||||
Storage = 'storage',
|
||||
TTS = 'tts',
|
||||
|
||||
/* eslint-disable typescript-sort-keys/string-enum */
|
||||
// business
|
||||
Plans = 'plans',
|
||||
Funds = 'funds',
|
||||
Usage = 'usage',
|
||||
Billing = 'billing',
|
||||
Referral = 'referral',
|
||||
/* eslint-enable typescript-sort-keys/string-enum */
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user