mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 03:40:48 +00:00
Removed 'Unstarred all' action (#5756)
Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
This commit is contained in:
parent
e818265c76
commit
56c3f7ed02
@ -1,6 +1,5 @@
|
||||
{
|
||||
"string": {
|
||||
"DeleteStarred": "Delete starred",
|
||||
"Starred": "Starred",
|
||||
"Star": "Star",
|
||||
"Unstar": "Unstar"
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
"string": {
|
||||
"DeleteStarred": "Eliminar destacados",
|
||||
"Starred": "Destacados",
|
||||
"Star": "Destacar",
|
||||
"Unstar": "Eliminar destaque"
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
"string": {
|
||||
"DeleteStarred": "Remover destacados",
|
||||
"Starred": "Destacados",
|
||||
"Star": "Destacar",
|
||||
"Unstar": "Remover destaque"
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
"string": {
|
||||
"DeleteStarred": "Удалить закладки",
|
||||
"Starred": "Закладки",
|
||||
"Star": "Добавить в закладки",
|
||||
"Unstar": "Удалить из закладок"
|
||||
|
@ -56,7 +56,6 @@ const preference = plugin(preferenceId, {
|
||||
Star: '' as Asset
|
||||
},
|
||||
string: {
|
||||
DeleteStarred: '' as IntlString,
|
||||
Starred: '' as IntlString,
|
||||
Star: '' as IntlString,
|
||||
Unstar: '' as IntlString
|
||||
|
@ -17,10 +17,7 @@
|
||||
import { DocNotifyContext, InboxNotification } from '@hcengineering/notification'
|
||||
import { InboxNotificationsClientImpl } from '@hcengineering/notification-resources'
|
||||
import { IntlString } from '@hcengineering/platform'
|
||||
import preference from '@hcengineering/preference'
|
||||
import { getClient } from '@hcengineering/presentation'
|
||||
import { Action } from '@hcengineering/ui'
|
||||
import view from '@hcengineering/view'
|
||||
import { TreeNode } from '@hcengineering/view-resources'
|
||||
import { SpacesNavModel } from '@hcengineering/workbench'
|
||||
import StarredNavItem from './StarredNavItem.svelte'
|
||||
@ -35,21 +32,6 @@
|
||||
|
||||
const client = getClient()
|
||||
|
||||
const unStarAll: Action = {
|
||||
label: preference.string.DeleteStarred,
|
||||
icon: view.icon.Delete,
|
||||
action: async (): Promise<void> => {
|
||||
const ids = spaces.map((space) => space._id)
|
||||
const current = await client.findAll(preference.class.SpacePreference, { attachedTo: { $in: ids } })
|
||||
|
||||
await Promise.all(
|
||||
current.map(async (item) => {
|
||||
await client.remove(item)
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function getSpaceModel (space: Ref<Class<Space>>): SpacesNavModel | undefined {
|
||||
const hierarchy = client.getHierarchy()
|
||||
const ancestors = [space, ...[...hierarchy.getAncestors(space)].reverse()]
|
||||
@ -79,7 +61,6 @@
|
||||
<TreeNode
|
||||
_id={'tree-stared'}
|
||||
{label}
|
||||
actions={async () => [unStarAll]}
|
||||
highlighted={spaces.some((s) => s._id === currentSpace) && !deselect}
|
||||
isFold
|
||||
empty={spaces.length === 0}
|
||||
|
Loading…
Reference in New Issue
Block a user