mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-03 08:57:14 +03:00
Remove watch action (#1619)
Signed-off-by: Dvinyanin Alexandr <dvinyanin.alexandr@gmail.com>
This commit is contained in:
parent
5c17a05c7a
commit
797e72332e
@ -416,19 +416,6 @@ export function createModel (builder: Builder): void {
|
|||||||
},
|
},
|
||||||
board.cardAction.MakeTemplate
|
board.cardAction.MakeTemplate
|
||||||
)
|
)
|
||||||
builder.createDoc(
|
|
||||||
board.class.CardAction,
|
|
||||||
core.space.Model,
|
|
||||||
{
|
|
||||||
icon: board.icon.Card,
|
|
||||||
isInline: false,
|
|
||||||
label: board.string.Watch,
|
|
||||||
position: 130,
|
|
||||||
type: board.cardActionType.Action,
|
|
||||||
component: board.component.WatchCard
|
|
||||||
},
|
|
||||||
board.cardAction.Watch
|
|
||||||
)
|
|
||||||
builder.createDoc(
|
builder.createDoc(
|
||||||
board.class.CardAction,
|
board.class.CardAction,
|
||||||
core.space.Model,
|
core.space.Model,
|
||||||
|
@ -33,8 +33,7 @@ export default mergeIds(boardId, board, {
|
|||||||
BoardPresenter: '' as AnyComponent,
|
BoardPresenter: '' as AnyComponent,
|
||||||
TemplatesIcon: '' as AnyComponent,
|
TemplatesIcon: '' as AnyComponent,
|
||||||
Cards: '' as AnyComponent,
|
Cards: '' as AnyComponent,
|
||||||
KanbanView: '' as AnyComponent,
|
KanbanView: '' as AnyComponent
|
||||||
WatchCard: '' as AnyComponent
|
|
||||||
},
|
},
|
||||||
space: {
|
space: {
|
||||||
DefaultBoard: '' as Ref<Space>
|
DefaultBoard: '' as Ref<Space>
|
||||||
|
@ -54,8 +54,6 @@
|
|||||||
"Move": "Move",
|
"Move": "Move",
|
||||||
"Copy": "Copy",
|
"Copy": "Copy",
|
||||||
"MakeTemplate": "Make Template",
|
"MakeTemplate": "Make Template",
|
||||||
"Watch": "Watch",
|
|
||||||
"Unwatch": "Unwatch",
|
|
||||||
"Archive": "Archive",
|
"Archive": "Archive",
|
||||||
"SendToBoard": "Send to board",
|
"SendToBoard": "Send to board",
|
||||||
"Delete": "Delete",
|
"Delete": "Delete",
|
||||||
|
@ -54,8 +54,6 @@
|
|||||||
"Move": "Переместить",
|
"Move": "Переместить",
|
||||||
"Copy": "Копировать",
|
"Copy": "Копировать",
|
||||||
"MakeTemplate": "Шаблон",
|
"MakeTemplate": "Шаблон",
|
||||||
"Watch": "Отслеживать",
|
|
||||||
"Unwatch": "Не отслеживать",
|
|
||||||
"Archive": "Архив",
|
"Archive": "Архив",
|
||||||
"SendToBoard": "Вернуть",
|
"SendToBoard": "Вернуть",
|
||||||
"Delete": "Удалить",
|
"Delete": "Удалить",
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
<script lang="ts">
|
|
||||||
import type { Card } from '@anticrm/board'
|
|
||||||
import { Button } from '@anticrm/ui'
|
|
||||||
import { NotificationClientImpl } from '@anticrm/notification-resources'
|
|
||||||
import board from '../plugin'
|
|
||||||
|
|
||||||
export let object: Card
|
|
||||||
|
|
||||||
const notificationClient = NotificationClientImpl.getClient()
|
|
||||||
const lastViews = notificationClient.getLastViews()
|
|
||||||
$: lastView = $lastViews.get(object._id)
|
|
||||||
$: subscribed = lastView !== undefined && lastView !== -1
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#if subscribed}
|
|
||||||
<Button
|
|
||||||
icon={board.icon.Card}
|
|
||||||
label={board.string.Unwatch}
|
|
||||||
kind={'no-border'}
|
|
||||||
justify="left"
|
|
||||||
on:click={() => {
|
|
||||||
notificationClient.unsubscribe(object._id)
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
{:else}
|
|
||||||
<Button
|
|
||||||
icon={board.icon.Card}
|
|
||||||
label={board.string.Watch}
|
|
||||||
kind={'no-border'}
|
|
||||||
justify="left"
|
|
||||||
on:click={() => {
|
|
||||||
notificationClient.updateLastView(object._id, object._class, undefined, true)
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
{/if}
|
|
@ -36,7 +36,6 @@ import DateRangePicker from './components/popups/DateRangePicker.svelte'
|
|||||||
import CardDatePresenter from './components/presenters/DatePresenter.svelte'
|
import CardDatePresenter from './components/presenters/DatePresenter.svelte'
|
||||||
import CardLabelPresenter from './components/presenters/LabelPresenter.svelte'
|
import CardLabelPresenter from './components/presenters/LabelPresenter.svelte'
|
||||||
import TemplatesIcon from './components/TemplatesIcon.svelte'
|
import TemplatesIcon from './components/TemplatesIcon.svelte'
|
||||||
import WatchCard from './components/WatchCard.svelte'
|
|
||||||
import BoardHeader from './components/BoardHeader.svelte'
|
import BoardHeader from './components/BoardHeader.svelte'
|
||||||
import BoardMenu from './components/BoardMenu.svelte'
|
import BoardMenu from './components/BoardMenu.svelte'
|
||||||
import MenuMainPage from './components/MenuMainPage.svelte'
|
import MenuMainPage from './components/MenuMainPage.svelte'
|
||||||
@ -106,7 +105,6 @@ export default async (): Promise<Resources> => ({
|
|||||||
TemplatesIcon,
|
TemplatesIcon,
|
||||||
KanbanView,
|
KanbanView,
|
||||||
BoardPresenter,
|
BoardPresenter,
|
||||||
WatchCard,
|
|
||||||
BoardHeader,
|
BoardHeader,
|
||||||
BoardMenu,
|
BoardMenu,
|
||||||
Archive,
|
Archive,
|
||||||
|
@ -75,8 +75,6 @@ export default mergeIds(boardId, board, {
|
|||||||
Move: '' as IntlString,
|
Move: '' as IntlString,
|
||||||
Copy: '' as IntlString,
|
Copy: '' as IntlString,
|
||||||
MakeTemplate: '' as IntlString,
|
MakeTemplate: '' as IntlString,
|
||||||
Watch: '' as IntlString,
|
|
||||||
Unwatch: '' as IntlString,
|
|
||||||
Archive: '' as IntlString,
|
Archive: '' as IntlString,
|
||||||
SendToBoard: '' as IntlString,
|
SendToBoard: '' as IntlString,
|
||||||
Delete: '' as IntlString,
|
Delete: '' as IntlString,
|
||||||
|
Loading…
Reference in New Issue
Block a user