Browse Source

Merge pull request #7983 from danielroe/process-client

fix: opt in to `import.meta.*` properties
pull/8002/head
Mert E 9 months ago committed by GitHub
parent
commit
51097466a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      packages/nc-gui/composables/useLoadingIndicator/index.ts

6
packages/nc-gui/composables/useLoadingIndicator/index.ts

@ -18,7 +18,7 @@ export function useLoadingIndicator({ duration = 2000, throttle = 200 }: UseLoad
progress.value = 0
isLoading.value = true
if (throttle) {
if (process.client) {
if (import.meta.client) {
_throttle = setTimeout(_startTimer, throttle)
}
} else {
@ -44,7 +44,7 @@ export function useLoadingIndicator({ duration = 2000, throttle = 200 }: UseLoad
function _hide() {
clear()
if (process.client) {
if (import.meta.client) {
setTimeout(() => {
isLoading.value = false
setTimeout(() => {
@ -55,7 +55,7 @@ export function useLoadingIndicator({ duration = 2000, throttle = 200 }: UseLoad
}
function _startTimer() {
if (process.client) {
if (import.meta.client) {
_timer = setInterval(() => {
_increase(step.value)
}, 100)

Loading…
Cancel
Save