mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-15 12:55:59 +00:00
fix: more tooltips (#6767)
This commit is contained in:
parent
6b68b7f90a
commit
9fac238d56
@ -89,6 +89,9 @@
|
|||||||
"Selected": "Selected:",
|
"Selected": "Selected:",
|
||||||
"Submit": "Submit",
|
"Submit": "Submit",
|
||||||
"NextStep": "Next step",
|
"NextStep": "Next step",
|
||||||
"TypeHere": "Type here..."
|
"TypeHere": "Type here...",
|
||||||
|
"FullSize": "Full size",
|
||||||
|
"UseMaxWidth": "Max width",
|
||||||
|
"Sidebar": "Sidebar"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -89,6 +89,9 @@
|
|||||||
"Selected": "Seleccionado:",
|
"Selected": "Seleccionado:",
|
||||||
"Submit": "Enviar",
|
"Submit": "Enviar",
|
||||||
"NextStep": "Siguiente paso",
|
"NextStep": "Siguiente paso",
|
||||||
"TypeHere": "Escribe aquí..."
|
"TypeHere": "Escribe aquí...",
|
||||||
|
"FullSize": "Tamaño completo",
|
||||||
|
"UseMaxWidth": "Ancho máximo",
|
||||||
|
"Sidebar": "Barra lateral"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -89,6 +89,9 @@
|
|||||||
"Selected": "Sélectionné :",
|
"Selected": "Sélectionné :",
|
||||||
"Submit": "Soumettre",
|
"Submit": "Soumettre",
|
||||||
"NextStep": "Étape suivante",
|
"NextStep": "Étape suivante",
|
||||||
"TypeHere": "Tapez ici..."
|
"TypeHere": "Tapez ici...",
|
||||||
|
"FullSize": "Taille réelle",
|
||||||
|
"UseMaxWidth": "Largeur maximale",
|
||||||
|
"Sidebar": "Barre latérale"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -89,6 +89,9 @@
|
|||||||
"Selected": "Selecionado:",
|
"Selected": "Selecionado:",
|
||||||
"Submit": "Enviar",
|
"Submit": "Enviar",
|
||||||
"NextStep": "Seguinte passo",
|
"NextStep": "Seguinte passo",
|
||||||
"TypeHere": "Escreva aqui..."
|
"TypeHere": "Escreva aqui...",
|
||||||
|
"FullSize": "Tamanho completo",
|
||||||
|
"UseMaxWidth": "Largura máxima",
|
||||||
|
"Sidebar": "Barra lateral"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -89,6 +89,9 @@
|
|||||||
"Selected": "Выбрано:",
|
"Selected": "Выбрано:",
|
||||||
"Submit": "Отправить",
|
"Submit": "Отправить",
|
||||||
"NextStep": "Следующий шаг",
|
"NextStep": "Следующий шаг",
|
||||||
"TypeHere": "Вводите здесь..."
|
"TypeHere": "Вводите здесь...",
|
||||||
|
"FullSize": "Полный размер",
|
||||||
|
"UseMaxWidth": "Максимальная ширина",
|
||||||
|
"Sidebar": "Боковая панель"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -89,6 +89,9 @@
|
|||||||
"Selected": "已选:",
|
"Selected": "已选:",
|
||||||
"Submit": "提交",
|
"Submit": "提交",
|
||||||
"NextStep": "下一步",
|
"NextStep": "下一步",
|
||||||
"TypeHere": "在此输入..."
|
"TypeHere": "在此输入...",
|
||||||
|
"FullSize": "全尺寸",
|
||||||
|
"UseMaxWidth": "使用最大宽度",
|
||||||
|
"Sidebar": "侧边栏"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -34,6 +34,8 @@
|
|||||||
import IconScale from './icons/Scale.svelte'
|
import IconScale from './icons/Scale.svelte'
|
||||||
import IconScaleFull from './icons/ScaleFull.svelte'
|
import IconScaleFull from './icons/ScaleFull.svelte'
|
||||||
|
|
||||||
|
import plugin from '../plugin'
|
||||||
|
|
||||||
export let innerWidth: number = 0
|
export let innerWidth: number = 0
|
||||||
export let panelWidth: number = 0
|
export let panelWidth: number = 0
|
||||||
export let isHeader: boolean = true
|
export let isHeader: boolean = true
|
||||||
@ -209,6 +211,7 @@
|
|||||||
iconProps={{ size: 'medium' }}
|
iconProps={{ size: 'medium' }}
|
||||||
kind={'icon'}
|
kind={'icon'}
|
||||||
selected={useMaxWidth}
|
selected={useMaxWidth}
|
||||||
|
showTooltip={{ label: plugin.string.UseMaxWidth, direction: 'bottom' }}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
useMaxWidth = !useMaxWidth
|
useMaxWidth = !useMaxWidth
|
||||||
dispatch('maxWidth', useMaxWidth)
|
dispatch('maxWidth', useMaxWidth)
|
||||||
@ -222,6 +225,7 @@
|
|||||||
iconProps={{ size: 'medium' }}
|
iconProps={{ size: 'medium' }}
|
||||||
kind={'icon'}
|
kind={'icon'}
|
||||||
selected={fullSize}
|
selected={fullSize}
|
||||||
|
showTooltip={{ label: plugin.string.FullSize, direction: 'bottom' }}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
fullSize = !fullSize
|
fullSize = !fullSize
|
||||||
dispatch('fullsize')
|
dispatch('fullsize')
|
||||||
@ -244,6 +248,7 @@
|
|||||||
iconProps={{ size: 'medium', filled: asideShown }}
|
iconProps={{ size: 'medium', filled: asideShown }}
|
||||||
kind={'icon'}
|
kind={'icon'}
|
||||||
selected={asideShown}
|
selected={asideShown}
|
||||||
|
showTooltip={{ label: plugin.string.Sidebar, direction: 'bottom' }}
|
||||||
on:click={handleAside}
|
on:click={handleAside}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -115,7 +115,11 @@ export const uis = plugin(uiId, {
|
|||||||
Selected: '' as IntlString,
|
Selected: '' as IntlString,
|
||||||
Submit: '' as IntlString,
|
Submit: '' as IntlString,
|
||||||
NextStep: '' as IntlString,
|
NextStep: '' as IntlString,
|
||||||
TypeHere: '' as IntlString
|
TypeHere: '' as IntlString,
|
||||||
|
|
||||||
|
FullSize: '' as IntlString,
|
||||||
|
UseMaxWidth: '' as IntlString,
|
||||||
|
Sidebar: '' as IntlString
|
||||||
},
|
},
|
||||||
metadata: {
|
metadata: {
|
||||||
DefaultApplication: '' as Metadata<AnyComponent>,
|
DefaultApplication: '' as Metadata<AnyComponent>,
|
||||||
|
@ -186,11 +186,13 @@
|
|||||||
const aside: ButtonItem[] = [
|
const aside: ButtonItem[] = [
|
||||||
{
|
{
|
||||||
id: 'references',
|
id: 'references',
|
||||||
icon: document.icon.References
|
icon: document.icon.References,
|
||||||
|
showTooltip: { label: document.string.Backlinks, direction: 'bottom' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'activity',
|
id: 'activity',
|
||||||
icon: activity.icon.Activity
|
icon: activity.icon.Activity,
|
||||||
|
showTooltip: { label: activity.string.Activity, direction: 'bottom' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
let selectedAside: string | boolean = false
|
let selectedAside: string | boolean = false
|
||||||
@ -282,6 +284,7 @@
|
|||||||
icon={IconMoreH}
|
icon={IconMoreH}
|
||||||
iconProps={{ size: 'medium' }}
|
iconProps={{ size: 'medium' }}
|
||||||
kind={'icon'}
|
kind={'icon'}
|
||||||
|
showTooltip={{ label: view.string.MoreActions, direction: 'bottom' }}
|
||||||
on:click={showContextMenu}
|
on:click={showContextMenu}
|
||||||
/>
|
/>
|
||||||
{#each actions as action}
|
{#each actions as action}
|
||||||
@ -311,6 +314,7 @@
|
|||||||
fill: doc.color !== undefined ? getPlatformColorDef(doc.color, $themeStore.dark).icon : 'currentColor'
|
fill: doc.color !== undefined ? getPlatformColorDef(doc.color, $themeStore.dark).icon : 'currentColor'
|
||||||
}}
|
}}
|
||||||
disabled={readonly}
|
disabled={readonly}
|
||||||
|
showTooltip={{ label: document.string.Icon, direction: 'bottom' }}
|
||||||
on:click={chooseIcon}
|
on:click={chooseIcon}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
import type { Action, AnySvelteComponent } from '@hcengineering/ui'
|
import type { Action, AnySvelteComponent } from '@hcengineering/ui'
|
||||||
import { IconMoreH, Menu, navigate, showPopup, NavItem, ButtonIcon } from '@hcengineering/ui'
|
import { IconMoreH, Menu, navigate, showPopup, NavItem, ButtonIcon } from '@hcengineering/ui'
|
||||||
import { getDocumentLink } from '../../utils'
|
import { getDocumentLink } from '../../utils'
|
||||||
|
import view from '@hcengineering/view'
|
||||||
|
|
||||||
export let doc: Document
|
export let doc: Document
|
||||||
export let icon: Asset | AnySvelteComponent | undefined = undefined
|
export let icon: Asset | AnySvelteComponent | undefined = undefined
|
||||||
@ -87,6 +88,7 @@
|
|||||||
size={'extra-small'}
|
size={'extra-small'}
|
||||||
pressed={hovered}
|
pressed={hovered}
|
||||||
dataId={'btnDocMore'}
|
dataId={'btnDocMore'}
|
||||||
|
tooltip={{ label: view.string.MoreActions, direction: 'top' }}
|
||||||
on:click={onMenuClick}
|
on:click={onMenuClick}
|
||||||
/>
|
/>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
import { type Doc, type DocumentQuery, type Ref, type WithLookup } from '@hcengineering/core'
|
import { type Doc, type DocumentQuery, type Ref, type WithLookup } from '@hcengineering/core'
|
||||||
import drive, { type Drive, type Folder } from '@hcengineering/drive'
|
import drive, { type Drive, type Folder } from '@hcengineering/drive'
|
||||||
import { Scroller, SearchInput, Panel, Button, IconMoreH } from '@hcengineering/ui'
|
import { Scroller, SearchInput, Panel, Button, IconMoreH } from '@hcengineering/ui'
|
||||||
import { Viewlet, ViewOptions } from '@hcengineering/view'
|
import view, { Viewlet, ViewOptions } from '@hcengineering/view'
|
||||||
import {
|
import {
|
||||||
FilterBar,
|
FilterBar,
|
||||||
FilterButton,
|
FilterButton,
|
||||||
@ -83,6 +83,7 @@
|
|||||||
icon={IconMoreH}
|
icon={IconMoreH}
|
||||||
iconProps={{ size: 'medium' }}
|
iconProps={{ size: 'medium' }}
|
||||||
kind={'icon'}
|
kind={'icon'}
|
||||||
|
showTooltip={{ label: view.string.MoreActions, direction: 'bottom' }}
|
||||||
on:click={(ev) => {
|
on:click={(ev) => {
|
||||||
showMenu(ev, { object })
|
showMenu(ev, { object })
|
||||||
}}
|
}}
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
import { type Resource } from '@hcengineering/drive'
|
import { type Resource } from '@hcengineering/drive'
|
||||||
import { getClient } from '@hcengineering/presentation'
|
import { getClient } from '@hcengineering/presentation'
|
||||||
import { Button, IconMoreH } from '@hcengineering/ui'
|
import { Button, IconMoreH } from '@hcengineering/ui'
|
||||||
|
import view from '@hcengineering/view'
|
||||||
import { ObjectPresenter, TimestampPresenter, openDoc, showMenu } from '@hcengineering/view-resources'
|
import { ObjectPresenter, TimestampPresenter, openDoc, showMenu } from '@hcengineering/view-resources'
|
||||||
import { createEventDispatcher } from 'svelte'
|
import { createEventDispatcher } from 'svelte'
|
||||||
|
|
||||||
@ -71,6 +72,7 @@
|
|||||||
icon={IconMoreH}
|
icon={IconMoreH}
|
||||||
kind="ghost"
|
kind="ghost"
|
||||||
size="medium"
|
size="medium"
|
||||||
|
showTooltip={{ label: view.string.MoreActions, direction: 'bottom' }}
|
||||||
on:click={(evt) => {
|
on:click={(evt) => {
|
||||||
hovered = true
|
hovered = true
|
||||||
showMenu(evt, { object }, () => {
|
showMenu(evt, { object }, () => {
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
NavGroup,
|
NavGroup,
|
||||||
ButtonIcon
|
ButtonIcon
|
||||||
} from '@hcengineering/ui'
|
} from '@hcengineering/ui'
|
||||||
|
import view from '@hcengineering/view'
|
||||||
|
|
||||||
export let _id: Ref<Doc> | string | undefined = undefined
|
export let _id: Ref<Doc> | string | undefined = undefined
|
||||||
export let icon: Asset | AnySvelteComponent | undefined = undefined
|
export let icon: Asset | AnySvelteComponent | undefined = undefined
|
||||||
@ -115,6 +116,7 @@
|
|||||||
icon={action.icon ?? ActionIcon}
|
icon={action.icon ?? ActionIcon}
|
||||||
size={'extra-small'}
|
size={'extra-small'}
|
||||||
kind={'tertiary'}
|
kind={'tertiary'}
|
||||||
|
tooltip={{ label: action.label, direction: 'top' }}
|
||||||
on:click={(ev) => onInlineClick(ev, action)}
|
on:click={(ev) => onInlineClick(ev, action)}
|
||||||
/>
|
/>
|
||||||
{/each}
|
{/each}
|
||||||
@ -131,7 +133,14 @@
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{:else if popupMenuActions.length > 0}
|
{:else if popupMenuActions.length > 0}
|
||||||
<ButtonIcon icon={IconMoreH} size={'extra-small'} kind={'tertiary'} {pressed} on:click={onMenuClick} />
|
<ButtonIcon
|
||||||
|
icon={IconMoreH}
|
||||||
|
size={'extra-small'}
|
||||||
|
kind={'tertiary'}
|
||||||
|
tooltip={{ label: view.string.MoreActions, direction: 'top' }}
|
||||||
|
{pressed}
|
||||||
|
on:click={onMenuClick}
|
||||||
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
<svelte:fragment slot="visible"><slot name="visible" /></svelte:fragment>
|
<svelte:fragment slot="visible"><slot name="visible" /></svelte:fragment>
|
||||||
@ -170,6 +179,7 @@
|
|||||||
icon={action.icon ?? ActionIcon}
|
icon={action.icon ?? ActionIcon}
|
||||||
size={'extra-small'}
|
size={'extra-small'}
|
||||||
kind={'tertiary'}
|
kind={'tertiary'}
|
||||||
|
tooltip={{ label: action.label, direction: 'bottom' }}
|
||||||
on:click={(ev) => onInlineClick(ev, action)}
|
on:click={(ev) => onInlineClick(ev, action)}
|
||||||
/>
|
/>
|
||||||
{/each}
|
{/each}
|
||||||
|
Loading…
Reference in New Issue
Block a user