Skip to content

Commit

Permalink
✨ feat(周报): 周报页面更新 使用vite react 渲染
Browse files Browse the repository at this point in the history
  • Loading branch information
littleCareless committed Dec 30, 2024
1 parent 618dd56 commit 15bee62
Show file tree
Hide file tree
Showing 80 changed files with 16,516 additions and 141 deletions.
2 changes: 1 addition & 1 deletion src/commands/GenerateWeeklyReportCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ import { WeeklyReportPanel } from "../webview/WeeklyReportPanel";
export class GenerateWeeklyReportCommand extends BaseCommand {
async execute(): Promise<void> {
// 只负责打开WebView面板
WeeklyReportPanel.createOrShow(this.context.extensionUri);
WeeklyReportPanel.createOrShow(this.context.extensionUri, this.context);
}
}
3 changes: 3 additions & 0 deletions src/webview-ui/.bolt/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"template": "vite-shadcn"
}
2 changes: 2 additions & 0 deletions src/webview-ui/.bolt/ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/components/ui/*
hooks/use-toast.ts
7 changes: 7 additions & 0 deletions src/webview-ui/.bolt/prompt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
For all designs I ask you to make, have them be beautiful, not cookie cutter. Make webpages that are fully featured and worthy for production.

By default, this template supports JSX syntax with Tailwind CSS classes, the shadcn/ui library, React hooks, and Lucide React for icons. Do not install other packages for UI themes, icons, etc unless absolutely necessary or I request them.

Use icons from lucide-react for logos.

Use stock photos from unsplash where appropriate, only valid URLs you know exist.
24 changes: 24 additions & 0 deletions src/webview-ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
20 changes: 20 additions & 0 deletions src/webview-ui/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/index.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
}
}
28 changes: 28 additions & 0 deletions src/webview-ui/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import js from '@eslint/js';
import globals from 'globals';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
);
13 changes: 13 additions & 0 deletions src/webview-ui/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>⚡️ Bolt.new + Vite + React</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit 15bee62

Please sign in to comment.