Compare commits
No commits in common. "35d61ebd6c9af97c8b2b0f112ea520c5e3a001fe" and "18c4efc9083a457445b7ca5f9c6422b94cdda669" have entirely different histories.
35d61ebd6c
...
18c4efc908
|
|
@ -1,149 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="AutoImportSettings">
|
|
||||||
<option name="autoReloadType" value="SELECTIVE" />
|
|
||||||
</component>
|
|
||||||
<component name="ChangeListManager">
|
|
||||||
<list default="true" id="84ab346f-c07b-447e-ab86-93b94f723f79" name="更改" comment="" />
|
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
||||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
||||||
</component>
|
|
||||||
<component name="Git.Settings">
|
|
||||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
||||||
</component>
|
|
||||||
<component name="PackageJsonUpdateNotifier">
|
|
||||||
<dismissed value="$PROJECT_DIR$/package.json" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectColorInfo">{
|
|
||||||
"associatedIndex": 3
|
|
||||||
}</component>
|
|
||||||
<component name="ProjectId" id="2tCjKDO1RAqqDDpGgzpShWM9BvI" />
|
|
||||||
<component name="ProjectViewState">
|
|
||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
|
||||||
<option name="showLibraryContents" value="true" />
|
|
||||||
</component>
|
|
||||||
<component name="PropertiesComponent"><![CDATA[{
|
|
||||||
"keyToString": {
|
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
||||||
"RunOnceActivity.git.unshallow": "true",
|
|
||||||
"git-widget-placeholder": "markdown",
|
|
||||||
"ignore.virus.scanning.warn.message": "true",
|
|
||||||
"node.js.detected.package.eslint": "true",
|
|
||||||
"node.js.detected.package.tslint": "true",
|
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
|
||||||
"nodejs_package_manager_path": "pnpm",
|
|
||||||
"npm.dev.executor": "Run",
|
|
||||||
"settings.editor.selected.configurable": "preferences.language.and.region",
|
|
||||||
"ts.external.directory.path": "C:\\Users\\expdsn\\WebstormProjects\\ai-bot\\node_modules\\typescript\\lib",
|
|
||||||
"vue.rearranger.settings.migration": "true"
|
|
||||||
}
|
|
||||||
}]]></component>
|
|
||||||
<component name="RunManager">
|
|
||||||
<configuration name="dev" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
|
|
||||||
<package-json value="$PROJECT_DIR$/package.json" />
|
|
||||||
<command value="run" />
|
|
||||||
<scripts>
|
|
||||||
<script value="dev" />
|
|
||||||
</scripts>
|
|
||||||
<node-interpreter value="project" />
|
|
||||||
<package-manager value="yarn" />
|
|
||||||
<envs />
|
|
||||||
<method v="2" />
|
|
||||||
</configuration>
|
|
||||||
<recent_temporary>
|
|
||||||
<list>
|
|
||||||
<item itemvalue="npm.dev" />
|
|
||||||
</list>
|
|
||||||
</recent_temporary>
|
|
||||||
</component>
|
|
||||||
<component name="SharedIndexes">
|
|
||||||
<attachedChunks>
|
|
||||||
<set>
|
|
||||||
<option value="bundled-js-predefined-d6986cc7102b-76f8388c3a79-JavaScript-WS-243.24978.60" />
|
|
||||||
</set>
|
|
||||||
</attachedChunks>
|
|
||||||
</component>
|
|
||||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
|
|
||||||
<component name="TaskManager">
|
|
||||||
<task active="true" id="Default" summary="默认任务">
|
|
||||||
<changelist id="84ab346f-c07b-447e-ab86-93b94f723f79" name="更改" comment="" />
|
|
||||||
<created>1739862885367</created>
|
|
||||||
<option name="number" value="Default" />
|
|
||||||
<option name="presentableId" value="Default" />
|
|
||||||
<updated>1739862885367</updated>
|
|
||||||
<workItem from="1739862887270" duration="2556000" />
|
|
||||||
<workItem from="1739866039210" duration="2420000" />
|
|
||||||
<workItem from="1739868501347" duration="114000" />
|
|
||||||
<workItem from="1739868625193" duration="55000" />
|
|
||||||
<workItem from="1739868789923" duration="1235000" />
|
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00001" summary="更改">
|
|
||||||
<option name="closed" value="true" />
|
|
||||||
<created>1739869769283</created>
|
|
||||||
<option name="number" value="00001" />
|
|
||||||
<option name="presentableId" value="LOCAL-00001" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1739869769283</updated>
|
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00002" summary="1">
|
|
||||||
<option name="closed" value="true" />
|
|
||||||
<created>1739870022777</created>
|
|
||||||
<option name="number" value="00002" />
|
|
||||||
<option name="presentableId" value="LOCAL-00002" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1739870022777</updated>
|
|
||||||
</task>
|
|
||||||
<option name="localTasksCounter" value="3" />
|
|
||||||
<servers />
|
|
||||||
</component>
|
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
|
||||||
<option name="version" value="3" />
|
|
||||||
</component>
|
|
||||||
<component name="Vcs.Log.Tabs.Properties">
|
|
||||||
<option name="RECENT_FILTERS">
|
|
||||||
<map>
|
|
||||||
<entry key="Branch">
|
|
||||||
<value>
|
|
||||||
<list>
|
|
||||||
<RecentGroup>
|
|
||||||
<option name="FILTER_VALUES">
|
|
||||||
<option value="origin/dev" />
|
|
||||||
</option>
|
|
||||||
</RecentGroup>
|
|
||||||
</list>
|
|
||||||
</value>
|
|
||||||
</entry>
|
|
||||||
</map>
|
|
||||||
</option>
|
|
||||||
<option name="TAB_STATES">
|
|
||||||
<map>
|
|
||||||
<entry key="MAIN">
|
|
||||||
<value>
|
|
||||||
<State>
|
|
||||||
<option name="FILTERS">
|
|
||||||
<map>
|
|
||||||
<entry key="branch">
|
|
||||||
<value>
|
|
||||||
<list>
|
|
||||||
<option value="origin/dev" />
|
|
||||||
</list>
|
|
||||||
</value>
|
|
||||||
</entry>
|
|
||||||
</map>
|
|
||||||
</option>
|
|
||||||
</State>
|
|
||||||
</value>
|
|
||||||
</entry>
|
|
||||||
</map>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="VcsManagerConfiguration">
|
|
||||||
<MESSAGE value="完成了网站的广告和详请展示" />
|
|
||||||
<MESSAGE value="更改" />
|
|
||||||
<MESSAGE value="1" />
|
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="1" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
|
|
@ -2,21 +2,16 @@
|
||||||
|
|
||||||
import { ArticleType } from '@/app/_lib/data/article';
|
import { ArticleType } from '@/app/_lib/data/article';
|
||||||
import ImageUpload from '@/app/_ui/ImageUpload';
|
import ImageUpload from '@/app/_ui/ImageUpload';
|
||||||
import { faArrowLeft, faRibbon } from '@fortawesome/free-solid-svg-icons';
|
import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
import { BackTop, Button, Card, Col, DatePicker, Form, Grid, Input, InputNumber, message, Row, Select, Space, Upload } from 'antd';
|
import { Button, Card, Col, DatePicker, Form, Input, InputNumber, message, Row, Select, Space } from 'antd';
|
||||||
import { useParams, useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
|
import { MdEditor } from 'md-editor-rt';
|
||||||
import 'md-editor-rt/lib/style.css';
|
import 'md-editor-rt/lib/style.css';
|
||||||
import '@ant-design/v5-patch-for-react-19';
|
import '@ant-design/v5-patch-for-react-19';
|
||||||
import { mRequest } from '@/app/_lib/request';
|
import { mRequest } from '@/app/_lib/request';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import {Editor} from "@bytemd/react";
|
|
||||||
import gfm from '@bytemd/plugin-gfm'
|
|
||||||
|
|
||||||
const plugins = [
|
|
||||||
gfm(),
|
|
||||||
// Add more plugins here
|
|
||||||
]
|
|
||||||
export default function AddOrEdit({ editData }: { editData?: ArticleType | null }) {
|
export default function AddOrEdit({ editData }: { editData?: ArticleType | null }) {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
console.log(editData);
|
console.log(editData);
|
||||||
|
|
@ -149,9 +144,7 @@ export default function AddOrEdit({ editData }: { editData?: ArticleType | null
|
||||||
}
|
}
|
||||||
]}>
|
]}>
|
||||||
{/* <MDEditor className='my-markdown ' /> */}
|
{/* <MDEditor className='my-markdown ' /> */}
|
||||||
<Editor
|
<MdEditor />
|
||||||
plugins={plugins} value={''}
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item className="flex justify-end">
|
<Form.Item className="flex justify-end">
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
@import "tailwindcss";
|
@import "tailwindcss";
|
||||||
@import 'bytemd/dist/index.css';
|
|
||||||
:root {
|
:root {
|
||||||
--background: #f9f9f9;
|
--background: #f9f9f9;
|
||||||
--foreground: #171717;
|
--foreground: #171717;
|
||||||
|
|
|
||||||
12
package.json
12
package.json
|
|
@ -3,7 +3,7 @@
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev --turbopack",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"pro-build": "node --max-old-space-size=1024 node_modules/next/dist/bin/next build",
|
"pro-build": "node --max-old-space-size=1024 node_modules/next/dist/bin/next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
|
|
@ -12,8 +12,6 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ant-design/icons": "^5.5.2",
|
"@ant-design/icons": "^5.5.2",
|
||||||
"@ant-design/nextjs-registry": "^1.0.2",
|
"@ant-design/nextjs-registry": "^1.0.2",
|
||||||
"@bytemd/plugin-gfm": "^1.22.0",
|
|
||||||
"@bytemd/react": "^1.22.0",
|
|
||||||
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
||||||
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
||||||
"@fortawesome/react-fontawesome": "^0.2.2",
|
"@fortawesome/react-fontawesome": "^0.2.2",
|
||||||
|
|
@ -23,9 +21,9 @@
|
||||||
"ali-oss": "^6.22.0",
|
"ali-oss": "^6.22.0",
|
||||||
"antd": "^5.23.2",
|
"antd": "^5.23.2",
|
||||||
"bcrypt": "^5.1.1",
|
"bcrypt": "^5.1.1",
|
||||||
"bytemd": "^1.22.0",
|
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
|
"icons": "link:@awesome.me/kit-KIT_CODE/icons",
|
||||||
"jose": "^5.9.6",
|
"jose": "^5.9.6",
|
||||||
"jotai": "^2.11.1",
|
"jotai": "^2.11.1",
|
||||||
"md-editor-rt": "^5.2.2",
|
"md-editor-rt": "^5.2.2",
|
||||||
|
|
@ -51,11 +49,5 @@
|
||||||
"postcss": "^8.5.1",
|
"postcss": "^8.5.1",
|
||||||
"tailwindcss": "^4.0.4",
|
"tailwindcss": "^4.0.4",
|
||||||
"typescript": "^5"
|
"typescript": "^5"
|
||||||
},
|
|
||||||
"pnpm": {
|
|
||||||
"onlyBuiltDependencies": [
|
|
||||||
"bcrypt",
|
|
||||||
"sharp"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue