File tree Expand file tree Collapse file tree 1 file changed +40
-4
lines changed
apps/desktop/src/components/codegen Expand file tree Collapse file tree 1 file changed +40
-4
lines changed Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
2
import ConfigurableScrollableContainer from ' $components/ConfigurableScrollableContainer.svelte' ;
3
+ import { Button } from ' @gitbutler/ui' ;
3
4
import { focusable } from ' @gitbutler/ui/focus/focusable' ;
4
5
import type { Snippet } from ' svelte' ;
5
6
41
42
</div >
42
43
</div >
43
44
44
- <ConfigurableScrollableContainer bind:this ={scrollableContainer } childrenWrapHeight =" 100%" >
45
- <div class =" chat-messages hide-native-scrollbar" >
46
- {@render messages ()}
45
+ <div class =" chat-container" >
46
+ <ConfigurableScrollableContainer bind:this ={scrollableContainer } childrenWrapHeight =" 100%" >
47
+ <div class =" chat-messages" >
48
+ {@render messages ()}
49
+ </div >
50
+ </ConfigurableScrollableContainer >
51
+
52
+ <div class =" chat-scroll-to-bottom" >
53
+ <Button
54
+ kind =" outline"
55
+ icon =" arrow-down"
56
+ tooltip =" Scroll to bottom"
57
+ onclick ={scrollToBottom }
58
+ />
47
59
</div >
48
- </ConfigurableScrollableContainer >
60
+ </div >
49
61
50
62
<div class =" chat-footer" use:focusable >
51
63
{@render input ()}
72
84
border-bottom : 1 px solid var (--clr-border-3 );
73
85
}
74
86
87
+ .chat-container {
88
+ position : relative;
89
+ flex : 1 ;
90
+ overflow : hidden;
91
+ }
92
+
75
93
.chat-messages {
76
94
display : flex;
77
95
flex-direction : column;
87
105
padding : 16 px ;
88
106
border-top : 1 px solid var (--clr-border-2 );
89
107
}
108
+
109
+ .chat-scroll-to-bottom {
110
+ z-index : 10 ;
111
+ position : absolute;
112
+ right : 16 px ;
113
+ bottom : 14 px ;
114
+ overflow : hidden;
115
+ border-radius : var (--radius-btn );
116
+ background-color : var (--clr-bg-1 );
117
+ transition :
118
+ box-shadow var (--transition-fast ),
119
+ transform var (--transition-medium );
120
+
121
+ &:hover {
122
+ transform : translateY (-2 px );
123
+ box-shadow : var (--fx-shadow-s );
124
+ }
125
+ }
90
126
</style >
You can’t perform that action at this time.
0 commit comments