Fix contact info (#1087)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
Co-authored-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Andrey Sobolev 2022-03-03 16:26:00 +07:00 committed by GitHub
parent 09c9b22938
commit 53ce98c2b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 52 additions and 49 deletions

View File

@ -25,7 +25,7 @@
export let primary: boolean = false
</script>
<div class="flex-center icon-button icon-{size}" class:selected class:transparent class:primary on:click on:mousemove>
<div class="flex-center icon-button icon-{size}" class:selected class:transparent class:primary on:click|stopPropagation on:mousemove>
<div class="content">
<Icon {icon} size={'full'} />
</div>

View File

@ -42,7 +42,7 @@
><slot /></div>
{#if !ignore && bigger && !fixed}
<div class="showMore" class:outter={cHeight > limit} on:click={toggle}>
<div class="showMore" on:click={toggle}>
<Label label={(cHeight > limit) ? ui.string.ShowLess : ui.string.ShowMore} />
</div>
{/if}
@ -76,10 +76,5 @@
border-radius: 2.5rem;
user-select: none;
cursor: pointer;
&.outter {
bottom: -2.75rem;
transform: translateX(-50%);
}
}
</style>

View File

@ -19,25 +19,25 @@
{#each filterTx([tx, ...tx.txes], core.class.TxCreateDoc) as ctx, i}
{#if i === 0}
<div class='mr-2'>
<IconAdd size={'small'} />
</div>
{/if}
{#if typeof viewlet?.component === 'string'}
<Component is={viewlet?.component} props={getProps(getDTxProps(ctx), edit)} on:close={onCancelEdit} />
{:else}
<svelte:component this={viewlet?.component} {...getProps(getDTxProps(ctx), edit)} on:close={onCancelEdit} />
<div class="mr-1"><IconAdd size={'small'} /></div>
{/if}
<div class="mr-1">
{#if typeof viewlet?.component === 'string'}
<Component is={viewlet?.component} props={getProps(getDTxProps(ctx), edit)} on:close={onCancelEdit} />
{:else}
<svelte:component this={viewlet?.component} {...getProps(getDTxProps(ctx), edit)} on:close={onCancelEdit} />
{/if}
</div>
{/each}
{#each filterTx([tx, ...tx.txes], core.class.TxRemoveDoc) as ctx, i}
{#if i === 0}
<div class='mr-2'>
<IconDelete size={'small'} />
</div>
{/if}
{#if typeof viewlet?.component === 'string'}
<Component is={viewlet?.component} props={getProps(getDTxProps(ctx), edit)} on:close={onCancelEdit} />
{:else}
<svelte:component this={viewlet?.component} {...getProps(getDTxProps(ctx), edit)} on:close={onCancelEdit} />
<div class="mr-1"><IconDelete size={'small'} /></div>
{/if}
<div class="mr-1">
{#if typeof viewlet?.component === 'string'}
<Component is={viewlet?.component} props={getProps(getDTxProps(ctx), edit)} on:close={onCancelEdit} />
{:else}
<svelte:component this={viewlet?.component} {...getProps(getDTxProps(ctx), edit)} on:close={onCancelEdit} />
{/if}
</div>
{/each}

View File

@ -41,7 +41,7 @@
}
})}
/>
<span><Label label={presentation.string.AddSocialLinks} /></span>
<span class="ml-2"><Label label={presentation.string.AddSocialLinks} /></span>
{:else}
<ChannelsView value={channels} size={'small'} {integrations} on:click />
<div class="ml-1">
@ -58,9 +58,3 @@
/>
</div>
{/if}
<style lang="scss">
span {
margin-left: 0.5rem;
}
</style>

View File

@ -37,4 +37,4 @@
}
</script>
<ChannelsView {value} size={'small'} reverse on:click={click} />
<ChannelsView {value} size={'small'} length={'short'} on:click={click} />

View File

@ -26,6 +26,7 @@
export let value: AttachedData<Channel>[] | Channel | null
export let size: 'small' | 'medium' | 'large' | 'x-large' = 'large'
export let length: 'short' | 'full' = 'full'
export let reverse: boolean = false
export let integrations: Set<Ref<Doc>> = new Set<Ref<Doc>>()
const notificationClient = NotificationClientImpl.getClient()
@ -99,20 +100,36 @@
<div
bind:this={divHTML}
class="flex-row-center flex-wrap"
class:gap-1={size === 'small'}
class:gap-2={size !== 'small'}
class="channels {length}"
class:one={displayItems?.length === 1}
class:reverse
class:small-gap={size === 'small'}
class:normal-gap={size !== 'small'}
>
{#each displayItems as item}
<div
on:click|stopPropagation={() => {
dispatch('click', item)
}}
>
<Tooltip component={ChannelsPopup} props={{ value: item }} label={undefined} anchor={divHTML}>
<CircleButton icon={item.icon} {size} primary={item.integration || item.notification} />
</Tooltip>
</div>
{#each displayItems as item,i}
<Tooltip component={ChannelsPopup} props={{ value: item }} label={undefined} anchor={divHTML}>
<CircleButton
icon={item.icon}
{size}
primary={item.integration || item.notification}
on:click={() => {
dispatch('click', item)
}}
/>
</Tooltip>
{/each}
</div>
<style lang="scss">
.channels {
display: grid;
&.one { display: block; }
&.short {
grid-template-columns: repeat(4, min-content);
grid-auto-rows: auto;
}
&.full { grid-auto-flow: column; }
&.reverse { grid-auto-flow: dense; }
&.small-gap { gap: .25rem; }
&.normal-gap { gap: .5rem; }
}
</style>

View File

@ -113,7 +113,7 @@
<div class="separator" />
<div class="flex-between channels">
<div class="flex-between">
<div class="flex-row-center">
<ChannelsEditor attachedTo={object._id} attachedClass={object._class} {editable} {integrations} on:click />
</div>
@ -135,9 +135,6 @@
font-size: 1.25rem;
color: var(--theme-caption-color);
}
.channels {
margin-top: 0.75rem;
}
.location {
margin-top: 0.25rem;
font-size: 0.75rem;

View File

@ -53,7 +53,7 @@
<Component is={attachment.component.AttachmentsPresenter} props={{ value: candidate, size: 'medium', showCounter: true }}/>
</div>
<div class='flex flex-grow'>
<ChannelsView value={channels} size={'small'} on:click />
<ChannelsView value={channels} size={'small'} length={'short'} on:click />
</div>
</div>
{/if}