Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
mhlv committed Sep 5, 2024
2 parents 0bffd5a + 59ce35d commit 4fc2f0e
Show file tree
Hide file tree
Showing 247 changed files with 3,675 additions and 2,566 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,64 @@ jobs:
env:
GITHUB_TOKEN: ${{secrets.TOKEN}}

- name: debug
if: matrix.os != 'windows-latest'
run: |
echo "list dist/:"
ls -alh dist/
echo "list artifacts/:"
ls -alh artifacts/
- name: debug Windows
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
Get-ChildItem -Path dist | Format-Table -Property Mode, LastWriteTime, Length, Name
Get-ChildItem -Path artifacts | Format-Table -Property Mode, LastWriteTime, Length, Name
- name: Upload artifacts to HTTP server
if: matrix.os != 'windows-latest'
run: |
RELEASE_VERSION=$( echo "$GITHUB_REF_NAME" | perl -pe 's/^[a-zA-Z]+//' )
cd artifacts/
for FILE in *; do
UPLOAD_URL="https://publish-releases.anytype.io/desktop/upload/${RELEASE_VERSION}/${FILE}"
echo "Uploading files to ${UPLOAD_URL}"
curl \
--header "Authorization: Bearer ${{ secrets.PUBLISH_RELEASES_TOKEN }}" \
--upload-file ${FILE} \
${UPLOAD_URL}
done
cd ../dist/
for FILE in *.yml; do
UPLOAD_URL="https://publish-releases.anytype.io/desktop/upload/${RELEASE_VERSION}/${FILE}"
echo "Uploading files to ${UPLOAD_URL}"
curl \
--header "Authorization: Bearer ${{ secrets.PUBLISH_RELEASES_TOKEN }}" \
--upload-file ${FILE} \
${UPLOAD_URL}
done
- name: Upload artifacts to HTTP server Windows
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
$releaseVersion = $env:GITHUB_REF_NAME -replace '^[a-zA-Z]+', ''
$files = Get-ChildItem -File artifacts
foreach ($file in $files) {
$encodedFileName = [System.Uri]::EscapeDataString($file.Name)
$uploadUrl = "https://publish-releases.anytype.io/desktop/upload/$releaseVersion/$encodedFileName"
echo "Uploading files to $uploadUrl"
curl.exe -H "Authorization: Bearer ${{ secrets.PUBLISH_RELEASES_TOKEN }}" -T $file.FullName $uploadUrl
}
$yml_files = Get-ChildItem -File dist -Filter *.yml
foreach ($file in $yml_files) {
$encodedFileName = [System.Uri]::EscapeDataString($file.Name)
$uploadUrl = "https://publish-releases.anytype.io/desktop/upload/$releaseVersion/$encodedFileName"
echo "Uploading files to $uploadUrl"
curl.exe -H "Authorization: Bearer ${{ secrets.PUBLISH_RELEASES_TOKEN }}" -T $file.FullName $uploadUrl
}
- name: Delete old releases
uses: dev-drprasad/[email protected]
with:
Expand Down
3 changes: 2 additions & 1 deletion dist/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ nmh.log
[0-9]*.js.map
extension.crx
extension.pem
extension.zip
extension.zip
cmaps/*
4 changes: 2 additions & 2 deletions dist/img/icon/relation/big/checkbox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 10 additions & 4 deletions dist/img/icon/relation/big/date.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: 3 additions & 3 deletions dist/img/icon/relation/big/email.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 6 additions & 7 deletions dist/img/icon/relation/big/multiSelect.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions dist/img/icon/relation/big/select.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: 3 additions & 3 deletions dist/img/icon/relation/small/checkbox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 10 additions & 4 deletions dist/img/icon/relation/small/date.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: 3 additions & 3 deletions dist/img/icon/relation/small/email.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions dist/img/icon/relation/small/multiSelect.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions dist/img/icon/relation/small/select.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions dist/workers/graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ const forceProps = {
distance: 100,
},
forceX: {
strength: 0.1,
x: 0.45,
strength: 0.01,
x: 0.5,
},
forceY: {
strength: 0.1,
y: 0.45,
strength: 0.01,
y: 0.5,
},
};

Expand Down Expand Up @@ -198,11 +198,11 @@ initForces = () => {
.strength(d => d.source.type == d.target.type ? 1 : 0.5);

simulation.force('forceX')
.strength(d => d.isOrphan ? forceX.strength : 0)
.strength(d => !d.isOrphan ? forceX.strength : 0)
.x(width * forceX.x);

simulation.force('forceY')
.strength(d => d.isOrphan ? forceY.strength : 0)
.strength(d => !d.isOrphan ? forceY.strength : 0)
.y(height * forceY.y);

updateForces();
Expand Down
6 changes: 3 additions & 3 deletions electron/js/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ class Api {
WindowManager.command(win, cmd, param);
};

windowOpen (win, route) {
openWindow (win, route) {
WindowManager.createMain({ route, isChild: true });
};

urlOpen (win, url) {
openUrl (win, url) {
shell.openExternal(url);
};

pathOpen (win, path) {
openPath (win, path) {
shell.openPath(path);
};

Expand Down
4 changes: 4 additions & 0 deletions electron/js/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ class MenuManager {
{ label: Util.translate('electronMenuCopy'), role: 'copy' },
{ label: Util.translate('electronMenuCut'), role: 'cut' },
{ label: Util.translate('electronMenuPaste'), role: 'paste' },
{
label: Util.translate('electronMenuPastePlain'), accelerator: 'CmdOrCtrl+Shift+V',
click: () => Util.send(this.win, 'commandEditor', 'pastePlain'),
},

Separator,

Expand Down
2 changes: 1 addition & 1 deletion electron/js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const fs = require('fs');
const sanitize = require('sanitize-filename');
const protocol = 'anytype';
const ConfigManager = require('./config.js');
const Constant = require('../json/constant.json');

log.transports.rendererConsole.level = 'error';

Expand Down Expand Up @@ -220,7 +221,6 @@ class Util {
};

enabledLangs () {
const Constant = require('../json/constant.json');
return Constant.enabledLangs || [];
};

Expand Down
4 changes: 2 additions & 2 deletions extension/iframe/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ const Create = observer(class Create extends React.Component<I.PageComponent, St
const node = $(this.node);
const templateType = S.Record.getTemplateType();
const filters: I.Filter[] = [
{ operator: I.FilterOperator.And, relationKey: 'layout', condition: I.FilterCondition.In, value: U.Object.getPageLayouts() },
{ operator: I.FilterOperator.And, relationKey: 'type', condition: I.FilterCondition.NotEqual, value: templateType?.id },
{ relationKey: 'layout', condition: I.FilterCondition.In, value: U.Object.getPageLayouts() },
{ relationKey: 'type', condition: I.FilterCondition.NotEqual, value: templateType?.id },
];

S.Menu.open('searchObject', {
Expand Down
2 changes: 1 addition & 1 deletion middleware.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.35.6
0.36.0-rc3
Loading

0 comments on commit 4fc2f0e

Please sign in to comment.