UBERF-8063 Unarchive action for wiki and drive (#6522)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2024-09-11 13:45:52 +07:00
committed by GitHub
parent e497946805
commit 581e00353c
16 changed files with 84 additions and 16 deletions
+25 -1
View File
@@ -47,7 +47,7 @@ import { generateClassNotificationTypes } from '@hcengineering/model-notificatio
import preference, { TPreference } from '@hcengineering/model-preference'
import presentation from '@hcengineering/model-presentation'
import tracker from '@hcengineering/model-tracker'
import view, { actionTemplates, createAction } from '@hcengineering/model-view'
import view, { actionTemplates, createAction, type ViewAction } from '@hcengineering/model-view'
import workbench from '@hcengineering/model-workbench'
import notification from '@hcengineering/notification'
import { getEmbeddedLabel, type Asset } from '@hcengineering/platform'
@@ -233,6 +233,30 @@ function defineTeamspace (builder: Builder): void {
actions: [tracker.action.EditRelatedTargets, tracker.action.NewRelatedIssue]
})
createAction(builder, {
label: view.string.UnArchive,
icon: view.icon.Archive,
action: view.actionImpl.UpdateDocument as ViewAction,
actionProps: {
key: 'archived',
ask: true,
value: false,
label: view.string.UnArchive,
message: document.string.UnarchiveConfirm
},
input: 'any',
category: view.category.General,
target: document.class.Teamspace,
visibilityTester: view.function.CanArchiveSpace,
query: {
archived: true
},
context: {
mode: ['context', 'browser'],
group: 'tools'
}
})
createAction(
builder,
{
+2 -1
View File
@@ -64,6 +64,7 @@ export default mergeIds(documentId, document, {
ConfigDescription: '' as IntlString,
ParentDocument: '' as IntlString,
ChildDocument: '' as IntlString,
LockedBy: '' as IntlString
LockedBy: '' as IntlString,
UnarchiveConfirm: '' as IntlString
}
})
+31 -1
View File
@@ -58,7 +58,13 @@ import { TAttachedDoc, TDoc, TType, TTypedSpace } from '@hcengineering/model-cor
import presentation from '@hcengineering/model-presentation'
import print from '@hcengineering/model-print'
import tracker from '@hcengineering/model-tracker'
import view, { type Viewlet, actionTemplates, classPresenter, createAction } from '@hcengineering/model-view'
import view, {
type ViewAction,
type Viewlet,
actionTemplates,
classPresenter,
createAction
} from '@hcengineering/model-view'
import workbench from '@hcengineering/model-workbench'
import { getEmbeddedLabel } from '@hcengineering/platform'
@@ -279,6 +285,30 @@ function defineDrive (builder: Builder): void {
actions: [tracker.action.EditRelatedTargets, print.action.Print, tracker.action.NewRelatedIssue]
})
createAction(builder, {
label: view.string.UnArchive,
icon: view.icon.Archive,
action: view.actionImpl.UpdateDocument as ViewAction,
actionProps: {
key: 'archived',
ask: true,
value: false,
label: view.string.UnArchive,
message: drive.string.UnarchiveConfirm
},
input: 'any',
category: view.category.General,
target: drive.class.Drive,
visibilityTester: view.function.CanArchiveSpace,
query: {
archived: true
},
context: {
mode: ['context', 'browser'],
group: 'tools'
}
})
createAction(
builder,
{
+2 -1
View File
@@ -103,6 +103,7 @@ export default mergeIds(driveId, drive, {
Files: '' as IntlString,
Folders: '' as IntlString,
Version: '' as IntlString,
Restore: '' as IntlString
Restore: '' as IntlString,
UnarchiveConfirm: '' as IntlString
}
})
+2 -1
View File
@@ -58,6 +58,7 @@
"Icon": "Icon",
"Color": "Color",
"RoleLabel": "Role: {role}",
"Embeddings": "Embeddings"
"Embeddings": "Embeddings",
"UnarchiveConfirm": "Do you want to unarchive teamspace?"
}
}
+2 -1
View File
@@ -51,6 +51,7 @@
"Icon": "Icono",
"Color": "Color",
"RoleLabel": "Role: {role}",
"Embeddings": "Incrustaciones"
"Embeddings": "Incrustaciones",
"UnarchiveConfirm": "¿Quieres desarchivar el trabajo?"
}
}
+2 -1
View File
@@ -51,6 +51,7 @@
"Icon": "Icône",
"Color": "Couleur",
"RoleLabel": "Rôle : {role}",
"Embeddings": "Intégrations"
"Embeddings": "Intégrations",
"UnarchiveConfirm": "Voulez-vous désarchiver le l'espace d'équipe ?"
}
}
+2 -1
View File
@@ -51,6 +51,7 @@
"Icon": "Ícone",
"Color": "Cor",
"RoleLabel": "Papel: {role}",
"Embeddings": "Incorporações"
"Embeddings": "Incorporações",
"UnarchiveConfirm": "Você deseja desarquivar o trabalho?"
}
}
+2 -1
View File
@@ -58,6 +58,7 @@
"Icon": "Иконка",
"Color": "Цвет",
"RoleLabel": "Роль: {role}",
"Embeddings": "Вложения"
"Embeddings": "Вложения",
"UnarchiveConfirm": "Вы уверены, что хотите разархивировать пространство?"
}
}
+2 -1
View File
@@ -62,6 +62,7 @@
"Icon": "图标",
"Color": "颜色",
"RoleLabel": "角色:{role}",
"Embeddings": "嵌入"
"Embeddings": "嵌入",
"UnarchiveConfirm": "您确定要取消存档吗?"
}
}
+2 -1
View File
@@ -27,6 +27,7 @@
"Rename": "Rename",
"Restore": "Restore",
"RoleLabel": "Role",
"Root": "/"
"Root": "/",
"UnarchiveConfirm": "Are you sure you want to unarchive the drive?"
}
}
+2 -1
View File
@@ -27,6 +27,7 @@
"Rename": "Renombrar",
"Restore": "Restaurar",
"RoleLabel": "Rol",
"Root": "/"
"Root": "/",
"UnarchiveConfirm": "¿Estás seguro de que deseas desarchivar la unidad?"
}
}
+2 -1
View File
@@ -27,6 +27,7 @@
"Rename": "Renommer",
"Restore": "Restaurer",
"RoleLabel": "Rôle",
"Root": "/"
"Root": "/",
"UnarchiveConfirm": "Êtes-vous sûr de vouloir désarchiver le disque?"
}
}
+2 -1
View File
@@ -27,6 +27,7 @@
"Rename": "Renomear",
"Restore": "Restaurar",
"RoleLabel": "Papel",
"Root": "/"
"Root": "/",
"UnarchiveConfirm": "Tem a certeza de que deseja desarquivar a unidade?"
}
}
+2 -1
View File
@@ -27,6 +27,7 @@
"Rename": "Переименовать",
"Restore": "Восстановить",
"RoleLabel": "Роль",
"Root": "/"
"Root": "/",
"UnarchiveConfirm": "Вы уверены, что хотите разархивировать диск?"
}
}
+2 -1
View File
@@ -27,6 +27,7 @@
"Rename": "重命名",
"Restore": "恢复",
"RoleLabel": "角色",
"Root": "/"
"Root": "/",
"UnarchiveConfirm": "您确定要取消存档磁盘吗?"
}
}