Compare commits

...

3 Commits

Author SHA1 Message Date
expdsn 35d61ebd6c 更改 2025-02-18 17:39:04 +08:00
expdsn d757d6712f Merge remote-tracking branch 'origin/markdown' into dev
# Conflicts:
#	app/admin/(default)/dashboard/article/detail/AddOrEdit.tsx
2025-02-18 17:38:54 +08:00
expdsn 0c08e7d230 更改 2025-02-18 17:09:28 +08:00
5 changed files with 172 additions and 8706 deletions

149
.idea/workspace.xml Normal file
View File

@ -0,0 +1,149 @@
<?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">{
&quot;associatedIndex&quot;: 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>

View File

@ -2,16 +2,21 @@
import { ArticleType } from '@/app/_lib/data/article';
import ImageUpload from '@/app/_ui/ImageUpload';
import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
import { faArrowLeft, faRibbon } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Button, Card, Col, DatePicker, Form, Input, InputNumber, message, Row, Select, Space } from 'antd';
import { useRouter } from 'next/navigation'
import { MdEditor } from 'md-editor-rt';
import { BackTop, Button, Card, Col, DatePicker, Form, Grid, Input, InputNumber, message, Row, Select, Space, Upload } from 'antd';
import { useParams, useRouter } from 'next/navigation'
import 'md-editor-rt/lib/style.css';
import '@ant-design/v5-patch-for-react-19';
import { mRequest } from '@/app/_lib/request';
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 }) {
const router = useRouter()
console.log(editData);
@ -144,7 +149,9 @@ export default function AddOrEdit({ editData }: { editData?: ArticleType | null
}
]}>
{/* <MDEditor className='my-markdown ' /> */}
<MdEditor />
<Editor
plugins={plugins} value={''}
/>
</Form.Item>
<Form.Item className="flex justify-end">

View File

@ -1,5 +1,5 @@
@import "tailwindcss";
@import 'bytemd/dist/index.css';
:root {
--background: #f9f9f9;
--foreground: #171717;

View File

@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"dev": "next dev --turbopack",
"build": "next build",
"pro-build": "node --max-old-space-size=1024 node_modules/next/dist/bin/next build",
"start": "next start",
@ -12,6 +12,8 @@
"dependencies": {
"@ant-design/icons": "^5.5.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/free-solid-svg-icons": "^6.7.2",
"@fortawesome/react-fontawesome": "^0.2.2",
@ -21,9 +23,9 @@
"ali-oss": "^6.22.0",
"antd": "^5.23.2",
"bcrypt": "^5.1.1",
"bytemd": "^1.22.0",
"clsx": "^2.1.1",
"dayjs": "^1.11.13",
"icons": "link:@awesome.me/kit-KIT_CODE/icons",
"jose": "^5.9.6",
"jotai": "^2.11.1",
"md-editor-rt": "^5.2.2",
@ -49,5 +51,11 @@
"postcss": "^8.5.1",
"tailwindcss": "^4.0.4",
"typescript": "^5"
},
"pnpm": {
"onlyBuiltDependencies": [
"bcrypt",
"sharp"
]
}
}

File diff suppressed because it is too large Load Diff