Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/summary redesign #35

Merged
merged 2 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@mdi/font": "^5.2.45",
"@sentry/browser": "^5.29.2",
"@sentry/integrations": "^5.29.2",
"@weni/unnnic-system": "1.5.3",
"@weni/unnnic-system": "1.5.6",
"ansi-regex": "5.0.1",
"axios": "0.21.2",
"buefy": "^0.9.4",
Expand Down
12 changes: 4 additions & 8 deletions src/components/repository/BadgesCardDragDrop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div slot="icon" class="level example-accordion__btns-wrapper">
<unnnic-icon-svg
:icon="`${isOpen ? 'arrow-button-down-1' : 'arrow-right-1-1'}`"
size="sm"
size="xs"
/>
</div>
<div slot="options">
Expand Down Expand Up @@ -413,23 +413,19 @@ export default {

&__link {
text-decoration: underline;
margin: 1rem;
margin: 2rem;
margin-right: 0;
font-family: $unnnic-font-family-secondary;
font-size: $unnnic-font-size-body-gt;
color: $unnnic-color-neutral-cloudy;
}

&__wrapper {
margin: 0.75rem 0.5rem;
display: flex;
flex-wrap: wrap;

&__badge {
height: 1.5rem;
margin: 0.4rem 0.5rem 0 0;
font-weight: bold;
line-height: calc(1.5rem - 4px);
border-width: 1px;
margin: 1rem 1rem 0 0;

&--moving {
cursor: grab;
Expand Down
3 changes: 1 addition & 2 deletions src/components/repository/CreateBadgesCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@

<div class="drag-area__dropzone__content">
<span class="drag-area__dropzone__content__title">
Arraste as entidades para alterar o seu grupo ou para <br />
esta área em cinza para criar um novo.
{{ $t('webapp.home.drag_new') }}
</span>
</div>
</div>
Expand Down
45 changes: 28 additions & 17 deletions src/components/repository/EntityEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</div>
<unnnic-modal
:showModal="openModal"
:text="$t('webapp.home.delete_group')"
:text="modalTitle"
scheme="feedback-red"
modal-icon="alert-circle-1"
@close="openModal = false"
Expand All @@ -62,9 +62,9 @@
class="create-repository__container__button"
type="primary"
scheme="feedback-red"
@click="removeGroup(group.group_id)"
@click="onDelete"
>
{{ $t("webapp.home.delete_group") }}
{{ deleteButton }}
</unnnic-button>
</unnnic-modal>
</div>
Expand Down Expand Up @@ -111,7 +111,12 @@ export default {
needsUpdate: false,
openModal: false,
deleteMessage: '',
group: {}
modalTitle: '',
deleteButton: '',
group: {},
groupId: null,
entity: null,
isGroup: false
};
},
computed: {
Expand Down Expand Up @@ -196,6 +201,7 @@ export default {
}
},
async removeEntity(entity, groupId) {
this.openModal = false
this.loading = true;
try {
await this.deleteEntity({
Expand Down Expand Up @@ -246,31 +252,36 @@ export default {
}
},
onRemoveEntity(entity, groupId) {
this.$buefy.dialog.alert({
title: this.$t('webapp.home.delete_entity'),
message: this.$t('webapp.home.delete_entity_message', {
entity: entity.value,
}),
confirmText: this.$t('webapp.home.delete'),
cancelText: this.$t('webapp.home.cancel'),
canCancel: true,
closeOnConfirm: true,
type: 'is-danger',
onConfirm: async () => {
this.removeEntity(entity, groupId);
},
this.groupId = groupId
this.entity = entity
this.openModal = true;
this.modalTitle = this.$t('webapp.home.delete_entity');
this.deleteMessage = this.$t('webapp.home.delete_entity_message', {
entity: entity.value
});
this.deleteButton = this.$t('webapp.home.delete');
this.isGroup = false
},
onRemoveGroup(group) {
this.group = group
this.openModal = true
this.modalTitle = this.$t('webapp.home.delete_group');
this.deleteMessage = this.$t('webapp.home.delete_group_message', {
group: group.value
})
this.deleteButton = this.$t('webapp.home.delete_group');
this.isGroup = true
},
editGroups() {
this.editing = !this.editing
this.$emit('onEditGroups')
},
onDelete() {
if (this.isGroup) {
this.removeGroup(this.group.group_id)
} else {
this.removeEntity(this.entity, this.groupId);
}
}
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,9 @@ export default {
font-family: $font-family;
}

/deep/ .unnnic-tag {
display: inline-flex;
color: inherit;
}

</style>
2 changes: 1 addition & 1 deletion src/components/repository/sidebar/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
<section class="training-menu">
<unnnic-sidebar-item
:icon="
dropSelect === 'isTrainActive' ? 'graph-stats-circle-1-1' : 'graph-stats-circle-1'
dropSelect === 'isTrainActive' ? 'graph-status-circle-1' : 'graph-status-circle-1'
"
:text="$t('webapp.menu.training')"
:enableTooltip="!collapse"
Expand Down
7 changes: 3 additions & 4 deletions src/components/shared/accordion/EntityAccordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ export default {
.expander {
&__trigger {
display: flex;
padding: .7rem;
// margin-top: 0.5rem;
padding: .7rem 0;
padding-bottom: 0;

&--slim {
padding: .35rem;
Expand Down Expand Up @@ -198,8 +198,7 @@ export default {

&__body {
padding: .5rem;
// background: #f5f5f5;
// border-radius: 4px;
padding-top: 0;

&--pending{
padding: .5rem 0;
Expand Down
1 change: 1 addition & 0 deletions src/components/shared/accordion/ExampleInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export default {
}

&-entities {
display: inline-flex;

&__wrapper {
margin: 0 0 0 0.8rem;
Expand Down
25 changes: 20 additions & 5 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,14 @@
"home": {
"description": "Description",
"no_description": "There is no description for this repository",
"intents_list": "Intents List",
"entities_list": "Entity Groups",
"intents_list": "Intents",
"entities_list": "Entities",
"entities_label": "This intelligence has {n} entity group | This intelligence has {n} entity groups",
"non-grouped_entities": "and {n} non-grouped entity. | and {n} non-grouped entities.",
"only_non-grouped_entities": "This intelligence has {n} non-grouped entitie. | This intelligence has {n} non-grouped entities.",
"bot_has_x_intents": "This bot has <strong>{intents}</strong> intents",
"labeled": "<strong>{n}</strong> entities grouped as <strong>{label_value}</strong> | <strong>{n}</strong> entity grouped as <strong>{label_value}</strong> | <strong>{n}</strong> entities grouped as <strong>{label_value}</strong>",
"unlabeled": "{n} ungrouped entities | <strong>{n}</strong> ungrouped entity | <strong>{n}</strong> ungrouped entities",
"labeled": "Group <strong>{label_value}</strong> ({n})",
"unlabeled": "Ungrouped entities ({n})",
"all_categories": "All categories",
"all_languages": "All languages",
"no_repo": "No repositories found.",
Expand All @@ -276,13 +276,25 @@
"finish_editing": "Finish editing",
"enter": "Enter",
"create_new_group": "Create new group",
"drag_new": "Drag entities to change their group or to this gray area to create a new one.",
"edit_group_name": "Change name",
"new_group_named": "New entity group named {name}",
"delete_entity": "Delete Entity",
"delete_entity_message": "Are you sure you want to delete entity named \"{entity}\"?",
"delete_group": "Delete Group",
"delete_group_message": "Are you sure you want to delete entity group named \"{group}\"?",
"delete": "Delete",
"cancel": "Cancel",
"edit_group_modal_title": "Change group name",
"edit_group_modal_subtitle": "What new name do you want to give the group <strong>{group}</strong>?",
"edit_group_field_title": "Group name",
"edit_group_field_label": "Choose a new name for the group",
"edit_group_button_label": "Change name",
"save_changes": "Save",
"create_group_modal_title": "Set the group name",
"create_group_modal_subtitle": "You have created a new group, what will its name be?",
"create_group_field_label": "Choose a name for the group",
"create_group_field_title": "Group name",
"remove_integrate": "Remove from project",
"integrate": "Integrate into the project",
"integrate_modal_title": "Integrate \"{intelligence}\" intelligence to the project? ",
Expand Down Expand Up @@ -359,12 +371,15 @@
"information_language": "Languages | Language | Languages",
"information_contributors": "Contributors | Contributor | Contributors",
"information_integrations": "Integrations | Integration | Integrations",
"intent_question": "INTENT is what the chatbot will detect as being the user's intention when sending a specific message. For example: when sending \"thank you\", the user's intention is to show gratitude. So the intent for that sentece could be \"thanks\".",
"intent_question": "INTENT is what the chatbot will detect as being the user's intention when sending a specific message. For example: when sending \"thank you\", the user's intention is to show gratitude. So the intent for that sentence could be \"thanks\".",
"entity_question": "ENTITY is the noun related to the desire that was detected by the chatbot. For example: If the user-submitted phrase is \"generate new report,\" the entity could be \"report\" or \"new report\"",
"entity_groups_info": "Noun related to desire that was detected by intelligence. For example: if the phrase sent by the user is “generate new report”, the entity can be “report” or “new report”.",
"intents_list_info": "The desire that intelligence perceives that the user has when sending a message. For example: when sending “thank you” the user's intent is to show gratitude. Thus, the intent could be “thanks”.",
"intelligence_force": "Intelligence force",
"intelligence_force_low": "Low",
"intelligence_force_regular": "Regular",
"intelligence_force_high": "High",
"intelligence_force_info": "There are 3 levels of strength: weak, regular and strong. The greater the number of phrases per intent, the balance between the intents and the number of test phrases, the greater your strength, which represents how well the intelligence is trained.",
"integrate": "Integrate to Flows",
"remove_integrate": "Remove from Flows"
},
Expand Down
15 changes: 15 additions & 0 deletions src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,25 @@
"finish_editing": "Edición completa",
"enter": "Mandar",
"create_new_group": "Crea un grupo",
"drag_new": "Arrastre entidades para cambiar su grupo o a esta área gris para crear una nueva.",
"edit_group_name": "Cambiar nombre",
"new_group_named": "Nuevo grupo de entidades: {name}",
"delete_entity": "Eliminar entidad",
"delete_entity_message": "¿Está seguro de que desea eliminar la entidad \"{entity}\"?",
"delete_group": "Eliminar grupo de entidades",
"delete_group_message": "¿Está seguro de que desea eliminar el grupo de entidades \"{group}\"?",
"delete": "Borrar",
"cancel": "Cancelar",
"edit_group_modal_title": "Cambiar nombre de grupo",
"edit_group_modal_subtitle": "¿Qué nombre nuevo quieres darle al grupo <strong>{group}</strong>?",
"edit_group_field_title": "Nombre del grupo",
"edit_group_field_label": "Elige un nuevo nombre para el grupo",
"edit_group_button_label": "Cambiar nombre",
"save_changes": "Guardar",
"create_group_modal_title": "Establece el nombre del grupo",
"create_group_modal_subtitle": "Has creado un nuevo grupo, ¿cuál será su nombre?",
"create_group_field_label": "Elige un nombre para el grupo",
"create_group_field_title": "Nombre del grupo",
"remove_integrate": "Eliminar del proyecto",
"integrate": "Integrar al proyecto",
"integrate_modal_title": "Integrar la inteligencia \"{intelligence}\" al proyecto?",
Expand Down Expand Up @@ -363,10 +375,13 @@
"information_integrations": "Integraciones | Integración | Integraciones",
"intent_question": "La INTENCIÓN es el deseo de que la inteligencia se dé cuenta de que el usuario tiene al enviar un mensaje específico. Por ejemplo: al enviar un \"gracias\", la intención del usuario es agradecer. Por lo tanto, la intención de la frase podría ser \"gracias\".",
"entity_question": "La ENTIDAD es el sustantivo relacionado con el deseo que fue detectado por la inteligencia. Por ejemplo: si el usuario envió \"generar nuevo informe\", la entidad puede ser \"informe\" o \"nuevo informe\".",
"entity_groups_info": "sustantivo relacionado con el deseo que fue detectado por la inteligencia. Por ejemplo: si la frase enviada por el usuario es “generar un nuevo informe”, la entidad puede ser “informe” o “nuevo informe”.",
"Intents_list_info": "El deseo de que la inteligencia perciba que el usuario tiene al enviar un mensaje. Por ejemplo: al enviar “gracias” la intención del usuario es mostrar gratitud. Por lo tanto, la intención podría ser “gracias”.",
"intelligence_force": "Fuerza de inteligencia",
"intelligence_force_low": "Bajo",
"intelligence_force_regular": "Regular",
"intelligence_force_high": "Elevado",
"intelligence_force_info": "There are 3 levels of strength: weak, regular and strong. The greater the number of phrases per intent, the balance between the intents and the number of test phrases, the greater your strength, which represents how well the intelligence is trained.",
"integrate": "Flujo",
"remove_integrate": "Eliminar de los Flujos"
},
Expand Down
3 changes: 3 additions & 0 deletions src/locales/pt_br.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@
"finish_editing": "Concluir edição",
"enter": "Enviar",
"create_new_group": "Criar grupo",
"drag_new": "Arraste as entidades para alterar o seu grupo ou para <br /> esta área em cinza para criar um novo.",
"edit_group_name": "Alterar nome",
"new_group_named": "Novo grupo",
"delete_entity": "Deletar entidade",
Expand Down Expand Up @@ -373,6 +374,8 @@
"information_integrations": "Integrações | Integração | Integrações",
"intent_question": "INTENÇÃO é o desejo que a inteligência vai perceber que o usuário tem ao enviar uma mensagem específica. Por exemplo: ao enviar um \"obrigado\" a intenção do usuário é agradecer. Assim, a intenção para a frase poderia ser \"agradecimento\".",
"entity_question": "ENTIDADE é o substantivo relacionado ao desejo que foi detectado pela inteligência. Por exemplo: Se a frase enviada pelo usuário for \"gerar novo relatório\", a entidade pode ser \"relatório\" ou \"novo relatório\".",
"entity_groups_info": "Substantivo relacionado ao desejo que foi detectado pela inteligência. Por exemplo: se a frase enviada pelo usuário for “gerar novo relatório” a entidade pode ser “relatório” ou “novo relatório”.",
"intents_list_info": "Desejo que a inteligência percebe que o usuário tem ao enviar uma mensagem. Por exemplo: ao enviar “obrigado” a intenção do usuário é agradecer. Assim, a intenção poderia ser “agradecimento”.",
"intelligence_force" : "Força da inteligência",
"intelligence_force_low": "Fraca",
"intelligence_force_regular": "Regular",
Expand Down
Loading