diff --git a/models/board/src/index.ts b/models/board/src/index.ts index af26a01438..36054241d8 100644 --- a/models/board/src/index.ts +++ b/models/board/src/index.ts @@ -426,8 +426,8 @@ export function createModel (builder: Builder): void { key: 'isArchived', value: true, ask: true, - label: task.string.Archive, - message: task.string.ArchiveConfirm + label: view.string.Archive, + message: view.string.ArchiveConfirm }, query: { isArchived: { $nin: [true] } diff --git a/models/document/src/index.ts b/models/document/src/index.ts index 19a7ca1139..a3f167cc0e 100644 --- a/models/document/src/index.ts +++ b/models/document/src/index.ts @@ -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, type ViewAction } from '@hcengineering/model-view' +import view, { actionTemplates, createAction } from '@hcengineering/model-view' import workbench from '@hcengineering/model-workbench' import notification from '@hcengineering/notification' import { getEmbeddedLabel, type Asset } from '@hcengineering/platform' @@ -233,30 +233,6 @@ 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, { diff --git a/models/document/src/plugin.ts b/models/document/src/plugin.ts index f09f46de22..b300742654 100644 --- a/models/document/src/plugin.ts +++ b/models/document/src/plugin.ts @@ -64,7 +64,6 @@ export default mergeIds(documentId, document, { ConfigDescription: '' as IntlString, ParentDocument: '' as IntlString, ChildDocument: '' as IntlString, - LockedBy: '' as IntlString, - UnarchiveConfirm: '' as IntlString + LockedBy: '' as IntlString } }) diff --git a/models/drive/src/index.ts b/models/drive/src/index.ts index 6ed7b8cbdf..249da898a1 100644 --- a/models/drive/src/index.ts +++ b/models/drive/src/index.ts @@ -58,13 +58,7 @@ 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 ViewAction, - type Viewlet, - actionTemplates, - classPresenter, - createAction -} from '@hcengineering/model-view' +import view, { type Viewlet, actionTemplates, classPresenter, createAction } from '@hcengineering/model-view' import workbench from '@hcengineering/model-workbench' import { getEmbeddedLabel } from '@hcengineering/platform' @@ -285,30 +279,6 @@ 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, { diff --git a/models/drive/src/plugin.ts b/models/drive/src/plugin.ts index 2d5e2873fe..533cb025d5 100644 --- a/models/drive/src/plugin.ts +++ b/models/drive/src/plugin.ts @@ -103,7 +103,6 @@ export default mergeIds(driveId, drive, { Files: '' as IntlString, Folders: '' as IntlString, Version: '' as IntlString, - Restore: '' as IntlString, - UnarchiveConfirm: '' as IntlString + Restore: '' as IntlString } }) diff --git a/models/lead/src/index.ts b/models/lead/src/index.ts index 9067842452..2bb5bad1a0 100644 --- a/models/lead/src/index.ts +++ b/models/lead/src/index.ts @@ -157,9 +157,6 @@ export function createModel (builder: Builder): void { lead.viewlet.TableFunnel ) - createAction(builder, { ...actionTemplates.archiveSpace, target: lead.class.Funnel }) - createAction(builder, { ...actionTemplates.unarchiveSpace, target: lead.class.Funnel }) - createAction(builder, { ...viewTemplates.open, target: lead.class.Funnel, diff --git a/models/products/src/index.ts b/models/products/src/index.ts index 9695eb795b..92946b8c6f 100644 --- a/models/products/src/index.ts +++ b/models/products/src/index.ts @@ -45,7 +45,7 @@ import attachment from '@hcengineering/model-attachment' import core, { TType } from '@hcengineering/model-core' import presentation from '@hcengineering/model-presentation' import tracker from '@hcengineering/model-tracker' -import { type Action, type ViewAction } from '@hcengineering/view' +import { type Action } from '@hcengineering/view' import view, { createAction } from '@hcengineering/model-view' import workbench from '@hcengineering/model-workbench' import { getEmbeddedLabel, type Asset } from '@hcengineering/platform' @@ -239,30 +239,6 @@ function defineProduct (builder: Builder): void { builder.mixin(products.class.Product, core.class.Class, view.mixin.IgnoreActions, { actions: [tracker.action.NewRelatedIssue] }) - - createAction(builder, { - label: products.string.Unarchive, - icon: view.icon.Archive, - action: view.actionImpl.UpdateDocument as ViewAction, - actionProps: { - key: 'archived', - ask: true, - value: false, - label: products.string.Unarchive, - message: products.string.UnarchiveConfirm - }, - input: 'any', - category: view.category.General, - target: products.class.Product, - visibilityTester: view.function.CanArchiveSpace, - query: { - archived: true - }, - context: { - mode: ['context', 'browser'], - group: 'tools' - } - }) } function defineSpaceType (builder: Builder): void { diff --git a/models/recruit/src/index.ts b/models/recruit/src/index.ts index dda0c330f2..b1f588e624 100644 --- a/models/recruit/src/index.ts +++ b/models/recruit/src/index.ts @@ -1067,9 +1067,6 @@ export function createModel (builder: Builder): void { recruit.completion.VacancyCategory ) - createAction(builder, { ...actionTemplates.archiveSpace, target: recruit.class.Vacancy }) - createAction(builder, { ...actionTemplates.unarchiveSpace, target: recruit.class.Vacancy }) - createAction(builder, { label: view.string.Open, icon: view.icon.Open, diff --git a/models/task/src/index.ts b/models/task/src/index.ts index e79272645e..0e4a37c7c2 100644 --- a/models/task/src/index.ts +++ b/models/task/src/index.ts @@ -79,7 +79,6 @@ import { } from '@hcengineering/task' import type { AnyComponent } from '@hcengineering/ui' import { PaletteColorIndexes } from '@hcengineering/ui/src/colors' -import { type ViewAction } from '@hcengineering/view' import { createPublicLinkAction } from '@hcengineering/model-guest' import task from './plugin' @@ -254,51 +253,6 @@ export const actionTemplates = template({ action: task.actionImpl.EditStatuses, input: 'focus', category: task.category.Task - }, - archiveSpace: { - label: task.string.Archive, - icon: view.icon.Archive, - action: view.actionImpl.UpdateDocument as ViewAction, - actionProps: { - key: 'archived', - value: true, - ask: true, - label: task.string.Archive, - message: task.string.ArchiveConfirm - }, - visibilityTester: view.function.CanArchiveSpace, - input: 'any', - category: task.category.Task, - query: { - archived: false - }, - context: { - mode: ['context', 'browser'], - group: 'tools' - }, - override: [view.action.Archive, view.action.Delete] - }, - unarchiveSpace: { - label: task.string.Unarchive, - icon: view.icon.Archive, - action: view.actionImpl.UpdateDocument as ViewAction, - actionProps: { - key: 'archived', - ask: true, - value: false, - label: task.string.Unarchive, - message: task.string.UnarchiveConfirm - }, - visibilityTester: view.function.CanArchiveSpace, - input: 'any', - category: task.category.Task, - query: { - archived: true - }, - context: { - mode: ['context', 'browser'], - group: 'tools' - } } }) diff --git a/models/task/src/plugin.ts b/models/task/src/plugin.ts index 8279487599..94f863de8e 100644 --- a/models/task/src/plugin.ts +++ b/models/task/src/plugin.ts @@ -26,16 +26,12 @@ import type { Action, ActionCategory, ViewAction, Viewlet } from '@hcengineering export default mergeIds(taskId, task, { action: { EditStatuses: '' as Ref, - ArchiveSpace: '' as Ref, - UnarchiveSpace: '' as Ref, ArchiveState: '' as Ref, PublicLink: '' as Ref>, ExportTasks: '' as Ref }, actionImpl: { EditStatuses: '' as ViewAction, - ArchiveSpace: '' as ViewAction, - UnarchiveSpace: '' as ViewAction, SelectStatus: '' as ViewAction, ExportTasks: '' as ViewAction }, diff --git a/models/tracker/src/actions.ts b/models/tracker/src/actions.ts index 36fd026112..783895f8c5 100644 --- a/models/tracker/src/actions.ts +++ b/models/tracker/src/actions.ts @@ -21,7 +21,7 @@ import view, { actionTemplates, createAction } from '@hcengineering/model-view' import workbench, { createNavigateAction } from '@hcengineering/model-workbench' import { type IntlString } from '@hcengineering/platform' import { TrackerEvents, trackerId } from '@hcengineering/tracker' -import { type KeyBinding, type ViewAction } from '@hcengineering/view' +import { type KeyBinding } from '@hcengineering/view' import tracker from './plugin' import tags from '@hcengineering/tags' @@ -151,29 +151,6 @@ export function createActions (builder: Builder, issuesId: string, componentsId: }, tracker.action.DeleteProjectClean ) - createAction(builder, { - label: tracker.string.Unarchive, - icon: view.icon.Archive, - action: view.actionImpl.UpdateDocument as ViewAction, - actionProps: { - key: 'archived', - ask: true, - value: false, - label: tracker.string.Unarchive, - message: tracker.string.UnarchiveConfirm - }, - input: 'any', - category: tracker.category.Tracker, - visibilityTester: view.function.CanArchiveSpace, - query: { - archived: true - }, - context: { - mode: ['context', 'browser'], - group: 'tools' - }, - target: tracker.class.Project - }) createAction( builder, diff --git a/models/tracker/src/plugin.ts b/models/tracker/src/plugin.ts index 663b70c190..e7449c1113 100644 --- a/models/tracker/src/plugin.ts +++ b/models/tracker/src/plugin.ts @@ -40,8 +40,6 @@ export default mergeIds(trackerId, tracker, { CreatedDate: '' as IntlString, ChangeStatus: '' as IntlString, ConfigDescription: '' as IntlString, - Unarchive: '' as IntlString, - UnarchiveConfirm: '' as IntlString, AllProjects: '' as IntlString, MapRelatedIssues: '' as IntlString, Extensions: '' as IntlString diff --git a/models/view/src/index.ts b/models/view/src/index.ts index e033ee20bd..f77d6bff86 100644 --- a/models/view/src/index.ts +++ b/models/view/src/index.ts @@ -690,6 +690,24 @@ export function createModel (builder: Builder): void { view.action.Archive ) + createAction( + builder, + { + action: view.actionImpl.UnArchive, + label: view.string.UnArchive, + icon: view.icon.Archive, + category: view.category.General, + input: 'any', + query: { + archived: true + }, + target: core.class.Space, + visibilityTester: view.function.CanArchiveSpace, + context: { mode: ['context', 'browser'], group: 'tools' } + }, + view.action.UnArchive + ) + createAction( builder, { diff --git a/models/view/src/plugin.ts b/models/view/src/plugin.ts index c636de7e02..2978ee19b8 100644 --- a/models/view/src/plugin.ts +++ b/models/view/src/plugin.ts @@ -24,6 +24,7 @@ import view from '@hcengineering/view-resources/src/plugin' export default mergeIds(viewId, view, { actionImpl: { Archive: '' as ViewAction, + UnArchive: '' as ViewAction, Join: '' as ViewAction, Leave: '' as ViewAction, Move: '' as ViewAction, diff --git a/plugins/document-assets/lang/en.json b/plugins/document-assets/lang/en.json index 0e2b8e0413..76c77d4a14 100644 --- a/plugins/document-assets/lang/en.json +++ b/plugins/document-assets/lang/en.json @@ -58,7 +58,6 @@ "Icon": "Icon", "Color": "Color", "RoleLabel": "Role: {role}", - "Embeddings": "Embeddings", - "UnarchiveConfirm": "Do you want to unarchive teamspace?" + "Embeddings": "Embeddings" } } \ No newline at end of file diff --git a/plugins/document-assets/lang/es.json b/plugins/document-assets/lang/es.json index df1b1e855b..5564f90024 100644 --- a/plugins/document-assets/lang/es.json +++ b/plugins/document-assets/lang/es.json @@ -51,7 +51,6 @@ "Icon": "Icono", "Color": "Color", "RoleLabel": "Role: {role}", - "Embeddings": "Incrustaciones", - "UnarchiveConfirm": "¿Quieres desarchivar el trabajo?" + "Embeddings": "Incrustaciones" } } \ No newline at end of file diff --git a/plugins/document-assets/lang/fr.json b/plugins/document-assets/lang/fr.json index 929b6f6067..49badd7dbf 100644 --- a/plugins/document-assets/lang/fr.json +++ b/plugins/document-assets/lang/fr.json @@ -51,7 +51,6 @@ "Icon": "Icône", "Color": "Couleur", "RoleLabel": "Rôle : {role}", - "Embeddings": "Intégrations", - "UnarchiveConfirm": "Voulez-vous désarchiver le l'espace d'équipe ?" + "Embeddings": "Intégrations" } } \ No newline at end of file diff --git a/plugins/document-assets/lang/pt.json b/plugins/document-assets/lang/pt.json index 6e287e3e76..eb96844d02 100644 --- a/plugins/document-assets/lang/pt.json +++ b/plugins/document-assets/lang/pt.json @@ -51,7 +51,6 @@ "Icon": "Ícone", "Color": "Cor", "RoleLabel": "Papel: {role}", - "Embeddings": "Incorporações", - "UnarchiveConfirm": "Você deseja desarquivar o trabalho?" + "Embeddings": "Incorporações" } } \ No newline at end of file diff --git a/plugins/document-assets/lang/ru.json b/plugins/document-assets/lang/ru.json index b199cba30e..f3c71698e0 100644 --- a/plugins/document-assets/lang/ru.json +++ b/plugins/document-assets/lang/ru.json @@ -58,7 +58,6 @@ "Icon": "Иконка", "Color": "Цвет", "RoleLabel": "Роль: {role}", - "Embeddings": "Вложения", - "UnarchiveConfirm": "Вы уверены, что хотите разархивировать пространство?" + "Embeddings": "Вложения" } } \ No newline at end of file diff --git a/plugins/document-assets/lang/zh.json b/plugins/document-assets/lang/zh.json index ccefd569c4..6868575a08 100644 --- a/plugins/document-assets/lang/zh.json +++ b/plugins/document-assets/lang/zh.json @@ -62,7 +62,6 @@ "Icon": "图标", "Color": "颜色", "RoleLabel": "角色:{role}", - "Embeddings": "嵌入", - "UnarchiveConfirm": "您确定要取消存档吗?" + "Embeddings": "嵌入" } } diff --git a/plugins/drive-assets/lang/en.json b/plugins/drive-assets/lang/en.json index 25c79994d0..917295a9c3 100644 --- a/plugins/drive-assets/lang/en.json +++ b/plugins/drive-assets/lang/en.json @@ -27,7 +27,6 @@ "Rename": "Rename", "Restore": "Restore", "RoleLabel": "Role", - "Root": "/", - "UnarchiveConfirm": "Are you sure you want to unarchive the drive?" + "Root": "/" } } diff --git a/plugins/drive-assets/lang/es.json b/plugins/drive-assets/lang/es.json index 17873b4daf..c93bd5a2f8 100644 --- a/plugins/drive-assets/lang/es.json +++ b/plugins/drive-assets/lang/es.json @@ -27,7 +27,6 @@ "Rename": "Renombrar", "Restore": "Restaurar", "RoleLabel": "Rol", - "Root": "/", - "UnarchiveConfirm": "¿Estás seguro de que deseas desarchivar la unidad?" + "Root": "/" } } \ No newline at end of file diff --git a/plugins/drive-assets/lang/fr.json b/plugins/drive-assets/lang/fr.json index 6012992cf4..4b1a26856d 100644 --- a/plugins/drive-assets/lang/fr.json +++ b/plugins/drive-assets/lang/fr.json @@ -27,7 +27,6 @@ "Rename": "Renommer", "Restore": "Restaurer", "RoleLabel": "Rôle", - "Root": "/", - "UnarchiveConfirm": "Êtes-vous sûr de vouloir désarchiver le disque?" + "Root": "/" } } \ No newline at end of file diff --git a/plugins/drive-assets/lang/pt.json b/plugins/drive-assets/lang/pt.json index 4755fcec3f..0a2039008e 100644 --- a/plugins/drive-assets/lang/pt.json +++ b/plugins/drive-assets/lang/pt.json @@ -27,7 +27,6 @@ "Rename": "Renomear", "Restore": "Restaurar", "RoleLabel": "Papel", - "Root": "/", - "UnarchiveConfirm": "Tem a certeza de que deseja desarquivar a unidade?" + "Root": "/" } } \ No newline at end of file diff --git a/plugins/drive-assets/lang/ru.json b/plugins/drive-assets/lang/ru.json index 9c4c846a2a..5faa793790 100644 --- a/plugins/drive-assets/lang/ru.json +++ b/plugins/drive-assets/lang/ru.json @@ -27,7 +27,6 @@ "Rename": "Переименовать", "Restore": "Восстановить", "RoleLabel": "Роль", - "Root": "/", - "UnarchiveConfirm": "Вы уверены, что хотите разархивировать диск?" + "Root": "/" } } diff --git a/plugins/drive-assets/lang/zh.json b/plugins/drive-assets/lang/zh.json index a9400d352b..6309c7cd7a 100644 --- a/plugins/drive-assets/lang/zh.json +++ b/plugins/drive-assets/lang/zh.json @@ -27,7 +27,6 @@ "Rename": "重命名", "Restore": "恢复", "RoleLabel": "角色", - "Root": "/", - "UnarchiveConfirm": "您确定要取消存档磁盘吗?" + "Root": "/" } } diff --git a/plugins/products-assets/lang/en.json b/plugins/products-assets/lang/en.json index b6b6f151be..ae990adaf7 100644 --- a/plugins/products-assets/lang/en.json +++ b/plugins/products-assets/lang/en.json @@ -15,8 +15,6 @@ "CreateProductVersion": "Create product version", "NoProductVersionParent": "No parent version", "NoProductVersions": "No product versions", - "Unarchive": "Unarchive", - "UnarchiveConfirm": "Do you want to unarchive product?", "CreateDialogClose": "Do you want to close this dialog?", "CreateDialogCloseNote": "All changes will be lost", "Description": "Description", diff --git a/plugins/products-assets/lang/fr.json b/plugins/products-assets/lang/fr.json index 1ed9613445..82268c1113 100644 --- a/plugins/products-assets/lang/fr.json +++ b/plugins/products-assets/lang/fr.json @@ -15,8 +15,6 @@ "CreateProductVersion": "Créer une version de produit", "NoProductVersionParent": "Aucune version parente", "NoProductVersions": "Aucune version de produit", - "Unarchive": "Désarchiver", - "UnarchiveConfirm": "Voulez-vous désarchiver le produit ?", "CreateDialogClose": "Voulez-vous fermer cette fenêtre ?", "CreateDialogCloseNote": "Tous les changements seront perdus", "Description": "Description", diff --git a/plugins/products-assets/lang/ru.json b/plugins/products-assets/lang/ru.json index 786ab0bb26..886fd64b66 100644 --- a/plugins/products-assets/lang/ru.json +++ b/plugins/products-assets/lang/ru.json @@ -15,8 +15,6 @@ "CreateProductVersion": "Создать версию продукта", "NoProductVersionParent": "Нет родительской версии", "NoProductVersions": "Нет версий продукта", - "Unarchive": "Разархивировать", - "UnarchiveConfirm": "Вы действительно хотите разархивировать продукт?", "CreateDialogClose": "Вы действительно хотите закрыть окно?", "CreateDialogCloseNote": "Все внесенные изменения будут потеряны", "Description": "Описание", diff --git a/plugins/products-assets/lang/zh.json b/plugins/products-assets/lang/zh.json index 2404526538..13feab4b08 100644 --- a/plugins/products-assets/lang/zh.json +++ b/plugins/products-assets/lang/zh.json @@ -15,8 +15,6 @@ "CreateProductVersion": "创建产品版本", "NoProductVersionParent": "无父版本", "NoProductVersions": "无产品版本", - "Unarchive": "取消归档", - "UnarchiveConfirm": "您要取消归档产品吗?", "CreateDialogClose": "您要关闭此对话框吗?", "CreateDialogCloseNote": "所有更改将会丢失", "Description": "描述", diff --git a/plugins/products-resources/src/plugin.ts b/plugins/products-resources/src/plugin.ts index 5fbb1e6fa3..285cd9ae10 100644 --- a/plugins/products-resources/src/plugin.ts +++ b/plugins/products-resources/src/plugin.ts @@ -48,8 +48,6 @@ export default mergeIds(productsId, products, { CreateProductVersion: '' as IntlString, NoProductVersionParent: '' as IntlString, NoProductVersions: '' as IntlString, - Unarchive: '' as IntlString, - UnarchiveConfirm: '' as IntlString, CreateDialogClose: '' as IntlString, CreateDialogCloseNote: '' as IntlString, Description: '' as IntlString, diff --git a/plugins/task-assets/lang/en.json b/plugins/task-assets/lang/en.json index 066596b8d3..3c9edeb61c 100644 --- a/plugins/task-assets/lang/en.json +++ b/plugins/task-assets/lang/en.json @@ -26,8 +26,6 @@ "Rank": "Rank", "TaskCreateLabel": "Task", "EditStates": "Edit states", - "Archive": "Archive", - "Unarchive": "Unarchive", "MarkAsDone": "Mark as done", "MarkAsUndone": "Mark as undone", "Kanban": "Kanban", @@ -64,8 +62,6 @@ "States": "States", "NoDoneState": "Not done", "ManageStatusesWithin": "Manage application statuses within", - "UnarchiveConfirm": "Do you want to unarchive?", - "ArchiveConfirm": "Do you want to archive?", "StatusDelete": "Delete status", "StatusDeleteConfirm": "Do you want to delete this status?", "CantStatusDelete": "Can't delete status", diff --git a/plugins/task-assets/lang/es.json b/plugins/task-assets/lang/es.json index 913edb49e3..e6882e11be 100644 --- a/plugins/task-assets/lang/es.json +++ b/plugins/task-assets/lang/es.json @@ -26,8 +26,6 @@ "Rank": "Orden", "TaskCreateLabel": "Tarea", "EditStates": "Editar estados", - "Archive": "Archivar", - "Unarchive": "Desarchivar", "MarkAsDone": "Marcar como hecho", "MarkAsUndone": "Marcar como pendiente", "Kanban": "Kanban", @@ -64,8 +62,6 @@ "States": "Estados", "NoDoneState": "No hecho", "ManageStatusesWithin": "Gestionar estados de la aplicación en", - "UnarchiveConfirm": "¿Desea desarchivar?", - "ArchiveConfirm": "¿Desea archivar?", "StatusDelete": "Eliminar estado", "StatusDeleteConfirm": "¿Desea eliminar este estado?", "CantStatusDelete": "No se puede eliminar el estado", diff --git a/plugins/task-assets/lang/fr.json b/plugins/task-assets/lang/fr.json index 509a7d22de..252a7592b9 100644 --- a/plugins/task-assets/lang/fr.json +++ b/plugins/task-assets/lang/fr.json @@ -26,8 +26,6 @@ "Rank": "Rang", "TaskCreateLabel": "Tâche", "EditStates": "Modifier les états", - "Archive": "Archiver", - "Unarchive": "Désarchiver", "MarkAsDone": "Marquer comme terminé", "MarkAsUndone": "Marquer comme non terminé", "Kanban": "Kanban", @@ -64,8 +62,6 @@ "States": "États", "NoDoneState": "Non terminé", "ManageStatusesWithin": "Gérer les statuts de l'application dans", - "UnarchiveConfirm": "Voulez-vous désarchiver ?", - "ArchiveConfirm": "Voulez-vous archiver ?", "StatusDelete": "Supprimer le statut", "StatusDeleteConfirm": "Voulez-vous supprimer ce statut ?", "CantStatusDelete": "Impossible de supprimer le statut", diff --git a/plugins/task-assets/lang/pt.json b/plugins/task-assets/lang/pt.json index bc4ad2a48a..1ac9e125d2 100644 --- a/plugins/task-assets/lang/pt.json +++ b/plugins/task-assets/lang/pt.json @@ -26,8 +26,6 @@ "Rank": "Classificação", "TaskCreateLabel": "Tarefa", "EditStates": "Editar estados", - "Archive": "Arquivar", - "Unarchive": "Desarquivar", "MarkAsDone": "Marcar como feito", "MarkAsUndone": "Marcar como não feito", "Kanban": "Kanban", @@ -64,8 +62,6 @@ "States": "Estados", "NoDoneState": "Não feito", "ManageStatusesWithin": "Gerenciar estados da aplicação dentro de", - "UnarchiveConfirm": "Deseja desarquivar?", - "ArchiveConfirm": "Deseja arquivar?", "StatusDelete": "Eliminar estado", "StatusDeleteConfirm": "Deseja eliminar este estado?", "CantStatusDelete": "Não é possível eliminar o estado", diff --git a/plugins/task-assets/lang/ru.json b/plugins/task-assets/lang/ru.json index 20cc5f1242..efc1a498a4 100644 --- a/plugins/task-assets/lang/ru.json +++ b/plugins/task-assets/lang/ru.json @@ -26,8 +26,6 @@ "Rank": "Ранк", "TaskCreateLabel": "Задача", "EditStates": "Редактировать статусы", - "Archive": "Архивировать", - "Unarchive": "Разархивировать", "MarkAsDone": "Отметить выполненным", "MarkAsUndone": "Отметить невыполненным", "Kanban": "Канбан", @@ -64,8 +62,6 @@ "States": "Статусы", "NoDoneState": "Не завершено", "ManageStatusesWithin": "Управление статусами для", - "UnarchiveConfirm": "Вы действительно хотите разархивировать?", - "ArchiveConfirm": "Вы действительно хотите архивировать?", "StatusDelete": "Удалить статус", "StatusDeleteConfirm": "Вы действительно хотите удалить этот статус?", "CantStatusDelete": "Невозможно удалить статус", diff --git a/plugins/task-assets/lang/zh.json b/plugins/task-assets/lang/zh.json index f6628c1b1a..a568c921dc 100644 --- a/plugins/task-assets/lang/zh.json +++ b/plugins/task-assets/lang/zh.json @@ -26,8 +26,6 @@ "Rank": "排名", "TaskCreateLabel": "任务", "EditStates": "编辑状态", - "Archive": "归档", - "Unarchive": "取消归档", "MarkAsDone": "标记为完成", "MarkAsUndone": "标记为未完成", "Kanban": "看板", @@ -64,8 +62,6 @@ "States": "状态", "NoDoneState": "未完成", "ManageStatusesWithin": "管理应用状态", - "UnarchiveConfirm": "您确定要取消归档吗?", - "ArchiveConfirm": "您确定要归档吗?", "StatusDelete": "删除状态", "StatusDeleteConfirm": "您确定要删除此状态吗?", "CantStatusDelete": "无法删除状态", diff --git a/plugins/task-resources/src/plugin.ts b/plugins/task-resources/src/plugin.ts index 39c2286b4d..a27714a92d 100644 --- a/plugins/task-resources/src/plugin.ts +++ b/plugins/task-resources/src/plugin.ts @@ -58,14 +58,10 @@ export default mergeIds(taskId, task, { AllStates: '' as IntlString, NoDoneState: '' as IntlString, ManageStatusesWithin: '' as IntlString, - ArchiveConfirm: '' as IntlString, - UnarchiveConfirm: '' as IntlString, StatusDeleteConfirm: '' as IntlString, StatusDelete: '' as IntlString, CantStatusDelete: '' as IntlString, CantStatusDeleteError: '' as IntlString, - Archive: '' as IntlString, - Unarchive: '' as IntlString, Tasks: '' as IntlString, Task: '' as IntlString, diff --git a/plugins/tracker-assets/lang/en.json b/plugins/tracker-assets/lang/en.json index fc09fd1740..e8d7acf004 100644 --- a/plugins/tracker-assets/lang/en.json +++ b/plugins/tracker-assets/lang/en.json @@ -273,8 +273,6 @@ "NoStatusFound": "No matching status found", "CreateMissingStatus": "Create missing status", "UnsetParent": "Parent issue will be unset", - "Unarchive": "Unarchive", - "UnarchiveConfirm": "Do you want to unarchive project?", "AllProjects": "All projects", "IssueNotificationTitle": "{issueTitle}", "IssueNotificationBody": "Updated by {senderName}", diff --git a/plugins/tracker-assets/lang/es.json b/plugins/tracker-assets/lang/es.json index a743c97522..0b6509b8a4 100644 --- a/plugins/tracker-assets/lang/es.json +++ b/plugins/tracker-assets/lang/es.json @@ -256,8 +256,6 @@ "NoStatusFound": "No se encontró ningún estado coincidente", "CreateMissingStatus": "Crear estado faltante", "UnsetParent": "El problema padre será desmarcado", - "Unarchive": "Desarchivar", - "UnarchiveConfirm": "¿Desea desarchivar el proyecto?", "AllProjects": "Todos los proyectos", "IssueNotificationTitle": "{issueTitle}", "IssueNotificationBody": "Actualizado por {senderName}", diff --git a/plugins/tracker-assets/lang/fr.json b/plugins/tracker-assets/lang/fr.json index f353c97657..f054c920d8 100644 --- a/plugins/tracker-assets/lang/fr.json +++ b/plugins/tracker-assets/lang/fr.json @@ -256,8 +256,6 @@ "NoStatusFound": "Aucun statut correspondant trouvé", "CreateMissingStatus": "Créer un statut manquant", "UnsetParent": "Le problème parent sera désélectionné", - "Unarchive": "Désarchiver", - "UnarchiveConfirm": "Voulez-vous désarchiver le projet ?", "AllProjects": "Tous les projets", "IssueNotificationTitle": "{issueTitle}", "IssueNotificationBody": "Mis à jour par {senderName}", diff --git a/plugins/tracker-assets/lang/pt.json b/plugins/tracker-assets/lang/pt.json index b5972deebb..7e10016d50 100644 --- a/plugins/tracker-assets/lang/pt.json +++ b/plugins/tracker-assets/lang/pt.json @@ -256,8 +256,6 @@ "NoStatusFound": "Nenhum estado correspondente encontrado", "CreateMissingStatus": "Criar estado em falta", "UnsetParent": "O problema pai será desassociado", - "Unarchive": "Desarquivar", - "UnarchiveConfirm": "Deseja desarquivar o projeto?", "AllProjects": "Todos os projetos", "IssueNotificationTitle": "{issueTitle}", "IssueNotificationBody": "Atualizado por {senderName}", diff --git a/plugins/tracker-assets/lang/ru.json b/plugins/tracker-assets/lang/ru.json index 055acc401d..5876d36abb 100644 --- a/plugins/tracker-assets/lang/ru.json +++ b/plugins/tracker-assets/lang/ru.json @@ -273,8 +273,6 @@ "NoStatusFound": "Статус не найдет", "CreateMissingStatus": "Создать отсутствующий статус", "UnsetParent": "Родительская задача будет убрана", - "Unarchive": "Разархивировать", - "UnarchiveConfirm": "Вы действительно хотите разархивировать?", "AllProjects": "All projects", "IssueNotificationTitle": "{issueTitle}", "IssueNotificationBody": "Обновлено {senderName}", diff --git a/plugins/tracker-assets/lang/zh.json b/plugins/tracker-assets/lang/zh.json index facd8bc13c..fddbf0ceb8 100644 --- a/plugins/tracker-assets/lang/zh.json +++ b/plugins/tracker-assets/lang/zh.json @@ -273,8 +273,6 @@ "NoStatusFound": "未找到匹配的状态", "CreateMissingStatus": "创建缺失的状态", "UnsetParent": "父问题将被取消设置", - "Unarchive": "取消归档", - "UnarchiveConfirm": "您想要取消归档项目吗?", "AllProjects": "所有项目", "IssueNotificationTitle": "{issueTitle}", "IssueNotificationBody": "由 {senderName} 更新", diff --git a/plugins/view-assets/lang/en.json b/plugins/view-assets/lang/en.json index bf93bf6978..ba1013178b 100644 --- a/plugins/view-assets/lang/en.json +++ b/plugins/view-assets/lang/en.json @@ -118,6 +118,7 @@ "Type": "Type", "ToViewCommands": "to view available commands", "UnArchive": "Unarchive", + "UnArchiveConfirm": "Do you want to unarchive this {count, plural, =1 {object} other {# objects}}?", "Pin": "Pin", "Unpin": "Unpin", "Archived": "Archived", diff --git a/plugins/view-assets/lang/es.json b/plugins/view-assets/lang/es.json index 622c07284f..57288a9388 100644 --- a/plugins/view-assets/lang/es.json +++ b/plugins/view-assets/lang/es.json @@ -113,6 +113,7 @@ "Type": "Tipo", "ToViewCommands": "para ver los comandos disponibles", "UnArchive": "Desarchivar", + "UnArchiveConfirm": "¿Desea desarchivar {count, plural, =1 {este objeto} other {# objetos}}?", "Pin": "Fijar", "Unpin": "Desfijar", "Archived": "Archivado", diff --git a/plugins/view-assets/lang/fr.json b/plugins/view-assets/lang/fr.json index 817551af35..031ab57189 100644 --- a/plugins/view-assets/lang/fr.json +++ b/plugins/view-assets/lang/fr.json @@ -113,6 +113,7 @@ "Type": "Type", "ToViewCommands": "pour voir les commandes disponibles", "UnArchive": "Désarchiver", + "UnArchiveConfirm": "Voulez-vous désarchiver {count, plural, =1 {cet objet} other {# objets}} ?", "Pin": "Épingler", "Unpin": "Détacher", "Archived": "Archivé", diff --git a/plugins/view-assets/lang/pt.json b/plugins/view-assets/lang/pt.json index 572cbc629c..8c009a19d3 100644 --- a/plugins/view-assets/lang/pt.json +++ b/plugins/view-assets/lang/pt.json @@ -113,6 +113,7 @@ "Type": "Tipo", "ToViewCommands": "para ver os comandos disponíveis", "UnArchive": "Desarquivar", + "UnArchiveConfirm": "Deseja desarquivar {count, plural, =1 {este objecto} other {estes # objectos}}?", "Pin": "Fixar", "Unpin": "Desafixar", "Archived": "Arquivado", diff --git a/plugins/view-assets/lang/ru.json b/plugins/view-assets/lang/ru.json index ccbf7ea272..d2c3f54823 100644 --- a/plugins/view-assets/lang/ru.json +++ b/plugins/view-assets/lang/ru.json @@ -115,6 +115,7 @@ "Type": "Введите", "ToViewCommands": "чтобы увидеть команды", "UnArchive": "Разархивировать", + "UnArchiveConfirm": "Вы действительно хотите разархивировать {count, plural, =1 {этот объект} one {этот # объект} few {эти # объекта} other {эти # объектов}}?", "Pin": "Закрепить", "Unpin": "Открепить", "Archived": "Архивированные", diff --git a/plugins/view-assets/lang/zh.json b/plugins/view-assets/lang/zh.json index c9631e28d9..34e738e854 100644 --- a/plugins/view-assets/lang/zh.json +++ b/plugins/view-assets/lang/zh.json @@ -118,6 +118,7 @@ "Type": "类型", "ToViewCommands": "查看可用命令", "UnArchive": "取消归档", + "UnArchiveConfirm": "您想要取消归档这个 {count, plural, =1 {对象} other {# 个对象}} 吗?", "Pin": "固定", "Unpin": "取消固定", "Archived": "已归档", diff --git a/plugins/view-resources/src/actionImpl.ts b/plugins/view-resources/src/actionImpl.ts index ed3197a437..b4d8304553 100644 --- a/plugins/view-resources/src/actionImpl.ts +++ b/plugins/view-resources/src/actionImpl.ts @@ -128,6 +128,27 @@ function Archive (object: Space | Space[]): void { ) } +function UnArchive (object: Space | Space[]): void { + showPopup( + MessageBox, + { + label: view.string.UnArchive, + message: view.string.UnArchiveConfirm, + params: { count: Array.isArray(object) ? object.length : 1 }, + action: async () => { + const objs = Array.isArray(object) ? object : [object] + const client = getClient() + const promises: Array> = [] + for (const obj of objs) { + promises.push(client.update(obj, { archived: false })) + } + await Promise.all(promises) + } + }, + undefined + ) +} + async function Leave (object: Space | Space[]): Promise { const client = getClient() const promises: Array> = [] @@ -564,6 +585,7 @@ export const actionImpl = { CopyTextToClipboard, Delete, Archive, + UnArchive, Join, Leave, Move, diff --git a/plugins/view-resources/src/plugin.ts b/plugins/view-resources/src/plugin.ts index 292131de8d..e3096d7759 100644 --- a/plugins/view-resources/src/plugin.ts +++ b/plugins/view-resources/src/plugin.ts @@ -44,6 +44,7 @@ export default mergeIds(viewId, view, { DeletePopupCreatorLabel: '' as IntlString, DeletePopupOwnerLabel: '' as IntlString, ArchiveConfirm: '' as IntlString, + UnArchiveConfirm: '' as IntlString, Assignees: '' as IntlString, Labels: '' as IntlString, ActionPlaceholder: '' as IntlString, diff --git a/plugins/view/src/index.ts b/plugins/view/src/index.ts index df90297256..42f9113524 100644 --- a/plugins/view/src/index.ts +++ b/plugins/view/src/index.ts @@ -126,6 +126,7 @@ const view = plugin(viewId, { action: { Delete: '' as Ref, Archive: '' as Ref, + UnArchive: '' as Ref, Join: '' as Ref, Leave: '' as Ref, Move: '' as Ref,