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

fix: enhance text consistency and SNI table UI #841

Merged
merged 1 commit into from
Oct 18, 2023
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
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
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