Merge branch 'main' of ssh://18.167.251.121:10002/aidlab/FiDA_Front
56
.gitea/workflows/prod_build_manual.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
name: 手动触发 FiDA WEB-Node.js 生产分支构建部署
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [ 18.18.0 ]
|
||||
env:
|
||||
REMOTE_DEPLOY_PATH: /workspace/workspace_fida/Web_Workspace_Server/Prod
|
||||
|
||||
steps:
|
||||
- name: 0.记录开始时间
|
||||
id: build_start_time
|
||||
run: echo "current_time=$(TZ='Asia/Hong_Kong' date '+%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: 1.检出代码
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- name: 2.设置 Node.js 环境
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm install
|
||||
- run: npm run build
|
||||
- run: ls -l
|
||||
|
||||
- name: 3.同步文件到远程服务器
|
||||
uses: appleboy/scp-action@v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
username: ${{ secrets.SERVER_USER }}
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
source: "./dist/*"
|
||||
target: ${{ env.REMOTE_DEPLOY_PATH }}
|
||||
ssh_options: "-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
|
||||
strip_components: 0
|
||||
|
||||
- name: 4. 远程重载 Nginx 配置
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
username: ${{ secrets.SERVER_USER }}
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
# 核心:执行 Nginx 重载命令
|
||||
script: |
|
||||
echo "尝试重载 Nginx 服务..."
|
||||
# 💡 注意:执行此命令需要服务器用户具有 sudo 权限,并且配置了 NOPASSWD。
|
||||
# 否则工作流可能会因为权限不足而失败。
|
||||
sudo systemctl reload nginx
|
||||
echo "Nginx 重载命令已发送。"
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/prettierrc",
|
||||
"semi": false,
|
||||
"tabWidth": 4,
|
||||
"singleQuote": true,
|
||||
"printWidth": 100,
|
||||
"useTabs": true,
|
||||
"trailingComma": "none"
|
||||
"$schema": "https://json.schemastore.org/prettierrc",
|
||||
"semi": false,
|
||||
"tabWidth": 4,
|
||||
"singleQuote": true,
|
||||
"printWidth": 100,
|
||||
"useTabs": true,
|
||||
"trailingComma": "none",
|
||||
"vueIndentScriptAndStyle": true
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"name": "furniture",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
|
||||
3
src/assets/icons/copy.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.50645 1.33331H10.8282C11.3648 1.3333 11.8077 1.3333 12.1685 1.36278C12.5433 1.39339 12.8877 1.4591 13.2113 1.62396C13.7131 1.87963 14.121 2.28757 14.3767 2.78934C14.5415 3.1129 14.6072 3.45736 14.6379 3.8321C14.6673 4.19289 14.6673 4.63579 14.6673 5.17243V7.4942C14.6673 8.03084 14.6673 8.47374 14.6379 8.83453C14.6072 9.20926 14.5415 9.55373 14.3767 9.87729C14.121 10.3791 13.7131 10.787 13.2113 11.0427C12.8877 11.2075 12.5433 11.2732 12.1685 11.3039C11.9277 11.3235 11.6503 11.3301 11.3329 11.3322C11.3307 11.6497 11.3242 11.9271 11.3045 12.1679C11.2739 12.5426 11.2082 12.8871 11.0433 13.2106C10.7877 13.7124 10.3797 14.1203 9.87796 14.376C9.5544 14.5409 9.20993 14.6066 8.8352 14.6372C8.47441 14.6667 8.03151 14.6667 7.49487 14.6666H5.1731C4.63646 14.6667 4.19356 14.6667 3.83277 14.6372C3.45804 14.6066 3.11357 14.5409 2.79001 14.376C2.28824 14.1203 1.8803 13.7124 1.62463 13.2106C1.45977 12.8871 1.39406 12.5426 1.36345 12.1679C1.33397 11.8071 1.33398 11.3642 1.33398 10.8275V8.50578C1.33398 7.96913 1.33397 7.52623 1.36345 7.16543C1.39406 6.7907 1.45977 6.44623 1.62463 6.12267C1.8803 5.62091 2.28824 5.21296 2.79001 4.9573C3.11357 4.79244 3.45804 4.72673 3.83277 4.69611C4.07358 4.67643 4.35097 4.66989 4.66839 4.66772C4.67057 4.3503 4.67711 4.07291 4.69678 3.8321C4.7274 3.45736 4.79311 3.1129 4.95797 2.78934C5.21363 2.28757 5.62158 1.87963 6.12334 1.62396C6.4469 1.4591 6.79137 1.39339 7.1661 1.36278C7.5269 1.3333 7.96981 1.3333 8.50645 1.33331ZM6.00183 4.66665L7.49485 4.66665C8.0315 4.66664 8.4744 4.66663 8.8352 4.69611C9.20993 4.72673 9.5544 4.79244 9.87796 4.9573C10.3797 5.21296 10.7877 5.62091 11.0433 6.12267C11.2082 6.44623 11.2739 6.7907 11.3045 7.16543C11.334 7.52623 11.334 7.96914 11.334 8.5058V9.99881C11.631 9.99672 11.8642 9.99094 12.06 9.97495C12.3522 9.95107 12.5017 9.90778 12.606 9.85466C12.8569 9.72682 13.0608 9.52285 13.1887 9.27197C13.2418 9.1677 13.2851 9.01823 13.3089 8.72596C13.3335 8.4259 13.334 8.0377 13.334 7.46665V5.19998C13.334 4.62893 13.3335 4.24073 13.3089 3.94067C13.2851 3.6484 13.2418 3.49893 13.1887 3.39466C13.0608 3.14378 12.8569 2.9398 12.606 2.81197C12.5017 2.75885 12.3522 2.71556 12.06 2.69168C11.7599 2.66717 11.3717 2.66665 10.8007 2.66665H8.53398C7.96293 2.66665 7.57474 2.66717 7.27468 2.69168C6.9824 2.71556 6.83293 2.75884 6.72866 2.81197C6.47778 2.9398 6.27381 3.14378 6.14598 3.39466C6.09285 3.49893 6.04957 3.6484 6.02569 3.94067C6.00969 4.1364 6.00391 4.36963 6.00183 4.66665ZM3.94134 6.02501C3.64907 6.04889 3.4996 6.09218 3.39533 6.1453C3.14445 6.27314 2.94047 6.47711 2.81264 6.72799C2.75952 6.83226 2.71623 6.98173 2.69235 7.274C2.66784 7.57406 2.66732 7.96226 2.66732 8.53331V10.8C2.66732 11.371 2.66784 11.7592 2.69235 12.0593C2.71623 12.3516 2.75952 12.501 2.81264 12.6053C2.94047 12.8562 3.14445 13.0602 3.39533 13.188C3.4996 13.2411 3.64907 13.2844 3.94134 13.3083C4.2414 13.3328 4.6296 13.3333 5.20065 13.3333H7.46732C8.03837 13.3333 8.42657 13.3328 8.72663 13.3083C9.0189 13.2844 9.16837 13.2411 9.27264 13.188C9.52352 13.0602 9.7275 12.8562 9.85533 12.6053C9.90845 12.501 9.95174 12.3516 9.97562 12.0593C10.0001 11.7592 10.0007 11.371 10.0007 10.8V8.53331C10.0007 7.96226 10.0001 7.57406 9.97562 7.274C9.95174 6.98173 9.90845 6.83226 9.85533 6.72799C9.7275 6.47711 9.52352 6.27314 9.27264 6.1453C9.16837 6.09218 9.0189 6.04889 8.72663 6.02501C8.42657 6.0005 8.03837 5.99998 7.46732 5.99998H5.20065C4.6296 5.99998 4.2414 6.0005 3.94134 6.02501Z" fill="currentColor" fill-opacity="0.65"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
3
src/assets/icons/equal.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6 9C6 8.44772 6.44772 8 7 8H17C17.5523 8 18 8.44772 18 9C18 9.55228 17.5523 10 17 10H7C6.44772 10 6 9.55228 6 9ZM6 15C6 14.4477 6.44772 14 7 14H17C17.5523 14 18 14.4477 18 15C18 15.5523 17.5523 16 17 16H7C6.44772 16 6 15.5523 6 15Z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 368 B |
3
src/assets/icons/refreshTransparent.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0.00519349 5.25084C0.374352 2.29042 2.89859 0 5.95881 0C7.48038 0 8.89399 0.567115 9.9667 1.50293V0.666667C9.9667 0.298477 10.2652 0 10.6334 0C11.0016 0 11.3 0.298477 11.3 0.666667V3.33333C11.3 3.70152 11.0016 4 10.6334 4H7.95881C7.59062 4 7.29214 3.70152 7.29214 3.33333C7.29214 2.96514 7.59062 2.66667 7.95881 2.66667H9.26357C8.40925 1.84253 7.23221 1.33333 5.95881 1.33333C3.57953 1.33333 1.61525 3.11449 1.32828 5.41583C1.28272 5.78119 0.949604 6.04044 0.584243 5.99488C0.218883 5.94932 -0.0403663 5.6162 0.00519349 5.25084ZM11.3334 6.00512C11.6987 6.05068 11.958 6.3838 11.9124 6.74916C11.5433 9.70958 9.01902 12 5.95881 12C4.44096 12 3.03056 11.4357 1.95881 10.5039V11.3333C1.95881 11.7015 1.66033 12 1.29214 12C0.923951 12 0.625474 11.7015 0.625474 11.3333V8.66667C0.625474 8.29848 0.923951 8 1.29214 8H3.95881C4.327 8 4.62547 8.29848 4.62547 8.66667C4.62547 9.03486 4.327 9.33333 3.95881 9.33333H2.65404C3.50837 10.1575 4.6854 10.6667 5.95881 10.6667C8.33808 10.6667 10.3024 8.88551 10.5893 6.58417C10.6349 6.21881 10.968 5.95956 11.3334 6.00512Z" fill="currentColor" fill-opacity="0.65"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
3
src/assets/icons/thumbDown.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.91215 14.3308C7.77862 14.5645 7.51769 14.695 7.25063 14.6616L6.94814 14.6238C5.30337 14.4182 4.24269 12.7778 4.73015 11.1935L5.0988 9.99538C4.87276 9.99127 4.66908 9.98361 4.48636 9.96929C4.08346 9.93771 3.71249 9.87012 3.3762 9.69307C2.68269 9.32795 2.18492 8.67624 2.01514 7.9111C1.93281 7.54007 1.96521 7.16439 2.04076 6.76738C2.11454 6.37964 2.24367 5.9062 2.40205 5.3255L2.71371 4.18272C2.72491 4.14168 2.73591 4.10119 2.74677 4.06125C2.94391 3.33614 3.09216 2.79083 3.41704 2.37016C3.70217 2.00096 4.07916 1.71301 4.51038 1.53507C5.0017 1.33233 5.56681 1.33278 6.31825 1.33338C7.59912 1.3344 8.88 1.33344 10.1609 1.33344C10.6975 1.33343 11.1404 1.33343 11.5012 1.36291C11.8759 1.39352 12.2204 1.45923 12.544 1.62409C13.0457 1.87975 13.4537 2.2877 13.7093 2.78947C13.8742 3.11302 13.9399 3.45749 13.9705 3.83223C14 4.19302 14 4.63593 14 5.17258V6.66678C14 6.69781 14 6.72838 14 6.7585C14.0003 7.28876 14.0005 7.68253 13.9091 8.02363C13.6625 8.94387 12.9437 9.66267 12.0235 9.90925C11.6824 10.0006 11.2886 10.0004 10.7584 10.0001C10.7283 10.0001 10.6977 10.0001 10.6667 10.0001C10.4936 10.0001 10.3339 10.0928 10.2481 10.243L7.91215 14.3308ZM10.9793 2.67229C11.0928 2.87001 11.1819 3.08389 11.2425 3.30993C11.3339 3.65103 11.3336 4.0448 11.3334 4.57506C11.3333 4.60518 11.3333 4.63575 11.3333 4.66678V8.6602C11.505 8.65408 11.5992 8.64257 11.6784 8.62135C12.1385 8.49806 12.4979 8.13866 12.6212 7.67854C12.6609 7.53035 12.6667 7.32968 12.6667 6.66678V5.20011C12.6667 4.62906 12.6661 4.24086 12.6416 3.9408C12.6177 3.64852 12.5745 3.49906 12.5213 3.39479C12.3935 3.14391 12.1895 2.93993 11.9386 2.8121C11.8344 2.75897 11.6849 2.71569 11.3926 2.69181C11.2713 2.6819 11.1357 2.67591 10.9793 2.67229ZM9.99999 8.79359V4.66678C9.99999 4.00387 9.99426 3.8032 9.95456 3.65502C9.83127 3.1949 9.47187 2.8355 9.01175 2.71221C8.86356 2.6725 8.66289 2.66678 7.99999 2.66678H6.44413C5.50832 2.66678 5.23352 2.67906 5.01898 2.76759C4.80337 2.85656 4.61487 3.00053 4.47231 3.18513C4.33045 3.36882 4.24629 3.63071 4.00007 4.53354L3.69563 5.6498C3.52827 6.26345 3.41343 6.68636 3.35059 7.01663C3.28839 7.34349 3.29206 7.51073 3.31681 7.62227C3.4017 8.00484 3.65059 8.3307 3.99734 8.51326C4.09844 8.56648 4.25882 8.61403 4.59053 8.64003C4.9257 8.6663 5.36392 8.66678 5.99999 8.66678C6.21155 8.66678 6.41056 8.7672 6.53625 8.93738C6.66194 9.10756 6.69939 9.32729 6.63717 9.5295L6.00453 11.5856C5.77439 12.3335 6.23437 13.1065 6.97869 13.277L9.0904 9.58151C9.29853 9.21729 9.62205 8.94286 9.99999 8.79359Z" fill="currentColor" fill-opacity="0.65"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
3
src/assets/icons/thumbUp.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.0879 1.66924C8.22143 1.43556 8.48236 1.3051 8.74942 1.33848L9.05191 1.37629C10.6967 1.58189 11.7574 3.22233 11.2699 4.8066L10.9012 6.00471C11.1273 6.00881 11.331 6.01648 11.5137 6.0308C11.9166 6.06238 12.2876 6.12997 12.6239 6.30702C13.3174 6.67214 13.8151 7.32385 13.9849 8.08898C14.0672 8.46002 14.0348 8.83569 13.9593 9.23271C13.8855 9.62045 13.7564 10.0939 13.598 10.6746L13.2863 11.8174C13.2751 11.8584 13.2641 11.8989 13.2533 11.9388C13.0561 12.6639 12.9079 13.2093 12.583 13.6299C12.2979 13.9991 11.9209 14.2871 11.4897 14.465C10.9983 14.6678 10.4332 14.6673 9.6818 14.6667C8.40093 14.6657 7.12005 14.6666 5.83918 14.6666C5.30254 14.6667 4.85964 14.6667 4.49885 14.6372C4.12412 14.6066 3.77965 14.5409 3.45609 14.376C2.95432 14.1203 2.54638 13.7124 2.29071 13.2106C2.12585 12.8871 2.06014 12.5426 2.02953 12.1679C2.00005 11.8071 2.00006 11.3642 2.00006 10.8275L2.00006 9.3333C2.00006 9.30228 2.00005 9.27171 2.00003 9.24158C1.99974 8.71133 1.99953 8.31756 2.09093 7.97646C2.33751 7.05621 3.0563 6.33742 3.97655 6.09084C4.31765 5.99944 4.71142 5.99965 5.24167 5.99994C5.2718 5.99996 5.30237 5.99997 5.33339 5.99997C5.50641 5.99997 5.66615 5.90727 5.75199 5.75705L8.0879 1.66924ZM5.02074 13.3278C4.90721 13.1301 4.81816 12.9162 4.75759 12.6902C4.66619 12.3491 4.66641 11.9553 4.66669 11.425C4.66671 11.3949 4.66673 11.3643 4.66673 11.3333V7.33988C4.49502 7.34601 4.40083 7.35752 4.32164 7.37874C3.86152 7.50203 3.50212 7.86143 3.37883 8.32155C3.33912 8.46974 3.3334 8.67041 3.3334 9.3333V10.8C3.3334 11.371 3.33392 11.7592 3.35843 12.0593C3.38231 12.3516 3.4256 12.501 3.47872 12.6053C3.60655 12.8562 3.81053 13.0602 4.06141 13.188C4.16568 13.2411 4.31515 13.2844 4.60742 13.3083C4.72871 13.3182 4.8644 13.3242 5.02074 13.3278ZM6.00006 7.20649V11.3333C6.00006 11.9962 6.00579 12.1969 6.04549 12.3451C6.16878 12.8052 6.52818 13.1646 6.9883 13.2879C7.13649 13.3276 7.33716 13.3333 8.00006 13.3333H9.55592C10.4917 13.3333 10.7665 13.321 10.9811 13.2325C11.1967 13.1435 11.3852 12.9996 11.5277 12.815C11.6696 12.6313 11.7538 12.3694 12 11.4665L12.3044 10.3503C12.4718 9.73663 12.5866 9.31372 12.6495 8.98346C12.7117 8.65659 12.708 8.48936 12.6832 8.37781C12.5983 7.99525 12.3495 7.66939 12.0027 7.48683C11.9016 7.4336 11.7412 7.38605 11.4095 7.36006C11.0744 7.33379 10.6361 7.33331 10.0001 7.33331C9.7885 7.33331 9.58949 7.23289 9.4638 7.06271C9.33811 6.89253 9.30066 6.6728 9.36288 6.47059L9.99552 4.41448C10.2257 3.66654 9.76568 2.89356 9.02136 2.7231L6.90965 6.41857C6.70152 6.7828 6.378 7.05723 6.00006 7.20649Z" fill="currentColor" fill-opacity="0.65"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/assets/images/agent-thumb.jpg
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
src/assets/images/sender.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
src/assets/images/user-thumb.jpg
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
@@ -88,7 +88,10 @@ export default {
|
||||
diversity: 'Diversity',
|
||||
relevance: 'Relevance'
|
||||
},
|
||||
confirm: 'Confirm'
|
||||
confirm: 'Confirm',
|
||||
styleTitle: 'Settings',
|
||||
createProject: 'Create Project',
|
||||
trendingReport: 'Trending Report'
|
||||
},
|
||||
area: {
|
||||
unitedStates: 'United States',
|
||||
@@ -102,6 +105,10 @@ export default {
|
||||
canada: 'Canada',
|
||||
germany: 'Germany'
|
||||
},
|
||||
agent: {
|
||||
copySuccess: 'Text copied to clipboard',
|
||||
copyFaild: 'Copy failed. Your browser may be restricting clipboard access. Please try copying manually.'
|
||||
},
|
||||
|
||||
// Version Tree
|
||||
VersionTree: {
|
||||
@@ -114,7 +121,13 @@ export default {
|
||||
branchingNodeTree: 'Branching Node Tree',
|
||||
restore: 'Restore',
|
||||
newChat: 'New Chat',
|
||||
delete: 'Delete'
|
||||
delete: 'Delete',
|
||||
deleteChat:'Delete chat?',
|
||||
deleteHint:'Once deleted, you won’t be able to view this conversation again.',
|
||||
restoreChat:'Restore chat?',
|
||||
restoreHint:'Once deleted, you won’t be able to view this conversation again.',
|
||||
cancel: 'cancel',
|
||||
Confirm: 'Confirm',
|
||||
},
|
||||
//generateSketch
|
||||
generateSketch: {
|
||||
|
||||
@@ -1,102 +1,133 @@
|
||||
export default {
|
||||
AlphaVersion: '2026版本',
|
||||
Login: {
|
||||
login: '登录',
|
||||
register: '注册',
|
||||
signUp: '注册',
|
||||
loginTo: '登录到 <span>FiDA</span',
|
||||
loginTitle: '一个多智能体画布,用于快速、趋势驱动的设计迭代。',
|
||||
name: '姓名',
|
||||
email: '邮箱',
|
||||
password: '密码',
|
||||
enterName: '请输入姓名',
|
||||
enterEmail: '请输入邮箱',
|
||||
enterPassword: '请输入密码',
|
||||
forgetPassword: '忘记密码?',
|
||||
pleaseInputName: '请输入姓名',
|
||||
nameLengthError: '姓名长度必须在 {min} 到 {max} 个字符之间',
|
||||
pleaseInputEmail: '请输入邮箱',
|
||||
emailFormatError: '请输入正确的邮箱',
|
||||
pleaseInputPassword: '请输入密码',
|
||||
passwordLengthError: '密码长度必须在 {min} 到 {max} 个字符之间',
|
||||
pleaseTermsPolicy: '请同意条款、政策和费用',
|
||||
agreeTermsPolicy: '我同意 <span onclick="onClickPrivacy()">条款、政策</span> 和费用。',
|
||||
noAccountToSignUp: `还没有账号? <span onclick="onClickRegister()">注册</span>`,
|
||||
signUpFor: '注册账号',
|
||||
registerTip: '一个多智能体画布,用于快速、趋势驱动的设计迭代。',
|
||||
havenAccountToLogin: `已经有账号? <span onclick="onClickLogin()">登录</span>`,
|
||||
verifyEmail: '验证您的邮箱地址',
|
||||
verifyCodeHasSent: '已发送验证码到 <span>{email}</span>',
|
||||
verifyCode: '请输入验证码',
|
||||
verify: '验证',
|
||||
resendCode: '重新发送验证码',
|
||||
resendCodeIn: '重新发送验证码倒计时 {time}',
|
||||
orContinueWith: '或者使用',
|
||||
googleLogin: '使用 Google 登录',
|
||||
wechatLogin: '使用微信登录',
|
||||
indexTip: '一个多智能体画布,用于快速、趋势驱动的设计迭代。',
|
||||
},
|
||||
Nuic: {
|
||||
hiName: '你好,{name}。这是 Fiphant。',
|
||||
nuic1Title: `帮助他发现您空间中的 <b>“YOU”</b>。`,
|
||||
nuic1Tip: `让我们设置您的个人资料。几个快速的细节将帮助 Fiphant 理解您的需求并找到您正在寻找的内容。`,
|
||||
letsGo: '让我们开始,Fiphant!',
|
||||
skip: '跳过',
|
||||
next: '下一步',
|
||||
nuic2Title: `你通常喜欢什么样的风格呢?`,
|
||||
loadMore: '加载更多',
|
||||
nuic3Title: `您在 <b>哪里</b> 工作?您从事什么 <b>工作</b>?`,
|
||||
basedIn: '公司',
|
||||
role: '角色',
|
||||
allSet: '准备好了!',
|
||||
loadingTip: '我们正在自定义您的仪表板。',
|
||||
},
|
||||
Home: {
|
||||
creditsNum: '积分: {num}',
|
||||
newProject: '新建项目',
|
||||
home: '首页',
|
||||
history: '历史记录',
|
||||
today: '今天',
|
||||
yesterday: '昨天',
|
||||
earlierChat: '更早的'
|
||||
},
|
||||
Input: {
|
||||
placeholder: '请输入',
|
||||
selectPlaceholder: '请选择',
|
||||
type: '类型',
|
||||
area: '地区',
|
||||
style: '风格',
|
||||
types: {
|
||||
sofa: '沙发',
|
||||
desk: '书桌',
|
||||
chair: '椅子'
|
||||
},
|
||||
styles: {
|
||||
modern: '现代',
|
||||
classic: '古典'
|
||||
},
|
||||
chooseStyle: '选择风格',
|
||||
setting: 'Setting',
|
||||
settingOptions: {
|
||||
creativity: '创意度',
|
||||
diversity: '多样性',
|
||||
relevance: '相关度'
|
||||
},
|
||||
confirm: '确认',
|
||||
styleTitle: '设置',
|
||||
createProject: '创建项目',
|
||||
trendingReport: '趋势报告'
|
||||
},
|
||||
area: {
|
||||
unitedStates: '美国',
|
||||
singapore: '新加坡',
|
||||
australia: '澳大利亚',
|
||||
southKorea: '韩国',
|
||||
china: '中国',
|
||||
italy: '意大利',
|
||||
france: '法国',
|
||||
japan: '日本',
|
||||
canada: '加拿大',
|
||||
germany: '德国'
|
||||
}
|
||||
AlphaVersion: '2026版本',
|
||||
Login: {
|
||||
login: '登录',
|
||||
register: '注册',
|
||||
signUp: '注册',
|
||||
loginTo: '登录到 <span>FiDA</span',
|
||||
loginTitle: '一个多智能体画布,用于快速、趋势驱动的设计迭代。',
|
||||
name: '姓名',
|
||||
email: '邮箱',
|
||||
password: '密码',
|
||||
enterName: '请输入姓名',
|
||||
enterEmail: '请输入邮箱',
|
||||
enterPassword: '请输入密码',
|
||||
forgetPassword: '忘记密码?',
|
||||
pleaseInputName: '请输入姓名',
|
||||
nameLengthError: '姓名长度必须在 {min} 到 {max} 个字符之间',
|
||||
pleaseInputEmail: '请输入邮箱',
|
||||
emailFormatError: '请输入正确的邮箱',
|
||||
pleaseInputPassword: '请输入密码',
|
||||
passwordLengthError: '密码长度必须在 {min} 到 {max} 个字符之间',
|
||||
pleaseTermsPolicy: '请同意条款、政策和费用',
|
||||
agreeTermsPolicy: '我同意 <span onclick="onClickPrivacy()">条款、政策</span> 和费用。',
|
||||
noAccountToSignUp: `还没有账号? <span onclick="onClickRegister()">注册</span>`,
|
||||
signUpFor: '注册账号',
|
||||
registerTip: '一个多智能体画布,用于快速、趋势驱动的设计迭代。',
|
||||
havenAccountToLogin: `已经有账号? <span onclick="onClickLogin()">登录</span>`,
|
||||
verifyEmail: '验证您的邮箱地址',
|
||||
verifyCodeHasSent: '已发送验证码到 <span>{email}</span>',
|
||||
verifyCode: '请输入验证码',
|
||||
verify: '验证',
|
||||
resendCode: '重新发送验证码',
|
||||
resendCodeIn: '重新发送验证码倒计时 {time}',
|
||||
orContinueWith: '或者使用',
|
||||
googleLogin: '使用 Google 登录',
|
||||
wechatLogin: '使用微信登录',
|
||||
indexTip: '一个多智能体画布,用于快速、趋势驱动的设计迭代。'
|
||||
},
|
||||
Nuic: {
|
||||
hiName: '你好,{name}。这是 Fiphant。',
|
||||
nuic1Title: `帮助他发现您空间中的 <b>“YOU”</b>。`,
|
||||
nuic1Tip: `让我们设置您的个人资料。几个快速的细节将帮助 Fiphant 理解您的需求并找到您正在寻找的内容。`,
|
||||
letsGo: '让我们开始,Fiphant!',
|
||||
skip: '跳过',
|
||||
next: '下一步',
|
||||
nuic2Title: `你通常喜欢什么样的风格呢?`,
|
||||
loadMore: '加载更多',
|
||||
nuic3Title: `您在 <b>哪里</b> 工作?您从事什么 <b>工作</b>?`,
|
||||
basedIn: '公司',
|
||||
role: '角色',
|
||||
allSet: '准备好了!',
|
||||
loadingTip: '我们正在自定义您的仪表板。'
|
||||
},
|
||||
Home: {
|
||||
creditsNum: '积分: {num}',
|
||||
newProject: '新建项目',
|
||||
home: '首页',
|
||||
history: '历史记录',
|
||||
today: '今天',
|
||||
yesterday: '昨天',
|
||||
earlierChat: '更早的'
|
||||
},
|
||||
Input: {
|
||||
placeholder: '请输入',
|
||||
selectPlaceholder: '请选择',
|
||||
type: '类型',
|
||||
area: '地区',
|
||||
style: '风格',
|
||||
types: {
|
||||
sofa: '沙发',
|
||||
desk: '书桌',
|
||||
chair: '椅子'
|
||||
},
|
||||
styles: {
|
||||
modern: '现代',
|
||||
classic: '古典'
|
||||
},
|
||||
chooseStyle: '选择风格',
|
||||
setting: 'Setting',
|
||||
settingOptions: {
|
||||
creativity: '创意度',
|
||||
diversity: '多样性',
|
||||
relevance: '相关度'
|
||||
},
|
||||
confirm: '确认',
|
||||
styleTitle: '设置',
|
||||
createProject: '创建项目',
|
||||
trendingReport: '趋势报告'
|
||||
},
|
||||
area: {
|
||||
unitedStates: '美国',
|
||||
singapore: '新加坡',
|
||||
australia: '澳大利亚',
|
||||
southKorea: '韩国',
|
||||
china: '中国',
|
||||
italy: '意大利',
|
||||
france: '法国',
|
||||
japan: '日本',
|
||||
canada: '加拿大',
|
||||
germany: '德国'
|
||||
},
|
||||
agent: {
|
||||
copySuccess: '文本已复制到剪贴板',
|
||||
copyFaild:
|
||||
'复制失败。您的浏览器可能限制了剪贴板访问,请允许浏览器访问剪贴板或尝试手动复制。'
|
||||
},
|
||||
|
||||
// Version Tree
|
||||
VersionTree: {
|
||||
versionInformation: '版本信息',
|
||||
input: '用户请求',
|
||||
userRequest: '用户请求',
|
||||
sketch: '设计草图',
|
||||
generateResult: '生成结果',
|
||||
linearNodeTree: '线性节点树',
|
||||
branchingNodeTree: '分支节点树',
|
||||
restore: '恢复',
|
||||
newChat: '新建对话',
|
||||
delete: '删除',
|
||||
deleteChat:'删除对话?',
|
||||
deleteHint:'删除后将无法恢复该对话。',
|
||||
restoreChat:'恢复对话?',
|
||||
restoreHint:'恢复后将显示该对话。',
|
||||
cancel: '取消',
|
||||
Confirm: '确认',
|
||||
},
|
||||
//generateSketch
|
||||
generateSketch: {
|
||||
restore: '恢复',
|
||||
delete: '删除',
|
||||
edit: '编辑'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,69 +7,75 @@ import { createRouter, createWebHistory } from 'vue-router'
|
||||
* 3. 路由的name默认是文件名,如果文件名与name不一致,通过defineOptions({ name: 'componentName' })来设置
|
||||
*/
|
||||
const router = createRouter({
|
||||
history: createWebHistory('/'),
|
||||
// history: createWebHistory(import.meta.env.VITE_APP_URL),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/index'
|
||||
},
|
||||
{
|
||||
path: '/index',
|
||||
name: 'index',
|
||||
component: () => import('../views/login/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
name: 'login',
|
||||
component: () => import('../views/login/login.vue'),
|
||||
},
|
||||
{
|
||||
path: '/register',
|
||||
name: 'register',
|
||||
component: () => import('../views/login/register.vue'),
|
||||
},
|
||||
{
|
||||
path: '/nuic',
|
||||
name: 'nuic',
|
||||
component: () => import('../views/nuic/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/home',
|
||||
name: 'home',
|
||||
component: () => import('../views/home/index.vue'),
|
||||
children: [
|
||||
{
|
||||
path: 'test/:id',
|
||||
name: 'test',
|
||||
component: () => import('../views/home/test.vue'),
|
||||
meta: { topNavStyle: '2' }
|
||||
},
|
||||
{
|
||||
path: '/home/versionTree',
|
||||
name: 'versionTree',
|
||||
component: () => import('../views/home/versionTree.vue'),
|
||||
meta: { topNavStyle: '2' }
|
||||
},
|
||||
{
|
||||
path: 'mainInput',
|
||||
name: 'mainInput',
|
||||
component: () => import('../views/home/mainInput.vue')
|
||||
},
|
||||
{
|
||||
path: 'canvas',
|
||||
name: 'canvas',
|
||||
component: () => import('../views/canvas/index.vue'),
|
||||
meta: { topNavStyle: '2' }
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/:pathMatch(.*)',
|
||||
name: '404',
|
||||
component: () => import('../views/404.vue'),
|
||||
}
|
||||
]
|
||||
history: createWebHistory('/'),
|
||||
// history: createWebHistory(import.meta.env.VITE_APP_URL),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/index'
|
||||
},
|
||||
{
|
||||
path: '/index',
|
||||
name: 'index',
|
||||
component: () => import('../views/login/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
name: 'login',
|
||||
component: () => import('../views/login/login.vue')
|
||||
},
|
||||
{
|
||||
path: '/register',
|
||||
name: 'register',
|
||||
component: () => import('../views/login/register.vue')
|
||||
},
|
||||
{
|
||||
path: '/nuic',
|
||||
name: 'nuic',
|
||||
component: () => import('../views/nuic/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/home',
|
||||
name: 'home',
|
||||
component: () => import('../views/home/index.vue'),
|
||||
children: [
|
||||
{
|
||||
path: 'test/:id',
|
||||
name: 'test',
|
||||
component: () => import('../views/home/test.vue'),
|
||||
meta: { topNavStyle: '2' }
|
||||
},
|
||||
{
|
||||
path: '/home/versionTree',
|
||||
name: 'versionTree',
|
||||
component: () => import('../views/home/VersionTree.vue'),
|
||||
meta: { topNavStyle: '2' }
|
||||
},
|
||||
{
|
||||
path: 'mainInput',
|
||||
name: 'mainInput',
|
||||
component: () => import('../views/home/mainInput.vue')
|
||||
},
|
||||
{
|
||||
path: 'canvas',
|
||||
name: 'canvas',
|
||||
component: () => import('../views/canvas/index.vue'),
|
||||
meta: { topNavStyle: '2' }
|
||||
},
|
||||
{
|
||||
path: 'agent',
|
||||
name: 'agent',
|
||||
component: () => import('../views/home/agent/index.vue')
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/:pathMatch(.*)',
|
||||
name: '404',
|
||||
component: () => import('../views/404.vue')
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
export default router
|
||||
|
||||
75
src/views/home/agent/components/Agent.vue
Normal file
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<div class="agent-container flex flex-col">
|
||||
<div class="agent-header flex align-center space-between">
|
||||
<div class="header-title-wrapper">
|
||||
<div class="agent-title">{{ props.title }}</div>
|
||||
<div class="agent-name">AI Assistant 1.0</div>
|
||||
</div>
|
||||
<SvgIcon name="equal" color="#0d0d0d" size="24" />
|
||||
</div>
|
||||
<div class="agent-body flex-1 flex flex-col">
|
||||
<List />
|
||||
<Input :is-agent-mode="true" @send="handleSendMessage" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import List from './List.vue'
|
||||
import Input from '../../components/Input.vue'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
title: string
|
||||
}>(),
|
||||
{
|
||||
title: 'Retro Sofa Sketch'
|
||||
}
|
||||
)
|
||||
|
||||
const handleSendMessage = (message: string) => {
|
||||
console.log('Message sent:', message)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.c-svg {
|
||||
width: initial;
|
||||
}
|
||||
.agent-container {
|
||||
// width: 39%;
|
||||
width: 63.4rem;
|
||||
background-color: #fff;
|
||||
border-radius: 2rem;
|
||||
box-shadow: 0px 15px 21px 0px #0000000d;
|
||||
|
||||
.agent-header {
|
||||
height: 7.4rem;
|
||||
border-bottom: 0.1rem solid #c9c9c9;
|
||||
font-family: 'GeneralMedium';
|
||||
padding: 1.4rem 3.4rem 1.4rem 3.1rem;
|
||||
|
||||
.agent-title {
|
||||
font-size: 1.8rem;
|
||||
margin-bottom: 0.6rem;
|
||||
}
|
||||
|
||||
.agent-name {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
}
|
||||
.agent-body {
|
||||
padding: 3.2rem;
|
||||
.assist-input-wrapper {
|
||||
width: 100%;
|
||||
height: 14.4rem;
|
||||
min-height: 14.4rem !important;
|
||||
max-height: 14.4rem !important;
|
||||
}
|
||||
}
|
||||
.input-wrapper {
|
||||
height: 14.4rem;
|
||||
padding: 0 2rem 3rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
127
src/views/home/agent/components/Item.vue
Normal file
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<div class="agent-item">
|
||||
<div class="message-wrapper flex align-center" :class="{ 'is-user': content.isUser }">
|
||||
<div class="thumb">
|
||||
<img :src="content.isUser ? userThumb : agentThumb" class="thumb-icon" />
|
||||
</div>
|
||||
<div class="message-context">
|
||||
<div class="message-txt">{{ content.text }}</div>
|
||||
<div class="operate flex" :class="{ 'is-user': content.isUser }">
|
||||
<template v-if="content.isUser">
|
||||
<SvgIcon name="copy" size="16" color="#000" @click.stop="handleCopyText" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<SvgIcon
|
||||
v-for="operate in operateList"
|
||||
:key="operate.name"
|
||||
:name="operate.name"
|
||||
:size="operate.name === 'refreshTransparent' ? '14' : '16'"
|
||||
color="#000000A6"
|
||||
@click.stop="operate.action"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import userThumb from '@/assets/images/user-thumb.jpg'
|
||||
import agentThumb from '@/assets/images/agent-thumb.jpg'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const props = defineProps<{
|
||||
content: Object
|
||||
}>()
|
||||
|
||||
const operateList = ref([
|
||||
{
|
||||
name: 'thumbUp',
|
||||
action: () => {
|
||||
console.log('thumbUp')
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'thumbDown',
|
||||
action: () => {
|
||||
console.log('thumbDown')
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'refreshTransparent',
|
||||
action: () => {
|
||||
console.log('refresh')
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'copy',
|
||||
action: () => {
|
||||
handleCopyText()
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
const handleCopyText = () => {
|
||||
navigator.clipboard
|
||||
.writeText(props.content.text)
|
||||
.then(() => {
|
||||
// console.log('Text copied to clipboard');
|
||||
ElMessage({
|
||||
message: t('agent.copySuccess'),
|
||||
type: 'success',
|
||||
offset: 300
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('Could not copy text: ', err)
|
||||
ElMessage({
|
||||
message: t('agent.copyFailed'),
|
||||
type: 'error',
|
||||
offset: 300
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.c-svg {
|
||||
width: initial;
|
||||
cursor: pointer;
|
||||
}
|
||||
.agent-item {
|
||||
font-family: 'Regular';
|
||||
font-size: 1.4rem;
|
||||
.message-wrapper {
|
||||
column-gap: 0.9rem;
|
||||
&.is-user {
|
||||
text-align: right;
|
||||
flex-direction: row-reverse;
|
||||
column-gap: 1.3rem;
|
||||
}
|
||||
|
||||
.thumb {
|
||||
flex-shrink: 0;
|
||||
width: 4.4rem;
|
||||
height: 4.4rem;
|
||||
border-radius: 50%;
|
||||
border: 0.1rem solid #e5dfdf;
|
||||
.thumb-icon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.operate {
|
||||
margin-top: 1.3rem;
|
||||
column-gap: 1.2rem;
|
||||
&.is-user {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
29
src/views/home/agent/components/List.vue
Normal file
@@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<div class="agent-list flex flex-col flex-1">
|
||||
<Item v-for="message in messageList" :key="message.id" :content="message" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import Item from './Item.vue'
|
||||
|
||||
const messageList = ref([
|
||||
{ id: 1, text: 'Hello', isUser: true },
|
||||
{
|
||||
id: 2,
|
||||
text: 'Hey, I am your design assistant FiDA. I noticed that you want to design a yellow sofa. I can help you! Tell me what else you need?'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
text: 'Please design a vintage-inspired sofa with smooth, flowing lines and a sculptural silhouette. The sofa features a retro aesthetic combined with elegant curves, creating a timeless and refined look.',
|
||||
isUser: true
|
||||
}
|
||||
])
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.agent-list {
|
||||
row-gap: 3.2rem;
|
||||
}
|
||||
</style>
|
||||
30
src/views/home/agent/index.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<div class="agent-wrapper flex space-between">
|
||||
<Agent :title="agentTitle" />
|
||||
<div class="preview-wrapper">preview</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import Agent from './components/Agent.vue'
|
||||
const agentTitle = ref('Retro Sofa Sketch')
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.agent-wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-top: 0.1rem solid #c9c9c9;
|
||||
padding: 8rem 2.3rem 6rem 2.8rem;
|
||||
|
||||
.c-svg {
|
||||
width: initial;
|
||||
}
|
||||
|
||||
.preview-wrapper {
|
||||
width: 91.2rem;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
139
src/views/home/versionTree/components/dialog.vue
Normal file
@@ -0,0 +1,139 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onUnmounted, reactive, toRefs } from "vue";
|
||||
const props = defineProps({
|
||||
textData: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
} as any,
|
||||
styleData: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
} as any,
|
||||
callBack: {
|
||||
type: Function,
|
||||
default: () => {}
|
||||
}
|
||||
})
|
||||
// const emit = defineEmits([
|
||||
// ])
|
||||
let data = reactive({
|
||||
})
|
||||
|
||||
const dialogFormVisible = ref(false)
|
||||
|
||||
const confirm = async ()=>{
|
||||
if(props.callBack)await props.callBack()
|
||||
dialogFormVisible.value = false
|
||||
}
|
||||
|
||||
onMounted(()=>{
|
||||
})
|
||||
onUnmounted(()=>{
|
||||
})
|
||||
defineExpose({open:()=>dialogFormVisible.value = true})
|
||||
const {} = toRefs(data);
|
||||
</script>
|
||||
<template>
|
||||
<div class="dialog">
|
||||
<el-dialog
|
||||
:align-center="true"
|
||||
v-model="dialogFormVisible"
|
||||
:close-on-click-modal="false"
|
||||
:title="props.textData?.title"
|
||||
:show-close="false"
|
||||
:width="props.styleData?.width || '50%'">
|
||||
<template #header="{ close, titleId, titleClass }">
|
||||
<div class="my-header">
|
||||
<div class="text">{{ props.textData?.title }}</div>
|
||||
<div class="icon" @click="dialogFormVisible = false">
|
||||
<SvgIcon
|
||||
name="close"
|
||||
size="8"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div class="boundary"></div>
|
||||
<div class="dialog-content">
|
||||
{{ props.textData?.text }}
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<div class="dialog-footer-cancel" @click="dialogFormVisible = false">
|
||||
{{ props.textData?.cancelText || 'Cancel' }}
|
||||
</div>
|
||||
<div class="dialog-footer-confirm" type="primary" @click="confirm">
|
||||
{{ props.textData?.submitText || 'Confirm' }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
.dialog{
|
||||
--el-dialog-padding-primary: 1.6rem 1.2rem;
|
||||
--el-dialog-border-radius: .8rem;
|
||||
:deep(.el-dialog){
|
||||
.my-header{
|
||||
display: flex;
|
||||
padding: 0 .5rem;
|
||||
justify-content: space-between;
|
||||
--el-dialog-padding-primary: 1.2rem
|
||||
.text{
|
||||
font-family: 'Semibold';
|
||||
font-size: 1.4rem;
|
||||
line-height: 2rem;
|
||||
letter-spacing: -0.18px;
|
||||
}
|
||||
.icon{
|
||||
cursor: pointer;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.boundary{
|
||||
border-bottom: .7px solid rgba(0, 0, 0, 0.1);
|
||||
width: 100%;
|
||||
}
|
||||
.dialog-content{
|
||||
padding: 0 .5rem;
|
||||
padding-top: 1.2rem;
|
||||
font-family: 'Regular';
|
||||
font-weight: 400;
|
||||
font-size: 1.2rem;
|
||||
line-height: 2rem;
|
||||
letter-spacing: -0.18px;
|
||||
}
|
||||
.dialog-footer{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
--el-dialog-padding-primary: 1.7rem;
|
||||
> div{
|
||||
font-weight: 500;
|
||||
font-size: 1.2rem;
|
||||
line-height: 2rem;
|
||||
letter-spacing: -0.18px;
|
||||
width: 5.9rem;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
border-radius: 1.5rem;
|
||||
padding: .3rem 0 .4rem;
|
||||
}
|
||||
.dialog-footer-cancel{
|
||||
color: #000;
|
||||
margin-right: .6rem;
|
||||
border: 0.7px solid #0000001A;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.dialog-footer-confirm{
|
||||
color: #fff;
|
||||
background-color: #f74545;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -18,7 +18,7 @@ let data = reactive({
|
||||
onMounted(()=>{
|
||||
})
|
||||
onUnmounted(()=>{
|
||||
})
|
||||
})
|
||||
defineExpose({})
|
||||
const {} = toRefs(data);
|
||||
</script>
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onUnmounted, reactive, toRefs } from "vue";
|
||||
import VersionDetail from './versionDetail.vue'
|
||||
import ChatHistory from './chatHistory.vue'
|
||||
import ChatDetail from './chatDetail.vue'
|
||||
//const props = defineProps({
|
||||
//})
|
||||
const emit = defineEmits([
|
||||
@@ -14,7 +14,7 @@ const detailData = ref({
|
||||
versionSketch:'Version 1 - Sketch',
|
||||
versionSketchTime:'2023-08-01 10:00:00',
|
||||
},
|
||||
userChatHistory:{
|
||||
userChatDetail:{
|
||||
|
||||
}
|
||||
|
||||
@@ -35,10 +35,10 @@ defineExpose({})
|
||||
></VersionDetail>
|
||||
</div>
|
||||
<div class="useInput">
|
||||
<ChatHistory type="user"></ChatHistory>
|
||||
<ChatDetail type="user"></ChatDetail>
|
||||
</div>
|
||||
<div class="systemInput">
|
||||
<ChatHistory type="robot"></ChatHistory>
|
||||
<ChatDetail type="robot"></ChatDetail>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onUnmounted, reactive, toRefs } from "vue";
|
||||
import { ref, onMounted, onUnmounted, reactive, toRefs } from 'vue'
|
||||
import Tree from './tree/index.vue'
|
||||
import Detail from './detail/index.vue'
|
||||
import { versionsList } from './tools/versionsData'
|
||||
import { findAndAddChild, findAndRemoveChild } from './tools/tools'
|
||||
|
||||
const props = defineProps({
|
||||
versionTreeData:{
|
||||
type:Object,
|
||||
default:()=>{
|
||||
versionTreeData: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
drawer:false,
|
||||
list:[],
|
||||
drawer: false,
|
||||
list: []
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
//const emit = defineEmits([
|
||||
//])
|
||||
@@ -65,24 +65,22 @@ const versionDelete = (versionDetail)=>{
|
||||
treeKey.value++
|
||||
}
|
||||
|
||||
let data = reactive({
|
||||
})
|
||||
onMounted(()=>{
|
||||
})
|
||||
onUnmounted(()=>{
|
||||
})
|
||||
let data = reactive({})
|
||||
onMounted(() => {})
|
||||
onUnmounted(() => {})
|
||||
defineExpose({})
|
||||
const {} = toRefs(data);
|
||||
const {} = toRefs(data)
|
||||
</script>
|
||||
<template>
|
||||
<div class="versionTree">
|
||||
<el-drawer
|
||||
v-model="versionTreeData.drawer"
|
||||
<el-drawer
|
||||
v-model="versionTreeData.drawer"
|
||||
:close-on-press-escape="false"
|
||||
:close-on-click-modal="false"
|
||||
:size="treeState?'109rem':'49rem'"
|
||||
:size="treeState ? '109rem' : '49rem'"
|
||||
body-class="versionTreeBody"
|
||||
:with-header="false">
|
||||
:with-header="false"
|
||||
>
|
||||
<div class="versionTreeTitle">
|
||||
<span>Version Tree: Retro Sofa Sketch</span>
|
||||
<div class="closeBtn" @click="versionTreeData.drawer = false">
|
||||
@@ -132,10 +130,23 @@ const {} = toRefs(data);
|
||||
--treeItem-background: #ffffff;
|
||||
--treeItem-active-background: #e6e6e6;
|
||||
|
||||
:deep(.versionTreeBody){
|
||||
--el-drawer-padding-primary: 0rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
:deep(.versionTreeBody) {
|
||||
--el-drawer-padding-primary: 0rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.versionTreeTitle {
|
||||
width: 100%;
|
||||
height: 8rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 0.8rem 0 2.4rem;
|
||||
border-bottom: 1px solid #c9c9c9;
|
||||
> span {
|
||||
font-size: 2rem;
|
||||
font-weight: 600;
|
||||
font-family: 'SemiBold';
|
||||
}
|
||||
.versionTreeTitle{
|
||||
width: 100%;
|
||||
@@ -213,4 +224,24 @@ const {} = toRefs(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
.expandBtnBox {
|
||||
}
|
||||
.versionTreeBox {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
> .tree {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
padding: 2.1rem 0 5.4rem 2.2rem;
|
||||
}
|
||||
> .detail {
|
||||
width: 35rem;
|
||||
margin: 2.1rem 3rem 5.4rem 3.4rem;
|
||||
height: calc(100% - 2.1rem - 5.4rem);
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -6,6 +6,7 @@ import SpecialEdge from './speciaiEdge.vue'
|
||||
import InputNode from './InputNode.vue'//主
|
||||
import SecondaryNode from './secondaryNode.vue'//分支
|
||||
import { useLayout } from '../../tools/tools'
|
||||
import dialogVue from "../../components/dialog.vue";
|
||||
const props = defineProps({
|
||||
selectItem: {
|
||||
type: Object,
|
||||
@@ -22,6 +23,9 @@ const emit = defineEmits([
|
||||
'versionDelete',
|
||||
])
|
||||
|
||||
const dialogDeleteRef = ref()
|
||||
const dialogRestoreRef = ref()
|
||||
|
||||
// 节点类型:input、output、default、custom
|
||||
// input:开始点,output:结尾点,default:普通节点,custom:自定义节点
|
||||
const position = { x: 0, y: 0 }
|
||||
@@ -88,10 +92,11 @@ watch(()=>props.selectItem.id, (newVal, oldVal) => {
|
||||
|
||||
const versionRestore = ()=>{
|
||||
emit('versionRestore')
|
||||
dialogRestoreRef.value?.open()
|
||||
}
|
||||
|
||||
const versionDelete = ()=>{
|
||||
emit('versionDelete')
|
||||
dialogDeleteRef.value?.open()
|
||||
}
|
||||
|
||||
onMounted(()=>{
|
||||
@@ -135,6 +140,30 @@ defineExpose({push})
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<dialogVue
|
||||
:textData="{
|
||||
title: $t('VersionTree.deleteChat'),
|
||||
text: $t('VersionTree.deleteHint'),
|
||||
submitText: $t('VersionTree.delete'),
|
||||
cancelText: $t('VersionTree.cancel'),
|
||||
}"
|
||||
:styleData="{
|
||||
width: '40.6rem'
|
||||
}"
|
||||
:callBack="()=>emit('versionDelete')"
|
||||
ref="dialogDeleteRef" />
|
||||
<dialogVue
|
||||
:textData="{
|
||||
title: $t('VersionTree.restoreChat'),
|
||||
text: $t('VersionTree.restoreHint'),
|
||||
submitText: $t('VersionTree.confirm'),
|
||||
cancelText: $t('VersionTree.cancel'),
|
||||
}"
|
||||
:styleData="{
|
||||
width: '40.6rem'
|
||||
}"
|
||||
:callBack="()=>emit('versionRestore')"
|
||||
ref="dialogRestoreRef" />
|
||||
</div>
|
||||
</template>
|
||||
<style lang="less">
|
||||
|
||||