Process minor fixes (#10704)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2026-03-29 15:49:08 +05:00
committed by GitHub
parent 0e3cfbd949
commit 9d4e14cb70
9 changed files with 61 additions and 54 deletions
@@ -13,36 +13,17 @@
// limitations under the License.
-->
<script lang="ts">
import { Class, Doc, Ref } from '@hcengineering/core'
import { Asset, IntlString } from '@hcengineering/platform'
import { Button, ToggleWithLabel } from '@hcengineering/ui'
import { BuildModelKey, Viewlet } from '@hcengineering/view'
import { Viewlet } from '@hcengineering/view'
import { createEventDispatcher } from 'svelte'
import view from '../plugin'
import { AttributeConfig, Config, isAttribute } from '../viewOptions'
export let viewlet: Viewlet
export let items: Array<Config | AttributeConfig> = []
const dispatch = createEventDispatcher()
interface Config {
value: string | BuildModelKey | undefined
type: 'divider' | 'attribute'
}
interface AttributeConfig extends Config {
type: 'attribute'
enabled: boolean
label: IntlString
_class: Ref<Class<Doc>>
icon: Asset | undefined
order?: number
}
function isAttribute (val: Config): val is AttributeConfig {
return val.type === 'attribute'
}
function dragEnd () {
selected = undefined
dispatch('save', items)