diff --git a/src/views/canvas/components/card.vue b/src/views/canvas/components/card.vue index 825b9eb..653e6b2 100644 --- a/src/views/canvas/components/card.vue +++ b/src/views/canvas/components/card.vue @@ -21,6 +21,10 @@ import { computed, ref, markRaw, onMounted } from 'vue' import ToRealStyle from './cards/to-real-style.vue' import SceneComposition from './cards/scene-composition.vue' + import ColorPalette from './cards/color-palette.vue' + import ToVideo from './cards/to-video.vue' + import To3DModel from './cards/to-3d-model.vue' + import EditMaterial from './cards/edit-material.vue' const components = [ { type: 'to-real-style', @@ -35,17 +39,17 @@ { type: 'color-palette', title: 'Color Palette', - component: SceneComposition + component: ColorPalette }, { type: 'to-video', title: 'To Video', - component: SceneComposition + component: ToVideo }, { type: 'to-3d-model', title: 'To 3D Model', - component: SceneComposition + component: To3DModel }, { type: 'add-print', @@ -55,7 +59,7 @@ { type: 'edit-material', title: 'Edit Material', - component: SceneComposition + component: EditMaterial } ] const emit = defineEmits(['add', 'generate']) @@ -121,6 +125,20 @@ } > .body { padding: 1.6rem 1.3rem; + &:deep(> *) { + width: 100%; + > * { + margin-bottom: 1rem; + &:last-child { + margin-bottom: 0; + } + } + > .label { + font-size: 1.2rem; + font-family: Medium; + color: #000; + } + } } > .footer { margin-bottom: 1.6rem; diff --git a/src/views/canvas/components/cards/color-palette.vue b/src/views/canvas/components/cards/color-palette.vue new file mode 100644 index 0000000..31cc3b9 --- /dev/null +++ b/src/views/canvas/components/cards/color-palette.vue @@ -0,0 +1,64 @@ + + + + + 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 @@ } } - +