mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-13 19:00:09 +00:00
Merge branch 'develop' into staging
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
commit
afbe36d450
8
.github/workflows/main.yml
vendored
8
.github/workflows/main.yml
vendored
@ -628,7 +628,7 @@ jobs:
|
|||||||
node ../common/scripts/install-run-rushx.js dist --linux --windows --x64
|
node ../common/scripts/install-run-rushx.js dist --linux --windows --x64
|
||||||
node ../common/scripts/install-run-rushx.js dist-signed --macos --x64 --arm64
|
node ../common/scripts/install-run-rushx.js dist-signed --macos --x64 --arm64
|
||||||
./scripts/copy-publish-artifacts.sh ${{ env.PublishTempFolder}}
|
./scripts/copy-publish-artifacts.sh ${{ env.PublishTempFolder}}
|
||||||
- name: Publish distribution assets
|
- name: Publish distribution assets and version
|
||||||
uses: ryand56/r2-upload-action@latest
|
uses: ryand56/r2-upload-action@latest
|
||||||
with:
|
with:
|
||||||
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
|
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
|
||||||
@ -637,12 +637,6 @@ jobs:
|
|||||||
r2-bucket: desktop-distro
|
r2-bucket: desktop-distro
|
||||||
source-dir: desktop-package/${{ env.PublishTempFolder}}
|
source-dir: desktop-package/${{ env.PublishTempFolder}}
|
||||||
destination-dir: ./
|
destination-dir: ./
|
||||||
- name: Publish distribution version
|
|
||||||
env:
|
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
|
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
|
||||||
run: |
|
|
||||||
./desktop-package/scripts/publish-version.sh
|
|
||||||
- name: Upload MacOS
|
- name: Upload MacOS
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
@ -3,6 +3,7 @@ SRC_FOLDER=deploy
|
|||||||
TARGET_FOLDER=$1
|
TARGET_FOLDER=$1
|
||||||
CHANNEL=latest
|
CHANNEL=latest
|
||||||
|
|
||||||
|
set -e
|
||||||
if [ -d "$TARGET_FOLDER" ]; then rm -Rf $TARGET_FOLDER; fi
|
if [ -d "$TARGET_FOLDER" ]; then rm -Rf $TARGET_FOLDER; fi
|
||||||
mkdir $TARGET_FOLDER
|
mkdir $TARGET_FOLDER
|
||||||
|
|
||||||
@ -15,3 +16,11 @@ cp $SRC_FOLDER/*.exe $TARGET_FOLDER
|
|||||||
cp $SRC_FOLDER/$CHANNEL.yml $TARGET_FOLDER
|
cp $SRC_FOLDER/$CHANNEL.yml $TARGET_FOLDER
|
||||||
cp $SRC_FOLDER/$CHANNEL-mac.yml $TARGET_FOLDER
|
cp $SRC_FOLDER/$CHANNEL-mac.yml $TARGET_FOLDER
|
||||||
cp $SRC_FOLDER/$CHANNEL-linux.yml $TARGET_FOLDER
|
cp $SRC_FOLDER/$CHANNEL-linux.yml $TARGET_FOLDER
|
||||||
|
|
||||||
|
# Create version-specific description files
|
||||||
|
rawVersion=$(node ../common/scripts/show_tag.js)
|
||||||
|
version=${rawVersion:1:${#rawVersion}-2}
|
||||||
|
|
||||||
|
cp $SRC_FOLDER/$CHANNEL.yml $TARGET_FOLDER/${version}.yml
|
||||||
|
cp $SRC_FOLDER/$CHANNEL-mac.yml $TARGET_FOLDER/${version}-mac.yml
|
||||||
|
cp $SRC_FOLDER/$CHANNEL-linux.yml $TARGET_FOLDER/${version}-linux.yml
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
endpoint=https://47fadbaa4ecbea9f3e8b7043a4584e27.r2.cloudflarestorage.com
|
|
||||||
bucket=desktop-distro
|
|
||||||
rawVersion=$(node common/scripts/show_tag.js)
|
|
||||||
version=${rawVersion:1:${#rawVersion}-2}
|
|
||||||
|
|
||||||
cd desktop-package/deploy
|
|
||||||
|
|
||||||
aws s3api put-object --endpoint $endpoint --bucket $bucket --key ${version}-mac.yml --body latest-mac.yml --acl public-read 2>&1 > /dev/null
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Error uploading ${version}-mac.yml" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
aws s3api put-object --endpoint $endpoint --bucket $bucket --key ${version}-linux.yml --body latest-linux.yml --acl public-read 2>&1 > /dev/null
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Error uploading ${version}-linux.yml" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
aws s3api put-object --endpoint $endpoint --bucket $bucket --key ${version}.yml --body latest.yml --acl public-read 2>&1 > /dev/null
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Error uploading ${version}.yml" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo Successfully published version ${version} to ${endpoint}/${bucket}
|
|
@ -33,10 +33,10 @@ export function canDisplayLinkPreview (val: LinkPreviewDetails): boolean {
|
|||||||
if (val.hostname === undefined) {
|
if (val.hostname === undefined) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (val.image === undefined && val.description === undefined) {
|
if (val.image === undefined && val.description?.trim() === '') {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (val.title === undefined && val.description === undefined) {
|
if (val.title?.trim() === '' && val.description?.trim() === '') {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
@ -53,7 +53,9 @@ export async function fetchLinkPreviewDetails (url: string, timeoutMs = 15000):
|
|||||||
headers: { Authorization: 'Bearer ' + token },
|
headers: { Authorization: 'Bearer ' + token },
|
||||||
signal: AbortSignal.timeout(timeoutMs)
|
signal: AbortSignal.timeout(timeoutMs)
|
||||||
})
|
})
|
||||||
return response.json() as LinkPreviewDetails
|
const res = (await response.json()) as LinkPreviewDetails
|
||||||
|
res.url = url
|
||||||
|
return res
|
||||||
} catch {
|
} catch {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@
|
|||||||
{#await getJsonOrEmpty(value.file, value.name)}
|
{#await getJsonOrEmpty(value.file, value.name)}
|
||||||
<Spinner size="small" />
|
<Spinner size="small" />
|
||||||
{:then linkPreviewDetails}
|
{:then linkPreviewDetails}
|
||||||
<div class="flex-center icon">
|
<div class="flex-center icon image">
|
||||||
{#if linkPreviewDetails.icon !== undefined && !useDefaultIcon}
|
{#if linkPreviewDetails.icon !== undefined && !useDefaultIcon}
|
||||||
<img
|
<img
|
||||||
src={linkPreviewDetails.icon}
|
src={linkPreviewDetails.icon}
|
||||||
|
@ -333,7 +333,7 @@
|
|||||||
const hrefs = refContainer.getElementsByTagName('a')
|
const hrefs = refContainer.getElementsByTagName('a')
|
||||||
const newUrls: string[] = []
|
const newUrls: string[] = []
|
||||||
for (let i = 0; i < hrefs.length; i++) {
|
for (let i = 0; i < hrefs.length; i++) {
|
||||||
if (hrefs[i].target !== '_blank' || !isValidUrl(hrefs[i].href)) {
|
if (hrefs[i].target !== '_blank' || !isValidUrl(hrefs[i].href) || hrefs[i].rel === '') {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
const key = getUrlKey(hrefs[i].href)
|
const key = getUrlKey(hrefs[i].href)
|
||||||
@ -363,7 +363,7 @@
|
|||||||
if (canDisplayLinkPreview(meta) && meta.url !== undefined) {
|
if (canDisplayLinkPreview(meta) && meta.url !== undefined) {
|
||||||
const blob = new Blob([JSON.stringify(meta)])
|
const blob = new Blob([JSON.stringify(meta)])
|
||||||
const file = new File([blob], meta.url, { type: 'application/link-preview' })
|
const file = new File([blob], meta.url, { type: 'application/link-preview' })
|
||||||
void createAttachment(file)
|
await createAttachment(file)
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
void setPlatformStatus(unknownError(err))
|
void setPlatformStatus(unknownError(err))
|
||||||
|
@ -17,12 +17,14 @@
|
|||||||
import LinkPreviewPresenter from './LinkPreviewPresenter.svelte'
|
import LinkPreviewPresenter from './LinkPreviewPresenter.svelte'
|
||||||
import { type WithLookup } from '@hcengineering/core'
|
import { type WithLookup } from '@hcengineering/core'
|
||||||
import { type Attachment } from '@hcengineering/attachment'
|
import { type Attachment } from '@hcengineering/attachment'
|
||||||
|
import { Scroller } from '@hcengineering/ui'
|
||||||
export let attachments: WithLookup<Attachment>[] = []
|
export let attachments: WithLookup<Attachment>[] = []
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="gapV-2">
|
<div class="gapV-2">
|
||||||
{#each attachments as attachment}
|
{#each attachments as attachment}
|
||||||
<LinkPreviewPresenter {attachment} />
|
<Scroller contentDirection={'horizontal'} horizontal scrollSnap>
|
||||||
|
<LinkPreviewPresenter {attachment} />
|
||||||
|
</Scroller>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<div class="quote content">
|
<div class="quote content">
|
||||||
{#if canDisplay}
|
{#if canDisplay}
|
||||||
<div class="gapV-2">
|
<div class="gapV-2">
|
||||||
<div class="flex gap-1">
|
<div class="flex-row-center gap-1">
|
||||||
{#if viewModel.icon !== undefined && !useDefaultIcon}
|
{#if viewModel.icon !== undefined && !useDefaultIcon}
|
||||||
<img
|
<img
|
||||||
src={viewModel.icon}
|
src={viewModel.icon}
|
||||||
@ -81,14 +81,15 @@
|
|||||||
max-height: 25rem;
|
max-height: 25rem;
|
||||||
}
|
}
|
||||||
.preview-icon {
|
.preview-icon {
|
||||||
max-width: 22px;
|
max-width: 16px;
|
||||||
max-height: 22px;
|
max-height: 16px;
|
||||||
}
|
}
|
||||||
.quote {
|
.quote {
|
||||||
border-left: 0.25rem solid;
|
border-left: 0.25rem solid;
|
||||||
padding-left: 15px;
|
padding-left: 0.75rem;
|
||||||
}
|
}
|
||||||
.content {
|
.content {
|
||||||
|
scroll-snap-align: start;
|
||||||
max-width: 35rem;
|
max-width: 35rem;
|
||||||
max-height: 35rem;
|
max-height: 35rem;
|
||||||
}
|
}
|
||||||
|
@ -31,10 +31,8 @@
|
|||||||
let configurations: Record<Ref<Class<Doc>>, Viewlet['config']> = {}
|
let configurations: Record<Ref<Class<Doc>>, Viewlet['config']> = {}
|
||||||
|
|
||||||
function fetchConfigurations (viewlet: Viewlet): void {
|
function fetchConfigurations (viewlet: Viewlet): void {
|
||||||
configurationsLoading = true
|
|
||||||
configurations = {}
|
configurations = {}
|
||||||
|
configurationsLoading = objectConfigurations.query(
|
||||||
objectConfigurations.query(
|
|
||||||
view.class.Viewlet,
|
view.class.Viewlet,
|
||||||
{
|
{
|
||||||
attachTo: { $in: hierarchy.getDescendants(_class) },
|
attachTo: { $in: hierarchy.getDescendants(_class) },
|
||||||
@ -49,8 +47,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function fetchPreferences (viewlet: Viewlet): void {
|
function fetchPreferences (viewlet: Viewlet): void {
|
||||||
preferencesLoading = true
|
preferencesLoading = preferenceQuery.query(
|
||||||
preferenceQuery.query(
|
|
||||||
view.class.ViewletPreference,
|
view.class.ViewletPreference,
|
||||||
{
|
{
|
||||||
space: core.space.Workspace,
|
space: core.space.Workspace,
|
||||||
|
@ -751,7 +751,7 @@ export function categorizeFields (
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function makeViewletKey (loc?: Location): string {
|
export function makeViewletKey (loc?: Location): string {
|
||||||
loc = loc != null ? { path: loc.path } : getCurrentResolvedLocation()
|
loc = loc != null ? { path: loc.path, fragment: loc.fragment } : getCurrentResolvedLocation()
|
||||||
loc.query = undefined
|
loc.query = undefined
|
||||||
|
|
||||||
if (loc.fragment != null && loc.fragment !== '') {
|
if (loc.fragment != null && loc.fragment !== '') {
|
||||||
|
Loading…
Reference in New Issue
Block a user