Removed 'Unstarred all' action (#5756)

Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
This commit is contained in:
Alexander Platov 2024-06-08 20:43:48 +03:00 committed by GitHub
parent e818265c76
commit 56c3f7ed02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 0 additions and 24 deletions

View File

@ -1,6 +1,5 @@
{
"string": {
"DeleteStarred": "Delete starred",
"Starred": "Starred",
"Star": "Star",
"Unstar": "Unstar"

View File

@ -1,6 +1,5 @@
{
"string": {
"DeleteStarred": "Eliminar destacados",
"Starred": "Destacados",
"Star": "Destacar",
"Unstar": "Eliminar destaque"

View File

@ -1,6 +1,5 @@
{
"string": {
"DeleteStarred": "Remover destacados",
"Starred": "Destacados",
"Star": "Destacar",
"Unstar": "Remover destaque"

View File

@ -1,6 +1,5 @@
{
"string": {
"DeleteStarred": "Удалить закладки",
"Starred": "Закладки",
"Star": "Добавить в закладки",
"Unstar": "Удалить из закладок"

View File

@ -56,7 +56,6 @@ const preference = plugin(preferenceId, {
Star: '' as Asset
},
string: {
DeleteStarred: '' as IntlString,
Starred: '' as IntlString,
Star: '' as IntlString,
Unstar: '' as IntlString

View File

@ -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}