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
- Real-time collaboration
- Diagrams (Draw.io, Excalidraw and Mermaid)
- Spaces
- Permissions management
- Groups
@ -32,4 +33,4 @@ To get started with Docmost, please refer to our [documentation](https://docmost
</p>
### 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",
"private": true,
"version": "0.3.0",
"version": "0.3.1",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",

View File

@ -7,23 +7,27 @@ declare global {
export function getAppUrl(): string {
//let appUrl = window.CONFIG?.APP_URL || process.env.APP_URL;
// if (import.meta.env.DEV) {
// return appUrl || "http://localhost:3000";
// if (import.meta.env.DEV) {
// return appUrl || "http://localhost:3000";
//}
return `${window.location.protocol}//${window.location.host}`;
}
export function getBackendUrl(): string {
return getAppUrl() + "/api";
return getAppUrl() + '/api';
}
export function getCollaborationUrl(): string {
const COLLAB_PATH = "/collab";
const url = process.env.APP_URL || getAppUrl();
const COLLAB_PATH = '/collab';
const wsProtocol = url.startsWith("https") ? "wss" : "ws";
return `${wsProtocol}://${url.split("://")[1]}${COLLAB_PATH}`;
let url = getAppUrl();
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) {
@ -31,17 +35,17 @@ export function getAvatarUrl(avatarUrl: string) {
return null;
}
if (avatarUrl?.startsWith("http")) {
if (avatarUrl?.startsWith('http')) {
return avatarUrl;
}
return getBackendUrl() + "/attachments/img/avatar/" + avatarUrl;
return getBackendUrl() + '/attachments/img/avatar/' + avatarUrl;
}
export function getSpaceUrl(spaceSlug: string) {
return "/s/" + spaceSlug;
return '/s/' + spaceSlug;
}
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",
"version": "0.3.0",
"version": "0.3.1",
"description": "",
"author": "",
"private": true,

View File

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