Skip to content

Commit

Permalink
Add loading state to Access Tokens. Update Table loading state (#3501)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwallacespeckle authored Nov 18, 2024
1 parent 8570ecb commit a264f37
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
{ id: 'actions', header: '', classes: 'col-span-1 flex justify-end' }
]"
:items="tokens"
:loading="loading"
>
<template #name="{ item }">
{{ item.name }}
Expand Down Expand Up @@ -107,9 +108,11 @@ const emit = defineEmits<{
(e: 'delete', item: TokenItem): void
}>()
const { result: tokensResult, refetch: refetchTokens } = useQuery(
developerSettingsAccessTokensQuery
)
const {
result: tokensResult,
refetch: refetchTokens,
loading
} = useQuery(developerSettingsAccessTokensQuery)
const tokenSuccess = ref('')
const showCreateTokenDialog = ref(false)
Expand Down
9 changes: 3 additions & 6 deletions packages/ui-components/src/components/layout/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@
>
<div
v-if="loading || !items"
class="flex items-center justify-center py-3"
tabindex="0"
:style="{ paddingRight: paddingRightStyle }"
:class="rowsWrapperClasses"
>
<div :class="getClasses(undefined, 0, { noPadding: true })" tabindex="0">
<CommonLoadingBar loading />
</div>
<CommonLoadingIcon />
</div>
<template v-else-if="items?.length">
<div
Expand Down Expand Up @@ -85,7 +82,7 @@
import { noop, isString } from 'lodash'
import { computed } from 'vue'
import type { PropAnyComponent } from '~~/src/helpers/common/components'
import { CommonLoadingBar, FormButton } from '~~/src/lib'
import { CommonLoadingIcon, FormButton } from '~~/src/lib'
import { directive as vTippy } from 'vue-tippy'

export type TableColumn<I> = {
Expand Down

0 comments on commit a264f37

Please sign in to comment.