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 2, 2024
2 parents 0c279b0 + 640ba7a commit db5531d
Show file tree
Hide file tree
Showing 84 changed files with 1,010 additions and 446 deletions.
2 changes: 2 additions & 0 deletions electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ function createWindow () {
MenuManager.initMenu();
MenuManager.initTray();

Api.systemInfo(mainWindow);

installNativeMessagingHost();

ipcMain.removeHandler('Api');
Expand Down
7 changes: 7 additions & 0 deletions electron/js/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const fs = require('fs');
const path = require('path');
const keytar = require('keytar');
const { download } = require('electron-dl');
const si = require('systeminformation');

const MenuManager = require('./menu.js');
const ConfigManager = require('./config.js');
Expand Down Expand Up @@ -215,6 +216,12 @@ class Api {
win.webContents.reload();
};

systemInfo (win) {
si.getStaticData().then(data => {
Util.send(win, 'commandGlobal', 'systemInfo', data);
});
};

};

module.exports = new Api();
8 changes: 4 additions & 4 deletions electron/js/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,11 @@ class MenuManager {
}
},

(is.windows || is.linux) ? {
label: Util.translate('electronMenuShowMenu'), type: 'checkbox', checked: !config.hideMenuBar, click: () => {
Api.setMenuBarVisibility(this.win, !config.hideMenuBar);
(is.windows || is.linux) ? {
label: Util.translate('electronMenuShowMenu'), type: 'checkbox', checked: config.hideMenuBar, click: () => {
Api.setMenuBarVisibility(this.win, config.hideMenuBar);
this.initTray();
}
}
} : null,

Separator,
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-rc5
0.36.0-rc6
32 changes: 29 additions & 3 deletions package-lock.json

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

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "anytype",
"version": "0.42.22-alpha",
"version": "0.42.28-beta",
"description": "Anytype",
"main": "electron.js",
"scripts": {
Expand Down Expand Up @@ -148,7 +148,8 @@
"selection-ranges": "^3.0.3",
"sha1": "^1.1.1",
"stream-slicer": "^0.0.6",
"swiper": "^11.0.3"
"swiper": "^11.0.3",
"systeminformation": "^5.23.5"
},
"build": {
"npmRebuild": true,
Expand Down Expand Up @@ -522,6 +523,10 @@
"from": "node_modules/supports-color",
"to": "node_modules/supports-color"
},
{
"from": "node_modules/systeminformation",
"to": "node_modules/systeminformation"
},
{
"from": "node_modules/through2",
"to": "node_modules/through2"
Expand Down
3 changes: 3 additions & 0 deletions src/img/arrow/gallery.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/img/icon/popup/preview/play.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/img/icon/share/banner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/img/theme/dark/icon/share/banner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/json/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
allowedSchemes: [ 'https?', 'mailto', 'tel' ],

count: {
icon: 16,
icon: 10,
phrase: { letter: 8, word: 12 }
},

Expand Down Expand Up @@ -54,7 +54,7 @@ export default {
default: {
interfaceLang: 'en-US',
codeLang: 'plain',
typeKey: 'ot-note',
typeKey: 'ot-page',
pinTime: 600,
},

Expand Down Expand Up @@ -93,7 +93,9 @@ export default {
profile: 'profile',
deleted: 'deleted',
type: 'type',
typeStore: 'typeStore',
relation: 'relation',
relationStore: 'relationStore',
option: 'option',
store: 'store',
archive: 'archive',
Expand Down
1 change: 0 additions & 1 deletion src/json/relation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ export default {
'spaceAccessType',
'readersLimit',
'writersLimit',
'sharedSpacesLimit',
'targetSpaceId',
'creator',
'createdDate',
Expand Down
11 changes: 7 additions & 4 deletions src/json/text.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
"commonAdd": "Add",
"commonDone": "Done",
"commonUnlink": "Unlink",
"commonUnlinkFromType": "Unlink from Type",
"commonUnlinkFromObject": "Unlink from Object",
"commonUnlinkFromSet": "Unlink from Set",
"commonFromCollection": "Unlink from Collection",
"commonDeletedObject": "Non-existent object",
"commonDeletedType": "Deleted type",
"commonDeletedRelation": "Deleted Relation",
Expand Down Expand Up @@ -164,6 +168,7 @@
"commonEntrySpace": "My First Space",
"commonSystem": "System",
"commonMainChat": "Main сhat",
"commonMenu": "Menu",

"pluralDay": "day|days",
"pluralObject": "Object|Objects",
Expand Down Expand Up @@ -334,6 +339,7 @@
"headerGraphTooltipSettings": "Settings",

"shareTooltipLabel": "<b>Share Anytype</b> with<br/>those you care about",
"shareBannerLabel": "<b>Share the space!</b> Invite your friends and build together.",

"authInviteTitle": "Welcome to Anytype",
"authInviteLabel": "Enter your invite code. If you don't have one, visit <a href=\"https:\/\/anytype.io\">anytype.io<\/a> to register for early access. We are inviting new testers on a rolling basis.",
Expand Down Expand Up @@ -1229,7 +1235,6 @@
"popupShortcutMarkdownBeginningOfLine10": "Create line divider",
"popupShortcutMarkdownBeginningOfLine11": "Create dots divider",

"popupShortcutCommandMenu": "Menu",
"popupShortcutCommandMenu1": "Activate command menu",
"popupShortcutCommandMenu2": "Move in menu",
"popupShortcutCommandMenu3": "Get into & close sub menu",
Expand Down Expand Up @@ -1369,8 +1374,6 @@
"menuBlockLinkFilterPlaceholder": "Paste link or search Objects",
"menuBlockLinkSectionsLinkToWebsite": "Link to website",

"menuBlockRelationEditUnlinkFromType": "Unlink from Type",
"menuBlockRelationEditUnlinkFromObject": "Unlink from Object",
"menuBlockRelationEditSelectObjectType": "Select Object Type",
"menuBlockRelationEditLimitObjectTypes": "Limit Object Types",
"menuBlockRelationEditIncludeTime": "Include time",
Expand Down Expand Up @@ -1809,7 +1812,7 @@
"sidebarObjectSort": "Sort",
"sidebarObjectOrphan": "Only unlinked",
"sidebarObjectOrphanLabel": "Unlinked objects that do not have a direct link or backlink with other objects in the graph.",
"sidebarObjectEmpty": "It’s empty here.<br/>Create your first objects to get started.",
"sidebarObjectEmpty": "It’s empty here.<br/><span class='small'>Create your first objects to get started.</span>",

"sidebarObjectSortCreated": "Date created",
"sidebarObjectSortUpdated": "Date updated",
Expand Down
5 changes: 2 additions & 3 deletions src/json/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export default {
iconSpace: {
text: '#fff',
bg: {
grey: '#949494',
yellow: '#ecd91b',
orange: '#ffb522',
red: '#f55522',
Expand All @@ -11,8 +10,8 @@ export default {
blue: '#3e58eb',
ice: '#2aa7ee',
teal: '#0fc8ba',
lime: '#5dd400',
green: '#57c600'
green: '#57c600',
grey: '#949494',
},

list: [ 'grey', 'yellow', 'orange', 'red', 'pink', 'purple', 'blue', 'ice', 'teal', 'lime', 'green' ],
Expand Down
2 changes: 1 addition & 1 deletion src/scss/block/markup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ markupmention {
smile { display: none; position: relative; z-index: 1; }
smile img { margin-top: 2px !important; }

.space { width: 2px; height: 20px; vertical-align: middle; display: none; }
.space { width: 4px; height: 20px; vertical-align: middle; display: none; }
name { display: inline; white-space: normal; position: relative; border-bottom: 0.075em solid; border-color: inherit; }
}
markupmention.disabled {
Expand Down
19 changes: 16 additions & 3 deletions src/scss/component/share.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,24 @@
background-image: linear-gradient(90deg, #FFD3D3 0%, #FFF4CC 20.71%, rgba(255, 244, 204, 0.00) 41.52%);
}
.shareTooltip {
.icon.smile { width: 85px; height: 40px; background: url('~img/icon/share/smile.svg') }
.label { @include text-common; }
.icon.close { background-image: url('~img/icon/notification/delete.svg'); }
}

.shareBanner { position: relative; border-radius: 12px; background: var(--color-bg-primary) linear-gradient(-90deg, #C5F3E5 0%, #F1FFC9 27.23%, rgba(255, 255, 255, 0.15) 54%); margin-top: 10px; }
.shareBanner {
.bannerInner { position: relative; padding: 11.75px 100px 11.75px 16px; border-radius: 12px; overflow: hidden; }
.label { @include text-common; max-width: 185px; }
.icon.smile { position: absolute; right: 6px; top: 50%; margin-top: -37px; width: 82px; height: 74px; background: url('~img/icon/share/banner.svg'); }
.icon.close { background-image: url('~img/icon/widget/remove.svg'); z-index: 1; -webkit-app-region: no-drag; }
}

.shareTooltip,
.shareBanner {
.icon.close {
width: 20px; height: 20px; border-radius: 50%; position: absolute; background-color: var(--color-bg-primary);
box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.20); top: -8px; left: -8px; background-image: url('~img/icon/notification/delete.svg');
box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.20); top: -8px; left: -8px;
background-size: 10px; transition: $transitionAllCommon;
}
.icon.smile { width: 85px; height: 40px; background: url('~img/icon/share/smile.svg') }
.label { @include text-common; }
}
2 changes: 1 addition & 1 deletion src/scss/component/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ html.platformWindows {
.sidebar {
> .containerWidget > .body { overflow-y: overlay; }
}
}
}
21 changes: 10 additions & 11 deletions src/scss/component/sidebar/object.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
> #containerObject {
> .inner { display: flex; flex-direction: column; width: 100%; height: 100%; background: var(--color-bg-primary); border-radius: 12px; }
> .inner {
> .head { display: flex; flex-direction: column; gap: 8px 0px; overflow: hidden; padding: 0px 0px 16px 0px; }
> .head { display: flex; flex-direction: column; gap: 8px 0px; overflow: hidden; padding: 0px 0px 12px 0px; }
> .head {
.titleWrap {
display: flex; flex-direction: row; align-items: center; gap: 0px 8px; width: 100%; padding: 16px 10px 3px 10px; justify-content: space-between;
display: flex; flex-direction: row; align-items: center; gap: 0px 8px; width: 100%; padding: 16px 10px 1px 10px; justify-content: space-between;
}
.titleWrap {
.side { height: 32px; }
Expand Down Expand Up @@ -38,18 +38,13 @@

.controls { position: absolute; top: -4px; left: 0px; width: 100%; display: flex; justify-content: space-between; }
.controls {
.side { width: 60px; opacity: 0; transition: $transitionAllCommon; }
.side.hover { opacity: 1; }
.side.hover {
.icon.arrow { pointer-events: all; }
.gradient { width: 60px; }
}
.side { width: 60px; position: relative; }
.side.hide {
.icon.arrow, .gradient { display: none; }
}

.icon.arrow { background-image: url('~img/arrow/sidebarObjectTab.svg'); position: absolute; z-index: 2; top: 0px; pointer-events: none; }
.gradient { position: absolute; width: 16px; height: 28px; z-index: 1; top: 0px; pointer-events: none; }
.icon.arrow { background-image: url('~img/arrow/sidebarObjectTab.svg'); position: absolute; z-index: 2; top: 0px; }
.gradient { position: absolute; width: 100%; height: 28px; z-index: 1; top: 0px; pointer-events: none; }

.side.left {
.icon.arrow { left: 16px; transform: rotateZ(180deg); }
Expand Down Expand Up @@ -78,6 +73,10 @@
> .body {
.ReactVirtualized__List { padding: 0px 8px 8px 8px; overscroll-behavior: none; }
.emptySearch { height: auto; }
.emptySearch {
.txt { color: var(--color-text-secondary); }
.small { @include text-small; }
}

.items { height: 100%; }

Expand All @@ -86,7 +85,7 @@
.iconObject { flex-shrink: 0; }
.iconObject.c48 { background-color: var(--color-shape-tertiary); }

.info { width: 100%; display: flex; flex-direction: column; gap: 2px 0px; }
.info { width: 100%; display: flex; flex-direction: column; }

.nameWrap { flex-grow: 1; overflow: hidden; }
.name { @include text-overflow-nw; width: 100%; }
Expand Down
9 changes: 8 additions & 1 deletion src/scss/component/sidebar/widget.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
display: flex; flex-direction: row; align-items: center; justify-content: center; padding: 0px 12px; height: 52px;
gap: 0px 8px; overflow: hidden;
}
> .head {
.name { @include text-overflow-nw; opacity: 0; transform: translate3d(0px,30px,0px); transition: all 0.2s $easeInQuint; }
}
> .head.show {
.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 {
Expand Down Expand Up @@ -97,4 +103,5 @@

.list.isListPreview { overflow: hidden; height: 100%; }
}
}
> .body.withShareBanner { margin-top: -10px; }
}
Loading

0 comments on commit db5531d

Please sign in to comment.