update jump to latest button with circular design and animation
- add arrow-down-to-line icon - circular 32px button centered above prompt input - fade/scale/translate animation on show/hide - fix duplicate language.ru keys in i18n files
This commit is contained in:
@@ -284,7 +284,6 @@ export const dict = {
|
||||
"language.da": "Dänisch",
|
||||
"language.ru": "Russisch",
|
||||
"language.pl": "Polnisch",
|
||||
"language.ru": "Russisch",
|
||||
"language.ar": "Arabisch",
|
||||
|
||||
"toast.language.title": "Sprache",
|
||||
|
||||
@@ -279,7 +279,6 @@ export const dict = {
|
||||
"language.da": "Danés",
|
||||
"language.ru": "Ruso",
|
||||
"language.pl": "Polaco",
|
||||
"language.ru": "Ruso",
|
||||
"language.ar": "Árabe",
|
||||
|
||||
"toast.language.title": "Idioma",
|
||||
|
||||
@@ -279,7 +279,6 @@ export const dict = {
|
||||
"language.da": "Danois",
|
||||
"language.ru": "Russe",
|
||||
"language.pl": "Polonais",
|
||||
"language.ru": "Russe",
|
||||
"language.ar": "Arabe",
|
||||
|
||||
"toast.language.title": "Langue",
|
||||
|
||||
@@ -277,7 +277,6 @@ export const dict = {
|
||||
"language.da": "デンマーク語",
|
||||
"language.ru": "ロシア語",
|
||||
"language.pl": "ポーランド語",
|
||||
"language.ru": "ロシア語",
|
||||
"language.ar": "アラビア語",
|
||||
|
||||
"toast.language.title": "言語",
|
||||
|
||||
@@ -281,7 +281,6 @@ export const dict = {
|
||||
"language.da": "덴마크어",
|
||||
"language.ru": "러시아어",
|
||||
"language.pl": "폴란드어",
|
||||
"language.ru": "러시아어",
|
||||
"language.ar": "아랍어",
|
||||
|
||||
"toast.language.title": "언어",
|
||||
|
||||
@@ -277,7 +277,6 @@ export const dict = {
|
||||
"language.da": "丹麦语",
|
||||
"language.ru": "俄语",
|
||||
"language.pl": "波兰语",
|
||||
"language.ru": "俄语",
|
||||
"language.ar": "阿拉伯语",
|
||||
|
||||
"toast.language.title": "语言",
|
||||
|
||||
@@ -1360,23 +1360,24 @@ export default function Page() {
|
||||
}
|
||||
>
|
||||
<div class="relative w-full h-full min-w-0">
|
||||
<Show when={autoScroll.userScrolled()}>
|
||||
<div class="absolute right-4 md:right-6 bottom-[calc(var(--prompt-height,8rem)+16px)] z-[60] pointer-events-none">
|
||||
<Button
|
||||
variant="secondary"
|
||||
size="small"
|
||||
icon="chevron-down"
|
||||
class="pointer-events-auto shadow-sm"
|
||||
onClick={() => {
|
||||
setStore("messageId", undefined)
|
||||
autoScroll.forceScrollToBottom()
|
||||
window.history.replaceState(null, "", window.location.href.replace(/#.*$/, ""))
|
||||
}}
|
||||
>
|
||||
{language.t("session.messages.jumpToLatest")}
|
||||
</Button>
|
||||
</div>
|
||||
</Show>
|
||||
<div
|
||||
class="absolute left-1/2 -translate-x-1/2 bottom-[calc(var(--prompt-height,8rem)+32px)] z-[60] pointer-events-none transition-all duration-200 ease-out"
|
||||
classList={{
|
||||
"opacity-100 translate-y-0 scale-100": autoScroll.userScrolled(),
|
||||
"opacity-0 translate-y-2 scale-95 pointer-events-none": !autoScroll.userScrolled(),
|
||||
}}
|
||||
>
|
||||
<button
|
||||
class="pointer-events-auto size-8 flex items-center justify-center rounded-full bg-background-base border border-border-base shadow-sm text-text-base hover:bg-background-stronger transition-colors"
|
||||
onClick={() => {
|
||||
setStore("messageId", undefined)
|
||||
autoScroll.forceScrollToBottom()
|
||||
window.history.replaceState(null, "", window.location.href.replace(/#.*$/, ""))
|
||||
}}
|
||||
>
|
||||
<Icon name="arrow-down-to-line" />
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
ref={setScrollRef}
|
||||
onScroll={(e) => {
|
||||
|
||||
Reference in New Issue
Block a user