Skip to content

Commit

Permalink
fix: enhance text consistency and SNI table UI (#841)
Browse files Browse the repository at this point in the history
  • Loading branch information
nekolab committed Oct 18, 2023
1 parent 7487215 commit 3831ea7
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
<EntityDeleteModal
:action-pending="isDeletePending"
:description="t('delete.description')"
:entity-name="pluginToBeDeleted && (pluginToBeDeleted.name || pluginToBeDeleted.id)"
:entity-name="pluginToBeDeleted && (pluginToBeDeleted.instance_name || pluginToBeDeleted.name || pluginToBeDeleted.id)"
:entity-type="EntityTypes.Plugin"
:error="deleteModalError"
:title="t('delete.title')"
Expand Down
2 changes: 1 addition & 1 deletion packages/entities/entities-plugins/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"configure_dynamic_ordering": "Configure Dynamic Ordering"
},
"delete": {
"title": "Delete Plugin",
"title": "Delete a Plugin",
"description": "Are you sure you want to delete this plugin? This action cannot be reversed."
},
"copy": {
Expand Down
3 changes: 3 additions & 0 deletions packages/entities/entities-shared/docs/entity-base-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ Table key to use for user table preferences. If empty, will fallback to use defa

The table is rendered inside a `KCard`. `tttle` text is displayed in the upper left corner of the `KCard` above the table.

#### `disableRowClick`
Controls whether the table rows are clickable or not. Defaults to `false`. Setting to `true` will suppress the `click:row` event even if a `@click:row` handler is provided.

### Slots

#### `toolbar-filter`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ const props = defineProps({
type: String,
default: '',
},
/** default to false, setting to true will suppress the row click event even if "@click:row" is attached */
disableRowClick: {
type: Boolean,
default: false,
},
})
const emit = defineEmits<{
Expand Down Expand Up @@ -304,9 +309,13 @@ const clearSearchInput = () => {
emit('clear-search-input')
}
const handleRowClick = (_: MouseEvent, row: BaseTableHeaders) => {
emit('click:row', row)
}
const handleRowClick = computed(() => {
return props.disableRowClick
? undefined
: (_: MouseEvent, row: BaseTableHeaders) => {
emit('click:row', row)
}
})
const handleSortChanged = (sortParams: TableSortParams) => {
emit('sort', sortParams)
Expand Down
1 change: 1 addition & 0 deletions packages/entities/entities-snis/src/components/SniList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
:cache-identifier="cacheIdentifier"
:cell-attributes="cellAttrsFn"
disable-pagination-page-jump
:disable-row-click="true"
:disable-sorting="disableSorting"
:empty-state-options="emptyStateOptions"
enable-entity-actions
Expand Down
2 changes: 1 addition & 1 deletion packages/entities/entities-snis/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"fields": {
"name": {
"label": "Name",
"placeholder": "Enter a unique name for this key set"
"placeholder": "Enter a unique name for this SNI"
},
"tags": {
"label": "Tags",
Expand Down
2 changes: 1 addition & 1 deletion packages/entities/entities-vaults/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"view": "View Details"
},
"delete": {
"title": "Delete Vault",
"title": "Delete a Vault",
"description": "Are you sure you want to delete this vault? This action cannot be reversed."
},
"errors": {
Expand Down

0 comments on commit 3831ea7

Please sign in to comment.