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
|
||||
)
|
||||
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(
|
||||
board.class.CardAction,
|
||||
core.space.Model,
|
||||
|
@ -33,8 +33,7 @@ export default mergeIds(boardId, board, {
|
||||
BoardPresenter: '' as AnyComponent,
|
||||
TemplatesIcon: '' as AnyComponent,
|
||||
Cards: '' as AnyComponent,
|
||||
KanbanView: '' as AnyComponent,
|
||||
WatchCard: '' as AnyComponent
|
||||
KanbanView: '' as AnyComponent
|
||||
},
|
||||
space: {
|
||||
DefaultBoard: '' as Ref<Space>
|
||||
|
@ -54,8 +54,6 @@
|
||||
"Move": "Move",
|
||||
"Copy": "Copy",
|
||||
"MakeTemplate": "Make Template",
|
||||
"Watch": "Watch",
|
||||
"Unwatch": "Unwatch",
|
||||
"Archive": "Archive",
|
||||
"SendToBoard": "Send to board",
|
||||
"Delete": "Delete",
|
||||
|
@ -54,8 +54,6 @@
|
||||
"Move": "Переместить",
|
||||
"Copy": "Копировать",
|
||||
"MakeTemplate": "Шаблон",
|
||||
"Watch": "Отслеживать",
|
||||
"Unwatch": "Не отслеживать",
|
||||
"Archive": "Архив",
|
||||
"SendToBoard": "Вернуть",
|
||||
"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 CardLabelPresenter from './components/presenters/LabelPresenter.svelte'
|
||||
import TemplatesIcon from './components/TemplatesIcon.svelte'
|
||||
import WatchCard from './components/WatchCard.svelte'
|
||||
import BoardHeader from './components/BoardHeader.svelte'
|
||||
import BoardMenu from './components/BoardMenu.svelte'
|
||||
import MenuMainPage from './components/MenuMainPage.svelte'
|
||||
@ -106,7 +105,6 @@ export default async (): Promise<Resources> => ({
|
||||
TemplatesIcon,
|
||||
KanbanView,
|
||||
BoardPresenter,
|
||||
WatchCard,
|
||||
BoardHeader,
|
||||
BoardMenu,
|
||||
Archive,
|
||||
|
@ -75,8 +75,6 @@ export default mergeIds(boardId, board, {
|
||||
Move: '' as IntlString,
|
||||
Copy: '' as IntlString,
|
||||
MakeTemplate: '' as IntlString,
|
||||
Watch: '' as IntlString,
|
||||
Unwatch: '' as IntlString,
|
||||
Archive: '' as IntlString,
|
||||
SendToBoard: '' as IntlString,
|
||||
Delete: '' as IntlString,
|
||||
|
Loading…
Reference in New Issue
Block a user