Skip to content

Commit 0476447

Browse files
authored
Merge pull request #3 from lnbits/fix_move_buttons_top
fix: move `Open public chat` and `Minimize` buttons to the top
2 parents 1b96727 + 0af8253 commit 0476447

1 file changed

Lines changed: 32 additions & 23 deletions

File tree

static/embed.vue

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@
1212
<i class="text-caption q-pl-sm">powered by LNbits</i>
1313
</div>
1414
<div v-else class="chat-embed-body">
15+
<div class="chat-embed-header q-pa-sm">
16+
<div v-if="!chatData.messages.length" class="text-caption text-grey">
17+
Start the conversation.
18+
</div>
19+
<div class="chat-embed-actions">
20+
<q-btn
21+
v-if="chatId"
22+
flat
23+
dense
24+
icon="open_in_new"
25+
:href="publicChatLink"
26+
target="_blank"
27+
>
28+
<q-tooltip>Open public chat</q-tooltip>
29+
</q-btn>
30+
<q-btn flat dense icon="expand_less" @click="toggleMinimize">
31+
<q-tooltip>Minimize</q-tooltip>
32+
</q-btn>
33+
</div>
34+
</div>
1535
<div class="chat-container" ref="chatScroll">
1636
<div class="chat-messages q-pa-md">
1737
<q-chat-message
@@ -28,9 +48,6 @@
2848
</div>
2949
<div v-else v-text="message.message"></div>
3050
</q-chat-message>
31-
<div v-if="!chatData.messages.length" class="text-caption text-grey">
32-
Start the conversation.
33-
</div>
3451
</div>
3552
</div>
3653
<q-separator></q-separator>
@@ -53,17 +70,6 @@
5370
type="submit"
5471
:disable="!messageInput || sending"
5572
></q-btn>
56-
<q-btn
57-
v-if="chatId"
58-
class="q-ml-sm"
59-
flat
60-
dense
61-
icon="open_in_new"
62-
:href="publicChatLink"
63-
target="_blank"
64-
>
65-
<q-tooltip>Open public chat</q-tooltip>
66-
</q-btn>
6773
<q-btn
6874
v-if="publicPageData.tips"
6975
class="q-ml-sm"
@@ -84,15 +90,6 @@
8490
>
8591
<q-tooltip>Fund balance</q-tooltip>
8692
</q-btn>
87-
<q-btn
88-
class="q-ml-sm"
89-
flat
90-
dense
91-
icon="expand_less"
92-
@click="toggleMinimize"
93-
>
94-
<q-tooltip>Minimize</q-tooltip>
95-
</q-btn>
9693
</q-form>
9794
<div v-if="pendingAmount" class="text-caption text-grey q-mt-sm">
9895
Payment required (<span v-text="pendingAmount"></span> sats)
@@ -224,6 +221,18 @@ body {
224221
height: 100%;
225222
}
226223
224+
.chat-embed-header {
225+
display: flex;
226+
align-items: center;
227+
justify-content: space-between;
228+
gap: 8px;
229+
}
230+
231+
.chat-embed-actions {
232+
display: flex;
233+
gap: 8px;
234+
}
235+
227236
.chat-container {
228237
flex: 1 1 auto;
229238
overflow-y: auto;

0 commit comments

Comments
 (0)