File browser style fix (#1618)

Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
Denis Bykhov 2022-05-02 10:23:57 +06:00 committed by GitHub
parent 12602cea3f
commit 5c17a05c7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 29 additions and 35 deletions

View File

@ -17,8 +17,8 @@
"Name": "Name",
"FileBrowser": "File browser",
"FileBrowserFileCounter": "{results, plural, =1 {# result} other {# results}}",
"FileBrowserListView": "View as list",
"FileBrowserGridView": "View as grid",
"FileBrowserListView": "List",
"FileBrowserGridView": "Grid",
"FileBrowserFilterFrom": "From",
"FileBrowserFilterIn": "In",
"FileBrowserFilterDate": "Date",

View File

@ -17,8 +17,8 @@
"Name": "Название",
"FileBrowser": "Браузер файлов",
"FileBrowserFileCounter": "{results, plural, =1 {# результат} =2 {# результата} =3 {# результата} =4 {# результата} other {# результатов}}",
"FileBrowserListView": "Показать в виде списка",
"FileBrowserGridView": "Показать в виде таблицы",
"FileBrowserListView": "Список",
"FileBrowserGridView": "Таблица",
"FileBrowserFilterFrom": "От",
"FileBrowserFilterIn": "В",
"FileBrowserFilterDate": "Дата",

View File

@ -107,7 +107,7 @@
border-radius: 0.75rem;
justify-content: space-between;
overflow: hidden;
box-shadow: 0 0 0 1px var(--theme-bg-focused-border);
border: 1px solid var(--theme-button-border-hovered);
}
.cellImagePreview {
@ -115,8 +115,6 @@
justify-content: center;
height: 10rem;
overflow: hidden;
margin: 0 1.5rem;
border-radius: 0.5rem;
background-color: var(--theme-menu-color);
cursor: pointer;
}
@ -137,6 +135,7 @@
.cellInfo {
display: flex;
flex-direction: row;
border: 1px solid var(--theme-button-border-hovered);
padding: 0.75rem;
height: 4rem;
align-items: center;
@ -149,6 +148,9 @@
.eCellInfoMenu {
margin-left: auto;
position: absolute;
bottom: 1rem;
right: 0.5rem;
}
.eCellInfoFilename {

View File

@ -79,9 +79,10 @@
.eAttachmentCellActions {
display: flex;
visibility: hidden;
border: 1px solid var(--theme-bg-focused-border);
padding: 0.2rem;
border-radius: 0.375rem;
padding: 0.5rem;
border: 1px solid var(--theme-button-border-hovered);
border-radius: 0.25rem;
background-color: var(--board-bg-color);
}
.eAttachmentCellMenu {

View File

@ -71,15 +71,14 @@
.attachmentRow {
display: flex;
align-items: center;
margin: 0 1.5rem;
padding: 0.25rem 0;
margin: 0.5rem 1.5rem;
padding: 0.5rem;
border: 1px solid var(--theme-button-border-hovered);
border-radius: 0.5rem;
.eAttachmentRowActions {
display: flex;
visibility: hidden;
border: 1px solid var(--theme-bg-focused-border);
padding: 0.2rem;
border-radius: 0.375rem;
}
.eAttachmentRowMenu {

View File

@ -17,6 +17,7 @@
import contact, { Employee } from '@anticrm/contact'
import { EmployeeAccount } from '@anticrm/contact'
import core, { Class, getCurrentAccount, Ref, Space } from '@anticrm/core'
import view from '@anticrm/view'
import { getClient } from '@anticrm/presentation'
import ui, {
getCurrentLocation,
@ -135,7 +136,7 @@
isListDisplayMode = true
}}
>
<Icon icon={contact.icon.Person} size={'small'} />
<Icon icon={view.icon.Table} size={'small'} />
</button>
</Tooltip>
<Tooltip label={attachment.string.FileBrowserGridView} direction={'bottom'}>
@ -146,7 +147,7 @@
isListDisplayMode = false
}}
>
<Icon icon={contact.icon.Edit} size={'small'} />
<Icon icon={view.icon.Card} size={'small'} />
</button>
</Tooltip>
</div>
@ -169,7 +170,7 @@
<AttachmentsGalleryView {attachments} />
{/if}
{:else}
<div class="flex-between attachmentRow">
<div class="flex-between ml-6">
<Label label={attachment.string.NoFiles} />
</div>
{/if}

View File

@ -16,8 +16,7 @@
import attachment, { Attachment } from '@anticrm/attachment'
import { AttachmentRefInput } from '@anticrm/attachment-resources'
import { ChunterMessage, Message, ChunterSpace } from '@anticrm/chunter'
import { generateId, getCurrentAccount, Ref, Space, TxFactory } from '@anticrm/core'
import { NotificationClientImpl } from '@anticrm/notification-resources'
import { generateId, getCurrentAccount, Ref, Space } from '@anticrm/core'
import notification from '@anticrm/notification'
import { createQuery, getClient } from '@anticrm/presentation'
import { getCurrentLocation, navigate } from '@anticrm/ui'
@ -33,13 +32,11 @@
const client = getClient()
const _class = chunter.class.Message
let _id = generateId() as Ref<Message>
const notificationClient = NotificationClientImpl.getClient()
async function onMessage (event: CustomEvent) {
const { message, attachments } = event.detail
const me = getCurrentAccount()._id
const txFactory = new TxFactory(me)
const tx = txFactory.createTxCreateDoc<Message>(
await client.createDoc<Message>(
_class,
space,
{
@ -47,14 +44,12 @@
attachedToClass: chunter.class.ChunterSpace,
collection: 'messages',
content: message,
createOn: 0,
createOn: Date.now(),
createBy: me,
attachments
},
_id
)
tx.attributes.createOn = tx.modifiedOn
if (
chunterSpace._class === chunter.class.DirectMessage &&
!chunterSpace.lastMessage &&
@ -74,8 +69,6 @@
)
)
}
await notificationClient.updateLastView(space, chunter.class.ChunterSpace, tx.modifiedOn, true)
await client.tx(tx)
// Create an backlink to document
await createBacklinks(client, space, chunter.class.ChunterSpace, _id, message)

View File

@ -17,7 +17,7 @@
import { AttachmentRefInput } from '@anticrm/attachment-resources'
import type { ThreadMessage, Message, ChunterMessage } from '@anticrm/chunter'
import contact, { Employee } from '@anticrm/contact'
import core, { Doc, generateId, getCurrentAccount, Ref, Space, TxFactory } from '@anticrm/core'
import core, { Doc, generateId, getCurrentAccount, Ref, Space } from '@anticrm/core'
import { NotificationClientImpl } from '@anticrm/notification-resources'
import { createQuery, getClient } from '@anticrm/presentation'
import { IconClose, Label, getCurrentLocation, navigate } from '@anticrm/ui'
@ -143,8 +143,7 @@
async function onMessage (event: CustomEvent) {
const { message, attachments } = event.detail
const me = getCurrentAccount()._id
const txFactory = new TxFactory(me)
const tx = txFactory.createTxCreateDoc<ThreadMessage>(
await client.createDoc(
chunter.class.ThreadMessage,
currentSpace,
{
@ -153,14 +152,11 @@
collection: 'replies',
content: message,
createBy: me,
createOn: 0,
createOn: Date.now(),
attachments
},
commentId
)
tx.attributes.createOn = tx.modifiedOn
await notificationClient.updateLastView(_id, chunter.class.Message, tx.modifiedOn, true)
await client.tx(tx)
// Create an backlink to document
await createBacklinks(client, currentSpace, chunter.class.ChunterSpace, commentId, message)

View File

@ -19,6 +19,7 @@ import view, { viewId } from '@anticrm/view'
const icons = require('../assets/icons.svg') as string // eslint-disable-line
loadMetadata(view.icon, {
Table: `${icons}#table`,
Card: `${icons}#card`,
Delete: `${icons}#delete`,
Move: `${icons}#move`,
MoreH: `${icons}#more-h`,

View File

@ -285,6 +285,7 @@ const view = plugin(viewId, {
},
icon: {
Table: '' as Asset,
Card: '' as Asset,
Delete: '' as Asset,
MoreH: '' as Asset,
Move: '' as Asset,