Merge branch 'develop' of ssh://git.gezi.vip:6006/gx/dootask
# Conflicts: # public/css/app.css # public/js/app.js # public/js/build/208.js # public/js/build/389.js # public/js/build/406.js # public/js/build/406.js.LICENSE.txt # public/js/build/423.js # public/js/build/459.js # public/js/build/459.js.LICENSE.txt # public/js/build/688.js # public/js/build/688.js.LICENSE.txt # public/js/build/726.js # public/js/build/755.js # public/js/build/93.js # public/js/build/954.js
@ -8,6 +8,7 @@ use App\Models\User;
|
||||
use App\Models\WebSocketDialog;
|
||||
use App\Models\WebSocketDialogMsg;
|
||||
use App\Models\WebSocketDialogMsgRead;
|
||||
use App\Models\WebSocketDialogUser;
|
||||
use App\Module\Base;
|
||||
use Carbon\Carbon;
|
||||
use Request;
|
||||
@ -39,9 +40,10 @@ class DialogController extends AbstractController
|
||||
{
|
||||
$user = User::auth();
|
||||
//
|
||||
$list = WebSocketDialog::select(['web_socket_dialogs.*'])
|
||||
$list = WebSocketDialog::select(['web_socket_dialogs.*','u.top','u.top_at'])
|
||||
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
||||
->where('u.userid', $user->userid)
|
||||
->orderByDesc('u.top')
|
||||
->orderByDesc('web_socket_dialogs.last_at')
|
||||
->paginate(Base::getPaginate(200, 100));
|
||||
$list->transform(function (WebSocketDialog $item) use ($user) {
|
||||
@ -475,4 +477,35 @@ class DialogController extends AbstractController
|
||||
$msg->deleteMsg();
|
||||
return Base::retSuccess("success");
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} api/dialog/top 12. 会话置顶
|
||||
*
|
||||
* @apiDescription 消息撤回限制24小时内,需要token身份
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup dialog
|
||||
* @apiName top
|
||||
*
|
||||
* @apiParam {Number} dialog_id 会话ID
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
* @apiSuccess {Object} data 返回数据
|
||||
*/
|
||||
public function top()
|
||||
{
|
||||
$user = User::auth();
|
||||
$dialogId = intval(Request::input('dialog_id'));
|
||||
$dialogUser = WebSocketDialogUser::whereUserid($user->userid)->whereDialogId($dialogId)->first();
|
||||
if (!$dialogUser) {
|
||||
return Base::retError("会话不存在");
|
||||
}
|
||||
$top = $dialogUser->top === 1 ? 0 : 1;
|
||||
$topAt = $dialogUser->top === 1 ? null : Carbon::now();
|
||||
$dialogUser->top = $top;
|
||||
$dialogUser->top_at = $topAt;
|
||||
$dialogUser->save();
|
||||
return Base::retSuccess("success", $dialogId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -42,7 +42,24 @@ class UsersController extends AbstractController
|
||||
$type = trim(Request::input('type'));
|
||||
$email = trim(Request::input('email'));
|
||||
$password = trim(Request::input('password'));
|
||||
if(!$email){
|
||||
return Base::retError('请输入邮箱地址');
|
||||
}
|
||||
if ($type == 'reg') {
|
||||
$password2 = trim(Request::input('password2'));
|
||||
//邮箱
|
||||
if (!Base::isMail($email)) {
|
||||
return Base::retError('请输入正确的邮箱地址');
|
||||
}
|
||||
if (User::email2userid($email) > 0) {
|
||||
return Base::retError('邮箱地址已存在');
|
||||
}
|
||||
if (empty($password)) {
|
||||
return Base::retError('请输入密码');
|
||||
}
|
||||
if ($password != $password2) {
|
||||
return Base::retError('确认密码输入不一致');
|
||||
}
|
||||
$setting = Base::setting('system');
|
||||
if ($setting['reg'] == 'close') {
|
||||
return Base::retError('未开放注册');
|
||||
@ -64,6 +81,9 @@ class UsersController extends AbstractController
|
||||
return Base::retError('请输入正确的验证码', ['code' => 'need']);
|
||||
}
|
||||
}
|
||||
if (empty($password)) {
|
||||
return Base::retError('请输入密码');
|
||||
}
|
||||
//
|
||||
$retError = function ($msg) use ($email) {
|
||||
Cache::forever("code::" . $email, "need");
|
||||
|
||||
@ -180,13 +180,6 @@ class User extends AbstractModel
|
||||
*/
|
||||
public static function reg($email, $password, $other = [])
|
||||
{
|
||||
//邮箱
|
||||
if (!Base::isMail($email)) {
|
||||
throw new ApiException('请输入正确的邮箱地址');
|
||||
}
|
||||
if (User::email2userid($email) > 0) {
|
||||
throw new ApiException('邮箱地址已存在');
|
||||
}
|
||||
//密码
|
||||
self::passwordPolicy($password);
|
||||
//开始注册
|
||||
|
||||
@ -8,6 +8,8 @@ namespace App\Models;
|
||||
* @property int $id
|
||||
* @property int|null $dialog_id 对话ID
|
||||
* @property int|null $userid 会员ID
|
||||
* @property int|null $top 是否置顶:0否,1是
|
||||
* @property \Illuminate\Support\Carbon|null $top_at 置顶时间
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogUser newModelQuery()
|
||||
|
||||
55
app/Tasks/BatchRemoveFileTask.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tasks;
|
||||
|
||||
use App\Exceptions\ApiException;
|
||||
use App\Models\File;
|
||||
use App\Models\Tmp;
|
||||
use App\Models\User;
|
||||
use App\Models\WebSocketTmpMsg;
|
||||
use Carbon\Carbon;
|
||||
use Log;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* 删除过期临时数据任务
|
||||
* Class DeleteTmpTask
|
||||
* @package App\Tasks
|
||||
*/
|
||||
class BatchRemoveFileTask extends AbstractTask
|
||||
{
|
||||
protected array $_ids = [];
|
||||
|
||||
protected int $_userid;
|
||||
|
||||
public function __construct(array $ids, $userid)
|
||||
{
|
||||
$this->_ids = $ids;
|
||||
$this->_userid = $userid;
|
||||
}
|
||||
|
||||
public function start()
|
||||
{
|
||||
foreach ($this->_ids as $id) {
|
||||
Log::info("---------- $id ----------");
|
||||
Log::info("尝试删除Id为[$id]的文件");
|
||||
$file = File::find($id);
|
||||
if (empty($file)) {
|
||||
Log::warning("Id为[$id]的文件不存在或已被删除");
|
||||
continue;
|
||||
}
|
||||
Log::info("获取到文件名为[" . $file->name . "],类型为[" . ( $file->type ?: $file->ext ) . "]");
|
||||
$permission = $file->getPermission($this->_userid);
|
||||
if ($permission < 1000) {
|
||||
Log::warning("文件[$id][" . $file->name . "]仅限所有者或创建者操作");
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
$file->deleteFile();
|
||||
Log::info("删除Id为[$id]的文件成功");
|
||||
} catch (Throwable $throwable) {
|
||||
Log::error("删除Id为[$id]的文件失败,原因是:" . $throwable->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class WebSocketDialogUsersAddTop extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('web_socket_dialog_users', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('web_socket_dialog_users', 'top')) {
|
||||
$table->tinyInteger('top')->nullable()->default(0)->after('userid')->comment('是否置顶:0否,1是');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('web_socket_dialog_users', function (Blueprint $table) {
|
||||
$table->dropColumn("top");
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class WebSocketDialogUsersAddTopAt extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('web_socket_dialog_users', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('web_socket_dialog_users', 'top_at')) {
|
||||
$table->timestamp('top_at')->nullable()->after('top')->comment('置顶时间');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('web_socket_dialog_users', function (Blueprint $table) {
|
||||
$table->dropColumn("top_at");
|
||||
});
|
||||
}
|
||||
}
|
||||
2
public/css/app.css
vendored
2
public/css/iview.css
vendored
2
public/js/app.js
vendored
1
public/js/build/113.js
vendored
2
public/js/build/208.js
vendored
1
public/js/build/233.js
vendored
Normal file
1
public/js/build/249.js
vendored
2
public/js/build/252.js
vendored
2
public/js/build/423.js
vendored
7
public/js/build/459.js
vendored
1
public/js/build/592.js
vendored
Normal file
2
public/js/build/688.js
vendored
Normal file
15
public/js/build/688.js.LICENSE.txt
Normal file
@ -0,0 +1,15 @@
|
||||
/*!
|
||||
* clipboard.js v2.0.8
|
||||
* https://clipboardjs.com/
|
||||
*
|
||||
* Licensed MIT © Zeno Rocha
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Lodash <https://lodash.com/>
|
||||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
2
public/js/build/726.js
vendored
1
public/js/build/755.js
vendored
Normal file
1
public/js/build/93.js
vendored
Normal file
2
public/js/build/954.js
vendored
1
public/js/build/997.js
vendored
Normal file
13
public/js/drawio/CITATION.cff
Normal file
@ -0,0 +1,13 @@
|
||||
cff-version: 1.2.0
|
||||
message: "To cite draw.io in publications please use:"
|
||||
type: software
|
||||
license: Apache-2.0
|
||||
abstract: "draw.io - JavaScript Diagramming and Whiteboard Application"
|
||||
authors:
|
||||
- name: "JGraph"
|
||||
website: "http://www.diagrams.net"
|
||||
title: "draw.io"
|
||||
version: 15.5.2
|
||||
date-released: 2021-10-14
|
||||
repository-code: "https://github.com/jgraph/drawio"
|
||||
url: "https://www.diagrams.net/"
|
||||
3
public/js/drawio/META-INF/MANIFEST.MF
Normal file
@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
Class-Path:
|
||||
|
||||
27
public/js/drawio/WEB-INF/appengine-web.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
|
||||
|
||||
<threadsafe>true</threadsafe>
|
||||
<sessions-enabled>false</sessions-enabled>
|
||||
<runtime>java8</runtime>
|
||||
|
||||
<!-- Configure java.util.logging -->
|
||||
<system-properties>
|
||||
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
|
||||
</system-properties>
|
||||
|
||||
<!-- Path patterns not supported in production -->
|
||||
<static-files>
|
||||
<include path="/**">
|
||||
<http-header name="Referrer-Policy" value="strict-origin"/>
|
||||
<http-header name="Access-Control-Allow-Origin" value="*"/>
|
||||
<http-header name="X-XSS-Protection" value="1; mode=block"/>
|
||||
<http-header name="X-Content-Type-Options" value="nosniff"/>
|
||||
</include>
|
||||
</static-files>
|
||||
|
||||
<instance-class>F1</instance-class>
|
||||
<automatic-scaling>
|
||||
<max-idle-instances>1</max-idle-instances>
|
||||
</automatic-scaling>
|
||||
</appengine-web-app>
|
||||
1
public/js/drawio/WEB-INF/cloud_convert_api_key
Normal file
@ -0,0 +1 @@
|
||||
Replace_with_your_own_cloud_convert_api_key
|
||||
1
public/js/drawio/WEB-INF/dropbox_client_id
Normal file
@ -0,0 +1 @@
|
||||
Replace_with_your_own_dropbox_client_id
|
||||
1
public/js/drawio/WEB-INF/dropbox_client_secret
Normal file
@ -0,0 +1 @@
|
||||
Replace_with_your_own_dropbox_client_secret
|
||||
1
public/js/drawio/WEB-INF/github_client_id
Normal file
@ -0,0 +1 @@
|
||||
Replace_with_your_own_github_client_id
|
||||
1
public/js/drawio/WEB-INF/github_client_secret
Normal file
@ -0,0 +1 @@
|
||||
Replace_with_your_own_github_client_secret
|
||||
1
public/js/drawio/WEB-INF/gitlab_client_id
Normal file
@ -0,0 +1 @@
|
||||
Replace_with_your_own_gitlab_client_id
|
||||
1
public/js/drawio/WEB-INF/gitlab_client_secret
Normal file
@ -0,0 +1 @@
|
||||
Replace_with_your_own_gitlab_client_secret
|
||||
1
public/js/drawio/WEB-INF/google_client_id
Normal file
@ -0,0 +1 @@
|
||||
Replace_with_your_own_google_client_id
|
||||
1
public/js/drawio/WEB-INF/google_client_secret
Normal file
@ -0,0 +1 @@
|
||||
Replace_with_your_own_google_client_secret
|
||||
1
public/js/drawio/WEB-INF/iconfinder_client_id
Normal file
@ -0,0 +1 @@
|
||||
Replace_with_your_own_iconfinder_client_id
|
||||
1
public/js/drawio/WEB-INF/iconfinder_client_secret
Normal file
@ -0,0 +1 @@
|
||||
Replace_with_your_own_iconfinder_client_secret
|
||||
BIN
public/js/drawio/WEB-INF/lib/cache-api-1.1.1.jar
Normal file
BIN
public/js/drawio/WEB-INF/lib/commons-codec-1.11.jar
Normal file
BIN
public/js/drawio/WEB-INF/lib/commons-fileupload-1.4.jar
Normal file
BIN
public/js/drawio/WEB-INF/lib/commons-io-2.11.0.jar
Normal file
BIN
public/js/drawio/WEB-INF/lib/commons-lang3-3.12.0.jar
Normal file
BIN
public/js/drawio/WEB-INF/lib/commons-logging-1.2.jar
Normal file
BIN
public/js/drawio/WEB-INF/lib/commons-text-1.9.jar
Normal file
BIN
public/js/drawio/WEB-INF/lib/ehcache-3.8.1.jar
Normal file
BIN
public/js/drawio/WEB-INF/lib/gae-stub-1.0.8.jar
Normal file
BIN
public/js/drawio/WEB-INF/lib/gson-2.8.9.jar
Normal file
BIN
public/js/drawio/WEB-INF/lib/httpclient-4.5.13.jar
Normal file
BIN
public/js/drawio/WEB-INF/lib/httpcore-4.4.13.jar
Normal file
BIN
public/js/drawio/WEB-INF/lib/servlet-api.jar
Normal file
BIN
public/js/drawio/WEB-INF/lib/slf4j-api-1.7.25.jar
Normal file
2
public/js/drawio/WEB-INF/logging.properties
Normal file
@ -0,0 +1,2 @@
|
||||
# Set the default logging level for all loggers to WARNING
|
||||
.level = CONFIG
|
||||
1
public/js/drawio/WEB-INF/msgraph_client_id
Normal file
@ -0,0 +1 @@
|
||||
Replace_with_your_own_microsoft_graph_client_id
|
||||
1
public/js/drawio/WEB-INF/msgraph_client_secret
Normal file
@ -0,0 +1 @@
|
||||
Replace_with_your_own_microsoft_graph_client_secret
|
||||
4
public/js/drawio/WEB-INF/pusher.properties
Normal file
@ -0,0 +1,4 @@
|
||||
app_id=Replace_with_your_pusher_app_id
|
||||
key=Replace_with_your_pusher_key
|
||||
secret=Replace_with_your_pusher_secret
|
||||
cluster=Replace_with_your_pusher_cluster
|
||||
140
public/js/drawio/WEB-INF/web.xml
Normal file
@ -0,0 +1,140 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
|
||||
version="3.1">
|
||||
<welcome-file-list>
|
||||
<welcome-file>index.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
<servlet>
|
||||
<description/>
|
||||
<display-name>ProxyServlet</display-name>
|
||||
<servlet-name>ProxyServlet</servlet-name>
|
||||
<servlet-class>com.mxgraph.online.ProxyServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>ProxyServlet</servlet-name>
|
||||
<url-pattern>/proxy</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet>
|
||||
<description/>
|
||||
<display-name>EmbedServlet</display-name>
|
||||
<servlet-name>EmbedServlet</servlet-name>
|
||||
<servlet-class>com.mxgraph.online.EmbedServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>EmbedServlet</servlet-name>
|
||||
<url-pattern>/embed.js</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet>
|
||||
<description/>
|
||||
<display-name>EmbedServlet2</display-name>
|
||||
<servlet-name>EmbedServlet2</servlet-name>
|
||||
<servlet-class>com.mxgraph.online.EmbedServlet2</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>EmbedServlet2</servlet-name>
|
||||
<url-pattern>/embed2.js</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet>
|
||||
<description/>
|
||||
<display-name>ImgurRedirect</display-name>
|
||||
<servlet-name>ImgurRedirect</servlet-name>
|
||||
<servlet-class>com.mxgraph.online.ImgurRedirectServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>ImgurRedirect</servlet-name>
|
||||
<url-pattern>/i/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet>
|
||||
<description/>
|
||||
<display-name>GitHubAuthServlet</display-name>
|
||||
<servlet-name>GitHubAuthServlet</servlet-name>
|
||||
<servlet-class>com.mxgraph.online.GitHubAuthServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>GitHubAuthServlet</servlet-name>
|
||||
<url-pattern>/github2</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet>
|
||||
<display-name>LogServlet</display-name>
|
||||
<servlet-name>LogServlet</servlet-name>
|
||||
<servlet-class>com.mxgraph.online.LogServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>LogServlet</servlet-name>
|
||||
<url-pattern>/log</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet>
|
||||
<description/>
|
||||
<display-name>MSGraphAuthServlet</display-name>
|
||||
<servlet-name>MSGraphAuthServlet</servlet-name>
|
||||
<servlet-class>com.mxgraph.online.MSGraphAuthServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>MSGraphAuthServlet</servlet-name>
|
||||
<url-pattern>/microsoft</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet>
|
||||
<description/>
|
||||
<display-name>GoogleAuthServlet</display-name>
|
||||
<servlet-name>GoogleAuthServlet</servlet-name>
|
||||
<servlet-class>com.mxgraph.online.GoogleAuthServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>GoogleAuthServlet</servlet-name>
|
||||
<url-pattern>/google</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet>
|
||||
<description/>
|
||||
<display-name>ConverterServlet</display-name>
|
||||
<servlet-name>ConverterServlet</servlet-name>
|
||||
<servlet-class>com.mxgraph.online.ConverterServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>ConverterServlet</servlet-name>
|
||||
<url-pattern>/convert</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet>
|
||||
<description/>
|
||||
<display-name>ExportProxyServlet</display-name>
|
||||
<servlet-name>ExportProxyServlet</servlet-name>
|
||||
<servlet-class>com.mxgraph.online.ExportProxyServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>ExportProxyServlet</servlet-name>
|
||||
<url-pattern>/export</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>ExportProxyServlet</servlet-name>
|
||||
<url-pattern>/service/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet>
|
||||
<description/>
|
||||
<display-name>GitlabAuthServlet</display-name>
|
||||
<servlet-name>GitlabAuthServlet</servlet-name>
|
||||
<servlet-class>com.mxgraph.online.GitlabAuthServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>GitlabAuthServlet</servlet-name>
|
||||
<url-pattern>/gitlab</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet>
|
||||
<description/>
|
||||
<display-name>DropboxAuthServlet</display-name>
|
||||
<servlet-name>DropboxAuthServlet</servlet-name>
|
||||
<servlet-class>com.mxgraph.online.DropboxAuthServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>DropboxAuthServlet</servlet-name>
|
||||
<url-pattern>/dropbox</url-pattern>
|
||||
</servlet-mapping>
|
||||
<mime-mapping>
|
||||
<extension>css</extension>
|
||||
<mime-type>text/css</mime-type>
|
||||
</mime-mapping>
|
||||
<mime-mapping>
|
||||
<extension>manifest</extension>
|
||||
<mime-type>text/cache-manifest</mime-type>
|
||||
</mime-mapping>
|
||||
</web-app>
|
||||
12
public/js/drawio/clear.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Clear diagrams.net Cache</title>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
</head>
|
||||
<body style="font-size: large;">
|
||||
<script src="js/clear.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
6
public/js/drawio/disableUpdate.js
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
disableUpdate: function()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
37
public/js/drawio/dropbox.html
Normal file
@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
if (window.opener != null && window.opener.onDropboxCallback != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var hash = window.location.hash;
|
||||
var i1 = hash.indexOf('access_token=');
|
||||
var token = null;
|
||||
|
||||
if (i1 >= 0)
|
||||
{
|
||||
var i2 = hash.indexOf('&', i1 + 13);
|
||||
|
||||
if (i2 > i1)
|
||||
{
|
||||
token = hash.substring(i1 + 13, i2);
|
||||
}
|
||||
}
|
||||
|
||||
// Continues execution of main program flow
|
||||
window.opener.onDropboxCallback(token, window);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
alert('Dropbox: ' + e.toString());
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
79
public/js/drawio/electron-preload.js
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
const {
|
||||
contextBridge,
|
||||
ipcRenderer
|
||||
} = require("electron");
|
||||
|
||||
let reqId = 1;
|
||||
let reqInfo = {};
|
||||
let fileChangedListeners = {};
|
||||
|
||||
ipcRenderer.on('mainResp', (event, resp) =>
|
||||
{
|
||||
var callbacks = reqInfo[resp.reqId];
|
||||
|
||||
if (resp.error)
|
||||
{
|
||||
callbacks.error(resp.msg, resp.e);
|
||||
}
|
||||
else
|
||||
{
|
||||
callbacks.callback(resp.data);
|
||||
}
|
||||
|
||||
delete reqInfo[resp.reqId];
|
||||
});
|
||||
|
||||
ipcRenderer.on('fileChanged', (event, resp) =>
|
||||
{
|
||||
var listener = fileChangedListeners[resp.path];
|
||||
|
||||
if (listener)
|
||||
{
|
||||
listener(resp.curr, resp.prev);
|
||||
}
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld(
|
||||
'electron', {
|
||||
request: (msg, callback, error) =>
|
||||
{
|
||||
msg.reqId = reqId++;
|
||||
reqInfo[msg.reqId] = {callback: callback, error: error};
|
||||
|
||||
//TODO Maybe a special function for this better than this hack?
|
||||
//File watch special case where the callback is called multiple times
|
||||
if (msg.action == 'watchFile')
|
||||
{
|
||||
fileChangedListeners[msg.path] = msg.listener;
|
||||
delete msg.listener;
|
||||
}
|
||||
|
||||
ipcRenderer.send('rendererReq', msg);
|
||||
},
|
||||
registerMsgListener: function(action, callback)
|
||||
{
|
||||
ipcRenderer.on(action, function(event, args)
|
||||
{
|
||||
callback(args);
|
||||
});
|
||||
},
|
||||
sendMessage: function(action, args)
|
||||
{
|
||||
ipcRenderer.send(action, args);
|
||||
},
|
||||
listenOnce: function(action, callback)
|
||||
{
|
||||
ipcRenderer.once(action, function(event, args)
|
||||
{
|
||||
callback(args);
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
contextBridge.exposeInMainWorld(
|
||||
'process', {
|
||||
type: process.type,
|
||||
versions: process.versions
|
||||
}
|
||||
);
|
||||
1908
public/js/drawio/electron.js
vendored
Normal file
1
public/js/drawio/export-fonts.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
/* Add any special fonts css for export3.html (mainly PDF export) */
|
||||
19
public/js/drawio/export3.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<script src="js/export-init.js"></script>
|
||||
<!-- CSS for print output is needed for using current window -->
|
||||
<style type="text/css">
|
||||
span.MathJax_SVG svg { shape-rendering: crispEdges; }
|
||||
table.mxPageSelector { display: none; }
|
||||
hr.mxPageBreak { display: none; }
|
||||
</style>
|
||||
<link rel="stylesheet" href="mxgraph/css/common.css" charset="UTF-8" type="text/css">
|
||||
<link rel="stylesheet" href="export-fonts.css" charset="UTF-8" type="text/css">
|
||||
<script src="js/app.min.js"></script>
|
||||
<script src="js/export.js"></script>
|
||||
</head>
|
||||
<body style="margin:0px;overflow:hidden">
|
||||
</body>
|
||||
</html>
|
||||
BIN
public/js/drawio/favicon.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |
33
public/js/drawio/github.html
Normal file
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
This window will be closed automatically.
|
||||
<script>
|
||||
if (window.opener != null && window.opener.onGitHubCallback != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var search = window.location.search;
|
||||
var idx1 = search.indexOf('code=');
|
||||
var code = null;
|
||||
|
||||
if (idx1 >= 0)
|
||||
{
|
||||
code = search.substring(idx1 + 5);
|
||||
}
|
||||
|
||||
// Continues execution of main program flow
|
||||
window.opener.onGitHubCallback(code, window);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
alert('GitHub: ' + e.toString());
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
35
public/js/drawio/gitlab.html
Normal file
@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
This window will be closed automatically.
|
||||
<script>
|
||||
if (window.opener != null && window.opener.onGitLabCallback != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var search = window.location.href;
|
||||
var idx1 = search.indexOf('access_token=');
|
||||
var code = null;
|
||||
|
||||
if (idx1 >= 0)
|
||||
{
|
||||
var idx2 = search.indexOf('&', idx1);
|
||||
code = search.substring(idx1 + 13, idx2);
|
||||
}
|
||||
|
||||
// Continues execution of main program flow
|
||||
window.opener.onGitLabCallback(code, window);
|
||||
window.close();
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
alert('GitLab error: ' + e.toString());
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
BIN
public/js/drawio/images/1x1.png
Normal file
|
After Width: | Height: | Size: 67 B |
BIN
public/js/drawio/images/2x2.png
Normal file
|
After Width: | Height: | Size: 67 B |
BIN
public/js/drawio/images/3x3.png
Normal file
|
After Width: | Height: | Size: 67 B |
BIN
public/js/drawio/images/ajax-loader.gif
Normal file
|
After Width: | Height: | Size: 11 KiB |
16
public/js/drawio/images/all-diagrams-sel.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="14px" height="10px" viewBox="0 0 14 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: sketchtool 51.2 (57519) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>0E334220-6C14-41EC-B9A8-AD4B4ACC6069</title>
|
||||
<desc>Created with sketchtool.</desc>
|
||||
<defs></defs>
|
||||
<g id="Artboards" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="V5-START-grid-veiw" transform="translate(-1005.000000, -468.000000)" fill="#FFFFFF">
|
||||
<g id="recent-diagrams" transform="translate(428.000000, 442.000000)">
|
||||
<g id="all-diagrams" transform="translate(567.000000, 18.000000)">
|
||||
<path d="M21.5,13 C20.6715729,13 20,12.3284271 20,11.5 C20,10.6715729 20.6715729,10 21.5,10 C22.3284271,10 23,10.6715729 23,11.5 C23,12.3284271 22.3284271,13 21.5,13 Z M21,14 L22,14 C23.1045695,14 24,14.8954305 24,16 L24,18 L21,18 L21,14 Z M12.5,13 C11.6715729,13 11,12.3284271 11,11.5 C11,10.6715729 11.6715729,10 12.5,10 C13.3284271,10 14,10.6715729 14,11.5 C14,12.3284271 13.3284271,13 12.5,13 Z M12,14 L13,14 L13,18 L10,18 L10,16 C10,14.8954305 10.8954305,14 12,14 Z M17,12 C15.8954305,12 15,11.1045695 15,10 C15,8.8954305 15.8954305,8 17,8 C18.1045695,8 19,8.8954305 19,10 C19,11.1045695 18.1045695,12 17,12 Z M16,13 L18,13 C19.1045695,13 20,13.8954305 20,15 L20,18 L14,18 L14,15 C14,13.8954305 14.8954305,13 16,13 Z" id="Combined-Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
16
public/js/drawio/images/all-diagrams.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="14px" height="10px" viewBox="0 0 14 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: sketchtool 51.2 (57519) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>0E334220-6C14-41EC-B9A8-AD4B4ACC6069</title>
|
||||
<desc>Created with sketchtool.</desc>
|
||||
<defs></defs>
|
||||
<g id="Artboards" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="V5-START-grid-veiw" transform="translate(-1005.000000, -468.000000)" fill="#555555">
|
||||
<g id="recent-diagrams" transform="translate(428.000000, 442.000000)">
|
||||
<g id="all-diagrams" transform="translate(567.000000, 18.000000)">
|
||||
<path d="M21.5,13 C20.6715729,13 20,12.3284271 20,11.5 C20,10.6715729 20.6715729,10 21.5,10 C22.3284271,10 23,10.6715729 23,11.5 C23,12.3284271 22.3284271,13 21.5,13 Z M21,14 L22,14 C23.1045695,14 24,14.8954305 24,16 L24,18 L21,18 L21,14 Z M12.5,13 C11.6715729,13 11,12.3284271 11,11.5 C11,10.6715729 11.6715729,10 12.5,10 C13.3284271,10 14,10.6715729 14,11.5 C14,12.3284271 13.3284271,13 12.5,13 Z M12,14 L13,14 L13,18 L10,18 L10,16 C10,14.8954305 10.8954305,14 12,14 Z M17,12 C15.8954305,12 15,11.1045695 15,10 C15,8.8954305 15.8954305,8 17,8 C18.1045695,8 19,8.8954305 19,10 C19,11.1045695 18.1045695,12 17,12 Z M16,13 L18,13 C19.1045695,13 20,13.8954305 20,15 L20,18 L14,18 L14,15 C14,13.8954305 14.8954305,13 16,13 Z" id="Combined-Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
BIN
public/js/drawio/images/android-chrome-192x192.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
public/js/drawio/images/android-chrome-196x196.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
public/js/drawio/images/android-chrome-512x512.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
public/js/drawio/images/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
public/js/drawio/images/aui-wait.gif
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
public/js/drawio/images/broken.png
Normal file
|
After Width: | Height: | Size: 264 B |
9
public/js/drawio/images/browserconfig.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/images/mstile-150x150.png"/>
|
||||
<TileColor>#d89000</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
||||
BIN
public/js/drawio/images/check.png
Normal file
|
After Width: | Height: | Size: 520 B |
BIN
public/js/drawio/images/checkmark.gif
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
public/js/drawio/images/chevron-down.png
Normal file
|
After Width: | Height: | Size: 125 B |
BIN
public/js/drawio/images/chevron-up.png
Normal file
|
After Width: | Height: | Size: 124 B |
BIN
public/js/drawio/images/clear.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
public/js/drawio/images/close.png
Normal file
|
After Width: | Height: | Size: 116 B |
BIN
public/js/drawio/images/cloud-connector-atlas.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
public/js/drawio/images/collapsed.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
public/js/drawio/images/connector.png
Normal file
|
After Width: | Height: | Size: 226 B |
BIN
public/js/drawio/images/default-user.jpg
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
public/js/drawio/images/delete.png
Normal file
|
After Width: | Height: | Size: 512 B |
BIN
public/js/drawio/images/document-google-drive-icon-80.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
public/js/drawio/images/download.png
Normal file
|
After Width: | Height: | Size: 111 B |
BIN
public/js/drawio/images/draw-search.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
98
public/js/drawio/images/draw-search.svg
Normal file
@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="1.0beta1 (32d4812, 2019-09-19)"
|
||||
sodipodi:docname="drawlogo-text-bottom copy.svg"
|
||||
xml:space="preserve"
|
||||
style="enable-background:new 0 0 161.6 217.4;"
|
||||
viewBox="0 0 161.6 217.4"
|
||||
y="0px"
|
||||
x="0px"
|
||||
id="Ebene_1"
|
||||
version="1.1"><metadata
|
||||
id="metadata43">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs41">
|
||||
|
||||
|
||||
|
||||
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
inkscape:current-layer="Ebene_1"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:window-y="23"
|
||||
inkscape:window-x="0"
|
||||
inkscape:cy="132.49309"
|
||||
inkscape:cx="73.775536"
|
||||
inkscape:zoom="1.979899"
|
||||
showgrid="false"
|
||||
id="namedview39"
|
||||
inkscape:window-height="1229"
|
||||
inkscape:window-width="1967"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
inkscape:document-rotation="0"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff" />
|
||||
|
||||
<style
|
||||
id="style10"
|
||||
type="text/css">
|
||||
.st0{fill:#F08705;}
|
||||
.st1{fill:#DF6C0C;}
|
||||
.st2{fill:#FFFFFF;}
|
||||
.st3{fill:#333333;}
|
||||
</style>
|
||||
|
||||
<path
|
||||
class="st0"
|
||||
d="m 161.6,154.7 c 0,3.9 -3.2,6.9 -6.9,6.9 H 6.9 C 3,161.6 0,158.4 0,154.7 V 6.9 C 0,3 3.2,0 6.9,0 h 147.8 c 3.9,0 6.9,3.2 6.9,6.9 z"
|
||||
id="path12"
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:1;stop-opacity:1" />
|
||||
<g
|
||||
transform="matrix(0.78848791,0,0,0.77866629,34.180353,35.767528)"
|
||||
id="g16"
|
||||
style="opacity:1;stop-opacity:1">
|
||||
<path
|
||||
class="st1"
|
||||
d="m 161.6,154.7 c 0,3.9 -3.2,6.9 -6.9,6.9 H 55.3 l -32.2,-32.7 20,-32.7 59.4,-73.8 58.9,60.7 z"
|
||||
id="path14"
|
||||
inkscape:connector-curvature="0" />
|
||||
|
||||
</g>
|
||||
<path
|
||||
class="st2"
|
||||
d="M 103.85111,83.757028 H 97.468953 L 90.711376,72.49346 c 1.501684,-0.294472 2.627947,-1.619598 2.627947,-3.165578 v -8.502889 c 0,-1.803643 -1.464142,-3.239196 -3.303704,-3.239196 H 78.772991 c -1.839563,0 -3.303705,1.435553 -3.303705,3.239196 v 8.502889 c 0,1.582789 1.126263,2.871106 2.590405,3.165578 l -6.757577,11.300377 h -6.382156 c -1.839562,0 -3.303704,1.435553 -3.303704,3.239196 v 8.50289 c 0,1.803643 1.464142,3.239196 3.303704,3.239196 h 11.262628 c 1.839563,0 3.303704,-1.435553 3.303704,-3.239196 v -8.50289 c 0,-1.803643 -1.464141,-3.239196 -3.303704,-3.239196 h -1.088721 l 6.682493,-11.189949 h 5.218351 l 6.720035,11.189949 h -1.126263 c -1.839563,0 -3.303704,1.435553 -3.303704,3.239196 v 8.50289 c 0,1.803643 1.464141,3.239196 3.303704,3.239196 h 11.262629 c 1.83956,0 3.3037,-1.435553 3.3037,-3.239196 v -8.50289 c 0,-1.803643 -1.46414,-3.276005 -3.3037,-3.276005 z"
|
||||
id="path18"
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:1;stroke-width:0.371738;stop-opacity:1" />
|
||||
|
||||
<path
|
||||
class="st2"
|
||||
d="m 0,0 -23.738,17.487 c -2.462,1.924 -5.005,2.709 -7.002,2.477 4.853,6.568 7.486,14.827 6.874,23.611 -1.369,19.591 -18.363,34.362 -37.953,32.991 -19.59,-1.37 -34.362,-18.364 -32.993,-37.953 1.371,-19.592 18.363,-34.362 37.953,-32.992 8.786,0.612 16.596,4.372 22.424,10.093 0.05,-2.009 1.179,-4.417 3.427,-6.588 l 20.621,-21.075 c 3.521,-3.394 8.872,-3.329 11.896,0.148 C 4.534,-8.321 3.854,-3.012 0,0 m -57.505,14.898 c -14.464,-1.01 -27.011,9.899 -28.022,24.361 -1.01,14.465 9.897,27.012 24.36,28.023 14.463,1.013 27.011,-9.896 28.023,-24.36 1.01,-14.464 -9.897,-27.012 -24.361,-28.024"
|
||||
id="path20"
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:1;stroke-width:0.371738;stop-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |