mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 11:31:57 +03:00
Removable shared messages (#2559)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
017e1cc1d7
commit
3ba2958b20
@ -157,7 +157,9 @@ export function createModel (builder: Builder): void {
|
||||
txClass: core.class.TxCreateDoc,
|
||||
component: gmail.activity.TxSharedCreate,
|
||||
label: gmail.string.SharedMessages,
|
||||
display: 'content'
|
||||
display: 'content',
|
||||
editable: true,
|
||||
hideOnRemove: true
|
||||
},
|
||||
gmail.ids.TxSharedCreate
|
||||
)
|
||||
|
@ -123,7 +123,9 @@ export function createModel (builder: Builder): void {
|
||||
txClass: core.class.TxCreateDoc,
|
||||
component: telegram.activity.TxSharedCreate,
|
||||
label: telegram.string.SharedMessages,
|
||||
display: 'content'
|
||||
display: 'content',
|
||||
editable: true,
|
||||
hideOnRemove: true
|
||||
},
|
||||
telegram.ids.TxSharedCreate
|
||||
)
|
||||
|
@ -121,28 +121,26 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if enabled}
|
||||
<div class="popupPanel-body__main-header bottom-divider p-2">
|
||||
<div class="popupPanel-body__main-header bottom-divider p-2">
|
||||
<div class="flex-between">
|
||||
{#if selectable}
|
||||
<div class="flex-between">
|
||||
<span><b>{selected.size}</b> <Label label={gmail.string.MessagesSelected} /></span>
|
||||
<div class="flex">
|
||||
<div>
|
||||
<Button label={gmail.string.Cancel} size={'small'} on:click={clear} />
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<Button
|
||||
label={gmail.string.PublishSelected}
|
||||
size={'small'}
|
||||
kind={'primary'}
|
||||
disabled={!selected.size}
|
||||
on:click={share}
|
||||
/>
|
||||
</div>
|
||||
<span><b>{selected.size}</b> <Label label={gmail.string.MessagesSelected} /></span>
|
||||
<div class="flex">
|
||||
<div>
|
||||
<Button label={gmail.string.Cancel} size={'small'} on:click={clear} />
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<Button
|
||||
label={gmail.string.PublishSelected}
|
||||
size={'small'}
|
||||
kind={'primary'}
|
||||
disabled={!selected.size}
|
||||
on:click={share}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="flex-between">
|
||||
{#if enabled}
|
||||
<Button
|
||||
label={gmail.string.CreateMessage}
|
||||
size={'small'}
|
||||
@ -151,18 +149,18 @@
|
||||
newMessage = true
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
icon={IconShare}
|
||||
kind={'transparent'}
|
||||
showTooltip={{ label: gmail.string.ShareMessages }}
|
||||
on:click={async () => {
|
||||
selectable = !selectable
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
<Button
|
||||
icon={IconShare}
|
||||
kind={'transparent'}
|
||||
showTooltip={{ label: gmail.string.ShareMessages }}
|
||||
on:click={async () => {
|
||||
selectable = !selectable
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<Scroller>
|
||||
<div class="popupPanel-body__main-content py-4 clear-mins flex-no-shrink">
|
||||
{#if messages && messages.length > 0}
|
||||
|
@ -224,17 +224,16 @@
|
||||
showPopup(Reconnect, {}, eventToHTMLElement(e), onReconnect)
|
||||
}}
|
||||
/>
|
||||
{:else}
|
||||
<Button
|
||||
icon={IconShare}
|
||||
kind={'transparent'}
|
||||
size={'medium'}
|
||||
showTooltip={{ label: telegram.string.Share }}
|
||||
on:click={async () => {
|
||||
selectable = !selectable
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
<Button
|
||||
icon={IconShare}
|
||||
kind={'transparent'}
|
||||
size={'medium'}
|
||||
showTooltip={{ label: telegram.string.Share }}
|
||||
on:click={async () => {
|
||||
selectable = !selectable
|
||||
}}
|
||||
/>
|
||||
</svelte:fragment>
|
||||
|
||||
<Scroller bottomStart autoscroll>
|
||||
@ -243,36 +242,34 @@
|
||||
{/if}
|
||||
</Scroller>
|
||||
|
||||
{#if integration !== undefined && !integration.disabled}
|
||||
<div class="popupPanel-body__main-header ref-input" class:selectable>
|
||||
{#if selectable}
|
||||
<div class="flex-between">
|
||||
<span>{selected.size} messages selected</span>
|
||||
<div class="flex">
|
||||
<div>
|
||||
<Button label={telegram.string.Cancel} size={'medium'} on:click={clear} />
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<Button
|
||||
label={telegram.string.PublishSelected}
|
||||
size={'medium'}
|
||||
kind={'primary'}
|
||||
disabled={!selected.size}
|
||||
on:click={share}
|
||||
/>
|
||||
</div>
|
||||
<div class="popupPanel-body__main-header ref-input" class:selectable>
|
||||
{#if selectable}
|
||||
<div class="flex-between">
|
||||
<span>{selected.size} messages selected</span>
|
||||
<div class="flex">
|
||||
<div>
|
||||
<Button label={telegram.string.Cancel} size={'medium'} on:click={clear} />
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<Button
|
||||
label={telegram.string.PublishSelected}
|
||||
size={'medium'}
|
||||
kind={'primary'}
|
||||
disabled={!selected.size}
|
||||
on:click={share}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
<AttachmentRefInput
|
||||
space={telegram.space.Telegram}
|
||||
_class={telegram.class.NewMessage}
|
||||
{objectId}
|
||||
on:message={onMessage}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{:else if integration !== undefined && !integration.disabled}
|
||||
<AttachmentRefInput
|
||||
space={telegram.space.Telegram}
|
||||
_class={telegram.class.NewMessage}
|
||||
{objectId}
|
||||
on:message={onMessage}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
</Panel>
|
||||
{/if}
|
||||
|
||||
@ -281,7 +278,7 @@
|
||||
padding: 0.5rem 0 1.5rem;
|
||||
|
||||
&.selectable {
|
||||
padding: 1rem 0;
|
||||
padding: 1rem;
|
||||
color: var(--theme-caption-color);
|
||||
border-top: 1px solid var(--divider-color);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user