-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(Question,Home): move Question to Home page include style cha…
…nges
- Loading branch information
Showing
11 changed files
with
104 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
<script lang="ts" setup></script> | ||
|
||
<template> | ||
<RouterView /> | ||
<RouterView v-slot="{ Component }"> | ||
<Transition name="fade"> | ||
<Component :is="Component" /> | ||
</Transition> | ||
</RouterView> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,35 @@ | ||
<script setup lang="ts"> | ||
import { useSessionStore } from "../store/session.ts"; | ||
import { onMounted } from "vue"; | ||
const sessionStore = useSessionStore(); | ||
function handleClick() { | ||
sessionStore.session.question = | ||
"Extract elevation data of Sri Lanka from multiple TIF files using the shape of the island from a vector file"; | ||
"Extract elevation data of Sri Lanka from multiple TIF files using the shape of the island from a vector file."; | ||
sessionStore.chatted(); | ||
} | ||
onMounted(() => { | ||
// handleClick(); | ||
}); | ||
</script> | ||
|
||
<template> | ||
<el-button | ||
class="case-button" | ||
@click="handleClick" | ||
v-if="sessionStore.questionShow" | ||
>Elevation of Sri Lanka</el-button | ||
:disabled="sessionStore.loading" | ||
plain | ||
> | ||
<div></div> | ||
<template #default> Elevation of Sri Lanka </template> | ||
</el-button> | ||
</template> | ||
|
||
<style scoped lang="less"> | ||
.case-button { | ||
position: absolute; | ||
bottom: 20px; | ||
left: 20px; | ||
height: 100px; | ||
width: 100%; | ||
box-shadow: | ||
0 0 8px 6px rgba(29, 28, 35, 0.06), | ||
0 0 2px 0 rgba(29, 28, 35, 0.18); | ||
} | ||
.el-button + .el-button { | ||
margin: 0; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,38 @@ | ||
<script lang="ts" setup> | ||
import { Promotion } from "@element-plus/icons-vue"; | ||
import { Search, Top } from "@element-plus/icons-vue"; | ||
import { useSessionStore } from "../store/session.ts"; | ||
const sessionStore = useSessionStore(); | ||
// sessionStore.session.question = "Calculation of Flood Affected Area"; | ||
// sessionStore.chatted(); | ||
</script> | ||
|
||
<template> | ||
<Transition> | ||
<div class="container" v-show="sessionStore.questionShow"> | ||
<el-input | ||
v-model="sessionStore.session.question" | ||
placeholder="Type Something" | ||
@change="sessionStore.chatted()" | ||
:disabled="sessionStore.graphShow" | ||
> | ||
<template #suffix> | ||
<el-button :icon="Promotion" :disabled="sessionStore.graphShow" /> | ||
</template> | ||
</el-input> | ||
</div> | ||
</Transition> | ||
<div class="container"> | ||
<el-input | ||
v-model="sessionStore.session.question" | ||
placeholder="Type Something" | ||
@change="sessionStore.chatted()" | ||
style="height: 50px" | ||
resize="none" | ||
size="large" | ||
:disabled="sessionStore.loading" | ||
> | ||
<template #suffix> | ||
<el-button text :icon="Top" :loading="sessionStore.loading" /> | ||
</template> | ||
<template #prefix> | ||
<el-icon><Search /></el-icon> | ||
</template> | ||
</el-input> | ||
</div> | ||
</template> | ||
|
||
<style lang="less" scoped> | ||
.container { | ||
position: absolute; | ||
bottom: 25px; | ||
left: 30px; | ||
right: 30px; | ||
height: 70px; | ||
background-color: #f7f9fb; | ||
box-shadow: | ||
0 0 8px 6px rgba(29, 28, 35, 0.06), | ||
0 0 2px 0 rgba(29, 28, 35, 0.18); | ||
border-radius: 3px; | ||
.el-input { | ||
box-sizing: border-box; | ||
//height: 50px; | ||
//margin: 5px; | ||
//padding: 0 20px; | ||
padding: 10px; | ||
height: 100%; | ||
//width: 100%; | ||
:deep(.el-input__wrapper) { | ||
//background-color: #f7f9fb; | ||
border-radius: 3px; | ||
color: #828282; | ||
} | ||
} | ||
} | ||
.v-enter-active, | ||
.v-leave-active { | ||
transition: opacity 0.5s ease; | ||
} | ||
.v-enter-from, | ||
.v-leave-to { | ||
opacity: 0; | ||
margin: 20px; | ||
width: 100%; | ||
border-radius: 5px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,56 @@ | ||
<script setup lang="ts"> | ||
import { useRouter } from "vue-router"; | ||
const router = useRouter(); | ||
import Question from "@/components/Question.vue"; | ||
import Case from "@/components/Case.vue"; | ||
</script> | ||
|
||
<template> | ||
<div id="container"> | ||
<div class="title">Welcome</div> | ||
<el-button | ||
class="button" | ||
@click=" | ||
() => { | ||
router.push('/workflow'); | ||
} | ||
" | ||
>Build Workflow</el-button | ||
> | ||
<el-button | ||
class="button" | ||
@click=" | ||
() => { | ||
router.push('/chat'); | ||
} | ||
" | ||
>Go Chat</el-button | ||
> | ||
<el-image | ||
src="http://8.217.104.137:39999/_next/image?url=%2Flogo-light.png&w=640&q=75" | ||
mode="fit" | ||
style="position: absolute; top: 35px; right: 35px; height: 35px" | ||
/> | ||
<div class="title">AI GIS SYSTEM</div> | ||
<div class="content"> | ||
<Question /> | ||
<div class="cases"> | ||
<Case /> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style scoped lang="less"> | ||
@import "@/style.less"; | ||
#container { | ||
height: 100vh; | ||
width: 100vw; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
background: @bg-color; | ||
text-align: center; | ||
.title { | ||
font-size: 100px; | ||
padding-top: calc(23% - 50px); | ||
font-size: 50px; | ||
text-align: center; | ||
background: linear-gradient(135deg, #c850c0, #4158d0); | ||
-webkit-background-clip: text; | ||
background-clip: text; | ||
-webkit-text-fill-color: transparent; | ||
font-family: AppleSystemUIFont, serif; | ||
color: #000000; | ||
font-weight: bolder; | ||
font-family: sans-serif; | ||
text-shadow: 3px 2px rgba(darkblue, 0.3); | ||
} | ||
.button { | ||
font-size: 25px; | ||
margin: 20px; | ||
height: 100px; | ||
width: 200px; | ||
font-family: AppleSystemUIFont, serif; | ||
color: #ffffff; | ||
background: linear-gradient(135deg, #a1c4fd, #c2e9fb); | ||
.content { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
width: 70%; | ||
margin: 80px auto auto; | ||
.cases { | ||
display: grid; | ||
grid-template-columns: repeat(3, 1fr); | ||
grid-gap: 50px; | ||
justify-items: center; | ||
align-items: center; | ||
padding: 20px; | ||
width: 100%; | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,4 @@ | |
background-color:#F4F4F6; | ||
padding: 0; | ||
} | ||
} | ||
.question-button{ | ||
position: absolute; | ||
bottom: 20px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters