From 4ced7375b649411a29f9465e0dd6d6f82dd0819e Mon Sep 17 00:00:00 2001 From: "X1627315083@163.com" <1627315083@qq.com> Date: Mon, 9 Feb 2026 14:47:58 +0800 Subject: [PATCH 1/5] =?UTF-8?q?sketch=E7=94=9F=E6=88=90=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .prettierrc.json | 15 +- src/assets/icons/generateSketchEdit.svg | 3 + src/assets/icons/sketchDelete.svg | 3 + src/assets/icons/sketchRestore.svg | 3 + src/assets/icons/versionDelete.svg | 3 + src/assets/icons/versionNewChat.svg | 3 + src/assets/icons/versionRestore.svg | 3 + src/lang/en.ts | 227 +++++++++--------- src/views/home/VersionTree.vue | 85 ++++++- .../home/generateSketch/generateItem.vue | 164 +++++++++++++ src/views/home/generateSketch/index.vue | 52 ++++ .../home/versionTree/detail/ChatHistory.vue | 15 +- src/views/home/versionTree/detail/index.vue | 12 +- .../home/versionTree/detail/versionDetail.vue | 111 ++++++++- src/views/home/versionTree/index.vue | 115 ++++++++- .../{tree/view2 => }/tools/tools.js | 69 +++++- .../{tree/view2 => }/tools/versionsData.js | 22 +- src/views/home/versionTree/tree/index.vue | 51 ++-- src/views/home/versionTree/tree/view1Item.vue | 8 +- .../home/versionTree/tree/view2/index.vue | 17 +- .../versionTree/tree/view2/secondaryNode.vue | 4 +- 21 files changed, 797 insertions(+), 188 deletions(-) create mode 100644 src/assets/icons/generateSketchEdit.svg create mode 100644 src/assets/icons/sketchDelete.svg create mode 100644 src/assets/icons/sketchRestore.svg create mode 100644 src/assets/icons/versionDelete.svg create mode 100644 src/assets/icons/versionNewChat.svg create mode 100644 src/assets/icons/versionRestore.svg create mode 100644 src/views/home/generateSketch/generateItem.vue create mode 100644 src/views/home/generateSketch/index.vue rename src/views/home/versionTree/{tree/view2 => }/tools/tools.js (57%) rename src/views/home/versionTree/{tree/view2 => }/tools/versionsData.js (79%) diff --git a/.prettierrc.json b/.prettierrc.json index 24f1a24..e4a08f7 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,8 +1,9 @@ { - "$schema": "https://json.schemastore.org/prettierrc", - "semi": false, - "tabWidth": 4, - "singleQuote": true, - "printWidth": 100, - "trailingComma": "none" -} \ No newline at end of file + "$schema": "https://json.schemastore.org/prettierrc", + "semi": false, + "tabWidth": 4, + "singleQuote": true, + "printWidth": 100, + "useTabs": true, + "trailingComma": "none" +} diff --git a/src/assets/icons/generateSketchEdit.svg b/src/assets/icons/generateSketchEdit.svg new file mode 100644 index 0000000..862683d --- /dev/null +++ b/src/assets/icons/generateSketchEdit.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/sketchDelete.svg b/src/assets/icons/sketchDelete.svg new file mode 100644 index 0000000..626b364 --- /dev/null +++ b/src/assets/icons/sketchDelete.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/sketchRestore.svg b/src/assets/icons/sketchRestore.svg new file mode 100644 index 0000000..eb792f4 --- /dev/null +++ b/src/assets/icons/sketchRestore.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/versionDelete.svg b/src/assets/icons/versionDelete.svg new file mode 100644 index 0000000..8358506 --- /dev/null +++ b/src/assets/icons/versionDelete.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/versionNewChat.svg b/src/assets/icons/versionNewChat.svg new file mode 100644 index 0000000..d498bb2 --- /dev/null +++ b/src/assets/icons/versionNewChat.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/versionRestore.svg b/src/assets/icons/versionRestore.svg new file mode 100644 index 0000000..51e96c2 --- /dev/null +++ b/src/assets/icons/versionRestore.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/lang/en.ts b/src/lang/en.ts index 7d7f254..48ff4e1 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -1,111 +1,122 @@ export default { - Login: { - Login: 'Log in', - SignUp: 'Sign up', - LoginTo: 'Log on to', - LoginTitle: 'A multi-agent canvas for rapid, trend driven design iteration.', - name: 'Name', - email: 'Email', - password: 'Password', - enterName: 'Enter your name', - enterEmail: 'Enter your email', - enterPassword: 'Enter your password', - forgetPassword: 'Forget password?', - pleaseInputName: 'Please input the name', - nameLengthError: 'Name length must be between {min} and {max} characters', - pleaseInputEmail: 'Please input the email', - emailFormatError: 'Please input the email again', - pleaseInputPassword: 'Please input the password', - passwordLengthError: 'Password length must be between {min} and {max} characters', - pleaseTermsPolicy: 'Please agree to the Terms, Policy and Fees', - agreeTermsPolicy: - 'I agree to the Terms, Policy and Fees.', - noAccountToSignUp: `Don't have an account? Sign up`, - registerFor: 'Register for', - registerTip: 'A multi-agent canvas for rapid, trend driven design iteration.', - havenAccountToLogin: `Already have an account? Log in`, - verifyEmail: 'Verify your email address', - verifyCodeHasSent: 'A verification code has been sent to {email}', - verify: 'Verify', - resendCode: 'Resend Code', - resendCodeIn: 'Resend Code in {time}', - orContinueWith: 'or continue with', - googleLogin: 'Sign in with Google', - wechatLogin: 'Sign in with Wechat' - }, - Nuic: { - hiName: 'Hi, {name}.', - nuic1Title: `Help Fiphant discover the 'YOU' in your space.`, - nuic1Tip: `Let's set up your profile. A few quick details will help Fiphant understand
your needs and find exactly what you're looking for.`, - letsGo: 'Let’s go, Fiphant!', - skip: 'Skip', - next: 'Next', - nuic2Title: `What's your dream home vibe ?`, - loadMore: 'Load more', - nuic3Title: `Where are you based? What do you do ?`, - basedIn: 'Based in', - role: 'Role', - allSet: 'All set!' - }, - Home: { - creditsNum: 'Credits: {num}', - newProject: 'New Project', - home: 'Home', - history: 'History', - today: 'Today', - yesterday: 'Yesterday', - earlierChat: 'Earlier Chat' - }, - Input: { - placeholder: 'Please input', - selectPlaceholder: 'Please select', - typePlaceholder: 'Type', - areaPlaceholder: 'Region', - stylePlaceholder: 'Style', - types: { - sofa: 'Sofa', - desk: 'Desk', - chair: 'Chair' - }, - styles: { - Coastal: 'Coastal', - Verdant: 'Verdant', - Traditional: 'Traditional', - CenturyChrome: 'Century\nChrome', - ModernRevival: 'Modern\nRevival', - Tuscan2000s: "Tuscan\n2000's", - Bauhaus: 'Bauhaus', - Constructivism: 'Constructivism', - NordicNoir: 'Nordic\nNoir' - }, - chooseStyle: 'Choose Style', - setting: 'Setting', - settingOptions: { - creativity: 'Creativity', - diversity: 'Diversity', - relevance: 'Relevance' - }, - confirm: 'Confirm' - }, - area: { - unitedStates: 'United States', - singapore: 'Singapore', - australia: 'Australia', - southKorea: 'South Korea', - china: 'China', - italy: 'Italy', - france: 'France', - japan: 'Japan', - canada: 'Canada', - germany: 'Germany' - }, + Login: { + Login: 'Log in', + SignUp: 'Sign up', + LoginTo: 'Log on to', + LoginTitle: 'A multi-agent canvas for rapid, trend driven design iteration.', + name: 'Name', + email: 'Email', + password: 'Password', + enterName: 'Enter your name', + enterEmail: 'Enter your email', + enterPassword: 'Enter your password', + forgetPassword: 'Forget password?', + pleaseInputName: 'Please input the name', + nameLengthError: 'Name length must be between {min} and {max} characters', + pleaseInputEmail: 'Please input the email', + emailFormatError: 'Please input the email again', + pleaseInputPassword: 'Please input the password', + passwordLengthError: 'Password length must be between {min} and {max} characters', + pleaseTermsPolicy: 'Please agree to the Terms, Policy and Fees', + agreeTermsPolicy: + 'I agree to the Terms, Policy and Fees.', + noAccountToSignUp: `Don't have an account? Sign up`, + registerFor: 'Register for', + registerTip: 'A multi-agent canvas for rapid, trend driven design iteration.', + havenAccountToLogin: `Already have an account? Log in`, + verifyEmail: 'Verify your email address', + verifyCodeHasSent: 'A verification code has been sent to {email}', + verify: 'Verify', + resendCode: 'Resend Code', + resendCodeIn: 'Resend Code in {time}', + orContinueWith: 'or continue with', + googleLogin: 'Sign in with Google', + wechatLogin: 'Sign in with Wechat' + }, + Nuic: { + hiName: 'Hi, {name}.', + nuic1Title: `Help Fiphant discover the 'YOU' in your space.`, + nuic1Tip: `Let's set up your profile. A few quick details will help Fiphant understand
your needs and find exactly what you're looking for.`, + letsGo: 'Let’s go, Fiphant!', + skip: 'Skip', + next: 'Next', + nuic2Title: `What's your dream home vibe ?`, + loadMore: 'Load more', + nuic3Title: `Where are you based? What do you do ?`, + basedIn: 'Based in', + role: 'Role', + allSet: 'All set!' + }, + Home: { + creditsNum: 'Credits: {num}', + newProject: 'New Project', + home: 'Home', + history: 'History', + today: 'Today', + yesterday: 'Yesterday', + earlierChat: 'Earlier Chat' + }, + Input: { + placeholder: 'Please input', + selectPlaceholder: 'Please select', + typePlaceholder: 'Type', + areaPlaceholder: 'Region', + stylePlaceholder: 'Style', + types: { + sofa: 'Sofa', + desk: 'Desk', + chair: 'Chair' + }, + styles: { + Coastal: 'Coastal', + Verdant: 'Verdant', + Traditional: 'Traditional', + CenturyChrome: 'Century\nChrome', + ModernRevival: 'Modern\nRevival', + Tuscan2000s: "Tuscan\n2000's", + Bauhaus: 'Bauhaus', + Constructivism: 'Constructivism', + NordicNoir: 'Nordic\nNoir' + }, + chooseStyle: 'Choose Style', + setting: 'Setting', + settingOptions: { + creativity: 'Creativity', + diversity: 'Diversity', + relevance: 'Relevance' + }, + confirm: 'Confirm' + }, + area: { + unitedStates: 'United States', + singapore: 'Singapore', + australia: 'Australia', + southKorea: 'South Korea', + china: 'China', + italy: 'Italy', + france: 'France', + japan: 'Japan', + canada: 'Canada', + germany: 'Germany' + }, - // Version Tree - VersionTree: { - versionInformation: 'Version Information', - input: 'Input', - userRequest: 'User Request', - sketch: 'Sketch', - generateResult: 'Generate Result' - } + // Version Tree + VersionTree: { + versionInformation: 'Version Information', + input: 'Input', + userRequest: 'User Request', + sketch: 'Sketch', + generateResult: 'Generate Result', + linearNodeTree: 'Linear Node Tree', + branchingNodeTree: 'Branching Node Tree', + restore: 'Restore', + newChat: 'New Chat', + delete: 'Delete' + }, + //generateSketch + generateSketch: { + restore: 'Restore', + delete: 'Delete', + edit: 'Edit' + } } diff --git a/src/views/home/VersionTree.vue b/src/views/home/VersionTree.vue index 87c011a..307d360 100644 --- a/src/views/home/VersionTree.vue +++ b/src/views/home/VersionTree.vue @@ -1,6 +1,7 @@ \ No newline at end of file diff --git a/src/views/home/generateSketch/generateItem.vue b/src/views/home/generateSketch/generateItem.vue new file mode 100644 index 0000000..a8db8c9 --- /dev/null +++ b/src/views/home/generateSketch/generateItem.vue @@ -0,0 +1,164 @@ + + + + \ No newline at end of file diff --git a/src/views/home/generateSketch/index.vue b/src/views/home/generateSketch/index.vue new file mode 100644 index 0000000..c96924a --- /dev/null +++ b/src/views/home/generateSketch/index.vue @@ -0,0 +1,52 @@ + + + + \ No newline at end of file diff --git a/src/views/home/versionTree/detail/ChatHistory.vue b/src/views/home/versionTree/detail/ChatHistory.vue index 13b157b..227775a 100644 --- a/src/views/home/versionTree/detail/ChatHistory.vue +++ b/src/views/home/versionTree/detail/ChatHistory.vue @@ -36,7 +36,6 @@ const {} = toRefs(data);
{{ type == 'user'? $t('VersionTree.userRequest'): $t('VersionTree.generateResult') }}
Design a modern yellow sofa that combines comfort, elegance, and contemporary aesthetics.
 The sofa features a warm, soft yellow tone (mustard or light ochre), with a minimalist silhouette and clean lines.
 Upholstered in high-quality fabric with a subtle texture, offering a cozy and inviting feel.
 The seat is deep and plush, with generous cushioning for relaxation, while the backrest and armrests are softly rounded to enhance comfort. - Design a modern yellow sofa that combines comfort, elegance, and contemporary aesthetics.
 The sofa features a warm, soft yellow tone (mustard or light ochre), with a minimalist silhouette and clean lines.
 Upholstered in high-quality fabric with a subtle texture, offering a cozy and inviting feel.
 The seat is deep and plush, with generous cushioning for relaxation, while the backrest and armrests are softly rounded to enhance comfort.
@@ -91,12 +90,16 @@ const {} = toRefs(data); flex: 1; overflow-y: auto; margin-left: 3rem; - scrollbar-width: thin; - scrollbar-color: #ababab #f1f5f9; - -ms-overflow-style: -ms-autohiding-scrollbar; + &::-webkit-scrollbar { + width: 4px; + } + &::-webkit-scrollbar-thumb { + border-radius: 4px; + background: #ababab; + } &::-webkit-scrollbar-track { - background: #f1f5f9; - border-radius: 10px; + border-radius: 4px; + background: #d9d9d9; } } } diff --git a/src/views/home/versionTree/detail/index.vue b/src/views/home/versionTree/detail/index.vue index 6675cb6..db65f6a 100644 --- a/src/views/home/versionTree/detail/index.vue +++ b/src/views/home/versionTree/detail/index.vue @@ -4,8 +4,10 @@ import VersionDetail from './versionDetail.vue' import ChatHistory from './chatHistory.vue' //const props = defineProps({ //}) -//const emit = defineEmits([ -//]) +const emit = defineEmits([ + 'versionRestore', + 'versionDelete', +]) const detailData = ref({ id:1, versionDetail:{ @@ -30,7 +32,11 @@ defineExpose({}) + diff --git a/src/views/canvas/components/cards/edit-material.vue b/src/views/canvas/components/cards/edit-material.vue new file mode 100644 index 0000000..c93ca5d --- /dev/null +++ b/src/views/canvas/components/cards/edit-material.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/src/views/canvas/components/cards/scene-composition.vue b/src/views/canvas/components/cards/scene-composition.vue index 9f2ceaf..fba8cf9 100644 --- a/src/views/canvas/components/cards/scene-composition.vue +++ b/src/views/canvas/components/cards/scene-composition.vue @@ -5,18 +5,9 @@ diff --git a/src/views/canvas/components/cards/to-3d-model.vue b/src/views/canvas/components/cards/to-3d-model.vue new file mode 100644 index 0000000..2226b65 --- /dev/null +++ b/src/views/canvas/components/cards/to-3d-model.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/src/views/canvas/components/cards/to-real-style.vue b/src/views/canvas/components/cards/to-real-style.vue index cbf9ae5..bc79c26 100644 --- a/src/views/canvas/components/cards/to-real-style.vue +++ b/src/views/canvas/components/cards/to-real-style.vue @@ -1,27 +1,20 @@ + + diff --git a/src/views/canvas/components/upload-file.vue b/src/views/canvas/components/upload-file.vue index cb5fe6f..eb5c28b 100644 --- a/src/views/canvas/components/upload-file.vue +++ b/src/views/canvas/components/upload-file.vue @@ -1,26 +1,44 @@ @@ -30,29 +48,49 @@ height: 9.9rem; border-radius: 1rem; background-color: #f0f0f0; + // padding: 0 1.7rem; display: flex; - flex-direction: column; align-items: center; justify-content: center; - // padding: 0 1.7rem; - > .txt { - margin-top: 0.6rem; - margin-bottom: 0.8rem; - font-size: 0.8rem; - color: #7c7c7c; + > .control { + text-align: center; + > .txt { + margin-top: 0.6rem; + margin-bottom: 0.8rem; + font-size: 0.8rem; + color: #7c7c7c; + } + > button { + box-shadow: 0px 0.75px 0px 0px #00000005; + min-width: 3.9rem; + height: 1.3rem; + border-radius: 0.23rem; + background-color: #fff; + font-size: 0.6rem; + color: #000; + border: 0.05rem solid #d9d9d9; + cursor: pointer; + &:active { + opacity: 0.6; + } + } } - > button { - box-shadow: 0px 0.75px 0px 0px #00000005; - min-width: 3.9rem; - height: 1.3rem; - border-radius: 0.23rem; - background-color: #fff; - font-size: 0.6rem; - color: #000; - border: 0.05rem solid #d9d9d9; - cursor: pointer; - &:active { - opacity: 0.6; + > .preview { + width: 8rem; + height: 8rem; + position: relative; + > img { + height: 100%; + width: 100%; + object-fit: contain; + } + > .close { + position: absolute; + top: 0.01rem; + right: 0.01rem; + border-radius: 50%; + background-color: #fff; + cursor: pointer; } } } diff --git a/src/views/canvas/index.vue b/src/views/canvas/index.vue index 2b83bc1..66d5f8b 100644 --- a/src/views/canvas/index.vue +++ b/src/views/canvas/index.vue @@ -29,6 +29,7 @@ display: flex; flex-wrap: wrap; align-content: flex-start; + align-items: flex-start; padding: 2rem; gap: 2rem; } diff --git a/src/views/home/left-nav.vue b/src/views/home/left-nav.vue index 635cefa..7191cf9 100644 --- a/src/views/home/left-nav.vue +++ b/src/views/home/left-nav.vue @@ -7,7 +7,7 @@ - @@ -104,14 +104,20 @@ name: 'Conversation Item 5' } ]) - const onHome = () => { - console.log('onHome') + const onCreateProject = () => { + router.push({ name: 'mainInput' }) } + const onHome = () => {} const onCanvas = () => { router.push({ name: 'canvas' }) } const onHistory = () => { - showHistory.value = !showHistory.value + if (isCollapse.value) { + globalStore.setHomeLeftNavCollapse(false) + showHistory.value = true + } else { + showHistory.value = !showHistory.value + } } const onClickHistoryItem = (item: any) => { router.push({ name: 'test', params: { id: item.id } }) @@ -129,7 +135,7 @@ } } - + diff --git a/src/views/canvas/components/cards/color-palette.vue b/src/views/canvas/components/cards/color-palette.vue index 31cc3b9..e4ee1ee 100644 --- a/src/views/canvas/components/cards/color-palette.vue +++ b/src/views/canvas/components/cards/color-palette.vue @@ -37,6 +37,7 @@ diff --git a/src/views/canvas/components/cards/to-3d-model.vue b/src/views/canvas/components/cards/to-3d-model.vue index 2226b65..7cb286f 100644 --- a/src/views/canvas/components/cards/to-3d-model.vue +++ b/src/views/canvas/components/cards/to-3d-model.vue @@ -10,8 +10,8 @@ + + diff --git a/src/views/canvas/components/cards/to-real-style.vue b/src/views/canvas/components/cards/to-real-style.vue index bc79c26..a6f4e2b 100644 --- a/src/views/canvas/components/cards/to-real-style.vue +++ b/src/views/canvas/components/cards/to-real-style.vue @@ -3,6 +3,16 @@

Prompt

+
+
+ {{ v.label }} +
+

Size

@@ -10,9 +20,30 @@ + diff --git a/src/views/canvas/components/my-textarea.vue b/src/views/canvas/components/tools/my-textarea.vue similarity index 100% rename from src/views/canvas/components/my-textarea.vue rename to src/views/canvas/components/tools/my-textarea.vue diff --git a/src/views/canvas/components/tools/offset-tool.vue b/src/views/canvas/components/tools/offset-tool.vue new file mode 100644 index 0000000..9d9c237 --- /dev/null +++ b/src/views/canvas/components/tools/offset-tool.vue @@ -0,0 +1,217 @@ + + + + + diff --git a/src/views/canvas/components/pixel-ratio-selection.vue b/src/views/canvas/components/tools/pixel-ratio-selection.vue similarity index 100% rename from src/views/canvas/components/pixel-ratio-selection.vue rename to src/views/canvas/components/tools/pixel-ratio-selection.vue diff --git a/src/views/canvas/components/tools/slider.vue b/src/views/canvas/components/tools/slider.vue new file mode 100644 index 0000000..46cd80a --- /dev/null +++ b/src/views/canvas/components/tools/slider.vue @@ -0,0 +1,172 @@ + + + + + diff --git a/src/views/canvas/components/upload-file.vue b/src/views/canvas/components/tools/upload-file.vue similarity index 100% rename from src/views/canvas/components/upload-file.vue rename to src/views/canvas/components/tools/upload-file.vue diff --git a/src/views/canvas/index.vue b/src/views/canvas/index.vue index 66d5f8b..ed8ba68 100644 --- a/src/views/canvas/index.vue +++ b/src/views/canvas/index.vue @@ -5,6 +5,7 @@ + @@ -25,6 +26,7 @@ \ No newline at end of file From e090e4383abb73fa8a7fe2966fbdb1578bc76d35 Mon Sep 17 00:00:00 2001 From: lizhipeng Date: Mon, 9 Feb 2026 17:32:14 +0800 Subject: [PATCH 5/5] fix --- .../components/{card.vue => cards/index.vue} | 32 ++++++++++++------- .../canvas/components/tools/offset-tool.vue | 4 +-- src/views/canvas/index.vue | 2 +- 3 files changed, 23 insertions(+), 15 deletions(-) rename src/views/canvas/components/{card.vue => cards/index.vue} (81%) diff --git a/src/views/canvas/components/card.vue b/src/views/canvas/components/cards/index.vue similarity index 81% rename from src/views/canvas/components/card.vue rename to src/views/canvas/components/cards/index.vue index 705c087..5bbe685 100644 --- a/src/views/canvas/components/card.vue +++ b/src/views/canvas/components/cards/index.vue @@ -1,12 +1,12 @@