Skip to content

Commit

Permalink
fix: UI improvements for commenting section of event tracking details
Browse files Browse the repository at this point in the history
  • Loading branch information
t0bska authored May 21, 2021
1 parent 3b17258 commit 4a5ee20
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
12 changes: 10 additions & 2 deletions iris-client-fe/src/components/form/editable-field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
@click="isEditing = true"
:class="['d-flex editable-button', hover ? 'hover' : '']"
>
<div>
<div class="editable-button_text">
<slot v-bind="{ entry: model || '-' }" />
</div>
<v-spacer />
<v-icon class="ml-3">mdi-pencil</v-icon>
</div>
</v-hover>
Expand All @@ -25,6 +24,7 @@
hide-details="auto"
:error-messages="error"
outlined
@keypress.enter="keyEnter"
></component>
</template>
</v-form>
Expand Down Expand Up @@ -119,6 +119,11 @@ export default class EditableField extends EditableFieldProps {
};
this.$emit("submit", payload, resolve, reject);
}
keyEnter(): void {
if (this.$props.component != "v-textarea") {
this.submit();
}
}
}
</script>
<style scoped lang="scss">
Expand All @@ -129,4 +134,7 @@ export default class EditableField extends EditableFieldProps {
border-bottom-color: rgba(0, 0, 0, 0.12);
}
}
.editable-button_text {
width: 100%;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
default-value="-"
>
<strong> Kommentar: </strong><br />
{{ entry }}
<div class="white-space-pre-line">
{{ entry }}
</div>
</editable-field>
</v-col>
</v-row>
Expand Down Expand Up @@ -309,3 +311,11 @@ export default class EventTrackingDetailsComponent extends EventTrackingDetailsC
}
}
</script>
<style scoped lang="scss">
.white-space-pre-line {
white-space: pre-line;
max-height: 150px;
width: 100%;
overflow-y: auto;
}
</style>

0 comments on commit 4a5ee20

Please sign in to comment.