Skip to content

Commit 5c7944b

Browse files
committed
change style of agency actions in confirmation box
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent 74e4bbc commit 5c7944b

File tree

2 files changed

+32
-19
lines changed

2 files changed

+32
-19
lines changed

src/components/ChattyLLM/AgencyAction.vue

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,28 @@
44
-->
55
<template>
66
<div class="agency-action">
7-
<NcChip type="primary"
8-
:no-close="true"
9-
:text="action.name.replace(/_/g, ' ')">
10-
<template #icon>
11-
<ToolsIcon :size="16" />
12-
</template>
13-
</NcChip>
14-
<NcChip v-for="(argValue, argName) in action.args"
7+
<div class="action-title">
8+
<ToolsIcon :size="20" />
9+
<strong>
10+
{{ action.name.replace(/_/g, ' ') }}
11+
</strong>
12+
</div>
13+
<span v-for="(argValue, argName) in action.args"
1514
:key="argName + argValue"
1615
class="param"
17-
:no-close="true"
18-
:text="getParamText(argName, argValue)"
19-
:title="getParamText(argName, argValue)" />
16+
:title="getParamText(argName, argValue)">
17+
{{ getParamText(argName, argValue) }}
18+
</span>
2019
</div>
2120
</template>
2221

2322
<script>
2423
import ToolsIcon from 'vue-material-design-icons/Tools.vue'
2524
26-
import NcChip from '@nextcloud/vue/dist/Components/NcChip.js'
27-
2825
export default {
2926
name: 'AgencyAction',
3027
3128
components: {
32-
NcChip,
3329
ToolsIcon,
3430
},
3531
@@ -51,12 +47,24 @@ export default {
5147
<style lang="scss" scoped>
5248
.agency-action {
5349
display: flex;
50+
flex-direction: column;
5451
align-items: start;
5552
gap: 4px;
56-
flex-wrap: wrap;
53+
54+
border-radius: var(--border-radius-large);
55+
background-color: var(--color-primary-element-light-hover);
56+
padding: 8px;
57+
58+
.action-title {
59+
display: flex;
60+
align-items: center;
61+
}
5762
5863
.param {
59-
max-width: 300px;
64+
white-space: nowrap;
65+
text-overflow: ellipsis;
66+
width: 100%;
67+
overflow: hidden;
6068
}
6169
}
6270
</style>

src/components/ChattyLLM/AgencyActions.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
<div class="agency-actions">
77
<AgencyAction v-for="action in actions"
88
:key="action.id"
9-
:action="action" />
9+
:action="action"
10+
class="action" />
1011
</div>
1112
</template>
1213

@@ -32,8 +33,12 @@ export default {
3233
<style lang="scss" scoped>
3334
.agency-actions {
3435
display: flex;
35-
flex-direction: column;
36+
flex-wrap: wrap;
3637
align-items: start;
37-
gap: 4px;
38+
gap: 8px;
39+
40+
.action {
41+
max-width: 300px;
42+
}
3843
}
3944
</style>

0 commit comments

Comments
 (0)