Skip to content

Commit

Permalink
feat(message): added dong in weather
Browse files Browse the repository at this point in the history
  • Loading branch information
PleahMaCaka committed Nov 2, 2023
1 parent 0800364 commit 443b949
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/lib/components/chat/messages/AssistantMessage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
const regex = /`([^`]*)`/g
export let message: string = ""
//
// if (get(stateStore).translate) {
// client.translateToKr(message)
// .then(res => message = res)
// }
let showingMessage = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
border-radius: 10px;
min-width: 480px;
padding: 12px 16px;
padding: 12px 16px 8px 16px;
border: 6px solid rgba(199, 191, 191, 0.86);
font-family: Cabin, serif;
Expand Down
17 changes: 14 additions & 3 deletions src/lib/components/chat/messages/features/FeatWeather.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<BaseFeatureMessage>
{dateClient.getFullMonth()}.{dateClient.getDate()}. {dateClient.getDayOfWeekCurrentKr()}
요일 {dateClient.getHours()}시 날씨<br />
<hr />
<hr class="weather-box-hr" />
<div class="weather-content">
<img
class="weather-icon"
Expand All @@ -53,6 +53,8 @@
<p>강수량: {res?.rain}mm</p>
</div>
</div>
<hr class="weather-box-hr-end" />
<p class="weather-dong">{res?.dong}</p>
</BaseFeatureMessage>
</div>
{:catch error}
Expand All @@ -61,6 +63,11 @@
</div>

<style>
.weather-dong {
font-size: 0.9rem;
margin-top: 4px;
}
.weather-box {
display: flex;
flex-direction: column;
Expand All @@ -77,8 +84,12 @@
justify-content: flex-start;
}
.weather-box hr {
margin-bottom: 8px;
.weather-box-hr {
margin-bottom: 12px;
}
.weather-box-hr-end {
margin-top: 12px;
}
.weather-icon {
Expand Down
1 change: 1 addition & 0 deletions src/lib/types/api/WeatherResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export interface WeatherInfo {
wd: string
fdst: number
ffdst: number
dong: string
}

0 comments on commit 443b949

Please sign in to comment.