mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-23 05:53:09 +03:00
Gmail ui fixes (#2554)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
474cb9c887
commit
317e705b39
@ -2,7 +2,7 @@
|
|||||||
LOGIN_ENDPOINT=ws://localhost:3333
|
LOGIN_ENDPOINT=ws://localhost:3333
|
||||||
|
|
||||||
TELEGRAM_URL=http://localhost:8086
|
TELEGRAM_URL=http://localhost:8086
|
||||||
GMAIL_URL=http://localhost:8087
|
GMAIL_URL=http://localhost:8088
|
||||||
FRONT_URL=http://localhost:8080
|
FRONT_URL=http://localhost:8080
|
||||||
|
|
||||||
REKONI_URL=http://localhost:4004
|
REKONI_URL=http://localhost:4004
|
||||||
|
@ -171,7 +171,6 @@
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
transform-origin: center;
|
transform-origin: center;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
max-width: 95%;
|
|
||||||
|
|
||||||
&.preShow {
|
&.preShow {
|
||||||
transform: scale(0.9);
|
transform: scale(0.9);
|
||||||
|
@ -122,16 +122,22 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if enabled}
|
{#if enabled}
|
||||||
<div class="popupPanel-body__main-header bottom-divider">
|
<div class="popupPanel-body__main-header bottom-divider p-2">
|
||||||
{#if selectable}
|
{#if selectable}
|
||||||
<div class="flex-between w-full">
|
<div class="flex-between">
|
||||||
<span><b>{selected.size}</b> <Label label={gmail.string.MessagesSelected} /></span>
|
<span><b>{selected.size}</b> <Label label={gmail.string.MessagesSelected} /></span>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div>
|
<div>
|
||||||
<Button label={gmail.string.Cancel} on:click={clear} />
|
<Button label={gmail.string.Cancel} size={'small'} on:click={clear} />
|
||||||
</div>
|
</div>
|
||||||
<div class="ml-3">
|
<div class="ml-3">
|
||||||
<Button label={gmail.string.PublishSelected} kind={'primary'} disabled={!selected.size} on:click={share} />
|
<Button
|
||||||
|
label={gmail.string.PublishSelected}
|
||||||
|
size={'small'}
|
||||||
|
kind={'primary'}
|
||||||
|
disabled={!selected.size}
|
||||||
|
on:click={share}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -139,6 +145,7 @@
|
|||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<Button
|
<Button
|
||||||
label={gmail.string.CreateMessage}
|
label={gmail.string.CreateMessage}
|
||||||
|
size={'small'}
|
||||||
kind={'primary'}
|
kind={'primary'}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
newMessage = true
|
newMessage = true
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="popupPanel-body__main-header bottom-divider">
|
<div class="popupPanel-body__main-header bottom-divider">
|
||||||
<div class="flex-between">
|
<div class="flex-between p-2">
|
||||||
<div class="buttons-group">
|
<div class="buttons-group">
|
||||||
<Button
|
<Button
|
||||||
icon={IconArrowLeft}
|
icon={IconArrowLeft}
|
||||||
@ -79,7 +79,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Scroller>
|
<Scroller>
|
||||||
<div class="popupPanel-body__main-content py-4">
|
<div class="popupPanel-body__main-content py-4 h-full">
|
||||||
<Label label={currentMessage.incoming ? gmail.string.To : gmail.string.From} />
|
<Label label={currentMessage.incoming ? gmail.string.To : gmail.string.From} />
|
||||||
{user}
|
{user}
|
||||||
{#if currentMessage.copy?.length}
|
{#if currentMessage.copy?.length}
|
||||||
@ -94,7 +94,7 @@
|
|||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="flex-col content clear-mins">
|
<div class="flex-col content clear-mins h-full">
|
||||||
<FullMessageContent content={currentMessage.content} />
|
<FullMessageContent content={currentMessage.content} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
iframe {
|
iframe {
|
||||||
|
max-width: calc(100vw - 4rem);
|
||||||
|
width: 700px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-family: var(--font-family);
|
font-family: var(--font-family);
|
||||||
|
@ -14,18 +14,33 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import attachment, { Attachment } from '@hcengineering/attachment'
|
||||||
|
import { AttachmentPresenter } from '@hcengineering/attachment-resources'
|
||||||
import { SharedMessage } from '@hcengineering/gmail'
|
import { SharedMessage } from '@hcengineering/gmail'
|
||||||
|
import { createQuery } from '@hcengineering/presentation'
|
||||||
import { Label } from '@hcengineering/ui'
|
import { Label } from '@hcengineering/ui'
|
||||||
import gmail from '../plugin'
|
import gmail from '../plugin'
|
||||||
import FullMessageContent from './FullMessageContent.svelte'
|
import FullMessageContent from './FullMessageContent.svelte'
|
||||||
|
|
||||||
export let message: SharedMessage
|
export let message: SharedMessage
|
||||||
|
|
||||||
|
const query = createQuery()
|
||||||
|
let attachments: Attachment[] = []
|
||||||
|
|
||||||
|
$: message._id &&
|
||||||
|
query.query(
|
||||||
|
attachment.class.Attachment,
|
||||||
|
{
|
||||||
|
attachedTo: message._id
|
||||||
|
},
|
||||||
|
(res) => (attachments = res)
|
||||||
|
)
|
||||||
|
|
||||||
$: title = message.incoming ? message.sender : message.receiver
|
$: title = message.incoming ? message.sender : message.receiver
|
||||||
$: user = message.incoming ? message.receiver : message.sender
|
$: user = message.incoming ? message.receiver : message.sender
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="popup flex-col">
|
<div class="popup h-full w-full flex-col">
|
||||||
<div class="fs-title mb-4">
|
<div class="fs-title mb-4">
|
||||||
{message.subject}
|
{message.subject}
|
||||||
</div>
|
</div>
|
||||||
@ -40,6 +55,15 @@
|
|||||||
{#if message.copy?.length}
|
{#if message.copy?.length}
|
||||||
<Label label={gmail.string.Copy} />: {message.copy.join(', ')}
|
<Label label={gmail.string.Copy} />: {message.copy.join(', ')}
|
||||||
{/if}
|
{/if}
|
||||||
|
{#if attachments.length}
|
||||||
|
<div class="flex-row-center list mt-2">
|
||||||
|
{#each attachments as attachment}
|
||||||
|
<div class="item flex">
|
||||||
|
<AttachmentPresenter value={attachment} />
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
<div class="flex-col h-full clear-mins mt-5">
|
<div class="flex-col h-full clear-mins mt-5">
|
||||||
<FullMessageContent content={message.content} />
|
<FullMessageContent content={message.content} />
|
||||||
</div>
|
</div>
|
||||||
@ -48,7 +72,7 @@
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.popup {
|
.popup {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
max-height: 500px;
|
max-height: calc(100vh - 4rem);
|
||||||
background-color: var(--theme-button-bg-focused);
|
background-color: var(--theme-button-bg-focused);
|
||||||
border: 1px solid var(--theme-button-border-enabled);
|
border: 1px solid var(--theme-button-border-enabled);
|
||||||
border-radius: 0.75rem;
|
border-radius: 0.75rem;
|
||||||
|
@ -146,7 +146,7 @@
|
|||||||
style="display: none"
|
style="display: none"
|
||||||
on:change={fileSelected}
|
on:change={fileSelected}
|
||||||
/>
|
/>
|
||||||
<div class="popupPanel-body__main-header bottom-divider">
|
<div class="popupPanel-body__main-header bottom-divider p-2">
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div class="buttons-group">
|
<div class="buttons-group">
|
||||||
<Button
|
<Button
|
||||||
@ -169,13 +169,13 @@
|
|||||||
inputFile.click()
|
inputFile.click()
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Button label={plugin.string.Send} kind={'primary'} on:click={sendMsg} />
|
<Button label={plugin.string.Send} size={'small'} kind={'primary'} on:click={sendMsg} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Scroller>
|
<Scroller>
|
||||||
<div
|
<div
|
||||||
class="popupPanel-body__main-content py-4"
|
class="popupPanel-body__main-content py-4 h-full"
|
||||||
on:dragover|preventDefault={() => {}}
|
on:dragover|preventDefault={() => {}}
|
||||||
on:dragleave={() => {}}
|
on:dragleave={() => {}}
|
||||||
on:drop|preventDefault|stopPropagation={fileDrop}
|
on:drop|preventDefault|stopPropagation={fileDrop}
|
||||||
|
@ -51,7 +51,8 @@
|
|||||||
})
|
})
|
||||||
if (current === undefined) return
|
if (current === undefined) return
|
||||||
await client.update(current, {
|
await client.update(current, {
|
||||||
disabled: false
|
disabled: false,
|
||||||
|
value: res.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user