mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-30 19:59:47 +02:00
UBERF-8353: Reduce number of asyncs (#6806)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { DocumentQuery, Ref, Space, WithLookup } from '@hcengineering/core'
|
||||
import { IntlString, translate } from '@hcengineering/platform'
|
||||
import { IntlString, translate, translateCB } from '@hcengineering/platform'
|
||||
import { Button, IModeSelector, IconDetails, IconDetailsFilled, themeStore } from '@hcengineering/ui'
|
||||
import { ViewOptions, Viewlet } from '@hcengineering/view'
|
||||
import { FilterBar, SpaceHeader, ViewletContentView, ViewletSettingButton } from '@hcengineering/view-resources'
|
||||
@@ -26,7 +26,7 @@
|
||||
let resultQuery: DocumentQuery<GithubPullRequest> = { ...searchQuery }
|
||||
|
||||
$: if (!label && title) {
|
||||
void translate(title, {}, $themeStore.language).then((res) => {
|
||||
translateCB(title, {}, $themeStore.language, (res) => {
|
||||
label = res
|
||||
})
|
||||
}
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { WithLookup } from '@hcengineering/core'
|
||||
import { translate } from '@hcengineering/platform'
|
||||
import { Icon, themeStore } from '@hcengineering/ui'
|
||||
import { GithubIntegrationRepository } from '@hcengineering/github'
|
||||
import { translateCB } from '@hcengineering/platform'
|
||||
import { Icon, themeStore } from '@hcengineering/ui'
|
||||
import github from '../plugin'
|
||||
|
||||
export let value: WithLookup<GithubIntegrationRepository> | undefined
|
||||
@@ -33,13 +33,9 @@
|
||||
$: if (value !== undefined) {
|
||||
label = value.name
|
||||
} else {
|
||||
translate(github.string.NoRepository, {}, $themeStore.language)
|
||||
.then((r) => {
|
||||
label = r
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err)
|
||||
})
|
||||
translateCB(github.string.NoRepository, {}, $themeStore.language, (r) => {
|
||||
label = r
|
||||
})
|
||||
}
|
||||
$: disabled = disabled || value === undefined
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user