diff --git a/docker/nginx-drawio/Dockerfile b/docker/nginx-drawio/Dockerfile
index 921586b7..9c70f0c3 100644
--- a/docker/nginx-drawio/Dockerfile
+++ b/docker/nginx-drawio/Dockerfile
@@ -5,13 +5,17 @@ RUN apt-get update && \
mkdir -p /etc/nginx/servers /var/www && \
wget https://github.com/jgraph/drawio/releases/download/v24.4.10/draw.war -O /var/www/draw.war && \
wget https://github.com/mozilla/pdf.js/releases/download/v4.3.136/pdfjs-4.3.136-dist.zip -O /var/www/pdfjs.zip && \
+ wget https://github.com/jamebal/excalidraw/releases/download/v0.17.3/build.tar.gz -O /var/www/excalidraw.tar.gz && \
+ mkdir -p /var/www/excalidraw && \
unzip /var/www/draw.war -d /var/www/draw && \
unzip /var/www/pdfjs.zip -d /var/www/pdfjs && \
- rm -rf /var/www/pdfjs.zip /var/www/draw.war /var/www/draw/META-INF /var/www/draw/WEB-INF && \
+ tar -xvf /var/www/excalidraw.tar.gz -C /var/www/excalidraw && \
+ rm -rf /var/www/pdfjs.zip /var/www/excalidraw.tar.gz /var/www/draw.war /var/www/draw/META-INF /var/www/draw/WEB-INF && \
apt-get remove -y unzip wget && \
apt-get autoremove -y && \
apt-get clean
COPY docker/nginx-drawio/drawio.conf /etc/nginx/servers/drawio.conf
+COPY docker/nginx-drawio/excalidraw.conf /etc/nginx/servers/excalidraw.conf
COPY docker/nginx-drawio/pdfjs.conf /etc/nginx/servers/pdfjs.conf
COPY docker/nginx-drawio/mime.types /etc/nginx/mime.types
diff --git a/docker/nginx-drawio/excalidraw.conf b/docker/nginx-drawio/excalidraw.conf
new file mode 100644
index 00000000..34b139b6
--- /dev/null
+++ b/docker/nginx-drawio/excalidraw.conf
@@ -0,0 +1,10 @@
+server {
+ listen 8082;
+ server_name localhost;
+ root /var/www/excalidraw;
+ client_max_body_size 100m;
+ location / {
+ try_files $uri $uri/ /index.html;
+ index index.html index.htm;
+ }
+}
diff --git a/nginx.conf b/nginx.conf
index 8a2ddce6..fb8dbac5 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -243,6 +243,24 @@ http {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
+
+ location /excalidraw/app/ {
+ proxy_pass http://localhost:8082/excalidraw/app/;
+ proxy_http_version 1.1;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Real-PORT $remote_port;
+ proxy_set_header X-Forwarded-Host $the_host//excalidraw/app;
+ proxy_set_header X-Forwarded-Proto $the_scheme;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header Host $http_host;
+ proxy_set_header Scheme $scheme;
+ proxy_set_header Server-Protocol $server_protocol;
+ proxy_set_header Server-Name $server_name;
+ proxy_set_header Server-Addr $server_addr;
+ proxy_set_header Server-Port $server_port;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection $connection_upgrade;
+ }
}
include servers/*;
diff --git a/nginx.conf.no_office.template b/nginx.conf.no_office.template
index bb77ece4..f99ec8fc 100644
--- a/nginx.conf.no_office.template
+++ b/nginx.conf.no_office.template
@@ -225,6 +225,24 @@ http {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
+
+ location /excalidraw/app/ {
+ proxy_pass http://localhost:8082/excalidraw/app/;
+ proxy_http_version 1.1;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Real-PORT $remote_port;
+ proxy_set_header X-Forwarded-Host $the_host//excalidraw/app;
+ proxy_set_header X-Forwarded-Proto $the_scheme;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header Host $http_host;
+ proxy_set_header Scheme $scheme;
+ proxy_set_header Server-Protocol $server_protocol;
+ proxy_set_header Server-Name $server_name;
+ proxy_set_header Server-Addr $server_addr;
+ proxy_set_header Server-Port $server_port;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection $connection_upgrade;
+ }
}
include servers/*;
diff --git a/nginx.conf.template b/nginx.conf.template
index 2c8c3391..f7e3b9ed 100644
--- a/nginx.conf.template
+++ b/nginx.conf.template
@@ -243,6 +243,24 @@ http {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
+
+ location /excalidraw/app/ {
+ proxy_pass http://localhost:8082/excalidraw/app/;
+ proxy_http_version 1.1;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Real-PORT $remote_port;
+ proxy_set_header X-Forwarded-Host $the_host//excalidraw/app;
+ proxy_set_header X-Forwarded-Proto $the_scheme;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header Host $http_host;
+ proxy_set_header Scheme $scheme;
+ proxy_set_header Server-Protocol $server_protocol;
+ proxy_set_header Server-Name $server_name;
+ proxy_set_header Server-Addr $server_addr;
+ proxy_set_header Server-Port $server_port;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection $connection_upgrade;
+ }
}
include servers/*;
diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue
index e4f47ead..50b7f0b0 100644
--- a/src/components/ShowFile/ShowFile.vue
+++ b/src/components/ShowFile/ShowFile.vue
@@ -3607,6 +3607,10 @@ export default {
this.newCreateFileDialogTitle = '新建Word文档'
this.createNewFile('docx')
break
+ case 'createExcalidrawFile':
+ this.newCreateFileDialogTitle = '新建白板'
+ this.createNewFile('excalidraw')
+ break
case 'createExcelFile':
this.newCreateFileDialogTitle = '新建Excel工作表'
this.createNewFile('xlsx')
diff --git a/src/components/office/ExcalidrawEditor.vue b/src/components/office/ExcalidrawEditor.vue
new file mode 100644
index 00000000..08bca7e8
--- /dev/null
+++ b/src/components/office/ExcalidrawEditor.vue
@@ -0,0 +1,408 @@
+
+
+
+
+
{{ title }}
+
+
+
+ 取消预览
+
+
+
+
+
+
+ 保存
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/preview/IframePreview.vue b/src/components/preview/IframePreview.vue
index 30d56d65..fe2031f5 100644
--- a/src/components/preview/IframePreview.vue
+++ b/src/components/preview/IframePreview.vue
@@ -19,6 +19,7 @@
+
@@ -31,6 +32,7 @@