From bb1756c5b90e5ad10efd9fcd4fed6df93f27e464 Mon Sep 17 00:00:00 2001 From: Yi Yang Date: Fri, 10 May 2024 17:32:04 +0800 Subject: [PATCH] fix(entities): icon prop warning of kbutton (#1396) --- .../entities-certificates/package.json | 1 + .../src/components/CACertificateList.vue | 3 +- .../src/components/CertificateList.vue | 3 +- .../package.json | 3 +- .../src/components/ConsumerCredentialList.vue | 3 +- .../entities-consumer-groups/package.json | 3 +- .../src/components/ConsumerGroupList.vue | 3 +- .../entities/entities-consumers/package.json | 3 +- .../src/components/ConsumerList.vue | 3 +- .../entities-gateway-services/package.json | 3 +- .../src/components/GatewayServiceList.vue | 3 +- .../entities/entities-key-sets/package.json | 3 +- .../src/components/KeySetList.vue | 3 +- packages/entities/entities-keys/package.json | 3 +- .../entities-keys/src/components/KeyList.vue | 3 +- .../src/components/PluginList.vue | 3 +- .../src/components/RouteList.vue | 3 +- packages/entities/entities-snis/package.json | 3 +- .../entities-snis/src/components/SniList.vue | 3 +- .../entities-upstreams-targets/package.json | 3 +- .../src/components/TargetsList.vue | 3 +- .../src/components/UpstreamsList.vue | 3 +- .../entities/entities-vaults/package.json | 3 +- .../src/components/VaultList.vue | 3 +- pnpm-lock.yaml | 30 +++++++++++++++++++ 25 files changed, 77 insertions(+), 23 deletions(-) diff --git a/packages/entities/entities-certificates/package.json b/packages/entities/entities-certificates/package.json index 0a9145b4b6..176ff86dc1 100644 --- a/packages/entities/entities-certificates/package.json +++ b/packages/entities/entities-certificates/package.json @@ -66,6 +66,7 @@ }, "dependencies": { "@kong-ui-public/entities-shared": "workspace:^", + "@kong/icons": "^1.9.1", "@peculiar/x509": "^1.9.7" }, "distSizeChecker": { diff --git a/packages/entities/entities-certificates/src/components/CACertificateList.vue b/packages/entities/entities-certificates/src/components/CACertificateList.vue index f25d61aec7..da4a4fe293 100644 --- a/packages/entities/entities-certificates/src/components/CACertificateList.vue +++ b/packages/entities/entities-certificates/src/components/CACertificateList.vue @@ -37,10 +37,10 @@ v-show="hasData" appearance="primary" data-testid="toolbar-add-ca-certificate" - icon="plus" size="large" :to="config.createRoute" > + {{ t('ca-certificates.list.toolbar_actions.new_ca_certificate') }} @@ -146,6 +146,7 @@ import type { PropType } from 'vue' import { computed, ref, watch, onBeforeMount } from 'vue' import type { AxiosError } from 'axios' import { useRouter } from 'vue-router' +import { AddIcon } from '@kong/icons' import composables from '../composables' import endpoints from '../ca-certificates-endpoints' diff --git a/packages/entities/entities-certificates/src/components/CertificateList.vue b/packages/entities/entities-certificates/src/components/CertificateList.vue index f16d35f6e5..de956c64f8 100644 --- a/packages/entities/entities-certificates/src/components/CertificateList.vue +++ b/packages/entities/entities-certificates/src/components/CertificateList.vue @@ -37,10 +37,10 @@ v-show="hasData" appearance="primary" data-testid="toolbar-add-certificate" - icon="plus" size="large" :to="config.createRoute" > + {{ t('certificates.list.toolbar_actions.new_certificate') }} @@ -170,6 +170,7 @@ import type { PropType } from 'vue' import { computed, ref, watch, onBeforeMount } from 'vue' import type { AxiosError } from 'axios' import { useRouter } from 'vue-router' +import { AddIcon } from '@kong/icons' import composables from '../composables' import endpoints from '../certificates-endpoints' diff --git a/packages/entities/entities-consumer-credentials/package.json b/packages/entities/entities-consumer-credentials/package.json index 5444fd7f0f..dc93cb5647 100644 --- a/packages/entities/entities-consumer-credentials/package.json +++ b/packages/entities/entities-consumer-credentials/package.json @@ -68,6 +68,7 @@ "errorLimit": "300KB" }, "dependencies": { - "@kong-ui-public/entities-shared": "workspace:^" + "@kong-ui-public/entities-shared": "workspace:^", + "@kong/icons": "^1.9.1" } } diff --git a/packages/entities/entities-consumer-credentials/src/components/ConsumerCredentialList.vue b/packages/entities/entities-consumer-credentials/src/components/ConsumerCredentialList.vue index c6625de1cb..18a1bac38c 100644 --- a/packages/entities/entities-consumer-credentials/src/components/ConsumerCredentialList.vue +++ b/packages/entities/entities-consumer-credentials/src/components/ConsumerCredentialList.vue @@ -28,10 +28,10 @@ v-show="hasData" appearance="primary" data-testid="toolbar-add-credential" - icon="plus" size="large" :to="config.createRoute" > + {{ t(`credentials.list.toolbar_actions.${config.plugin}.new`) }} @@ -191,6 +191,7 @@ import type { PropType } from 'vue' import { computed, ref, watch, onBeforeMount } from 'vue' import type { AxiosError } from 'axios' +import { AddIcon } from '@kong/icons' import composables from '../composables' import endpoints from '../consumer-credentials-endpoints' import { diff --git a/packages/entities/entities-consumer-groups/package.json b/packages/entities/entities-consumer-groups/package.json index 04eebdb2d6..bba177251f 100644 --- a/packages/entities/entities-consumer-groups/package.json +++ b/packages/entities/entities-consumer-groups/package.json @@ -68,6 +68,7 @@ "errorLimit": "500KB" }, "dependencies": { - "@kong-ui-public/entities-shared": "workspace:^" + "@kong-ui-public/entities-shared": "workspace:^", + "@kong/icons": "^1.9.1" } } diff --git a/packages/entities/entities-consumer-groups/src/components/ConsumerGroupList.vue b/packages/entities/entities-consumer-groups/src/components/ConsumerGroupList.vue index f2c6f6b331..98c11e4ca3 100644 --- a/packages/entities/entities-consumer-groups/src/components/ConsumerGroupList.vue +++ b/packages/entities/entities-consumer-groups/src/components/ConsumerGroupList.vue @@ -41,11 +41,11 @@ v-show="hasData" appearance="primary" data-testid="toolbar-add-consumer-group" - icon="plus" size="large" :to="config.consumerId ? undefined : config.createRoute" @click="() => config.consumerId ? handleAddToGroupClick() : undefined" > + {{ config.consumerId ? t('consumer_groups.actions.add_to_group') : t('consumer_groups.list.toolbar_actions.new_consumer_group') }} @@ -181,6 +181,7 @@ import type { PropType } from 'vue' import { computed, ref, watch, onBeforeMount } from 'vue' import type { AxiosError } from 'axios' import { useRouter } from 'vue-router' +import { AddIcon } from '@kong/icons' import composables from '../composables' import endpoints from '../consumer-groups-endpoints' import { diff --git a/packages/entities/entities-consumers/package.json b/packages/entities/entities-consumers/package.json index 715f5191f6..054f731298 100644 --- a/packages/entities/entities-consumers/package.json +++ b/packages/entities/entities-consumers/package.json @@ -68,6 +68,7 @@ "errorLimit": "500KB" }, "dependencies": { - "@kong-ui-public/entities-shared": "workspace:^" + "@kong-ui-public/entities-shared": "workspace:^", + "@kong/icons": "^1.9.1" } } diff --git a/packages/entities/entities-consumers/src/components/ConsumerList.vue b/packages/entities/entities-consumers/src/components/ConsumerList.vue index bfc54b2b51..e0fdf8b745 100644 --- a/packages/entities/entities-consumers/src/components/ConsumerList.vue +++ b/packages/entities/entities-consumers/src/components/ConsumerList.vue @@ -41,11 +41,11 @@ v-show="hasData" appearance="primary" data-testid="toolbar-add-consumer" - icon="plus" size="large" :to="config.consumerGroupId ? undefined : config.createRoute" @click="() => config.consumerGroupId ? handleAddConsumerClick() : undefined" > + {{ config.consumerGroupId ? t('consumers.actions.add_consumer') : t('consumers.list.toolbar_actions.new_consumer') }} @@ -181,6 +181,7 @@ import type { PropType } from 'vue' import { computed, ref, watch, onBeforeMount } from 'vue' import type { AxiosError } from 'axios' import { useRouter } from 'vue-router' +import { AddIcon } from '@kong/icons' import composables from '../composables' import endpoints from '../consumers-endpoints' import { diff --git a/packages/entities/entities-gateway-services/package.json b/packages/entities/entities-gateway-services/package.json index 081ef13cfa..873a266047 100644 --- a/packages/entities/entities-gateway-services/package.json +++ b/packages/entities/entities-gateway-services/package.json @@ -68,6 +68,7 @@ "errorLimit": "600KB" }, "dependencies": { - "@kong-ui-public/entities-shared": "workspace:^" + "@kong-ui-public/entities-shared": "workspace:^", + "@kong/icons": "^1.9.1" } } diff --git a/packages/entities/entities-gateway-services/src/components/GatewayServiceList.vue b/packages/entities/entities-gateway-services/src/components/GatewayServiceList.vue index dec5b89e32..a917f6e586 100644 --- a/packages/entities/entities-gateway-services/src/components/GatewayServiceList.vue +++ b/packages/entities/entities-gateway-services/src/components/GatewayServiceList.vue @@ -37,10 +37,10 @@ v-show="hasData" appearance="primary" data-testid="toolbar-add-gateway-service" - icon="plus" size="large" :to="config.createRoute" > + {{ t('gateway_services.list.toolbar_actions.new_gateway_service') }} @@ -165,6 +165,7 @@ import type { PropType } from 'vue' import { computed, ref, watch, onBeforeMount } from 'vue' import { useRouter } from 'vue-router' +import { AddIcon } from '@kong/icons' import composables from '../composables' import endpoints from '../gateway-services-endpoints' import type { AxiosError } from 'axios' diff --git a/packages/entities/entities-key-sets/package.json b/packages/entities/entities-key-sets/package.json index 15d8f92690..357ccf3a5f 100644 --- a/packages/entities/entities-key-sets/package.json +++ b/packages/entities/entities-key-sets/package.json @@ -67,6 +67,7 @@ "errorLimit": "500KB" }, "dependencies": { - "@kong-ui-public/entities-shared": "workspace:^" + "@kong-ui-public/entities-shared": "workspace:^", + "@kong/icons": "^1.9.1" } } diff --git a/packages/entities/entities-key-sets/src/components/KeySetList.vue b/packages/entities/entities-key-sets/src/components/KeySetList.vue index becfd7da77..558097812d 100644 --- a/packages/entities/entities-key-sets/src/components/KeySetList.vue +++ b/packages/entities/entities-key-sets/src/components/KeySetList.vue @@ -37,10 +37,10 @@ v-show="hasData" appearance="primary" data-testid="toolbar-add-key-set" - icon="plus" size="large" :to="config.createRoute" > + {{ t('keySets.list.toolbar_actions.new_key_set') }} @@ -132,6 +132,7 @@ import type { PropType } from 'vue' import { computed, ref, watch, onBeforeMount } from 'vue' import type { AxiosError } from 'axios' +import { AddIcon } from '@kong/icons' import { useRouter } from 'vue-router' import composables from '../composables' import endpoints from '../key-sets-endpoints' diff --git a/packages/entities/entities-keys/package.json b/packages/entities/entities-keys/package.json index 33bee8d8e4..33f759f287 100644 --- a/packages/entities/entities-keys/package.json +++ b/packages/entities/entities-keys/package.json @@ -68,6 +68,7 @@ "errorLimit": "486KB" }, "dependencies": { - "@kong-ui-public/entities-shared": "workspace:^" + "@kong-ui-public/entities-shared": "workspace:^", + "@kong/icons": "^1.9.1" } } diff --git a/packages/entities/entities-keys/src/components/KeyList.vue b/packages/entities/entities-keys/src/components/KeyList.vue index f45a44b467..d5f0b920f3 100644 --- a/packages/entities/entities-keys/src/components/KeyList.vue +++ b/packages/entities/entities-keys/src/components/KeyList.vue @@ -37,10 +37,10 @@ v-show="hasData" appearance="primary" data-testid="toolbar-add-key" - icon="plus" size="large" :to="config.createRoute" > + {{ t('keys.list.toolbar_actions.new_key') }} @@ -137,6 +137,7 @@ import type { PropType } from 'vue' import { computed, ref, watch, onBeforeMount } from 'vue' import type { AxiosError } from 'axios' import { useRouter } from 'vue-router' +import { AddIcon } from '@kong/icons' import composables from '../composables' import endpoints from '../keys-endpoints' import { diff --git a/packages/entities/entities-plugins/src/components/PluginList.vue b/packages/entities/entities-plugins/src/components/PluginList.vue index 831eda2ffc..4e93315c32 100644 --- a/packages/entities/entities-plugins/src/components/PluginList.vue +++ b/packages/entities/entities-plugins/src/components/PluginList.vue @@ -40,10 +40,10 @@ v-show="hasData" appearance="primary" data-testid="toolbar-add-plugin" - icon="plus" size="large" :to="config.createRoute" > + {{ t('plugins.list.toolbar_actions.new_plugin') }} @@ -246,6 +246,7 @@ import type { FuzzyMatchFilterConfig, TableErrorMessage, } from '@kong-ui-public/entities-shared' +import { AddIcon } from '@kong/icons' import composables from '../composables' import endpoints from '../plugins-endpoints' diff --git a/packages/entities/entities-routes/src/components/RouteList.vue b/packages/entities/entities-routes/src/components/RouteList.vue index b3a2e6cbf7..f56d3b8d89 100644 --- a/packages/entities/entities-routes/src/components/RouteList.vue +++ b/packages/entities/entities-routes/src/components/RouteList.vue @@ -40,10 +40,10 @@ v-show="hasData" appearance="primary" data-testid="toolbar-add-route" - icon="plus" size="large" :to="config.createRoute" > + {{ t('routes.list.toolbar_actions.new_route') }} @@ -193,6 +193,7 @@ import { useRouter } from 'vue-router' import { BadgeMethodAppearances } from '@kong/kongponents' import type { BadgeMethodAppearance, HeaderTag } from '@kong/kongponents' +import { AddIcon } from '@kong/icons' import { EntityBaseTable, EntityDeleteModal, diff --git a/packages/entities/entities-snis/package.json b/packages/entities/entities-snis/package.json index 9287cbfb8d..32ecb90af5 100644 --- a/packages/entities/entities-snis/package.json +++ b/packages/entities/entities-snis/package.json @@ -68,6 +68,7 @@ "errorLimit": "400KB" }, "dependencies": { - "@kong-ui-public/entities-shared": "workspace:^" + "@kong-ui-public/entities-shared": "workspace:^", + "@kong/icons": "^1.9.1" } } diff --git a/packages/entities/entities-snis/src/components/SniList.vue b/packages/entities/entities-snis/src/components/SniList.vue index 8db30d24e0..4fd1be8db0 100644 --- a/packages/entities/entities-snis/src/components/SniList.vue +++ b/packages/entities/entities-snis/src/components/SniList.vue @@ -38,10 +38,10 @@ v-show="hasData" appearance="primary" data-testid="toolbar-add-sni" - icon="plus" size="large" :to="config.createRoute" > + {{ t('snis.list.toolbar_actions.new') }} @@ -159,6 +159,7 @@ import type { TableErrorMessage, } from '@kong-ui-public/entities-shared' import '@kong-ui-public/entities-shared/dist/style.css' +import { AddIcon } from '@kong/icons' const emit = defineEmits<{ (e: 'error', error: AxiosError): void, diff --git a/packages/entities/entities-upstreams-targets/package.json b/packages/entities/entities-upstreams-targets/package.json index 5e1b40fc01..d998bd2b95 100644 --- a/packages/entities/entities-upstreams-targets/package.json +++ b/packages/entities/entities-upstreams-targets/package.json @@ -68,6 +68,7 @@ "errorLimit": "900KB" }, "dependencies": { - "@kong-ui-public/entities-shared": "workspace:^" + "@kong-ui-public/entities-shared": "workspace:^", + "@kong/icons": "^1.9.1" } } diff --git a/packages/entities/entities-upstreams-targets/src/components/TargetsList.vue b/packages/entities/entities-upstreams-targets/src/components/TargetsList.vue index 7328cced35..95a67946b3 100644 --- a/packages/entities/entities-upstreams-targets/src/components/TargetsList.vue +++ b/packages/entities/entities-upstreams-targets/src/components/TargetsList.vue @@ -28,10 +28,10 @@ v-show="hasData" appearance="primary" data-testid="toolbar-new-target" - icon="plus" :to="props.config.createRoute ? props.config.createRoute : undefined" @click="() => !props.config.createRoute ? handleCreateTarget() : undefined" > + {{ t('targets.list.toolbar_actions.new_target') }} @@ -153,6 +153,7 @@ import { import type { PropType } from 'vue' import { computed, onBeforeMount, ref, watch } from 'vue' import type { AxiosError } from 'axios' +import { AddIcon } from '@kong/icons' import type { KongManagerTargetsListConfig, KonnectTargetsListConfig, diff --git a/packages/entities/entities-upstreams-targets/src/components/UpstreamsList.vue b/packages/entities/entities-upstreams-targets/src/components/UpstreamsList.vue index d27624f3ac..b504be8383 100644 --- a/packages/entities/entities-upstreams-targets/src/components/UpstreamsList.vue +++ b/packages/entities/entities-upstreams-targets/src/components/UpstreamsList.vue @@ -38,10 +38,10 @@ v-show="hasData" appearance="primary" data-testid="toolbar-add-upstream" - icon="plus" size="large" :to="config.createRoute" > + {{ t('upstreams.list.toolbar_actions.new_upstream') }} @@ -138,6 +138,7 @@ import type { PropType } from 'vue' import { computed, onBeforeMount, ref, watch } from 'vue' import type { AxiosError } from 'axios' import { useRouter } from 'vue-router' +import { AddIcon } from '@kong/icons' import type { KongManagerUpstreamsListConfig, KonnectUpstreamsListConfig, diff --git a/packages/entities/entities-vaults/package.json b/packages/entities/entities-vaults/package.json index d8d43d45e2..c56f1214aa 100644 --- a/packages/entities/entities-vaults/package.json +++ b/packages/entities/entities-vaults/package.json @@ -68,6 +68,7 @@ "errorLimit": "900KB" }, "dependencies": { - "@kong-ui-public/entities-shared": "workspace:^" + "@kong-ui-public/entities-shared": "workspace:^", + "@kong/icons": "^1.9.1" } } diff --git a/packages/entities/entities-vaults/src/components/VaultList.vue b/packages/entities/entities-vaults/src/components/VaultList.vue index 37e700768a..acf481a77a 100644 --- a/packages/entities/entities-vaults/src/components/VaultList.vue +++ b/packages/entities/entities-vaults/src/components/VaultList.vue @@ -37,10 +37,10 @@ v-show="hasData" appearance="primary" data-testid="toolbar-add-vault" - icon="plus" size="large" :to="config.createRoute" > + {{ t('vaults.list.toolbar_actions.new_vault') }} @@ -137,6 +137,7 @@ import type { PropType } from 'vue' import { computed, ref, watch, onBeforeMount } from 'vue' import { useRouter } from 'vue-router' import type { AxiosError } from 'axios' +import { AddIcon } from '@kong/icons' import { EntityBaseTable, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 87bc375c0a..450a278983 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -625,6 +625,9 @@ importers: '@kong-ui-public/entities-shared': specifier: workspace:^ version: link:../entities-shared + '@kong/icons': + specifier: ^1.9.1 + version: 1.9.1(vue@3.4.25) '@peculiar/x509': specifier: ^1.9.7 version: 1.9.7 @@ -653,6 +656,9 @@ importers: '@kong-ui-public/entities-shared': specifier: workspace:^ version: link:../entities-shared + '@kong/icons': + specifier: ^1.9.1 + version: 1.9.1(vue@3.4.25) devDependencies: '@kong-ui-public/i18n': specifier: workspace:^ @@ -678,6 +684,9 @@ importers: '@kong-ui-public/entities-shared': specifier: workspace:^ version: link:../entities-shared + '@kong/icons': + specifier: ^1.9.1 + version: 1.9.1(vue@3.4.25) devDependencies: '@kong-ui-public/i18n': specifier: workspace:^ @@ -703,6 +712,9 @@ importers: '@kong-ui-public/entities-shared': specifier: workspace:^ version: link:../entities-shared + '@kong/icons': + specifier: ^1.9.1 + version: 1.9.1(vue@3.4.25) devDependencies: '@kong-ui-public/i18n': specifier: workspace:^ @@ -756,6 +768,9 @@ importers: '@kong-ui-public/entities-shared': specifier: workspace:^ version: link:../entities-shared + '@kong/icons': + specifier: ^1.9.1 + version: 1.9.1(vue@3.4.25) devDependencies: '@kong-ui-public/i18n': specifier: workspace:^ @@ -781,6 +796,9 @@ importers: '@kong-ui-public/entities-shared': specifier: workspace:^ version: link:../entities-shared + '@kong/icons': + specifier: ^1.9.1 + version: 1.9.1(vue@3.4.25) devDependencies: '@kong-ui-public/i18n': specifier: workspace:^ @@ -803,6 +821,9 @@ importers: '@kong-ui-public/entities-shared': specifier: workspace:^ version: link:../entities-shared + '@kong/icons': + specifier: ^1.9.1 + version: 1.9.1(vue@3.4.25) devDependencies: '@kong-ui-public/i18n': specifier: workspace:^ @@ -955,6 +976,9 @@ importers: '@kong-ui-public/entities-shared': specifier: workspace:^ version: link:../entities-shared + '@kong/icons': + specifier: ^1.9.1 + version: 1.9.1(vue@3.4.25) devDependencies: '@kong-ui-public/i18n': specifier: workspace:^ @@ -980,6 +1004,9 @@ importers: '@kong-ui-public/entities-shared': specifier: workspace:^ version: link:../entities-shared + '@kong/icons': + specifier: ^1.9.1 + version: 1.9.1(vue@3.4.25) devDependencies: '@kong-ui-public/i18n': specifier: workspace:^ @@ -1005,6 +1032,9 @@ importers: '@kong-ui-public/entities-shared': specifier: workspace:^ version: link:../entities-shared + '@kong/icons': + specifier: ^1.9.1 + version: 1.9.1(vue@3.4.25) devDependencies: '@kong-ui-public/i18n': specifier: workspace:^