Skip to content

Commit

Permalink
feat(develop): 서비스 플로우 및 ux 개선
Browse files Browse the repository at this point in the history
  • Loading branch information
taewan2002 committed Feb 2, 2024
1 parent aa8f158 commit f87dc7e
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 39 deletions.
29 changes: 14 additions & 15 deletions components/chat/ChatInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@
</div>

<div class="chat-input">
<div class="chat-select-box" v-if="!(mode === 'VOICE' || isGenerating)">
<div
v-for="(select, idx) in selectList"
:key="idx"
class="chat-select"
:class="{ selected: type === idx + 1 }"
@click="onSelect(idx)"
>
{{ select }}
</div>
<div class="chat-select" @click="onSelect(-1)">↩︎</div>
</div>
<!-- <div class="chat-select-box" v-if="!(mode === 'VOICE' || isGenerating)">-->
<!-- <div-->
<!-- v-for="(select, idx) in selectList"-->
<!-- :key="idx"-->
<!-- class="chat-select"-->
<!-- :class="{ selected: type === idx + 1 }"-->
<!-- @click="onSelect(idx)"-->
<!-- >-->
<!-- {{ select }}-->
<!-- </div>-->
<!-- <div class="chat-select" @click="onSelect(-1)">↩︎</div>-->
<!-- </div>-->

<div class="chat-input-box">
<div v-if="isGenerating" class="chat-loading">
Expand Down Expand Up @@ -294,9 +294,8 @@ export default {
z-index: 997;
position: fixed;
bottom: 9rem;
bottom: calc(9rem + env(safe-area-inset-bottom));
bottom: calc(9rem + constant(safe-area-inset-bottom));
bottom: calc(env(safe-area-inset-bottom));
bottom: calc(constant(safe-area-inset-bottom));
}
.chat-select-box {
Expand Down
14 changes: 7 additions & 7 deletions layouts/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
<div class="layout">
<slot />
</div>
<Navigation />
<!-- <Navigation />-->
</div>
</template>

<script lang="ts"></script>
<style lang="scss" scoped>
.layout {
height: calc(100% - 9rem);
height: calc(100% - (9rem + constant(safe-area-inset-bottom)));
height: calc(100% - (9rem + env(safe-area-inset-bottom)));
height: calc(100%);
height: calc(100% - constant(safe-area-inset-bottom));
height: calc(100% - env(safe-area-inset-bottom));
margin-bottom: 9rem;
margin-bottom: calc(9rem + constant(safe-area-inset-bottom));
margin-bottom: calc(9rem + env(safe-area-inset-bottom));
//margin-bottom: 9rem;
//margin-bottom: calc(9rem + constant(safe-area-inset-bottom));
//margin-bottom: calc(9rem + env(safe-area-inset-bottom));
// 231215 - Toast 중앙정렬 이슈로 추가
display: flex;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"build:dev": "nuxt build --dotenv .env.dev",
"dev": "nuxt dev --dotenv .env.dev",
"local": "nuxt dev --host --dotenv .env.local",
"prod": "nuxt dev --dotenv .env.prod",
"generate": "nuxt generate --dotenv .env.prod",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
Expand Down
13 changes: 9 additions & 4 deletions pages/chat/index.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<div class="viewport">
<div class="header">
<span class="header-title"> Looi </span>
<Icon class="ic_help" @click="isVisible = !isVisible" />
<span class="logo_v2 icon" />
<Icon class="nav_mypage" @click="navigateTo(`/mypage?tab=diary`)" />
</div>

<div class="contents" ref="scrollableRef">
Expand All @@ -17,7 +17,7 @@
/>
</div>

<Navigation />
<!-- <Navigation />-->
<ChatInput />

<!-- 토스트 -->
Expand Down Expand Up @@ -205,7 +205,7 @@ const updateChatBoxCss = () => {
background: $gradient_bg_light;
padding-top: 60px; // header
// input + CSS 52px 간격 요청 + nav
padding-bottom: calc(12.5rem + 52px + 9rem);
//padding-bottom: calc(12.5rem + 52px + 9rem);
// IOS 네비 하단에 배경 X
// margin-bottom: env(safe-area-inset-bottom);
// margin-bottom: constant(safe-area-inset-bottom);
Expand All @@ -232,4 +232,9 @@ const updateChatBoxCss = () => {
padding: 6px 42px;
}
}
.nav_mypage {
//width: 100%;
//height: 100%;
//margin-top: 10px;
}
</style>
14 changes: 7 additions & 7 deletions pages/home/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</div>
</main>
</div>
<Navigation />
<!-- <Navigation />-->
</div>

<SimpleModal :isModalOpen="isModalOpen" @close="closeModal">
Expand Down Expand Up @@ -163,18 +163,18 @@ export default {
@import "@/assets/scss/mixins.scss";
.contents {
height: calc(100% - (6rem + 9rem));
height: calc(100% - (6rem + 9rem + constant(safe-area-inset-top)));
height: calc(100% - (6rem + 9rem + env(safe-area-inset-top)));
height: calc(100% - (6rem));
height: calc(100% - (6rem + constant(safe-area-inset-top)));
height: calc(100% - (6rem + env(safe-area-inset-top)));
margin-top: 6rem;
margin-top: calc(6rem + constant(safe-area-inset-top));
margin-top: calc(6rem + env(safe-area-inset-top));
padding: 0;
margin-bottom: 9rem;
margin-bottom: calc(9rem + constant(safe-area-inset-bottom));
margin-bottom: calc(9rem + env(safe-area-inset-bottom));
//margin-bottom: 9rem;
//margin-bottom: calc(9rem + constant(safe-area-inset-bottom));
//margin-bottom: calc(9rem + env(safe-area-inset-bottom));
overflow-x: none;
overflow-y: scroll;
Expand Down
13 changes: 10 additions & 3 deletions pages/mypage/index.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<div class="header">
<div class="header-top">
<span class="mypage-title">마이페이지</span>
<v-icon class="ic_setting" @click="goSetting" />
<v-icon class="ic_back" @click="navigateTo(`/chat`)" />
<v-icon class="ic_setting" @click="goSetting" />
</div>
</div>
<div class="contents">
Expand All @@ -19,6 +19,8 @@
</div>

<!-- (2) 통계 영역 -->
<Report />

<div
class="contents-header-2"
v-if="highestCountCategory"
Expand All @@ -28,6 +30,8 @@
<p class="status-text">{{ highestCountCategory.message }}</p>
</div>



<!-- (3) 콘텐츠 영역 -->
<div class="contents-header-4">
<Tags
Expand Down Expand Up @@ -73,6 +77,7 @@ import BoardItems from "../../components/diary/BoardItems.vue";
import Tags from "../../components/diary/Tags.vue";
import Icon from "~/components/common/Icon.vue";
import CalendarMain from "~/components/calendar/CalendarMain.vue";
import Report from "../../components/home/Report.vue";
export default {
name: "Mypage",
Expand All @@ -87,6 +92,7 @@ export default {
ListItems,
Icon,
CalendarMain,
Report,
},
data() {
return {
Expand Down Expand Up @@ -238,6 +244,7 @@ export default {
margin-top: 16px;
padding: 0 2rem;
height: 32px;
margin-bottom: 20px;
display: flex;
justify-content: space-between;
Expand All @@ -251,7 +258,7 @@ export default {
}
.contents-header-2 {
margin: 2rem 0 3rem 0;
margin: 3rem 0 3rem 0;
padding: 0 2rem;
width: 100%;
Expand Down
6 changes: 3 additions & 3 deletions store/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ enum ChatType {
RESULT = "result",
LOADING = "loading",
SELECT = "select", // 231206 - 미사용
DEFAULT = "default",
DEFAULT = "2",
SUCCESS = "success",
FAIL = "fail",
}
Expand All @@ -23,7 +23,7 @@ interface Chat {
const initialState = () => ({
chatList: [] as Chat[],
isGenerating: false,
type: 0,
type: 2,
resetFlag: false, // unmounted 시, 초기화 여부 플래그
});

Expand All @@ -49,7 +49,7 @@ export const useChatStore = defineStore("chat", {
const welcomeChat = {
is_docent: true,
type: ChatType.DEFAULT,
text: `${res.data.text} \n기록 예시가 필요한가요?`,
text: `${res.data.text}`,
};
this.addChat(welcomeChat);
},
Expand Down

0 comments on commit f87dc7e

Please sign in to comment.