Skip to content

Commit

Permalink
Merge branch 'feature/chat' into nightly-ci-test
Browse files Browse the repository at this point in the history
  • Loading branch information
fb929 committed Oct 9, 2024
2 parents db5531d + 8c7b4e3 commit 454289b
Show file tree
Hide file tree
Showing 64 changed files with 858 additions and 466 deletions.
4 changes: 4 additions & 0 deletions dist/js/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@ const s = document.createElement('script');

s.src = './js/main.js?' + Math.random();
s.type = 'text/javascript';
s.onerror = function() {
console.error('Failed to load main.js');
window.setTimeout(() => window.location.reload(), 1000);
};

document.body.appendChild(s);
3 changes: 2 additions & 1 deletion electron/json/cors.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@
"https://sketchfab.com",
"https://media.sketchfab.com",
"https://sentry.io",
"https://*.any.coop"
"https://*.any.coop",
"https://*.amplitude.com"
],

"script-src-elem": [
Expand Down
2 changes: 1 addition & 1 deletion middleware.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.36.0-rc6
0.36.0-rc7
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "anytype",
"version": "0.42.28-beta",
"version": "0.42.31-beta",
"description": "Anytype",
"main": "electron.js",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion src/json/text.json
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,7 @@
"blockChatMessageEdited": "(edited)",
"blockChatEditing": "Editing message",
"blockChatReplying": "Replying to %s",
"blockChatFormReadonly": "Only editors can send messages. Contact the owner to request access.",

"popupSettingsTitle": "Settings",
"popupSettingsAccountPersonalInformationTitle": "Personal information",
Expand Down Expand Up @@ -1160,6 +1161,7 @@
"popupShortcutMainBasics18": "Default zoom",
"popupShortcutMainBasics19": "Open the Quick Capture menu",
"popupShortcutMainBasics20": "Switch to the next/previous Space",
"popupShortcutMainBasics21": "Switch color mode (light/dark)",
"popupShortcutMainStructuring": "Structuring",
"popupShortcutMainStructuring1": "Create a new text block",
"popupShortcutMainStructuring2": "Create a line break within a block of text",
Expand Down Expand Up @@ -1802,7 +1804,7 @@

"sidebarObjectTypeObject": "Pages",
"sidebarObjectTypeList": "Lists",
"sidebarObjectTypeType": "Object Types",
"sidebarObjectTypeType": "Types",
"sidebarObjectTypeFile": "Files",
"sidebarObjectTypeMedia": "Media",
"sidebarObjectTypeBookmark": "Bookmarks",
Expand All @@ -1816,6 +1818,7 @@

"sidebarObjectSortCreated": "Date created",
"sidebarObjectSortUpdated": "Date updated",
"sidebarObjectSortLastUsed": "Date last used",

"unsplashString": "Photo by %s on %s",
"templateBannner": "You are editing a template",
Expand Down
2 changes: 1 addition & 1 deletion src/json/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default {
dark: {

color: {
default: '#252525',
default: '#ebebeb',
yellow: '#ecd91b',
orange: '#ffb522',
red: '#f55522',
Expand Down
27 changes: 20 additions & 7 deletions src/scss/block/bookmark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,39 @@
.side.left { width: 100%; padding: 16px; position: relative; }
.side.right { border-radius: 0px 8px 8px 0px; overflow: hidden; display: none; }

.name { @include text-common; line-height: 20px; font-weight: 500; @include clamp2; margin-bottom: 2px; }
.descr { @include text-small; line-height: 16px; color: var(--color-text-secondary); margin-bottom: 4px; @include clamp2; }
.name { @include text-common; line-height: 20px; font-weight: 500; @include clamp2; }
.descr { @include text-small; line-height: 16px; color: var(--color-text-secondary); @include clamp2; }
.archive { position: absolute; right: 10px; top: 10px; z-index: 1; }
}

.inner.isVertical { display: flex; flex-direction: column-reverse; }
.inner.isVertical { display: flex; flex-direction: column; }
.inner.isVertical {
.side.left { width: 100%; border-radius: 0px; }
.side.right { aspect-ratio: 7/3; width: 100%; border-radius: 0px; border-bottom: 0.05em solid var(--color-shape-secondary); }
.side.right { aspect-ratio: 7/3; width: 100%; border-radius: 0px; }

.link,
.name { margin-bottom: 4px; }
.descr { @include clamp3; }
}

.inner.withImage {
.sides { align-items: stretch; }
.side.left { width: calc(100% - 28%); padding: 16px 12px 16px 16px; }
.side.right { width: 28%; min-height: 90px; display: block; position: relative; overflow: hidden; }
.side.right { width: 28%; min-height: 90px; display: flex; justify-content: flex-start; align-items: center; position: relative; overflow: hidden; aspect-ratio: 7/3; max-height: 122px; }
.side.right {
.img { width: calc(100% - 16px); height: calc(100% - 32px); position: static; left: auto; top: auto; border-radius: 4px; }
}
}
.inner.withImage:not(.isVertical) {
.side.left { display: flex; flex-direction: column; justify-content: center; }
}

.inner.withImage.isVertical {
.side.left { width: 100%; }
.side.right { width: 100%; }
.side.right { width: 100%; padding: 0px 16px; margin-bottom: 16px; max-height: unset; }
.side.right {
.img { width: 100%; height: 100%; }
}
}

.link {
Expand All @@ -58,4 +71,4 @@

.block.blockBookmark > .wrapContent > .selectionTarget.isSelectionSelected::after { left: 0px; width: 100%; border-radius: 8px; }
.block.blockBookmark.withContent > .wrapContent > .selectionTarget.isSelectionSelected::after { border-radius: 8px; }
}
}
28 changes: 20 additions & 8 deletions src/scss/block/chat/attachment.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.attachments { display: flex; gap: 8px; flex-wrap: wrap; max-width: 540px; }
.attachments {
.attachment {
.attachments{
.attachment {
position: relative; border: 1px solid var(--color-shape-tertiary); background: var(--color-bg-primary); box-shadow: 0px 0px 4px rgba(0,0,0,0.05);
min-width: calc(532px / 2); width: calc(532px / 2); height: 72px; border-radius: 8px; display: flex; flex-direction: row; align-items: center;;
}
Expand All @@ -10,8 +10,8 @@
.iconObject { flex-shrink: 0; background-color: var(--color-shape-tertiary); border-radius: 6px; }
.info { flex-grow: 1; width: 100%; }

.icon.remove {
opacity: 0; transition: $transitionAllCommon; position: absolute; right: -6px; top: -6px; width: 20px; height: 20px; background-size: 8px;
.icon.remove {
opacity: 0; transition: $transitionAllCommon; position: absolute; right: -6px; top: -6px; width: 20px; height: 20px; background-size: 8px;
background-image: url('~img/icon/chat/buttons/remove.svg'); background-color: var(--color-bg-primary); border-radius: 50%;
box-shadow: 0px 1px 4px rgba(0,0,0,0.2);
}
Expand All @@ -23,14 +23,26 @@
}
}

.attachment.isFile, .attachment.isBookmark {
.attachment.isFile {
.iconObject { background-color: unset; }
.descr { display: flex; flex-direction: row; gap: 0px 6px; align-items: center; color: var(--color-text-secondary); }
}

.attachment.isBookmark { width: unset !important; min-width: unset; height: unset; }
.attachment.isBookmark {
.url { @include text-overflow-nw; }
.info { display: flex; flex-direction: column; gap: 2px 0px; }
.inner { display: flex; flex-direction: column; padding: 16px; gap: 8px 0px; width: 100%; max-width: 360px; }
.inner {
.side.left { display: flex; flex-direction: column; gap: 4px 0px; width: 100%; }
.side.left {
.link { @include text-small; color: var(--color-text-secondary); display: flex; justify-content: flex-start; align-items: center; gap: 0px 6px; }
.name { @include text-common; line-height: 20px; font-weight: 500; @include clamp2; }
.descr { @include text-small; line-height: 16px; color: var(--color-text-secondary); @include clamp3; }
}
.side.right { position: relative; display: flex; align-items: center; border-radius: 4px; overflow: hidden; }
.side.right {
.img { object-fit: cover; width: 100%; height: 100%; aspect-ratio: 40/21; }
}
}
}

.attachment.isImage { width: 72px; height: 72px; min-width: unset; display: flex; align-items: center; justify-content: center; }
Expand Down Expand Up @@ -118,4 +130,4 @@
.attachments.layout-10 {
.attachment { @include cnt-4; }
.attachment:nth-child(-n + 6) { @include cnt-3; }
}
}
6 changes: 6 additions & 0 deletions src/scss/block/chat/form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,9 @@

.icon.send { position: absolute; bottom: 10px; right: 16px; width: 20px; height: 20px; background: url('~img/icon/chat/buttons/send.svg'); }
}

.formWrapperReadonly {
display: flex; justify-content: center; align-items: center; gap: 0px 8px; height: 40px; border-radius: 8px; @include text-small;
border: 1px solid var(--color-shape-primary); background: var(--color-shape-tertiary);
}
.formWrapperReadonly::before { content: ''; display: block; width: 8px; height: 12px; background: url('~img/icon/lock.svg'); }
12 changes: 6 additions & 6 deletions src/scss/block/chat/message.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

.flex { display: flex; flex-direction: row; gap: 0px 8px; align-items: stretch; }

.side.left { flex-shrink: 0; width: 40px; display: flex; align-items: flex-end; }
.side.left {
> .flex > .side.left { flex-shrink: 0; width: 40px; display: flex; align-items: flex-end; }
> .flex > .side.left {
.iconObject { display: none; }
}

.side.right { display: flex; flex-direction: column; padding: 12px 16px; border-radius: 20px; background: rgba(242, 242, 242, 0.5); position: relative; }
> .flex > .side.right { display: flex; flex-direction: column; padding: 12px 16px; border-radius: 20px; background: rgba(242, 242, 242, 0.5); position: relative; }

.icon.reactionAdd { width: 20px; height: 20px; background-image: url('~img/icon/chat/buttons/reaction0.svg'); }
.icon.reactionAdd:hover, .icon.reactionAdd.hover { background-image: url('~img/icon/chat/buttons/reaction1.svg'); }
Expand Down Expand Up @@ -91,7 +91,7 @@

.message.isSelf {
.flex { flex-direction: row-reverse; }
.side.right { background: rgba(229, 248, 214, 0.5); }
> .flex > .side.right { background: rgba(229, 248, 214, 0.5); }
.controls { flex-direction: row-reverse; }
.reply { background-color: #e5f8d6; }
.reply::before { background-color: #4dae00; }
Expand All @@ -114,15 +114,15 @@
.message.isFirst { margin: 12px 0px 0px 0px; }
.message.isFirst {
.author { display: flex; }
.side.right { min-width: 164px; }
> .flex > .side.right { min-width: 164px; }
}

.message.isFirst, .message.withText {
.attachments { padding: 8px 0px 0px 0px; }
}

.message.isLast {
.side.left {
> .flex > .side.left {
.iconObject { display: block; }
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/scss/block/featured.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@
.iconObject { display: inline-block; vertical-align: middle; margin: -1px 6px 0px 0px !important; }
}

.cellContent.c-checkbox { padding: 5px 3px; }
.cellContent.c-checkbox {
.icon { margin: 0px 5px 0px 0px; }
.icon { margin: 0px 4px 0px 0px; }
}

.cellContent.c-longText {
Expand Down
8 changes: 8 additions & 0 deletions src/scss/block/text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@

.block.blockText.textDescription > .wrapMenu:hover > .icon.dnd { opacity: 1; }

.block.blockText.textHeader1,
.block.blockText.textHeader2,
.block.blockText.textHeader3 {
markupmention {
.space { width: 6px; }
}
}

/* Header1 */

.block.blockText.textHeader1 { padding: 22px 0px 0px 0px; }
Expand Down
10 changes: 9 additions & 1 deletion src/scss/component/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,15 @@
}

.block.blockText {
.wrapContent { min-height: 24px; }
> .wrapContent { min-height: 24px; }

&.textCallout {
> .wrapContent {
> .selectionTarget {
> .dropTarget { padding: 16px; }
}
}
}
}
.block.blockDiv { margin: 30px 0px; }
}
Expand Down
11 changes: 5 additions & 6 deletions src/scss/component/sidebar/object.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@

.tabs, .sides.sidesFilter { padding: 0px 16px; }

.tabs { margin: 0px 0px 3px 0px; position: relative; }
.tabs { position: relative; }
.tabs {
.scrollWrap { overflow: hidden; }
.scroll {
display: flex; align-items: center; gap: 0px 12px; font-weight: 500; color: var(--color-control-active); transition: 0.3s transform $easeInQuint;
transform: translate3d(0px,0px,0px);
}
.scrollWrap { overflow-y: hidden; overflow-x: auto; padding: 0px 0px 3px 0px; }
.scrollWrap::-webkit-scrollbar { display: none; }

.scroll { display: flex; align-items: center; gap: 0px 12px; font-weight: 500; color: var(--color-control-active); }

.tab { white-space: nowrap; flex-shrink: 0; transition: $transitionAllCommon; }
.tab.active, .tab:hover { color: var(--color-text-primary); }
Expand Down
2 changes: 1 addition & 1 deletion src/scss/component/sidebar/widget.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
.name { opacity: 1; transform: translate3d(0px,0px,0px); }
}

> .body { height: calc(100% - 52px); padding: 0px 12px 12px 12px; position: relative; flex-grow: 1; overflow: auto; overscroll-behavior: none; }
> .body { height: calc(100% - 52px); padding: 0px 6px 12px 12px; position: relative; flex-grow: 1; overflow: auto; overscroll-behavior: none; }
> .body {
@keyframes shake1 {
0% { transform: rotate(-0.5deg); }
Expand Down
3 changes: 3 additions & 0 deletions src/scss/menu/dataview/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,7 @@
}

.menu.menuDataviewContext { width: var(--menu-width-icon); }
.menu.menuDataviewContext {
.content { max-height: unset; }
}
}
Loading

0 comments on commit 454289b

Please sign in to comment.