mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-26 13:47:26 +03:00
update social editor and attachment presenter
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
7d5e2e72a7
commit
aa48e78d29
@ -17,11 +17,12 @@
|
||||
<script lang="ts">
|
||||
|
||||
import type { Attachment } from '@anticrm/chunter'
|
||||
import File from './icons/File.svelte'
|
||||
|
||||
export let value: Attachment
|
||||
|
||||
</script>
|
||||
|
||||
attachment: {#if value}{value.name}{:else}nothing{/if}
|
||||
|
||||
|
||||
{#if value}
|
||||
<File size={'small'}/>
|
||||
{/if}
|
||||
|
24
plugins/chunter-resources/src/components/icons/File.svelte
Normal file
24
plugins/chunter-resources/src/components/icons/File.svelte
Normal file
@ -0,0 +1,24 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
// Copyright © 2021 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
export let size: 'small' | 'medium' | 'large'
|
||||
const fill: string = 'var(--theme-caption-color)'
|
||||
</script>
|
||||
|
||||
<svg class="svg-{size}" {fill} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<path d="M11.2,0C11.2,0,11.2,0,11.2,0H6C6,0,6,0,6,0s0,0-0.1,0H5.8C5.7,0,5.5,0.1,5.4,0.2L1.3,4.5C1.2,4.6,1.2,4.7,1.2,4.8v7.5 c0,2,1.5,3.6,3.5,3.7h6.5c0,0,0.1,0,0.1,0c2,0,3.6-1.7,3.5-3.7V3.5C14.8,1.6,13.2,0,11.2,0z M5.5,1.4v1.6c0,1-0.7,1.8-1.6,1.8H2.2 L5.5,1.4z M13.9,12.4c0,1.5-1.1,2.7-2.7,2.7H4.7c-1.5-0.1-2.6-1.2-2.6-2.7V5.8h1.8c1.4,0,2.6-1.2,2.6-2.8V1h4.8c0,0,0,0,0,0 c1.4,0,2.6,1.2,2.7,2.6V12.4z"/>
|
||||
</svg>
|
@ -16,19 +16,30 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { EditBox } from '@anticrm/ui'
|
||||
import { getClient } from '@anticrm/presentation'
|
||||
|
||||
import contact, { ChannelProvider } from '@anticrm/contact'
|
||||
|
||||
let providers: ChannelProvider[] = []
|
||||
let values: string[]
|
||||
|
||||
const client = getClient()
|
||||
client.findAll(contact.class.ChannelProvider, {}).then(result => { providers = result; values = new Array(result.length) })
|
||||
|
||||
</script>
|
||||
|
||||
<div class="popup">
|
||||
<div class="popup-block">
|
||||
<span>Contact</span>
|
||||
<EditBox label={'Phone'} placeholder={'+7 (000) 000-00-00'} />
|
||||
<EditBox label={'Email'} placeholder={'rosamund.chen@gmail.com'} />
|
||||
{#each providers as provider, i}
|
||||
<EditBox label={provider.label} placeholder={'+7 (000) 000-00-00'} bind:value={values[i]}/>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="popup-block">
|
||||
<!-- <div class="popup-block">
|
||||
<span>SOCIAL LINKS</span>
|
||||
<EditBox label={'Twitter'} placeholder={'@rosychen'} />
|
||||
<EditBox label={'Facebook'} placeholder={'facebook/rosamundch'} />
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
|
Loading…
Reference in New Issue
Block a user