4 Commits

Author SHA1 Message Date
15eb997c92 Create main.yml 2024-09-16 10:08:24 +10:00
be0d97661a update README 2024-09-04 18:56:14 +01:00
4e2b23c97e v0.3.1 2024-09-03 10:49:38 +01:00
dc3ce27762 fix collaboration websocket 2024-09-03 10:48:47 +01:00
6 changed files with 67 additions and 15 deletions

47
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: Sync Merged-Downstream with Docmost Upstream Main
on:
schedule:
- cron: '0 0 * * *' # Run daily at midnight UTC
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history to detect changes properly
- name: Set up git
run: |
git config --global user.name "Shadowfita"
git config --global user.email "www.ryan.palmer@hotmail.com"
- name: Fetch upstream
run: |
git remote add upstream https://github.com/docmost/docmost.git
git fetch upstream
- name: Check if upstream has changes
id: check_changes
run: |
UPSTREAM_DIFF=$(git diff --name-only upstream/main)
if [ -z "$UPSTREAM_DIFF" ]; then
echo "No changes in upstream main branch."
echo "::set-output name=changes::false"
else
echo "Changes detected in upstream main branch."
echo "::set-output name=changes::true"
fi
- name: Merge upstream/main into Merged-Downstream
if: steps.check_changes.outputs.changes == 'true'
run: |
git checkout Merged-Downstream
git merge upstream/main
- name: Push changes to Merged-Downstream
if: steps.check_changes.outputs.changes == 'true'
run: |
git push origin Merged-Downstream

View File

@ -17,6 +17,7 @@ To get started with Docmost, please refer to our [documentation](https://docmost
## Features ## Features
- Real-time collaboration - Real-time collaboration
- Diagrams (Draw.io, Excalidraw and Mermaid)
- Spaces - Spaces
- Permissions management - Permissions management
- Groups - Groups
@ -32,4 +33,4 @@ To get started with Docmost, please refer to our [documentation](https://docmost
</p> </p>
### Contributing ### Contributing
See the [development doc](https://docmost.com/docs/self-hosting/development) See the [development documentation](https://docmost.com/docs/self-hosting/development)

View File

@ -1,7 +1,7 @@
{ {
"name": "client", "name": "client",
"private": true, "private": true,
"version": "0.3.0", "version": "0.3.1",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "tsc && vite build", "build": "tsc && vite build",

View File

@ -15,15 +15,19 @@ export function getAppUrl(): string {
} }
export function getBackendUrl(): string { export function getBackendUrl(): string {
return getAppUrl() + "/api"; return getAppUrl() + '/api';
} }
export function getCollaborationUrl(): string { export function getCollaborationUrl(): string {
const COLLAB_PATH = "/collab"; const COLLAB_PATH = '/collab';
const url = process.env.APP_URL || getAppUrl();
const wsProtocol = url.startsWith("https") ? "wss" : "ws"; let url = getAppUrl();
return `${wsProtocol}://${url.split("://")[1]}${COLLAB_PATH}`; if (import.meta.env.DEV) {
url = process.env.APP_URL;
}
const wsProtocol = url.startsWith('https') ? 'wss' : 'ws';
return `${wsProtocol}://${url.split('://')[1]}${COLLAB_PATH}`;
} }
export function getAvatarUrl(avatarUrl: string) { export function getAvatarUrl(avatarUrl: string) {
@ -31,17 +35,17 @@ export function getAvatarUrl(avatarUrl: string) {
return null; return null;
} }
if (avatarUrl?.startsWith("http")) { if (avatarUrl?.startsWith('http')) {
return avatarUrl; return avatarUrl;
} }
return getBackendUrl() + "/attachments/img/avatar/" + avatarUrl; return getBackendUrl() + '/attachments/img/avatar/' + avatarUrl;
} }
export function getSpaceUrl(spaceSlug: string) { export function getSpaceUrl(spaceSlug: string) {
return "/s/" + spaceSlug; return '/s/' + spaceSlug;
} }
export function getFileUrl(src: string) { export function getFileUrl(src: string) {
return src?.startsWith("/files/") ? getBackendUrl() + src : src; return src?.startsWith('/files/') ? getBackendUrl() + src : src;
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "server", "name": "server",
"version": "0.3.0", "version": "0.3.1",
"description": "", "description": "",
"author": "", "author": "",
"private": true, "private": true,

View File

@ -1,7 +1,7 @@
{ {
"name": "docmost", "name": "docmost",
"homepage": "https://docmost.com", "homepage": "https://docmost.com",
"version": "0.3.0", "version": "0.3.1",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "nx run-many -t build", "build": "nx run-many -t build",