Compare commits
2 Commits
dev-profil
...
v1.3.15
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6584259454 | ||
|
|
03d0f56095 |
1
.github/workflows/publish.yml
vendored
1
.github/workflows/publish.yml
vendored
@@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- "pro"
|
||||
- "dev"
|
||||
|
||||
jobs:
|
||||
check-version:
|
||||
|
||||
@@ -12,7 +12,6 @@ use App\Module\AI;
|
||||
use App\Module\Doo;
|
||||
use App\Models\File;
|
||||
use App\Models\User;
|
||||
use App\Models\UserBot;
|
||||
use App\Module\Base;
|
||||
use App\Module\Timer;
|
||||
use App\Models\Setting;
|
||||
@@ -444,29 +443,6 @@ class DialogController extends AbstractController
|
||||
return Base::retError('打开会话失败');
|
||||
}
|
||||
$data = WebSocketDialog::synthesizeData($dialog->id, $user->userid);
|
||||
|
||||
if ($userid > 0) {
|
||||
$botTarget = User::whereUserid($userid)->whereBot(1)->first();
|
||||
if ($botTarget) {
|
||||
$userBot = UserBot::whereBotId($botTarget->userid)->first();
|
||||
if ($userBot) {
|
||||
$userBot->dispatchWebhook(UserBot::WEBHOOK_EVENT_DIALOG_OPEN, [
|
||||
'dialog_id' => $dialog->id,
|
||||
'dialog_type' => $dialog->type,
|
||||
'session_id' => $dialog->session_id,
|
||||
'dialog_name' => $dialog->getGroupName(),
|
||||
'user' => [
|
||||
'userid' => $user->userid,
|
||||
'email' => $user->email,
|
||||
'nickname' => $user->nickname,
|
||||
],
|
||||
], 10, [
|
||||
'dialog' => $dialog->id,
|
||||
'operator' => $user->userid,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return Base::retSuccess('success', $data);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,8 +34,6 @@ use App\Models\WebSocketDialogUser;
|
||||
use App\Models\UserTaskBrowse;
|
||||
use App\Models\UserFavorite;
|
||||
use App\Models\UserRecentItem;
|
||||
use App\Models\UserTag;
|
||||
use App\Models\UserTagRecognition;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Models\UserEmailVerification;
|
||||
use App\Module\AgoraIO\AgoraTokenGenerator;
|
||||
@@ -357,9 +355,6 @@ class UsersController extends AbstractController
|
||||
$data['nickname_original'] = $user->getRawOriginal('nickname');
|
||||
$data['department_name'] = $user->getDepartmentName();
|
||||
$data['department_owner'] = UserDepartment::where('parent_id',0)->where('owner_userid', $user->userid)->exists(); // 适用默认部门下第1级负责人才能添加部门OKR
|
||||
$tagMeta = UserTag::listWithMeta($user->userid, $user);
|
||||
$data['personal_tags'] = $tagMeta['top'];
|
||||
$data['personal_tags_total'] = $tagMeta['total'];
|
||||
return Base::retSuccess('success', $data);
|
||||
}
|
||||
|
||||
@@ -420,9 +415,6 @@ class UsersController extends AbstractController
|
||||
* @apiParam {String} [tel] 电话
|
||||
* @apiParam {String} [nickname] 昵称
|
||||
* @apiParam {String} [profession] 职位/职称
|
||||
* @apiParam {String} [birthday] 生日(格式:YYYY-MM-DD)
|
||||
* @apiParam {String} [address] 地址
|
||||
* @apiParam {String} [introduction] 个人简介
|
||||
* @apiParam {String} [lang] 语言(比如:zh/en)
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
@@ -486,40 +478,6 @@ class UsersController extends AbstractController
|
||||
$upLdap['employeeType'] = $profession;
|
||||
}
|
||||
}
|
||||
// 生日
|
||||
if (Arr::exists($data, 'birthday')) {
|
||||
$birthday = trim((string) Request::input('birthday'));
|
||||
if ($birthday === '') {
|
||||
$user->birthday = null;
|
||||
} else {
|
||||
try {
|
||||
if (preg_match('/^\d{4}-\d{2}-\d{2}$/', $birthday)) {
|
||||
$birthdayDate = Carbon::createFromFormat('Y-m-d', $birthday);
|
||||
} else {
|
||||
$birthdayDate = Carbon::parse($birthday);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return Base::retError('生日格式错误');
|
||||
}
|
||||
$user->birthday = $birthdayDate->format('Y-m-d');
|
||||
}
|
||||
}
|
||||
// 地址
|
||||
if (Arr::exists($data, 'address')) {
|
||||
$address = trim((string) Request::input('address'));
|
||||
if (mb_strlen($address) > 100) {
|
||||
return Base::retError('地址最多只能设置100个字');
|
||||
}
|
||||
$user->address = $address ?: null;
|
||||
}
|
||||
// 个人简介
|
||||
if (Arr::exists($data, 'introduction')) {
|
||||
$introduction = trim((string) Request::input('introduction'));
|
||||
if (mb_strlen($introduction) > 500) {
|
||||
return Base::retError('个人简介最多只能设置500个字');
|
||||
}
|
||||
$user->introduction = $introduction ?: null;
|
||||
}
|
||||
// 语言
|
||||
if (Arr::exists($data, 'lang')) {
|
||||
$lang = trim(Request::input('lang'));
|
||||
@@ -778,12 +736,8 @@ class UsersController extends AbstractController
|
||||
public function basic()
|
||||
{
|
||||
$sharekey = Request::header('sharekey');
|
||||
$shareInfo = $sharekey ? Meeting::getShareInfo($sharekey) : null;
|
||||
$viewer = null;
|
||||
if (empty($shareInfo)) {
|
||||
$viewer = User::auth();
|
||||
} elseif (Doo::userId() > 0) {
|
||||
$viewer = User::whereUserid(Doo::userId())->first();
|
||||
if (empty($sharekey) || !Meeting::getShareInfo($sharekey)) {
|
||||
User::auth();
|
||||
}
|
||||
//
|
||||
$userid = Request::input('userid');
|
||||
@@ -801,9 +755,6 @@ class UsersController extends AbstractController
|
||||
$basic = UserDelete::userid2basic($id);
|
||||
}
|
||||
if ($basic) {
|
||||
$tagMeta = UserTag::listWithMeta($basic->userid, $viewer);
|
||||
$basic->personal_tags = $tagMeta['top'];
|
||||
$basic->personal_tags_total = $tagMeta['total'];
|
||||
//
|
||||
$retArray[] = $basic;
|
||||
}
|
||||
@@ -1468,233 +1419,6 @@ class UsersController extends AbstractController
|
||||
return Base::retSuccess('success', $data);
|
||||
}
|
||||
|
||||
protected function buildUserTagResponse(?User $viewer, int $targetUserId, string $message = 'success')
|
||||
{
|
||||
return Base::retSuccess($message, UserTag::listWithMeta($targetUserId, $viewer));
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} api/users/tags/lists 10.1. 获取个性标签列表
|
||||
*
|
||||
* @apiDescription 需要token身份
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup users
|
||||
* @apiName tags__lists
|
||||
*
|
||||
* @apiParam {Number} [userid] 会员ID(不传默认为当前用户)
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
* @apiSuccess {Object} data 返回数据
|
||||
* @apiSuccessExample {json} data:
|
||||
{
|
||||
"list": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "认真负责",
|
||||
"recognition_total": 3,
|
||||
"recognized": true,
|
||||
"can_edit": true,
|
||||
"can_delete": true
|
||||
}
|
||||
],
|
||||
"top": [ ],
|
||||
"total": 1
|
||||
}
|
||||
*/
|
||||
public function tags__lists()
|
||||
{
|
||||
$viewer = User::auth();
|
||||
$userid = intval(Request::input('userid')) ?: $viewer->userid;
|
||||
$target = User::whereUserid($userid)->first();
|
||||
if (empty($target)) {
|
||||
return Base::retError('会员不存在');
|
||||
}
|
||||
return $this->buildUserTagResponse($viewer, $target->userid);
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {post} api/users/tags/add 10.2. 新增个性标签
|
||||
*
|
||||
* @apiDescription 需要token身份
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup users
|
||||
* @apiName tags__add
|
||||
*
|
||||
* @apiParam {Number} [userid] 会员ID(不传默认为当前用户)
|
||||
* @apiParam {String} name 标签名称(1-20个字符)
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
* @apiSuccess {Object} data 返回数据,同“获取个性标签列表”
|
||||
*/
|
||||
public function tags__add()
|
||||
{
|
||||
$viewer = User::auth();
|
||||
$userid = intval(Request::input('userid')) ?: $viewer->userid;
|
||||
$target = User::whereUserid($userid)->first();
|
||||
if (empty($target)) {
|
||||
return Base::retError('会员不存在');
|
||||
}
|
||||
|
||||
$name = trim((string) Request::input('name'));
|
||||
if ($name === '') {
|
||||
return Base::retError('请输入个性标签');
|
||||
}
|
||||
if (mb_strlen($name) > 20) {
|
||||
return Base::retError('标签名称最多只能设置20个字');
|
||||
}
|
||||
if (UserTag::where('user_id', $userid)->where('name', $name)->exists()) {
|
||||
return Base::retError('标签已存在');
|
||||
}
|
||||
if (UserTag::where('user_id', $userid)->count() >= 100) {
|
||||
return Base::retError('每位会员最多添加100个标签');
|
||||
}
|
||||
|
||||
$tag = UserTag::create([
|
||||
'user_id' => $userid,
|
||||
'name' => $name,
|
||||
'created_by' => $viewer->userid,
|
||||
'updated_by' => $viewer->userid,
|
||||
]);
|
||||
$tag->save();
|
||||
|
||||
return $this->buildUserTagResponse($viewer, $userid, '添加成功');
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {post} api/users/tags/update 10.3. 修改个性标签
|
||||
*
|
||||
* @apiDescription 需要token身份
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup users
|
||||
* @apiName tags__update
|
||||
*
|
||||
* @apiParam {Number} tag_id 标签ID
|
||||
* @apiParam {String} name 标签名称(1-20个字符)
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
* @apiSuccess {Object} data 返回数据,同“获取个性标签列表”
|
||||
*/
|
||||
public function tags__update()
|
||||
{
|
||||
$viewer = User::auth();
|
||||
$tagId = intval(Request::input('tag_id'));
|
||||
$name = trim((string) Request::input('name'));
|
||||
if ($tagId <= 0) {
|
||||
return Base::retError('参数错误');
|
||||
}
|
||||
if ($name === '') {
|
||||
return Base::retError('请输入个性标签');
|
||||
}
|
||||
if (mb_strlen($name) > 20) {
|
||||
return Base::retError('标签名称最多只能设置20个字');
|
||||
}
|
||||
$tag = UserTag::find($tagId);
|
||||
if (empty($tag)) {
|
||||
return Base::retError('标签不存在');
|
||||
}
|
||||
if (!$tag->canManage($viewer)) {
|
||||
return Base::retError('无权操作该标签');
|
||||
}
|
||||
if ($name !== $tag->name && UserTag::where('user_id', $tag->user_id)->where('name', $name)->where('id', '!=', $tag->id)->exists()) {
|
||||
return Base::retError('标签已存在');
|
||||
}
|
||||
|
||||
if ($name !== $tag->name) {
|
||||
$tag->updateInstance([
|
||||
'name' => $name,
|
||||
'updated_by' => $viewer->userid,
|
||||
]);
|
||||
} else {
|
||||
$tag->updateInstance([
|
||||
'updated_by' => $viewer->userid,
|
||||
]);
|
||||
}
|
||||
$tag->save();
|
||||
|
||||
return $this->buildUserTagResponse($viewer, $tag->user_id, '保存成功');
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {post} api/users/tags/delete 10.4. 删除个性标签
|
||||
*
|
||||
* @apiDescription 需要token身份
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup users
|
||||
* @apiName tags__delete
|
||||
*
|
||||
* @apiParam {Number} tag_id 标签ID
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
* @apiSuccess {Object} data 返回数据,同“获取个性标签列表”
|
||||
*/
|
||||
public function tags__delete()
|
||||
{
|
||||
$viewer = User::auth();
|
||||
$tagId = intval(Request::input('tag_id'));
|
||||
if ($tagId <= 0) {
|
||||
return Base::retError('参数错误');
|
||||
}
|
||||
$tag = UserTag::find($tagId);
|
||||
if (empty($tag)) {
|
||||
return Base::retError('标签不存在');
|
||||
}
|
||||
if (!$tag->canManage($viewer)) {
|
||||
return Base::retError('无权操作该标签');
|
||||
}
|
||||
|
||||
$userId = $tag->user_id;
|
||||
$tag->delete();
|
||||
|
||||
return $this->buildUserTagResponse($viewer, $userId, '删除成功');
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {post} api/users/tags/recognize 10.5. 认可个性标签
|
||||
*
|
||||
* @apiDescription 需要token身份
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup users
|
||||
* @apiName tags__recognize
|
||||
*
|
||||
* @apiParam {Number} tag_id 标签ID
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
* @apiSuccess {Object} data 返回数据,同“获取个性标签列表”
|
||||
*/
|
||||
public function tags__recognize()
|
||||
{
|
||||
$viewer = User::auth();
|
||||
$tagId = intval(Request::input('tag_id'));
|
||||
if ($tagId <= 0) {
|
||||
return Base::retError('参数错误');
|
||||
}
|
||||
$tag = UserTag::find($tagId);
|
||||
if (empty($tag)) {
|
||||
return Base::retError('标签不存在');
|
||||
}
|
||||
|
||||
$recognition = UserTagRecognition::where('tag_id', $tagId)
|
||||
->where('user_id', $viewer->userid)
|
||||
->first();
|
||||
if ($recognition) {
|
||||
$recognition->delete();
|
||||
$message = '已取消认可';
|
||||
} else {
|
||||
UserTagRecognition::create([
|
||||
'tag_id' => $tagId,
|
||||
'user_id' => $viewer->userid,
|
||||
]);
|
||||
$message = '认可成功';
|
||||
}
|
||||
|
||||
return $this->buildUserTagResponse($viewer, $tag->user_id, $message);
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} api/users/meeting/link 20. 【会议】获取分享链接
|
||||
*
|
||||
@@ -2426,8 +2150,7 @@ class UsersController extends AbstractController
|
||||
'users.nickname',
|
||||
'users.userimg',
|
||||
'user_bots.clear_day',
|
||||
'user_bots.webhook_url',
|
||||
'user_bots.webhook_events'
|
||||
'user_bots.webhook_url'
|
||||
])
|
||||
->orderByDesc('id')
|
||||
->get()
|
||||
@@ -2437,7 +2160,6 @@ class UsersController extends AbstractController
|
||||
$bot['name'] = $bot['nickname'];
|
||||
$bot['avatar'] = $bot['userimg'];
|
||||
$bot['system_name'] = UserBot::systemBotName($bot['name']);
|
||||
$bot['webhook_events'] = UserBot::normalizeWebhookEvents($bot['webhook_events'] ?? null, empty($bot['webhook_events']));
|
||||
unset($bot['userid'], $bot['nickname'], $bot['userimg']);
|
||||
}
|
||||
|
||||
@@ -2489,13 +2211,11 @@ class UsersController extends AbstractController
|
||||
'avatar' => $botUser->userimg,
|
||||
'clear_day' => 0,
|
||||
'webhook_url' => '',
|
||||
'webhook_events' => [UserBot::WEBHOOK_EVENT_MESSAGE],
|
||||
'system_name' => UserBot::systemBotName($botUser->email),
|
||||
];
|
||||
if ($userBot) {
|
||||
$data['clear_day'] = $userBot->clear_day;
|
||||
$data['webhook_url'] = $userBot->webhook_url;
|
||||
$data['webhook_events'] = $userBot->webhook_events;
|
||||
}
|
||||
return Base::retSuccess('success', $data);
|
||||
}
|
||||
@@ -2576,9 +2296,6 @@ class UsersController extends AbstractController
|
||||
if (Arr::exists($data, 'webhook_url')) {
|
||||
$upBot['webhook_url'] = trim($data['webhook_url']);
|
||||
}
|
||||
if (Arr::exists($data, 'webhook_events')) {
|
||||
$upBot['webhook_events'] = UserBot::normalizeWebhookEvents($data['webhook_events'], false);
|
||||
}
|
||||
//
|
||||
if ($upUser) {
|
||||
$botUser->updateInstance($upUser);
|
||||
@@ -2595,13 +2312,11 @@ class UsersController extends AbstractController
|
||||
'avatar' => $botUser->userimg,
|
||||
'clear_day' => 0,
|
||||
'webhook_url' => '',
|
||||
'webhook_events' => [UserBot::WEBHOOK_EVENT_MESSAGE],
|
||||
'system_name' => UserBot::systemBotName($botUser->email),
|
||||
];
|
||||
if ($userBot) {
|
||||
$data['clear_day'] = $userBot->clear_day;
|
||||
$data['webhook_url'] = $userBot->webhook_url;
|
||||
$data['webhook_events'] = $userBot->webhook_events;
|
||||
}
|
||||
return Base::retSuccess($botId ? '修改成功' : '添加成功', $data);
|
||||
}
|
||||
|
||||
@@ -61,10 +61,6 @@ class IndexController extends InvokeController
|
||||
$array = Base::json2array(file_get_contents($hotFile));
|
||||
$style = null;
|
||||
$script = preg_replace("/^(\/\/(.*?))(:\d+)?\//i", "$1:" . $array['APP_DEV_PORT'] . "/", asset_main("resources/assets/js/app.js"));
|
||||
$proxyUri = Base::liveEnv('VSCODE_PROXY_URI');
|
||||
if (is_string($proxyUri) && preg_match('/^https?:\/\//i', $proxyUri)) {
|
||||
$script = preg_replace('/^(https?:\/\/|\/\/)[^\/]+/', rtrim($proxyUri, '/'), $script, 1);
|
||||
}
|
||||
} else {
|
||||
$array = Base::json2array(file_get_contents($manifestFile));
|
||||
$style = asset_main($array['resources/assets/js/app.js']['css'][0]);
|
||||
|
||||
@@ -22,9 +22,6 @@ use Carbon\Carbon;
|
||||
* @property string|null $tel 联系电话
|
||||
* @property string $nickname 昵称
|
||||
* @property string|null $profession 职位/职称
|
||||
* @property \Illuminate\Support\Carbon|null $birthday 生日
|
||||
* @property string|null $address 地址
|
||||
* @property string|null $introduction 个人简介
|
||||
* @property string $userimg 头像
|
||||
* @property string|null $encrypt
|
||||
* @property string|null $password 登录密码
|
||||
@@ -92,7 +89,7 @@ class User extends AbstractModel
|
||||
public static $defaultAvatarMode = 'auto';
|
||||
|
||||
// 基本信息的字段
|
||||
public static $basicField = ['userid', 'email', 'nickname', 'profession', 'birthday', 'address', 'introduction', 'department', 'userimg', 'bot', 'az', 'pinyin', 'line_at', 'disable_at'];
|
||||
public static $basicField = ['userid', 'email', 'nickname', 'profession', 'department', 'userimg', 'bot', 'az', 'pinyin', 'line_at', 'disable_at'];
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
|
||||
@@ -5,12 +5,10 @@ namespace App\Models;
|
||||
use App\Module\Base;
|
||||
use App\Module\Doo;
|
||||
use App\Module\Extranet;
|
||||
use App\Module\Ihttp;
|
||||
use App\Module\Timer;
|
||||
use App\Tasks\JokeSoupTask;
|
||||
use Cache;
|
||||
use Carbon\Carbon;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* App\Models\UserBot
|
||||
@@ -22,7 +20,6 @@ use Throwable;
|
||||
* @property \Illuminate\Support\Carbon|null $clear_at 下一次清理时间
|
||||
* @property string|null $webhook_url 消息webhook地址
|
||||
* @property int|null $webhook_num 消息webhook请求次数
|
||||
* @property array|null $webhook_events Webhook事件配置
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
@@ -47,131 +44,6 @@ use Throwable;
|
||||
*/
|
||||
class UserBot extends AbstractModel
|
||||
{
|
||||
public const WEBHOOK_EVENT_MESSAGE = 'message';
|
||||
public const WEBHOOK_EVENT_DIALOG_OPEN = 'dialog_open';
|
||||
public const WEBHOOK_EVENT_MEMBER_JOIN = 'member_join';
|
||||
public const WEBHOOK_EVENT_MEMBER_LEAVE = 'member_leave';
|
||||
|
||||
protected $casts = [
|
||||
'webhook_events' => 'array',
|
||||
];
|
||||
|
||||
/**
|
||||
* 获取可选的 webhook 事件
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public static function webhookEventOptions(): array
|
||||
{
|
||||
return [
|
||||
self::WEBHOOK_EVENT_MESSAGE,
|
||||
self::WEBHOOK_EVENT_DIALOG_OPEN,
|
||||
self::WEBHOOK_EVENT_MEMBER_JOIN,
|
||||
self::WEBHOOK_EVENT_MEMBER_LEAVE,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 标准化 webhook 事件配置
|
||||
*
|
||||
* @param mixed $events
|
||||
* @return array
|
||||
*/
|
||||
public static function normalizeWebhookEvents(mixed $events, bool $useFallback = true): array
|
||||
{
|
||||
if (is_string($events)) {
|
||||
$events = Base::json2array($events);
|
||||
}
|
||||
if ($events === null) {
|
||||
$events = [];
|
||||
}
|
||||
if (!is_array($events)) {
|
||||
$events = [$events];
|
||||
}
|
||||
$events = array_filter(array_map('strval', $events));
|
||||
$events = array_values(array_intersect($events, self::webhookEventOptions()));
|
||||
return $events ?: ($useFallback ? [self::WEBHOOK_EVENT_MESSAGE] : []);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 webhook 事件配置
|
||||
*
|
||||
* @param mixed $value
|
||||
* @return array
|
||||
*/
|
||||
public function getWebhookEventsAttribute(mixed $value): array
|
||||
{
|
||||
if ($value === null || $value === '') {
|
||||
return self::normalizeWebhookEvents(null, true);
|
||||
}
|
||||
return self::normalizeWebhookEvents($value, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 webhook 事件配置
|
||||
*
|
||||
* @param mixed $value
|
||||
* @return void
|
||||
*/
|
||||
public function setWebhookEventsAttribute(mixed $value): void
|
||||
{
|
||||
$useFallback = $value === null;
|
||||
$this->attributes['webhook_events'] = Base::array2json(self::normalizeWebhookEvents($value, $useFallback));
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否需要触发指定 webhook 事件
|
||||
*
|
||||
* @param string $event
|
||||
* @return bool
|
||||
*/
|
||||
public function shouldDispatchWebhook(string $event): bool
|
||||
{
|
||||
if (!$this->webhook_url) {
|
||||
return false;
|
||||
}
|
||||
if (!preg_match('/^https?:\/\//', $this->webhook_url)) {
|
||||
return false;
|
||||
}
|
||||
return in_array($event, $this->webhook_events ?? [], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送 webhook
|
||||
*
|
||||
* @param string $event
|
||||
* @param array $payload
|
||||
* @param int $timeout
|
||||
* @param array $context
|
||||
* @return array|null
|
||||
*/
|
||||
public function dispatchWebhook(string $event, array $payload, int $timeout = 30, array $context = []): ?array
|
||||
{
|
||||
if (!$this->shouldDispatchWebhook($event)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$payload = array_merge([
|
||||
'event' => $event,
|
||||
'timestamp' => time(),
|
||||
'bot_uid' => $this->bot_id,
|
||||
'owner_uid' => $this->userid,
|
||||
], $payload);
|
||||
|
||||
try {
|
||||
$result = Ihttp::ihttp_post($this->webhook_url, $payload, $timeout);
|
||||
$this->increment('webhook_num');
|
||||
return $result;
|
||||
} catch (Throwable $th) {
|
||||
info(Base::array2json(array_merge($context, [
|
||||
'bot_userid' => $this->bot_id,
|
||||
'event' => $event,
|
||||
'webhook_url' => $this->webhook_url,
|
||||
'error' => $th->getMessage(),
|
||||
])));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否系统机器人
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class UserTag extends AbstractModel
|
||||
{
|
||||
protected $table = 'user_tags';
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'name',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
];
|
||||
|
||||
public function creator(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'created_by', 'userid')
|
||||
->select(['userid', 'nickname']);
|
||||
}
|
||||
|
||||
public function recognitions(): HasMany
|
||||
{
|
||||
return $this->hasMany(UserTagRecognition::class, 'tag_id');
|
||||
}
|
||||
|
||||
public function canManage(User $viewer): bool
|
||||
{
|
||||
return $viewer->isAdmin()
|
||||
|| $viewer->userid === $this->user_id
|
||||
|| $viewer->userid === $this->created_by;
|
||||
}
|
||||
|
||||
public static function listWithMeta(int $targetUserId, ?User $viewer): array
|
||||
{
|
||||
$query = static::query()
|
||||
->where('user_id', $targetUserId)
|
||||
->with(['creator'])
|
||||
->withCount(['recognitions as recognition_total'])
|
||||
->orderByDesc('recognition_total')
|
||||
->orderBy('id');
|
||||
|
||||
$tags = $query->get();
|
||||
|
||||
$viewerId = $viewer?->userid ?? 0;
|
||||
$viewerIsAdmin = $viewer?->isAdmin() ?? false;
|
||||
$viewerIsOwner = $viewerId > 0 && $viewerId === $targetUserId;
|
||||
|
||||
$recognizedIds = [];
|
||||
if ($viewerId > 0 && $tags->isNotEmpty()) {
|
||||
$recognizedIds = UserTagRecognition::query()
|
||||
->where('user_id', $viewerId)
|
||||
->whereIn('tag_id', $tags->pluck('id'))
|
||||
->pluck('tag_id')
|
||||
->all();
|
||||
}
|
||||
$recognizedLookup = array_flip($recognizedIds);
|
||||
|
||||
$list = $tags->map(function (self $tag) use ($viewerId, $viewerIsAdmin, $viewerIsOwner, $recognizedLookup) {
|
||||
$canManage = $viewerIsAdmin || $viewerIsOwner || $viewerId === $tag->created_by;
|
||||
|
||||
return [
|
||||
'id' => $tag->id,
|
||||
'user_id' => $tag->user_id,
|
||||
'name' => $tag->name,
|
||||
'created_by' => $tag->created_by,
|
||||
'created_by_name' => $tag->creator?->nickname ?: '',
|
||||
'recognition_total' => (int) $tag->recognition_total,
|
||||
'recognized' => isset($recognizedLookup[$tag->id]),
|
||||
'can_edit' => $canManage,
|
||||
'can_delete' => $canManage,
|
||||
];
|
||||
})->values()->toArray();
|
||||
|
||||
return [
|
||||
'list' => $list,
|
||||
'top' => array_slice($list, 0, 10),
|
||||
'total' => count($list),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class UserTagRecognition extends AbstractModel
|
||||
{
|
||||
protected $table = 'user_tag_recognitions';
|
||||
|
||||
protected $fillable = [
|
||||
'tag_id',
|
||||
'user_id',
|
||||
];
|
||||
|
||||
public function tag(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(UserTag::class, 'tag_id');
|
||||
}
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_id', 'userid')
|
||||
->select(['userid', 'nickname']);
|
||||
}
|
||||
}
|
||||
@@ -461,8 +461,7 @@ class WebSocketDialog extends AbstractModel
|
||||
*/
|
||||
public function joinGroup($userid, $inviter, $important = null)
|
||||
{
|
||||
$addedUserIds = [];
|
||||
AbstractModel::transaction(function () use ($important, $inviter, $userid, &$addedUserIds) {
|
||||
AbstractModel::transaction(function () use ($important, $inviter, $userid) {
|
||||
foreach (is_array($userid) ? $userid : [$userid] as $value) {
|
||||
if ($value > 0) {
|
||||
$updateData = [
|
||||
@@ -481,7 +480,6 @@ class WebSocketDialog extends AbstractModel
|
||||
]);
|
||||
}, $isInsert);
|
||||
if ($isInsert) {
|
||||
$addedUserIds[] = $value;
|
||||
WebSocketDialogMsg::sendMsg(null, $this->id, 'notice', [
|
||||
'notice' => User::userid2nickname($value) . " 已加入群组"
|
||||
], $inviter, true, true);
|
||||
@@ -492,16 +490,6 @@ class WebSocketDialog extends AbstractModel
|
||||
$data = WebSocketDialog::generatePeople($this->id);
|
||||
$data['id'] = $this->id;
|
||||
$this->pushMsg("groupUpdate", $data);
|
||||
if ($addedUserIds) {
|
||||
$meta = ['action' => 'join'];
|
||||
if ($inviter > 0) {
|
||||
$actor = $this->getUserSnapshots([$inviter]);
|
||||
if (!empty($actor)) {
|
||||
$meta['actor'] = $actor[0];
|
||||
}
|
||||
}
|
||||
$this->dispatchMemberWebhook(UserBot::WEBHOOK_EVENT_MEMBER_JOIN, $addedUserIds, $meta);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -515,15 +503,14 @@ class WebSocketDialog extends AbstractModel
|
||||
public function exitGroup($userid, $type = 'exit', $checkDelete = true, $pushMsg = true)
|
||||
{
|
||||
$typeDesc = $type === 'remove' ? '移出' : '退出';
|
||||
$removedUserIds = [];
|
||||
AbstractModel::transaction(function () use ($pushMsg, $checkDelete, $typeDesc, $type, $userid, &$removedUserIds) {
|
||||
AbstractModel::transaction(function () use ($pushMsg, $checkDelete, $typeDesc, $type, $userid) {
|
||||
$builder = WebSocketDialogUser::whereDialogId($this->id);
|
||||
if (is_array($userid)) {
|
||||
$builder->whereIn('userid', $userid);
|
||||
} else {
|
||||
$builder->whereUserid($userid);
|
||||
}
|
||||
$builder->chunkById(100, function($list) use ($pushMsg, $checkDelete, $typeDesc, $type, &$removedUserIds) {
|
||||
$builder->chunkById(100, function($list) use ($pushMsg, $checkDelete, $typeDesc, $type) {
|
||||
/** @var WebSocketDialogUser $item */
|
||||
foreach ($list as $item) {
|
||||
if ($checkDelete) {
|
||||
@@ -544,7 +531,6 @@ class WebSocketDialog extends AbstractModel
|
||||
}
|
||||
//
|
||||
$item->delete();
|
||||
$removedUserIds[] = $item->userid;
|
||||
//
|
||||
if ($pushMsg) {
|
||||
if ($type === 'remove') {
|
||||
@@ -563,87 +549,6 @@ class WebSocketDialog extends AbstractModel
|
||||
$data = WebSocketDialog::generatePeople($this->id);
|
||||
$data['id'] = $this->id;
|
||||
$this->pushMsg("groupUpdate", $data);
|
||||
if ($removedUserIds) {
|
||||
$meta = ['action' => $type];
|
||||
$operatorId = User::userid();
|
||||
if ($operatorId > 0) {
|
||||
$actor = $this->getUserSnapshots([$operatorId]);
|
||||
if (!empty($actor)) {
|
||||
$meta['actor'] = $actor[0];
|
||||
}
|
||||
}
|
||||
$this->dispatchMemberWebhook(UserBot::WEBHOOK_EVENT_MEMBER_LEAVE, $removedUserIds, $meta);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户快照
|
||||
* @param array $userIds
|
||||
* @return array
|
||||
*/
|
||||
protected function getUserSnapshots(array $userIds): array
|
||||
{
|
||||
$userIds = array_values(array_unique(array_filter($userIds)));
|
||||
if (empty($userIds)) {
|
||||
return [];
|
||||
}
|
||||
return User::whereIn('userid', $userIds)
|
||||
->get(['userid', 'nickname', 'email', 'bot'])
|
||||
->map(function (User $user) {
|
||||
return [
|
||||
'userid' => $user->userid,
|
||||
'nickname' => $user->nickname,
|
||||
'email' => $user->email,
|
||||
'is_bot' => (bool)$user->bot,
|
||||
];
|
||||
})
|
||||
->values()
|
||||
->all();
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送成员事件到机器人 webhook
|
||||
* @param string $event
|
||||
* @param array $memberIds
|
||||
* @param array $meta
|
||||
* @return void
|
||||
*/
|
||||
protected function dispatchMemberWebhook(string $event, array $memberIds, array $meta = []): void
|
||||
{
|
||||
$memberIds = array_values(array_unique(array_filter($memberIds)));
|
||||
if (empty($memberIds)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$botIds = $this->dialogUser()->where('bot', 1)->pluck('userid')->toArray();
|
||||
if (empty($botIds)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$userBots = UserBot::whereIn('bot_id', $botIds)->get();
|
||||
if ($userBots->isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$members = $this->getUserSnapshots($memberIds);
|
||||
if (empty($members)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$payload = array_merge([
|
||||
'dialog_id' => $this->id,
|
||||
'dialog_type' => $this->type,
|
||||
'group_type' => $this->group_type,
|
||||
'dialog_name' => $this->getGroupName(),
|
||||
'members' => $members,
|
||||
], array_filter($meta, fn ($value) => $value !== null));
|
||||
|
||||
foreach ($userBots as $userBot) {
|
||||
$userBot->dispatchWebhook($event, $payload, 10, [
|
||||
'dialog' => $this->id,
|
||||
'event_members' => $memberIds,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3073,61 +3073,4 @@ class Base
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 实时读取 .env 配置(不受配置缓存影响)
|
||||
* @param string $key 配置键名
|
||||
* @param mixed $default 默认值
|
||||
* @return mixed
|
||||
*/
|
||||
public static function liveEnv($key, $default = null)
|
||||
{
|
||||
$envFile = base_path('.env');
|
||||
if (!file_exists($envFile)) {
|
||||
return $default;
|
||||
}
|
||||
|
||||
$envContent = file_get_contents($envFile);
|
||||
$lines = explode("\n", $envContent);
|
||||
|
||||
foreach ($lines as $line) {
|
||||
$line = trim($line);
|
||||
|
||||
// 跳过注释和空行
|
||||
if (empty($line) || str_starts_with($line, '#')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 解析 KEY=VALUE
|
||||
if (str_contains($line, '=')) {
|
||||
[$envKey, $envValue] = explode('=', $line, 2);
|
||||
$envKey = trim($envKey);
|
||||
|
||||
if ($envKey === $key) {
|
||||
$envValue = trim($envValue);
|
||||
|
||||
// 移除引号
|
||||
if (preg_match('/^(["\'])(.*)\1$/', $envValue, $matches)) {
|
||||
$envValue = $matches[2];
|
||||
}
|
||||
|
||||
// 处理布尔值
|
||||
$lowerValue = strtolower($envValue);
|
||||
if ($lowerValue === 'true') {
|
||||
return true;
|
||||
}
|
||||
if ($lowerValue === 'false') {
|
||||
return false;
|
||||
}
|
||||
if ($lowerValue === 'null' || $lowerValue === '(null)') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $envValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $default;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -427,7 +427,6 @@ class BotReceiveMsgTask extends AbstractTask
|
||||
private function handleWebhookRequest($sendText, $replyText, WebSocketDialogMsg $msg, WebSocketDialog $dialog, User $botUser)
|
||||
{
|
||||
$webhookUrl = null;
|
||||
$userBot = null;
|
||||
$extras = ['timestamp' => time()];
|
||||
|
||||
try {
|
||||
@@ -531,11 +530,13 @@ class BotReceiveMsgTask extends AbstractTask
|
||||
return;
|
||||
}
|
||||
$userBot = UserBot::whereBotId($botUser->userid)->first();
|
||||
if (!$userBot || !$userBot->shouldDispatchWebhook(UserBot::WEBHOOK_EVENT_MESSAGE)) {
|
||||
return;
|
||||
if ($userBot) {
|
||||
$userBot->webhook_num++;
|
||||
$userBot->save();
|
||||
$webhookUrl = $userBot->webhook_url;
|
||||
}
|
||||
}
|
||||
if (!$userBot && !preg_match("/^https?:\/\//", $webhookUrl)) {
|
||||
if (!preg_match("/^https?:\/\//", $webhookUrl)) {
|
||||
return;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
@@ -546,60 +547,50 @@ class BotReceiveMsgTask extends AbstractTask
|
||||
return;
|
||||
}
|
||||
//
|
||||
$data = [
|
||||
'text' => $sendText,
|
||||
'reply_text' => $replyText,
|
||||
'token' => User::generateToken($botUser),
|
||||
'session_id' => $dialog->session_id,
|
||||
'dialog_id' => $dialog->id,
|
||||
'dialog_type' => $dialog->type,
|
||||
'msg_id' => $msg->id,
|
||||
'msg_uid' => $msg->userid,
|
||||
'mention' => $this->mention ? 1 : 0,
|
||||
'bot_uid' => $botUser->userid,
|
||||
'version' => Base::getVersion(),
|
||||
'extras' => Base::array2json($extras)
|
||||
];
|
||||
// 添加用户信息
|
||||
$userInfo = User::find($msg->userid);
|
||||
if ($userInfo) {
|
||||
$data['msg_user'] = [
|
||||
'userid' => $userInfo->userid,
|
||||
'email' => $userInfo->email,
|
||||
'nickname' => $userInfo->nickname,
|
||||
'profession' => $userInfo->profession,
|
||||
'lang' => $userInfo->lang,
|
||||
'token' => User::generateTokenNoDevice($userInfo, now()->addHour()),
|
||||
try {
|
||||
$data = [
|
||||
'text' => $sendText,
|
||||
'reply_text' => $replyText,
|
||||
'token' => User::generateToken($botUser),
|
||||
'session_id' => $dialog->session_id,
|
||||
'dialog_id' => $dialog->id,
|
||||
'dialog_type' => $dialog->type,
|
||||
'msg_id' => $msg->id,
|
||||
'msg_uid' => $msg->userid,
|
||||
'mention' => $this->mention ? 1 : 0,
|
||||
'bot_uid' => $botUser->userid,
|
||||
'version' => Base::getVersion(),
|
||||
'extras' => Base::array2json($extras)
|
||||
];
|
||||
}
|
||||
|
||||
$result = null;
|
||||
if ($userBot) {
|
||||
$result = $userBot->dispatchWebhook(UserBot::WEBHOOK_EVENT_MESSAGE, $data, 30, [
|
||||
// 添加用户信息
|
||||
$userInfo = User::find($msg->userid);
|
||||
if ($userInfo) {
|
||||
$data['msg_user'] = [
|
||||
'userid' => $userInfo->userid,
|
||||
'email' => $userInfo->email,
|
||||
'nickname' => $userInfo->nickname,
|
||||
'profession' => $userInfo->profession,
|
||||
'lang' => $userInfo->lang,
|
||||
'token' => User::generateTokenNoDevice($userInfo, now()->addHour()),
|
||||
];
|
||||
}
|
||||
// 请求Webhook
|
||||
$result = Ihttp::ihttp_post($webhookUrl, $data, 30);
|
||||
if ($result['data'] && $data = Base::json2array($result['data'])) {
|
||||
if ($data['code'] != 200 && $data['message']) {
|
||||
WebSocketDialogMsg::sendMsg(null, $msg->dialog_id, 'text', [
|
||||
'text' => $result['data']['message']
|
||||
], $botUser->userid, false, false, true);
|
||||
}
|
||||
}
|
||||
} catch (\Throwable $th) {
|
||||
info(Base::array2json([
|
||||
'bot_userid' => $botUser->userid,
|
||||
'dialog' => $dialog->id,
|
||||
'msg' => $msg->id,
|
||||
]);
|
||||
} else {
|
||||
try {
|
||||
$result = Ihttp::ihttp_post($webhookUrl, $data, 30);
|
||||
} catch (\Throwable $th) {
|
||||
info(Base::array2json([
|
||||
'bot_userid' => $botUser->userid,
|
||||
'dialog' => $dialog->id,
|
||||
'msg' => $msg->id,
|
||||
'webhook_url' => $webhookUrl,
|
||||
'error' => $th->getMessage(),
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
||||
if ($result && isset($result['data'])) {
|
||||
$responseData = Base::json2array($result['data']);
|
||||
if (($responseData['code'] ?? 0) != 200 && !empty($responseData['message'])) {
|
||||
WebSocketDialogMsg::sendMsg(null, $msg->dialog_id, 'text', [
|
||||
'text' => $responseData['message']
|
||||
], $botUser->userid, false, false, true);
|
||||
}
|
||||
'webhook_url' => $webhookUrl,
|
||||
'error' => $th->getMessage(),
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
bin/version.js
vendored
2
bin/version.js
vendored
File diff suppressed because one or more lines are too long
10
cmd
10
cmd
@@ -175,13 +175,7 @@ web_build() {
|
||||
fi
|
||||
if [ "$type" = "dev" ]; then
|
||||
echo "<script>window.location.href=window.location.href.replace(/:\d+/, ':' + $(env_get APP_PORT))</script>" > ./index.html
|
||||
if [ -z "$(env_get APP_DEV_PORT)" ]; then
|
||||
env_set APP_DEV_PORT $(rand 20001 30000)
|
||||
fi
|
||||
if [ -n "${VSCODE_PROXY_URI:-}" ]; then
|
||||
VSCODE_PROXY_URI=$(APP_DEV_PORT="$(env_get APP_DEV_PORT)" node -p "process.env.VSCODE_PROXY_URI.replace(/\{\{port\}\}/g, process.env.APP_DEV_PORT || '')")
|
||||
fi
|
||||
env_set VSCODE_PROXY_URI "${VSCODE_PROXY_URI:-}"
|
||||
env_set APP_DEV_PORT $(rand 20001 30000)
|
||||
fi
|
||||
switch_debug "$type"
|
||||
#
|
||||
@@ -485,7 +479,7 @@ handle_install() {
|
||||
for vol in "${volumes[@]}"; do
|
||||
tmp_path="${WORK_DIR}/${vol}"
|
||||
mkdir -p "${tmp_path}"
|
||||
find "${tmp_path}" -type d -exec chmod 775 {} \;
|
||||
chmod -R 775 "${tmp_path}"
|
||||
rm -f "${tmp_path}/dootask.lock"
|
||||
cmda="${cmda} -v ${tmp_path}:/usr/share/${vol}"
|
||||
cmdb="${cmdb} touch /usr/share/${vol}/dootask.lock &&"
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('user_bots', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('user_bots', 'webhook_events')) {
|
||||
$table->text('webhook_events')->nullable()->after('webhook_num')->comment('Webhook事件配置');
|
||||
}
|
||||
});
|
||||
|
||||
DB::table('user_bots')
|
||||
->where(function ($query) {
|
||||
$query->whereNull('webhook_events')->orWhere('webhook_events', '');
|
||||
})
|
||||
->update(['webhook_events' => json_encode(['message'])]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('user_bots', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('user_bots', 'webhook_events')) {
|
||||
$table->dropColumn('webhook_events');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->date('birthday')->nullable()->after('profession');
|
||||
$table->string('address', 255)->nullable()->after('birthday');
|
||||
$table->text('introduction')->nullable()->after('address');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn(['birthday', 'address', 'introduction']);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUserTagsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_tags', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('user_id')->index()->comment('被标签用户ID');
|
||||
$table->string('name', 50)->comment('标签名称');
|
||||
$table->unsignedBigInteger('created_by')->index()->comment('创建人');
|
||||
$table->unsignedBigInteger('updated_by')->nullable()->comment('最后更新人');
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['user_id', 'name'], 'user_tags_unique_name');
|
||||
$table->foreign('user_id')->references('userid')->on('users')->onDelete('cascade');
|
||||
$table->foreign('created_by')->references('userid')->on('users')->onDelete('cascade');
|
||||
$table->foreign('updated_by')->references('userid')->on('users')->onDelete('set null');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_tags');
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUserTagRecognitionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_tag_recognitions', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('tag_id')->index()->comment('标签ID');
|
||||
$table->unsignedBigInteger('user_id')->index()->comment('认可人ID');
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['tag_id', 'user_id'], 'user_tag_recognitions_unique');
|
||||
$table->foreign('tag_id')->references('id')->on('user_tags')->onDelete('cascade');
|
||||
$table->foreign('user_id')->references('userid')->on('users')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_tag_recognitions');
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "DooTask",
|
||||
"version": "1.3.15",
|
||||
"codeVerson": 211,
|
||||
"codeVerson": 212,
|
||||
"description": "DooTask is task management system.",
|
||||
"scripts": {
|
||||
"start": "./cmd dev",
|
||||
|
||||
@@ -1 +1 @@
|
||||
import{n as m}from"./app.817c3a7e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var p=function(){var t=this,r=t.$createElement;return t._self._c,t._m(0)},e=[function(){var t=this,r=t.$createElement,i=t._self._c||r;return i("div",{staticClass:"page-404"},[i("div",{staticClass:"flex-center position-ref full-height"},[i("div",{staticClass:"code"},[t._v("404")]),i("div",{staticClass:"message"},[t._v("Not Found")])])])}];const s={},o={};var _=m(s,p,e,!1,n,"7d7154a8",null,null);function n(t){for(let r in o)this[r]=o[r]}var tt=function(){return _.exports}();export{tt as default};
|
||||
import{n as m}from"./app.2491f23f.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var p=function(){var t=this,r=t.$createElement;return t._self._c,t._m(0)},e=[function(){var t=this,r=t.$createElement,i=t._self._c||r;return i("div",{staticClass:"page-404"},[i("div",{staticClass:"flex-center position-ref full-height"},[i("div",{staticClass:"code"},[t._v("404")]),i("div",{staticClass:"message"},[t._v("Not Found")])])])}];const s={},o={};var _=m(s,p,e,!1,n,"7d7154a8",null,null);function n(t){for(let r in o)this[r]=o[r]}var tt=function(){return _.exports}();export{tt as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{m as s}from"./vuex.cc7cb26e.js";import{I as m}from"./IFrame.2a7489ee.js";import{n as p,l as o}from"./app.817c3a7e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var l=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"drawio-content"},[i("IFrame",{ref:"frame",staticClass:"drawio-iframe",attrs:{src:t.url},on:{"on-message":t.onMessage}}),t.loadIng?i("div",{staticClass:"drawio-loading"},[i("Loading")],1):t._e()],1)},d=[];const u={name:"Drawio",components:{IFrame:m},props:{value:{type:Object,default:function(){return{}}},title:{type:String,default:""},readOnly:{type:Boolean,default:!1}},data(){return{loadIng:!0,url:null,bakData:""}},created(){let t=o;switch(o){case"zh-CHT":t="zh-tw";break}let e=this.readOnly?1:0,i=this.readOnly?0:1,n=this.themeName==="dark"?"dark":"kennedy",r=`?title=${this.title?encodeURIComponent(this.title):""}&chrome=${i}&lightbox=${e}&ui=${n}&lang=${t}&offline=1&pwa=0&embed=1&noLangIcon=1&noExitBtn=1&noSaveBtn=1&saveAndExit=0&spin=1&proto=json`;this.$Electron?this.url=$A.originUrl(`drawio/webapp/index.html${r}`):this.url=$A.mainUrl(`drawio/webapp/${r}`)},mounted(){window.addEventListener("message",this.handleMessage)},beforeDestroy(){window.removeEventListener("message",this.handleMessage)},watch:{value:{handler(t){this.bakData!=$A.jsonStringify(t)&&(this.bakData=$A.jsonStringify(t),this.updateContent())},deep:!0}},computed:{...s(["themeName"])},methods:{formatZoom(t){return t+"%"},updateContent(){this.$refs.frame.postMessage(JSON.stringify({action:"load",autosave:1,xml:this.value.xml}))},onMessage(t){switch(t.event){case"init":this.loadIng=!1,this.updateContent();break;case"load":typeof this.value.xml=="undefined"&&this.$refs.frame.postMessage(JSON.stringify({action:"template"}));break;case"autosave":const e={xml:t.xml};this.bakData=$A.jsonStringify(e),this.$emit("input",e);break;case"save":this.$emit("saveData");break}}}},a={};var c=p(u,l,d,!1,h,"39021859",null,null);function h(t){for(let e in a)this[e]=a[e]}var st=function(){return c.exports}();export{st as default};
|
||||
import{m as s}from"./vuex.cc7cb26e.js";import{I as m}from"./IFrame.d7eff04e.js";import{n as p,l as o}from"./app.2491f23f.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var l=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"drawio-content"},[i("IFrame",{ref:"frame",staticClass:"drawio-iframe",attrs:{src:t.url},on:{"on-message":t.onMessage}}),t.loadIng?i("div",{staticClass:"drawio-loading"},[i("Loading")],1):t._e()],1)},d=[];const u={name:"Drawio",components:{IFrame:m},props:{value:{type:Object,default:function(){return{}}},title:{type:String,default:""},readOnly:{type:Boolean,default:!1}},data(){return{loadIng:!0,url:null,bakData:""}},created(){let t=o;switch(o){case"zh-CHT":t="zh-tw";break}let e=this.readOnly?1:0,i=this.readOnly?0:1,n=this.themeName==="dark"?"dark":"kennedy",r=`?title=${this.title?encodeURIComponent(this.title):""}&chrome=${i}&lightbox=${e}&ui=${n}&lang=${t}&offline=1&pwa=0&embed=1&noLangIcon=1&noExitBtn=1&noSaveBtn=1&saveAndExit=0&spin=1&proto=json`;this.$Electron?this.url=$A.originUrl(`drawio/webapp/index.html${r}`):this.url=$A.mainUrl(`drawio/webapp/${r}`)},mounted(){window.addEventListener("message",this.handleMessage)},beforeDestroy(){window.removeEventListener("message",this.handleMessage)},watch:{value:{handler(t){this.bakData!=$A.jsonStringify(t)&&(this.bakData=$A.jsonStringify(t),this.updateContent())},deep:!0}},computed:{...s(["themeName"])},methods:{formatZoom(t){return t+"%"},updateContent(){this.$refs.frame.postMessage(JSON.stringify({action:"load",autosave:1,xml:this.value.xml}))},onMessage(t){switch(t.event){case"init":this.loadIng=!1,this.updateContent();break;case"load":typeof this.value.xml=="undefined"&&this.$refs.frame.postMessage(JSON.stringify({action:"template"}));break;case"autosave":const e={xml:t.xml};this.bakData=$A.jsonStringify(e),this.$emit("input",e);break;case"save":this.$emit("saveData");break}}}},a={};var c=p(u,l,d,!1,h,"39021859",null,null);function h(t){for(let e in a)this[e]=a[e]}var st=function(){return c.exports}();export{st as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{n}from"./app.817c3a7e.js";var i=function(){var e=this,s=e.$createElement,r=e._self._c||s;return r("iframe",{directives:[{name:"show",rawName:"v-show",value:e.src,expression:"src"}],ref:"iframe",attrs:{src:e.src}})},a=[];const o={name:"IFrame",props:{src:{type:String,default:""}},mounted(){this.$refs.iframe.addEventListener("load",this.handleLoad),window.addEventListener("message",this.handleMessage)},beforeDestroy(){this.$refs.iframe.removeEventListener("load",this.handleLoad),window.removeEventListener("message",this.handleMessage)},methods:{handleLoad(){this.$emit("on-load")},handleMessage({data:e,source:s}){var r;s===((r=this.$refs.iframe)==null?void 0:r.contentWindow)&&(e=$A.jsonParse(e),e.source==="fileView"&&e.action==="picture"&&this.$store.dispatch("previewImage",{index:e.params.index,list:e.params.array}),this.$emit("on-message",e))},postMessage(e,s="*"){this.$refs.iframe&&this.$refs.iframe.contentWindow.postMessage(e,s)}}},t={};var m=n(o,i,a,!1,c,null,null,null);function c(e){for(let s in t)this[s]=t[s]}var l=function(){return m.exports}();export{l as I};
|
||||
import{n}from"./app.2491f23f.js";var i=function(){var e=this,s=e.$createElement,r=e._self._c||s;return r("iframe",{directives:[{name:"show",rawName:"v-show",value:e.src,expression:"src"}],ref:"iframe",attrs:{src:e.src}})},a=[];const o={name:"IFrame",props:{src:{type:String,default:""}},mounted(){this.$refs.iframe.addEventListener("load",this.handleLoad),window.addEventListener("message",this.handleMessage)},beforeDestroy(){this.$refs.iframe.removeEventListener("load",this.handleLoad),window.removeEventListener("message",this.handleMessage)},methods:{handleLoad(){this.$emit("on-load")},handleMessage({data:e,source:s}){var r;s===((r=this.$refs.iframe)==null?void 0:r.contentWindow)&&(e=$A.jsonParse(e),e.source==="fileView"&&e.action==="picture"&&this.$store.dispatch("previewImage",{index:e.params.index,list:e.params.array}),this.$emit("on-message",e))},postMessage(e,s="*"){this.$refs.iframe&&this.$refs.iframe.contentWindow.postMessage(e,s)}}},t={};var m=n(o,i,a,!1,c,null,null,null);function c(e){for(let s in t)this[s]=t[s]}var l=function(){return m.exports}();export{l as I};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{m as l}from"./vuex.cc7cb26e.js";import{n as o}from"./app.817c3a7e.js";var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"report-detail"},[e("div",{staticClass:"report-title user-select-auto"},[t._v(" "+t._s(t.data.title)+" "),t.loadIng>0?e("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):t._e()],1),t.data.id?e("div",{staticClass:"report-detail-context"},[e("ul",[e("li",[e("div",{staticClass:"report-label"},[t._v(" "+t._s(t.$L("\u6C47\u62A5\u4EBA"))+" ")]),e("div",{staticClass:"report-value"},[e("UserAvatar",{attrs:{userid:t.data.userid,size:28,clickOpenDetail:""}})],1)]),e("li",[e("div",{staticClass:"report-label"},[t._v(" "+t._s(t.$L("\u63D0\u4EA4\u65F6\u95F4"))+" ")]),e("div",{staticClass:"report-value"},[t._v(" "+t._s(t.data.created_at)+" ")])]),e("li",[e("div",{staticClass:"report-label"},[t._v(" "+t._s(t.$L("\u6C47\u62A5\u5BF9\u8C61"))+" ")]),e("div",{staticClass:"report-value"},[t.data.receives_user&&t.data.receives_user.length===0?[t._v("-")]:t._l(t.data.receives_user,function(r,i){return e("UserAvatar",{key:i,attrs:{userid:r.userid,size:28,clickOpenDetail:""}})})],2)]),t.data.report_link?e("li",{attrs:{title:t.$L("\u5206\u4EAB\u65F6\u95F4")+"\uFF1A"+t.data.report_link.created_at}},[e("div",{staticClass:"report-label"},[t._v(" "+t._s(t.$L("\u5206\u4EAB\u4EBA"))+" ")]),e("div",{staticClass:"report-value"},[e("UserAvatar",{attrs:{userid:t.data.report_link.userid,size:28,clickOpenDetail:""}})],1)]):t._e()]),e("div",{ref:"reportContent",staticClass:"report-content user-select-auto",domProps:{innerHTML:t._s(t.data.content)},on:{click:t.onClick}})]):t._e()])},d=[];const c={name:"ReportDetail",props:{data:{default:{}},type:{default:"view"}},data(){return{loadIng:0}},computed:{...l(["formOptions"])},watch:{"data.id":{handler(t){t>0&&this.type==="view"&&this.sendRead()},immediate:!0}},methods:{sendRead(){this.loadIng++,this.$store.dispatch("call",{url:"report/read",data:{ids:[this.data.id]}}).then(()=>{}).catch(()=>{}).finally(t=>{this.loadIng--})},onClick({target:t}){var a;if(t.nodeName==="IMG"){const e=$A.getTextImagesInfo((a=this.$refs.reportContent)==null?void 0:a.outerHTML);this.$store.dispatch("previewImage",{index:t.currentSrc,list:e})}}}},s={};var _=o(c,n,d,!1,p,null,null,null);function p(t){for(let a in s)this[a]=s[a]}var m=function(){return _.exports}();export{m as R};
|
||||
import{m as l}from"./vuex.cc7cb26e.js";import{n as o}from"./app.2491f23f.js";var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"report-detail"},[e("div",{staticClass:"report-title user-select-auto"},[t._v(" "+t._s(t.data.title)+" "),t.loadIng>0?e("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):t._e()],1),t.data.id?e("div",{staticClass:"report-detail-context"},[e("ul",[e("li",[e("div",{staticClass:"report-label"},[t._v(" "+t._s(t.$L("\u6C47\u62A5\u4EBA"))+" ")]),e("div",{staticClass:"report-value"},[e("UserAvatar",{attrs:{userid:t.data.userid,size:28,clickOpenDetail:""}})],1)]),e("li",[e("div",{staticClass:"report-label"},[t._v(" "+t._s(t.$L("\u63D0\u4EA4\u65F6\u95F4"))+" ")]),e("div",{staticClass:"report-value"},[t._v(" "+t._s(t.data.created_at)+" ")])]),e("li",[e("div",{staticClass:"report-label"},[t._v(" "+t._s(t.$L("\u6C47\u62A5\u5BF9\u8C61"))+" ")]),e("div",{staticClass:"report-value"},[t.data.receives_user&&t.data.receives_user.length===0?[t._v("-")]:t._l(t.data.receives_user,function(r,i){return e("UserAvatar",{key:i,attrs:{userid:r.userid,size:28,clickOpenDetail:""}})})],2)]),t.data.report_link?e("li",{attrs:{title:t.$L("\u5206\u4EAB\u65F6\u95F4")+"\uFF1A"+t.data.report_link.created_at}},[e("div",{staticClass:"report-label"},[t._v(" "+t._s(t.$L("\u5206\u4EAB\u4EBA"))+" ")]),e("div",{staticClass:"report-value"},[e("UserAvatar",{attrs:{userid:t.data.report_link.userid,size:28,clickOpenDetail:""}})],1)]):t._e()]),e("div",{ref:"reportContent",staticClass:"report-content user-select-auto",domProps:{innerHTML:t._s(t.data.content)},on:{click:t.onClick}})]):t._e()])},d=[];const c={name:"ReportDetail",props:{data:{default:{}},type:{default:"view"}},data(){return{loadIng:0}},computed:{...l(["formOptions"])},watch:{"data.id":{handler(t){t>0&&this.type==="view"&&this.sendRead()},immediate:!0}},methods:{sendRead(){this.loadIng++,this.$store.dispatch("call",{url:"report/read",data:{ids:[this.data.id]}}).then(()=>{}).catch(()=>{}).finally(t=>{this.loadIng--})},onClick({target:t}){var a;if(t.nodeName==="IMG"){const e=$A.getTextImagesInfo((a=this.$refs.reportContent)==null?void 0:a.outerHTML);this.$store.dispatch("previewImage",{index:t.currentSrc,list:e})}}}},s={};var _=o(c,n,d,!1,p,null,null,null);function p(t){for(let a in s)this[a]=s[a]}var m=function(){return _.exports}();export{m as R};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{n as r}from"./app.817c3a7e.js";var a=function(){var t=this,n=t.$createElement,e=t._self._c||n;return t.windowTouch?e("div",[e("Button",{attrs:{loading:t.loading,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),t.filtering?e("Button",{attrs:{type:"text"},on:{click:t.onCancelFilter}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loading,type:"text",icon:"md-refresh"},on:{click:t.onRefresh}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1):e("Tooltip",{attrs:{theme:"light",placement:t.placement,"transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loading,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.filtering?e("Button",{attrs:{type:"text"},on:{click:t.onCancelFilter}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loading,type:"text"},on:{click:t.onRefresh}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)},i=[];const l={name:"SearchButton",props:{loading:{type:Boolean,default:!1},filtering:{type:Boolean,default:!1},placement:{type:String,default:"bottom"}},methods:{onSearch(){this.$emit("search")},onRefresh(){this.$emit("refresh")},onCancelFilter(){this.$emit("cancelFilter")}}},o={};var s=r(l,a,i,!1,c,null,null,null);function c(t){for(let n in o)this[n]=o[n]}var h=function(){return s.exports}();export{h as S};
|
||||
import{n as r}from"./app.2491f23f.js";var a=function(){var t=this,n=t.$createElement,e=t._self._c||n;return t.windowTouch?e("div",[e("Button",{attrs:{loading:t.loading,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),t.filtering?e("Button",{attrs:{type:"text"},on:{click:t.onCancelFilter}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loading,type:"text",icon:"md-refresh"},on:{click:t.onRefresh}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1):e("Tooltip",{attrs:{theme:"light",placement:t.placement,"transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loading,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.filtering?e("Button",{attrs:{type:"text"},on:{click:t.onCancelFilter}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loading,type:"text"},on:{click:t.onRefresh}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)},i=[];const l={name:"SearchButton",props:{loading:{type:Boolean,default:!1},filtering:{type:Boolean,default:!1},placement:{type:String,default:"bottom"}},methods:{onSearch(){this.$emit("search")},onRefresh(){this.$emit("refresh")},onCancelFilter(){this.$emit("cancelFilter")}}},o={};var s=r(l,a,i,!1,c,null,null,null);function c(t){for(let n in o)this[n]=o[n]}var h=function(){return s.exports}();export{h as S};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7
public/js/build/app.c15427d2.css
vendored
7
public/js/build/app.c15427d2.css
vendored
File diff suppressed because one or more lines are too long
7
public/js/build/app.cfe66473.css
vendored
Normal file
7
public/js/build/app.cfe66473.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{M as i}from"./index.1fc7fdc9.js";import{n as m}from"./app.817c3a7e.js";import"./vue.fd9b772e.js";import"./@babel.f9bcab46.js";import"./vuex.cc7cb26e.js";import"./view-design-hi.ee3249c3.js";import"./@micro-zoe.f728a9f4.js";import"./DialogWrapper.0c7cd033.js";import"./index.b69b5f25.js";import"./vue-virtual-scroll-list-hi.15e3c1fb.js";import"./lodash.18c5398d.js";import"./ImgUpload.e96999cf.js";import"./jquery.16b446fd.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var e=function(){var t=this,r=t.$createElement,o=t._self._c||r;return o("MicroApps",{ref:"app",attrs:{"window-type":"popout"}})},n=[];const a={components:{MicroApps:i},async mounted(){const{name:t}=this.$route.params;if(!t){$A.modalError("\u5E94\u7528\u4E0D\u5B58\u5728");return}const r=(await $A.IDBArray("cacheMicroApps")).reverse().find(o=>o.name===t);if(!r){$A.modalError("\u5E94\u7528\u4E0D\u5B58\u5728");return}await this.$refs.app.onOpen(r)}},p={};var s=m(a,e,n,!1,c,null,null,null);function c(t){for(let r in p)this[r]=p[r]}var ar=function(){return s.exports}();export{ar as default};
|
||||
import{M as i}from"./index.faee056c.js";import{n as m}from"./app.2491f23f.js";import"./vue.fd9b772e.js";import"./@babel.f9bcab46.js";import"./vuex.cc7cb26e.js";import"./view-design-hi.ee3249c3.js";import"./@micro-zoe.f728a9f4.js";import"./DialogWrapper.b27f1bec.js";import"./index.29780965.js";import"./vue-virtual-scroll-list-hi.15e3c1fb.js";import"./lodash.18c5398d.js";import"./ImgUpload.ce006941.js";import"./jquery.15cce809.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var e=function(){var t=this,r=t.$createElement,o=t._self._c||r;return o("MicroApps",{ref:"app",attrs:{"window-type":"popout"}})},n=[];const a={components:{MicroApps:i},async mounted(){const{name:t}=this.$route.params;if(!t){$A.modalError("\u5E94\u7528\u4E0D\u5B58\u5728");return}const r=(await $A.IDBArray("cacheMicroApps")).reverse().find(o=>o.name===t);if(!r){$A.modalError("\u5E94\u7528\u4E0D\u5B58\u5728");return}await this.$refs.app.onOpen(r)}},p={};var s=m(a,e,n,!1,c,null,null,null);function c(t){for(let r in p)this[r]=p[r]}var ar=function(){return s.exports}();export{ar as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{n as l}from"./app.817c3a7e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var m=function(){var t=this,r=t.$createElement,i=t._self._c||r;return i("div",{staticClass:"setting-device"},[i("ul",[t.loadIng>0&&t.devices.length===0?i("li",{staticClass:"loading"},[i("Loading")],1):t._l(t.devices,function(e){return i("li",{key:e.id},[i("div",{staticClass:"icon"},[i("span",{class:t.getIcon(e.detail)})]),i("div",{staticClass:"info"},[i("div",{staticClass:"title"},[i("span",{staticClass:"name"},[t._v(t._s(t.getName(e.detail)))]),i("span",{staticClass:"device"},[t._v(t._s(t.getOs(e.detail)))])]),i("div",{staticClass:"time"},[i("EPopover",{attrs:{placement:"bottom-start",trigger:"click"}},[i("div",{staticClass:"setting-device-popover"},[i("p",[t._v(t._s(t.$L("\u767B\u5F55\u65F6\u95F4"))+": "+t._s(e.created_at))]),i("p",[t._v(t._s(t.$L("\u66F4\u65B0\u65F6\u95F4"))+": "+t._s(e.updated_at))]),i("p",[t._v(t._s(t.$L("\u8FC7\u671F\u65F6\u95F4"))+": "+t._s(e.expired_at))])]),i("span",{attrs:{slot:"reference"},slot:"reference"},[t._v(t._s(e.updated_at))])])],1)]),i("div",[e.is_current?i("span",{staticClass:"current"},[t._v(t._s(t.$L("\u5F53\u524D\u8BBE\u5907")))]):i("Button",{on:{click:function(o){return t.onLogout(e)}}},[t._v(t._s(t.$L("\u9000\u51FA\u767B\u5F55")))])],1)])})],2)])},p=[];const c={name:"SettingDevice",data(){return{loadIng:0,devices:[]}},mounted(){this.getDeviceList()},methods:{getDeviceList(){this.loadIng++,this.$store.dispatch("call",{url:"users/device/list"}).then(({data:t})=>{this.devices=t.list,typeof this.$parent.updateDeviceCount=="function"&&this.$parent.updateDeviceCount(this.devices.length)}).catch(({msg:t})=>{$A.modalError(t),this.devices=[]}).finally(()=>{this.loadIng--})},getIcon({app_type:t,app_name:r}){return/ios/i.test(t)?/ipad/i.test(r)?"tablet":/iphone/i.test(r)?"phone":"apple":/android/i.test(t)?/(tablet|phablet)/i.test(r)?"tablet":"android":/mac/i.test(t)?"macos":/win/i.test(t)?"window":"web"},getName({app_brand:t,app_model:r,device_name:i,app_type:e,app_name:o,browser:a}){const s=[];if(/web/i.test(e))s.push(a,this.$L("\u6D4F\u89C8\u5668"));else{if(i)return i;t?s.push(t,r):s.push(o||e,this.$L("\u5BA2\u6237\u7AEF"))}return s.join(" ")},getOs({app_os:t,os:r}){return t||r},onLogout(t){$A.modalConfirm({title:"\u9000\u51FA\u767B\u5F55",content:"\u662F\u5426\u5728\u8BE5\u8BBE\u5907\u4E0A\u9000\u51FA\u767B\u5F55\uFF1F",loading:!0,onOk:()=>new Promise((r,i)=>{this.$store.dispatch("call",{url:"users/device/logout",data:{id:t.id}}).then(({msg:e})=>{r(e),this.getDeviceList()}).catch(({msg:e})=>{i(e)})})})}}},n={};var u=l(c,m,p,!1,d,null,null,null);function d(t){for(let r in n)this[r]=n[r]}var st=function(){return u.exports}();export{st as default};
|
||||
import{n as l}from"./app.2491f23f.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var m=function(){var t=this,r=t.$createElement,i=t._self._c||r;return i("div",{staticClass:"setting-device"},[i("ul",[t.loadIng>0&&t.devices.length===0?i("li",{staticClass:"loading"},[i("Loading")],1):t._l(t.devices,function(e){return i("li",{key:e.id},[i("div",{staticClass:"icon"},[i("span",{class:t.getIcon(e.detail)})]),i("div",{staticClass:"info"},[i("div",{staticClass:"title"},[i("span",{staticClass:"name"},[t._v(t._s(t.getName(e.detail)))]),i("span",{staticClass:"device"},[t._v(t._s(t.getOs(e.detail)))])]),i("div",{staticClass:"time"},[i("EPopover",{attrs:{placement:"bottom-start",trigger:"click"}},[i("div",{staticClass:"setting-device-popover"},[i("p",[t._v(t._s(t.$L("\u767B\u5F55\u65F6\u95F4"))+": "+t._s(e.created_at))]),i("p",[t._v(t._s(t.$L("\u66F4\u65B0\u65F6\u95F4"))+": "+t._s(e.updated_at))]),i("p",[t._v(t._s(t.$L("\u8FC7\u671F\u65F6\u95F4"))+": "+t._s(e.expired_at))])]),i("span",{attrs:{slot:"reference"},slot:"reference"},[t._v(t._s(e.updated_at))])])],1)]),i("div",[e.is_current?i("span",{staticClass:"current"},[t._v(t._s(t.$L("\u5F53\u524D\u8BBE\u5907")))]):i("Button",{on:{click:function(o){return t.onLogout(e)}}},[t._v(t._s(t.$L("\u9000\u51FA\u767B\u5F55")))])],1)])})],2)])},p=[];const c={name:"SettingDevice",data(){return{loadIng:0,devices:[]}},mounted(){this.getDeviceList()},methods:{getDeviceList(){this.loadIng++,this.$store.dispatch("call",{url:"users/device/list"}).then(({data:t})=>{this.devices=t.list,typeof this.$parent.updateDeviceCount=="function"&&this.$parent.updateDeviceCount(this.devices.length)}).catch(({msg:t})=>{$A.modalError(t),this.devices=[]}).finally(()=>{this.loadIng--})},getIcon({app_type:t,app_name:r}){return/ios/i.test(t)?/ipad/i.test(r)?"tablet":/iphone/i.test(r)?"phone":"apple":/android/i.test(t)?/(tablet|phablet)/i.test(r)?"tablet":"android":/mac/i.test(t)?"macos":/win/i.test(t)?"window":"web"},getName({app_brand:t,app_model:r,device_name:i,app_type:e,app_name:o,browser:a}){const s=[];if(/web/i.test(e))s.push(a,this.$L("\u6D4F\u89C8\u5668"));else{if(i)return i;t?s.push(t,r):s.push(o||e,this.$L("\u5BA2\u6237\u7AEF"))}return s.join(" ")},getOs({app_os:t,os:r}){return t||r},onLogout(t){$A.modalConfirm({title:"\u9000\u51FA\u767B\u5F55",content:"\u662F\u5426\u5728\u8BE5\u8BBE\u5907\u4E0A\u9000\u51FA\u767B\u5F55\uFF1F",loading:!0,onOk:()=>new Promise((r,i)=>{this.$store.dispatch("call",{url:"users/device/logout",data:{id:t.id}}).then(({msg:e})=>{r(e),this.getDeviceList()}).catch(({msg:e})=>{i(e)})})})}}},n={};var u=l(c,m,p,!1,d,null,null,null);function d(t){for(let r in n)this[r]=n[r]}var st=function(){return u.exports}();export{st as default};
|
||||
@@ -1 +1 @@
|
||||
import{D as p}from"./DialogWrapper.0c7cd033.js";import{m}from"./vuex.cc7cb26e.js";import{n as a}from"./app.817c3a7e.js";import"./index.b69b5f25.js";import"./vue-virtual-scroll-list-hi.15e3c1fb.js";import"./@babel.f9bcab46.js";import"./vue.fd9b772e.js";import"./lodash.18c5398d.js";import"./ImgUpload.e96999cf.js";import"./jquery.16b446fd.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var e=function(){var t=this,o=t.$createElement,r=t._self._c||o;return r("div",{staticClass:"electron-dialog"},[r("PageTitle",{attrs:{title:t.dialogData.name}}),t.dialogId>0?r("DialogWrapper",{attrs:{dialogId:t.dialogId}}):t._e()],1)},n=[];const s={components:{DialogWrapper:p},computed:{...m(["cacheDialogs"]),dialogId(){const{dialogId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)},dialogData(){return this.cacheDialogs.find(({id:t})=>t===this.dialogId)||{}}}},i={};var l=a(s,e,n,!1,d,"4f6d7c8a",null,null);function d(t){for(let o in i)this[o]=i[o]}var et=function(){return l.exports}();export{et as default};
|
||||
import{D as p}from"./DialogWrapper.b27f1bec.js";import{m}from"./vuex.cc7cb26e.js";import{n as a}from"./app.2491f23f.js";import"./index.29780965.js";import"./vue-virtual-scroll-list-hi.15e3c1fb.js";import"./@babel.f9bcab46.js";import"./vue.fd9b772e.js";import"./lodash.18c5398d.js";import"./ImgUpload.ce006941.js";import"./jquery.15cce809.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var e=function(){var t=this,o=t.$createElement,r=t._self._c||o;return r("div",{staticClass:"electron-dialog"},[r("PageTitle",{attrs:{title:t.dialogData.name}}),t.dialogId>0?r("DialogWrapper",{attrs:{dialogId:t.dialogId}}):t._e()],1)},n=[];const s={components:{DialogWrapper:p},computed:{...m(["cacheDialogs"]),dialogId(){const{dialogId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)},dialogData(){return this.cacheDialogs.find(({id:t})=>t===this.dialogId)||{}}}},i={};var l=a(s,e,n,!1,d,"4f6d7c8a",null,null);function d(t){for(let o in i)this[o]=i[o]}var et=function(){return l.exports}();export{et as default};
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import n from"./FileContent.d8e600e1.js";import l from"./FilePreview.87ca99d9.js";import{n as m}from"./app.817c3a7e.js";import"./openpgp_hi.15f91b1d.js";import"./IFrame.2a7489ee.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"single-file"},[i("PageTitle",{attrs:{title:t.pageName}}),t.loadIng>0?i("Loading"):t.fileInfo?[t.isPreview?i("FilePreview",{attrs:{code:t.code,file:t.fileInfo,historyId:t.historyId,headerShow:!t.$isEEUIApp}}):i("FileContent",{attrs:{file:t.fileInfo},model:{value:t.fileShow,callback:function(r){t.fileShow=r},expression:"fileShow"}})]:t._e()],2)},p=[];const a={components:{FilePreview:l,FileContent:n},data(){return{loadIng:0,code:null,fileShow:!0,fileInfo:null}},mounted(){},computed:{historyId(){return this.$route.query?$A.runNum(this.$route.query.history_id):0},isPreview(){return this.windowPortrait||this.code||this.historyId>0||this.fileInfo&&this.fileInfo.permission===0},pageName(){return this.$route.query&&this.$route.query.history_title?this.$route.query.history_title:this.fileInfo?`${this.fileInfo.name} [${this.fileInfo.created_at}]`:""}},watch:{$route:{handler(){this.getInfo()},immediate:!0}},methods:{getInfo(){let{codeOrFileId:t}=this.$route.params,e={id:t};if(/^\d+$/.test(t))this.code=null;else if(t)this.code=t;else return;setTimeout(i=>{this.loadIng++},600),this.$store.dispatch("call",{url:"file/one",data:e}).then(({data:i})=>{this.fileInfo=i}).catch(({msg:i})=>{$A.modalError({content:i,onOk:()=>{window.close()}})}).finally(i=>{this.loadIng--})}}},o={};var f=m(a,s,p,!1,u,"662d0b64",null,null);function u(t){for(let e in o)this[e]=o[e]}var lt=function(){return f.exports}();export{lt as default};
|
||||
import n from"./FileContent.f219b9e5.js";import l from"./FilePreview.4047ac93.js";import{n as m}from"./app.2491f23f.js";import"./openpgp_hi.15f91b1d.js";import"./IFrame.d7eff04e.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"single-file"},[i("PageTitle",{attrs:{title:t.pageName}}),t.loadIng>0?i("Loading"):t.fileInfo?[t.isPreview?i("FilePreview",{attrs:{code:t.code,file:t.fileInfo,historyId:t.historyId,headerShow:!t.$isEEUIApp}}):i("FileContent",{attrs:{file:t.fileInfo},model:{value:t.fileShow,callback:function(r){t.fileShow=r},expression:"fileShow"}})]:t._e()],2)},p=[];const a={components:{FilePreview:l,FileContent:n},data(){return{loadIng:0,code:null,fileShow:!0,fileInfo:null}},mounted(){},computed:{historyId(){return this.$route.query?$A.runNum(this.$route.query.history_id):0},isPreview(){return this.windowPortrait||this.code||this.historyId>0||this.fileInfo&&this.fileInfo.permission===0},pageName(){return this.$route.query&&this.$route.query.history_title?this.$route.query.history_title:this.fileInfo?`${this.fileInfo.name} [${this.fileInfo.created_at}]`:""}},watch:{$route:{handler(){this.getInfo()},immediate:!0}},methods:{getInfo(){let{codeOrFileId:t}=this.$route.params,e={id:t};if(/^\d+$/.test(t))this.code=null;else if(t)this.code=t;else return;setTimeout(i=>{this.loadIng++},600),this.$store.dispatch("call",{url:"file/one",data:e}).then(({data:i})=>{this.fileInfo=i}).catch(({msg:i})=>{$A.modalError({content:i,onOk:()=>{window.close()}})}).finally(i=>{this.loadIng--})}}},o={};var f=m(a,s,p,!1,u,"662d0b64",null,null);function u(t){for(let e in o)this[e]=o[e]}var lt=function(){return f.exports}();export{lt as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{n as e}from"./app.817c3a7e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var m=function(){var t=this,o=t.$createElement,i=t._self._c||o;return i("div")},n=[];const p={data(){return{}},mounted(){if(/^https?:/i.test(window.location.protocol)){let t=null;if(this.$router.mode==="hash"?$A.stringLength(window.location.pathname)>2&&(t=`${window.location.origin}/#${window.location.pathname}${window.location.search}`):this.$router.mode==="history"&&$A.strExists(window.location.href,"/#/")&&(t=window.location.href.replace("/#/","/")),t)throw this.$store.dispatch("userUrl",t).then(o=>{window.location.href=o}),SyntaxError()}},activated(){this.start()},methods:{start(){this.userId>0?this.goForward({name:"manage-dashboard"},!0):this.goForward({name:"login"},!0)}}},r={};var a=e(p,m,n,!1,s,null,null,null);function s(t){for(let o in r)this[o]=r[o]}var tt=function(){return a.exports}();export{tt as default};
|
||||
import{n as e}from"./app.2491f23f.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var m=function(){var t=this,o=t.$createElement,i=t._self._c||o;return i("div")},n=[];const p={data(){return{}},mounted(){if(/^https?:/i.test(window.location.protocol)){let t=null;if(this.$router.mode==="hash"?$A.stringLength(window.location.pathname)>2&&(t=`${window.location.origin}/#${window.location.pathname}${window.location.search}`):this.$router.mode==="history"&&$A.strExists(window.location.href,"/#/")&&(t=window.location.href.replace("/#/","/")),t)throw this.$store.dispatch("userUrl",t).then(o=>{window.location.href=o}),SyntaxError()}},activated(){this.start()},methods:{start(){this.userId>0?this.goForward({name:"manage-dashboard"},!0):this.goForward({name:"login"},!0)}}},r={};var a=e(p,m,n,!1,s,null,null,null);function s(t){for(let o in r)this[o]=r[o]}var tt=function(){return a.exports}();export{tt as default};
|
||||
@@ -1 +1 @@
|
||||
import{_ as m}from"./openpgp_hi.15f91b1d.js";import{e as n}from"./index.40a8e116.js";import{n as p}from"./app.817c3a7e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var a=function(){var t=this,o=t.$createElement,i=t._self._c||o;return t.ready?i("VEditor",{attrs:{leftToolbar:t.leftToolbar,rightToolbar:t.rightToolbar,tocNavPositionRight:t.tocNavPositionRight,includeLevel:t.includeLevel},model:{value:t.content,callback:function(e){t.content=e},expression:"content"}}):i("Loading")},s=[];const l={name:"VMEditor",mixins:[n],components:{VEditor:()=>m(()=>import("./editor.18a511b5.js"),["js/build/editor.18a511b5.js","js/build/editor.e437d81f.css","js/build/@kangc.92e0b796.js","js/build/@kangc.d8464d83.css","js/build/@babel.f9bcab46.js","js/build/vue.fd9b772e.js","js/build/copy-to-clipboard.a53c061d.js","js/build/toggle-selection.d2487283.js","js/build/prismjs.ed627128.js","js/build/app.817c3a7e.js","js/build/app.c15427d2.css","js/build/jquery.16b446fd.js","js/build/dayjs.495f600d.js","js/build/localforage.be4775a0.js","js/build/markdown-it.bda97caf.js","js/build/mdurl.ce6c1dd8.js","js/build/uc.micro.8d343c98.js","js/build/entities.48a44fec.js","js/build/linkify-it.c5e8196e.js","js/build/punycode.js.4b3f125a.js","js/build/highlight.js.ab8aeea4.js","js/build/markdown-it-link-attributes.e1d5d151.js","js/build/@traptitech.897ae552.js","js/build/vuex.cc7cb26e.js","js/build/openpgp_hi.15f91b1d.js","js/build/axios.79c8b3d5.js","js/build/mitt.1ea0a2a3.js","js/build/quill-hi.654cb53d.js","js/build/parchment.d5c5924e.js","js/build/quill-delta.f1b7ce48.js","js/build/fast-diff.f17881f3.js","js/build/lodash.clonedeep.e8ef3f14.js","js/build/lodash.isequal.d6a986d0.js","js/build/eventemitter3.78b735ad.js","js/build/lodash-es.df04b444.js","js/build/quill-mention-hi.41f02fd4.js","js/build/view-design-hi.ee3249c3.js","js/build/vue-router.2d566cd7.js","js/build/vue-clipboard2.50be9c5e.js","js/build/clipboard.058ef547.js","js/build/vuedraggable.9fd6afed.js","js/build/sortablejs.d74243d9.js","js/build/vue-resize-observer.c3c9ca4e.js","js/build/element-sea.1d49e96e.js","js/build/deepmerge.cecf392e.js","js/build/resize-observer-polyfill.0bdc1850.js","js/build/throttle-debounce.7c3948b2.js","js/build/babel-helper-vue-jsx-merge-props.5ed215c3.js","js/build/normalize-wheel.2a034b9f.js","js/build/async-validator.49abba38.js","js/build/babel-runtime.4773988a.js","js/build/core-js.314b4a1d.js","js/build/codemirror.8cc0d7e8.js","js/build/codemirror.9ace6687.css","js/build/index.40a8e116.js","js/build/ImgUpload.e96999cf.js"])},data(){return{ready:!1,content:""}},async mounted(){await $A.loadScriptS(["js/katex/katex.min.js","js/katex/katex.min.css","js/mermaid.min.js"]),this.ready=!0},watch:{value:{handler(t){t==null&&(t=""),this.content=t},immediate:!0},content(t){this.$emit("input",t)}}},r={};var c=p(l,a,s,!1,_,null,null,null);function _(t){for(let o in r)this[o]=r[o]}var et=function(){return c.exports}();export{et as default};
|
||||
import{_ as m}from"./openpgp_hi.15f91b1d.js";import{e as n}from"./index.40a8e116.js";import{n as p}from"./app.2491f23f.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var a=function(){var t=this,o=t.$createElement,i=t._self._c||o;return t.ready?i("VEditor",{attrs:{leftToolbar:t.leftToolbar,rightToolbar:t.rightToolbar,tocNavPositionRight:t.tocNavPositionRight,includeLevel:t.includeLevel},model:{value:t.content,callback:function(e){t.content=e},expression:"content"}}):i("Loading")},s=[];const l={name:"VMEditor",mixins:[n],components:{VEditor:()=>m(()=>import("./editor.c11f9480.js"),["js/build/editor.c11f9480.js","js/build/editor.e437d81f.css","js/build/@kangc.92e0b796.js","js/build/@kangc.d8464d83.css","js/build/@babel.f9bcab46.js","js/build/vue.fd9b772e.js","js/build/copy-to-clipboard.a53c061d.js","js/build/toggle-selection.d2487283.js","js/build/prismjs.ed627128.js","js/build/app.2491f23f.js","js/build/app.cfe66473.css","js/build/jquery.15cce809.js","js/build/dayjs.7adb259e.js","js/build/localforage.7983a366.js","js/build/markdown-it.bda97caf.js","js/build/mdurl.ce6c1dd8.js","js/build/uc.micro.8d343c98.js","js/build/entities.48a44fec.js","js/build/linkify-it.c5e8196e.js","js/build/punycode.js.4b3f125a.js","js/build/highlight.js.ab8aeea4.js","js/build/markdown-it-link-attributes.e1d5d151.js","js/build/@traptitech.897ae552.js","js/build/vuex.cc7cb26e.js","js/build/openpgp_hi.15f91b1d.js","js/build/axios.79c8b3d5.js","js/build/mitt.1ea0a2a3.js","js/build/quill-hi.654cb53d.js","js/build/parchment.d5c5924e.js","js/build/quill-delta.f1b7ce48.js","js/build/fast-diff.f17881f3.js","js/build/lodash.clonedeep.e8ef3f14.js","js/build/lodash.isequal.d6a986d0.js","js/build/eventemitter3.78b735ad.js","js/build/lodash-es.df04b444.js","js/build/quill-mention-hi.41f02fd4.js","js/build/view-design-hi.ee3249c3.js","js/build/vue-router.2d566cd7.js","js/build/vue-clipboard2.50be9c5e.js","js/build/clipboard.058ef547.js","js/build/vuedraggable.9fd6afed.js","js/build/sortablejs.d74243d9.js","js/build/vue-resize-observer.c3c9ca4e.js","js/build/element-sea.1d49e96e.js","js/build/deepmerge.cecf392e.js","js/build/resize-observer-polyfill.0bdc1850.js","js/build/throttle-debounce.7c3948b2.js","js/build/babel-helper-vue-jsx-merge-props.5ed215c3.js","js/build/normalize-wheel.2a034b9f.js","js/build/async-validator.49abba38.js","js/build/babel-runtime.4773988a.js","js/build/core-js.314b4a1d.js","js/build/codemirror.8cc0d7e8.js","js/build/codemirror.9ace6687.css","js/build/index.40a8e116.js","js/build/ImgUpload.ce006941.js"])},data(){return{ready:!1,content:""}},async mounted(){await $A.loadScriptS(["js/katex/katex.min.js","js/katex/katex.min.css","js/mermaid.min.js"]),this.ready=!0},watch:{value:{handler(t){t==null&&(t=""),this.content=t},immediate:!0},content(t){this.$emit("input",t)}}},r={};var c=p(l,a,s,!1,_,null,null,null);function _(t){for(let o in r)this[o]=r[o]}var et=function(){return c.exports}();export{et as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{f as e,l as n,k as s,n as p}from"./app.817c3a7e.js";import{m as l}from"./vuex.cc7cb26e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var u=function(){var t=this,o=t.$createElement,r=t._self._c||o;return r("div",{staticClass:"setting-item submit"},[r("Form",t._b({ref:"formData",attrs:{model:t.formData,rules:t.ruleData},nativeOn:{submit:function(a){a.preventDefault()}}},"Form",t.formOptions,!1),[r("FormItem",{attrs:{label:t.$L("\u9009\u62E9\u8BED\u8A00"),prop:"language"}},[r("Select",{attrs:{placeholder:t.$L("\u9009\u9879\u8BED\u8A00")},model:{value:t.formData.language,callback:function(a){t.$set(t.formData,"language",a)},expression:"formData.language"}},t._l(t.languageList,function(a,i){return r("Option",{key:i,attrs:{value:i}},[t._v(t._s(a))])}),1)],1)],1),r("div",{staticClass:"setting-footer"},[r("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),r("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},f=[];const g={data(){return{loadIng:0,languageList:e,formData:{language:""},ruleData:{}}},mounted(){this.initData()},computed:{...l(["formOptions"])},methods:{initData(){this.$set(this.formData,"language",n),this.formData_bak=$A.cloneJSON(this.formData)},submitForm(){this.$refs.formData.validate(t=>{t&&s(this.formData.language)})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)}}},m={};var c=p(g,u,f,!1,_,null,null,null);function _(t){for(let o in m)this[o]=m[o]}var et=function(){return c.exports}();export{et as default};
|
||||
import{f as e,l as n,k as s,n as p}from"./app.2491f23f.js";import{m as l}from"./vuex.cc7cb26e.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var u=function(){var t=this,o=t.$createElement,r=t._self._c||o;return r("div",{staticClass:"setting-item submit"},[r("Form",t._b({ref:"formData",attrs:{model:t.formData,rules:t.ruleData},nativeOn:{submit:function(a){a.preventDefault()}}},"Form",t.formOptions,!1),[r("FormItem",{attrs:{label:t.$L("\u9009\u62E9\u8BED\u8A00"),prop:"language"}},[r("Select",{attrs:{placeholder:t.$L("\u9009\u9879\u8BED\u8A00")},model:{value:t.formData.language,callback:function(a){t.$set(t.formData,"language",a)},expression:"formData.language"}},t._l(t.languageList,function(a,i){return r("Option",{key:i,attrs:{value:i}},[t._v(t._s(a))])}),1)],1)],1),r("div",{staticClass:"setting-footer"},[r("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),r("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},f=[];const g={data(){return{loadIng:0,languageList:e,formData:{language:""},ruleData:{}}},mounted(){this.initData()},computed:{...l(["formOptions"])},methods:{initData(){this.$set(this.formData,"language",n),this.formData_bak=$A.cloneJSON(this.formData)},submitForm(){this.$refs.formData.validate(t=>{t&&s(this.formData.language)})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)}}},m={};var c=p(g,u,f,!1,_,null,null,null);function _(t){for(let o in m)this[o]=m[o]}var et=function(){return c.exports}();export{et as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
@@ -1 +1 @@
|
||||
import{n as a}from"./app.817c3a7e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var s=function(){var i=this,t=i.$createElement,r=i._self._c||t;return r("div")},u=[];const c={mounted(){const{meetingId:i,sharekey:t}=this.$route.params,{nickname:r,avatar:m,audio:p,video:n,type:o}=this.$route.query;this.$store.dispatch("showMeetingWindow",{type:["direct","join"].includes(o)?o:"join",meetingid:i,meetingSharekey:t,meetingNickname:r,meetingAvatar:m,meetingAudio:p,meetingVideo:n,meetingdisabled:!0})},render(){return null}},e={};var d=a(c,s,u,!1,l,null,null,null);function l(i){for(let t in e)this[t]=e[t]}var et=function(){return d.exports}();export{et as default};
|
||||
import{n as a}from"./app.2491f23f.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var s=function(){var i=this,t=i.$createElement,r=i._self._c||t;return r("div")},u=[];const c={mounted(){const{meetingId:i,sharekey:t}=this.$route.params,{nickname:r,avatar:m,audio:p,video:n,type:o}=this.$route.query;this.$store.dispatch("showMeetingWindow",{type:["direct","join"].includes(o)?o:"join",meetingid:i,meetingSharekey:t,meetingNickname:r,meetingAvatar:m,meetingAudio:p,meetingVideo:n,meetingdisabled:!0})},render(){return null}},e={};var d=a(c,s,u,!1,l,null,null,null);function l(i){for(let t in e)this[t]=e[t]}var et=function(){return d.exports}();export{et as default};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{m as i}from"./vuex.cc7cb26e.js";import{n as a}from"./app.817c3a7e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var m=function(){var t=this,s=t.$createElement,r=t._self._c||s;return r("div",{staticClass:"setting-item submit"},[r("Form",t._b({ref:"formDatum",attrs:{model:t.formDatum,rules:t.ruleDatum},nativeOn:{submit:function(e){e.preventDefault()}}},"Form",t.formOptions,!1),[t.userInfo.changepass?r("Alert",{staticStyle:{"margin-bottom":"32px"},attrs:{type:"warning",showIcon:""}},[t._v(t._s(t.$L("\u8BF7\u5148\u4FEE\u6539\u767B\u5F55\u5BC6\u7801\uFF01")))]):t._e(),r("FormItem",{attrs:{label:t.$L("\u65E7\u5BC6\u7801"),prop:"oldpass"}},[r("Input",{attrs:{type:"password"},model:{value:t.formDatum.oldpass,callback:function(e){t.$set(t.formDatum,"oldpass",e)},expression:"formDatum.oldpass"}})],1),r("FormItem",{attrs:{label:t.$L("\u65B0\u5BC6\u7801"),prop:"newpass"}},[r("Input",{attrs:{type:"password"},model:{value:t.formDatum.newpass,callback:function(e){t.$set(t.formDatum,"newpass",e)},expression:"formDatum.newpass"}})],1),r("FormItem",{attrs:{label:t.$L("\u786E\u8BA4\u65B0\u5BC6\u7801"),prop:"checkpass"}},[r("Input",{attrs:{type:"password"},model:{value:t.formDatum.checkpass,callback:function(e){t.$set(t.formDatum,"checkpass",e)},expression:"formDatum.checkpass"}})],1)],1),r("div",{staticClass:"setting-footer"},[r("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),r("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},p=[];const n={data(){return{loadIng:0,formDatum:{oldpass:"",newpass:"",checkpass:""},ruleDatum:{oldpass:[{required:!0,message:this.$L("\u8BF7\u8F93\u5165\u65E7\u5BC6\u7801\uFF01"),trigger:"change"},{type:"string",min:6,message:this.$L("\u5BC6\u7801\u957F\u5EA6\u81F3\u5C116\u4F4D\uFF01"),trigger:"change"}],newpass:[{validator:(t,s,r)=>{s===""?r(new Error(this.$L("\u8BF7\u8F93\u5165\u65B0\u5BC6\u7801\uFF01"))):(this.formDatum.checkpass!==""&&this.$refs.formDatum.validateField("checkpass"),r())},required:!0,trigger:"change"},{type:"string",min:6,message:this.$L("\u5BC6\u7801\u957F\u5EA6\u81F3\u5C116\u4F4D\uFF01"),trigger:"change"}],checkpass:[{validator:(t,s,r)=>{s===""?r(new Error(this.$L("\u8BF7\u91CD\u65B0\u8F93\u5165\u65B0\u5BC6\u7801\uFF01"))):s!==this.formDatum.newpass?r(new Error(this.$L("\u4E24\u6B21\u5BC6\u7801\u8F93\u5165\u4E0D\u4E00\u81F4\uFF01"))):r()},required:!0,trigger:"change"}]}}},computed:{...i(["userInfo","formOptions"])},methods:{submitForm(){this.$refs.formDatum.validate(t=>{t&&(this.loadIng++,this.$store.dispatch("call",{url:"users/editpass",data:this.formDatum}).then(({data:s})=>{$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.$store.dispatch("saveUserInfo",s),this.$refs.formDatum.resetFields()}).catch(({msg:s})=>{$A.modalError(s)}).finally(s=>{this.loadIng--}))})},resetForm(){this.$refs.formDatum.resetFields()}}},o={};var l=a(n,m,p,!1,u,null,null,null);function u(t){for(let s in o)this[s]=o[s]}var st=function(){return l.exports}();export{st as default};
|
||||
import{m as i}from"./vuex.cc7cb26e.js";import{n as a}from"./app.2491f23f.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var m=function(){var t=this,s=t.$createElement,r=t._self._c||s;return r("div",{staticClass:"setting-item submit"},[r("Form",t._b({ref:"formDatum",attrs:{model:t.formDatum,rules:t.ruleDatum},nativeOn:{submit:function(e){e.preventDefault()}}},"Form",t.formOptions,!1),[t.userInfo.changepass?r("Alert",{staticStyle:{"margin-bottom":"32px"},attrs:{type:"warning",showIcon:""}},[t._v(t._s(t.$L("\u8BF7\u5148\u4FEE\u6539\u767B\u5F55\u5BC6\u7801\uFF01")))]):t._e(),r("FormItem",{attrs:{label:t.$L("\u65E7\u5BC6\u7801"),prop:"oldpass"}},[r("Input",{attrs:{type:"password"},model:{value:t.formDatum.oldpass,callback:function(e){t.$set(t.formDatum,"oldpass",e)},expression:"formDatum.oldpass"}})],1),r("FormItem",{attrs:{label:t.$L("\u65B0\u5BC6\u7801"),prop:"newpass"}},[r("Input",{attrs:{type:"password"},model:{value:t.formDatum.newpass,callback:function(e){t.$set(t.formDatum,"newpass",e)},expression:"formDatum.newpass"}})],1),r("FormItem",{attrs:{label:t.$L("\u786E\u8BA4\u65B0\u5BC6\u7801"),prop:"checkpass"}},[r("Input",{attrs:{type:"password"},model:{value:t.formDatum.checkpass,callback:function(e){t.$set(t.formDatum,"checkpass",e)},expression:"formDatum.checkpass"}})],1)],1),r("div",{staticClass:"setting-footer"},[r("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),r("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},p=[];const n={data(){return{loadIng:0,formDatum:{oldpass:"",newpass:"",checkpass:""},ruleDatum:{oldpass:[{required:!0,message:this.$L("\u8BF7\u8F93\u5165\u65E7\u5BC6\u7801\uFF01"),trigger:"change"},{type:"string",min:6,message:this.$L("\u5BC6\u7801\u957F\u5EA6\u81F3\u5C116\u4F4D\uFF01"),trigger:"change"}],newpass:[{validator:(t,s,r)=>{s===""?r(new Error(this.$L("\u8BF7\u8F93\u5165\u65B0\u5BC6\u7801\uFF01"))):(this.formDatum.checkpass!==""&&this.$refs.formDatum.validateField("checkpass"),r())},required:!0,trigger:"change"},{type:"string",min:6,message:this.$L("\u5BC6\u7801\u957F\u5EA6\u81F3\u5C116\u4F4D\uFF01"),trigger:"change"}],checkpass:[{validator:(t,s,r)=>{s===""?r(new Error(this.$L("\u8BF7\u91CD\u65B0\u8F93\u5165\u65B0\u5BC6\u7801\uFF01"))):s!==this.formDatum.newpass?r(new Error(this.$L("\u4E24\u6B21\u5BC6\u7801\u8F93\u5165\u4E0D\u4E00\u81F4\uFF01"))):r()},required:!0,trigger:"change"}]}}},computed:{...i(["userInfo","formOptions"])},methods:{submitForm(){this.$refs.formDatum.validate(t=>{t&&(this.loadIng++,this.$store.dispatch("call",{url:"users/editpass",data:this.formDatum}).then(({data:s})=>{$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.$store.dispatch("saveUserInfo",s),this.$refs.formDatum.resetFields()}).catch(({msg:s})=>{$A.modalError(s)}).finally(s=>{this.loadIng--}))})},resetForm(){this.$refs.formDatum.resetFields()}}},o={};var l=a(n,m,p,!1,u,null,null,null);function u(t){for(let s in o)this[s]=o[s]}var st=function(){return l.exports}();export{st as default};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{n as m}from"./app.817c3a7e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var p=function(){var r=this,t=r.$createElement,i=r._self._c||t;return i("div")},e=[];const n={},o={};var _=m(n,p,e,!1,s,null,null,null);function s(r){for(let t in o)this[t]=o[t]}var tt=function(){return _.exports}();export{tt as default};
|
||||
import{n as m}from"./app.2491f23f.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var p=function(){var r=this,t=r.$createElement,i=r._self._c||t;return i("div")},e=[];const n={},o={};var _=m(n,p,e,!1,s,null,null,null);function s(r){for(let t in o)this[t]=o[t]}var tt=function(){return _.exports}();export{tt as default};
|
||||
@@ -1 +1 @@
|
||||
import{_ as m}from"./openpgp_hi.15f91b1d.js";import{p}from"./index.40a8e116.js";import{n as e}from"./app.817c3a7e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var n=function(){var t=this,r=t.$createElement,i=t._self._c||r;return t.ready?i("VPreview",{attrs:{value:t.value}}):i("Loading")},a=[];const s={name:"VMPreview",mixins:[p],components:{VPreview:()=>m(()=>import("./preview.ec85a43c.js"),["js/build/preview.ec85a43c.js","js/build/preview.072d7643.css","js/build/@kangc.92e0b796.js","js/build/@kangc.d8464d83.css","js/build/@babel.f9bcab46.js","js/build/vue.fd9b772e.js","js/build/copy-to-clipboard.a53c061d.js","js/build/toggle-selection.d2487283.js","js/build/prismjs.ed627128.js","js/build/app.817c3a7e.js","js/build/app.c15427d2.css","js/build/jquery.16b446fd.js","js/build/dayjs.495f600d.js","js/build/localforage.be4775a0.js","js/build/markdown-it.bda97caf.js","js/build/mdurl.ce6c1dd8.js","js/build/uc.micro.8d343c98.js","js/build/entities.48a44fec.js","js/build/linkify-it.c5e8196e.js","js/build/punycode.js.4b3f125a.js","js/build/highlight.js.ab8aeea4.js","js/build/markdown-it-link-attributes.e1d5d151.js","js/build/@traptitech.897ae552.js","js/build/vuex.cc7cb26e.js","js/build/openpgp_hi.15f91b1d.js","js/build/axios.79c8b3d5.js","js/build/mitt.1ea0a2a3.js","js/build/quill-hi.654cb53d.js","js/build/parchment.d5c5924e.js","js/build/quill-delta.f1b7ce48.js","js/build/fast-diff.f17881f3.js","js/build/lodash.clonedeep.e8ef3f14.js","js/build/lodash.isequal.d6a986d0.js","js/build/eventemitter3.78b735ad.js","js/build/lodash-es.df04b444.js","js/build/quill-mention-hi.41f02fd4.js","js/build/view-design-hi.ee3249c3.js","js/build/vue-router.2d566cd7.js","js/build/vue-clipboard2.50be9c5e.js","js/build/clipboard.058ef547.js","js/build/vuedraggable.9fd6afed.js","js/build/sortablejs.d74243d9.js","js/build/vue-resize-observer.c3c9ca4e.js","js/build/element-sea.1d49e96e.js","js/build/deepmerge.cecf392e.js","js/build/resize-observer-polyfill.0bdc1850.js","js/build/throttle-debounce.7c3948b2.js","js/build/babel-helper-vue-jsx-merge-props.5ed215c3.js","js/build/normalize-wheel.2a034b9f.js","js/build/async-validator.49abba38.js","js/build/babel-runtime.4773988a.js","js/build/core-js.314b4a1d.js","js/build/index.40a8e116.js"])},data(){return{ready:!1}},async mounted(){await $A.loadScriptS(["js/katex/katex.min.js","js/katex/katex.min.css","js/mermaid.min.js"]),this.ready=!0}},o={};var _=e(s,n,a,!1,l,null,null,null);function l(t){for(let r in o)this[r]=o[r]}var ot=function(){return _.exports}();export{ot as default};
|
||||
import{_ as m}from"./openpgp_hi.15f91b1d.js";import{p}from"./index.40a8e116.js";import{n as e}from"./app.2491f23f.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var n=function(){var t=this,r=t.$createElement,i=t._self._c||r;return t.ready?i("VPreview",{attrs:{value:t.value}}):i("Loading")},a=[];const s={name:"VMPreview",mixins:[p],components:{VPreview:()=>m(()=>import("./preview.f192a59d.js"),["js/build/preview.f192a59d.js","js/build/preview.072d7643.css","js/build/@kangc.92e0b796.js","js/build/@kangc.d8464d83.css","js/build/@babel.f9bcab46.js","js/build/vue.fd9b772e.js","js/build/copy-to-clipboard.a53c061d.js","js/build/toggle-selection.d2487283.js","js/build/prismjs.ed627128.js","js/build/app.2491f23f.js","js/build/app.cfe66473.css","js/build/jquery.15cce809.js","js/build/dayjs.7adb259e.js","js/build/localforage.7983a366.js","js/build/markdown-it.bda97caf.js","js/build/mdurl.ce6c1dd8.js","js/build/uc.micro.8d343c98.js","js/build/entities.48a44fec.js","js/build/linkify-it.c5e8196e.js","js/build/punycode.js.4b3f125a.js","js/build/highlight.js.ab8aeea4.js","js/build/markdown-it-link-attributes.e1d5d151.js","js/build/@traptitech.897ae552.js","js/build/vuex.cc7cb26e.js","js/build/openpgp_hi.15f91b1d.js","js/build/axios.79c8b3d5.js","js/build/mitt.1ea0a2a3.js","js/build/quill-hi.654cb53d.js","js/build/parchment.d5c5924e.js","js/build/quill-delta.f1b7ce48.js","js/build/fast-diff.f17881f3.js","js/build/lodash.clonedeep.e8ef3f14.js","js/build/lodash.isequal.d6a986d0.js","js/build/eventemitter3.78b735ad.js","js/build/lodash-es.df04b444.js","js/build/quill-mention-hi.41f02fd4.js","js/build/view-design-hi.ee3249c3.js","js/build/vue-router.2d566cd7.js","js/build/vue-clipboard2.50be9c5e.js","js/build/clipboard.058ef547.js","js/build/vuedraggable.9fd6afed.js","js/build/sortablejs.d74243d9.js","js/build/vue-resize-observer.c3c9ca4e.js","js/build/element-sea.1d49e96e.js","js/build/deepmerge.cecf392e.js","js/build/resize-observer-polyfill.0bdc1850.js","js/build/throttle-debounce.7c3948b2.js","js/build/babel-helper-vue-jsx-merge-props.5ed215c3.js","js/build/normalize-wheel.2a034b9f.js","js/build/async-validator.49abba38.js","js/build/babel-runtime.4773988a.js","js/build/core-js.314b4a1d.js","js/build/index.40a8e116.js"])},data(){return{ready:!1}},async mounted(){await $A.loadScriptS(["js/katex/katex.min.js","js/katex/katex.min.css","js/mermaid.min.js"]),this.ready=!0}},o={};var _=e(s,n,a,!1,l,null,null,null);function l(t){for(let r in o)this[r]=o[r]}var ot=function(){return _.exports}();export{ot as default};
|
||||
@@ -1 +1 @@
|
||||
import{V as e,d as s,a as n,b as a,c as l,_ as u,e as _,v as c}from"./@kangc.92e0b796.js";import{P as v}from"./prismjs.ed627128.js";import{l as o,M as m,n as d}from"./app.817c3a7e.js";import{p as f}from"./index.40a8e116.js";import"./@babel.f9bcab46.js";import"./vue.fd9b772e.js";import"./copy-to-clipboard.a53c061d.js";import"./toggle-selection.d2487283.js";import"./jquery.16b446fd.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var h=function(){var t=this,r=t.$createElement,i=t._self._c||r;return i("div",{staticClass:"vmpreview-wrapper",on:{click:t.handleClick}},[i("v-md-preview",{attrs:{text:t.previewContent}})],1)},g=[];o==="zh"||o==="zh-CHT"?e.lang.use("zh-CN",s):e.lang.use("en-US",n);e.use(a());e.use(l());e.use(u());e.use(_());const w={mixins:[f],components:{[e.name]:e},created(){e.use(c,{Prism:v,extend(t){m.initReasoningPlugin(t)}})},computed:{previewContent({value:t}){return m.clearEmptyReasoning(t)}},methods:{handleClick({target:t}){if(t.nodeName==="IMG"){const r=[...this.$el.querySelectorAll("img").values()].map(i=>i.src);if(r.length===0)return;this.$store.dispatch("previewImage",{index:t.src,list:r})}}}},p={};var x=d(w,h,g,!1,C,"260a6756",null,null);function C(t){for(let r in p)this[r]=p[r]}var ht=function(){return x.exports}();export{ht as default};
|
||||
import{V as e,d as s,a as n,b as a,c as l,_ as u,e as _,v as c}from"./@kangc.92e0b796.js";import{P as v}from"./prismjs.ed627128.js";import{l as o,M as m,n as d}from"./app.2491f23f.js";import{p as f}from"./index.40a8e116.js";import"./@babel.f9bcab46.js";import"./vue.fd9b772e.js";import"./copy-to-clipboard.a53c061d.js";import"./toggle-selection.d2487283.js";import"./jquery.15cce809.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var h=function(){var t=this,r=t.$createElement,i=t._self._c||r;return i("div",{staticClass:"vmpreview-wrapper",on:{click:t.handleClick}},[i("v-md-preview",{attrs:{text:t.previewContent}})],1)},g=[];o==="zh"||o==="zh-CHT"?e.lang.use("zh-CN",s):e.lang.use("en-US",n);e.use(a());e.use(l());e.use(u());e.use(_());const w={mixins:[f],components:{[e.name]:e},created(){e.use(c,{Prism:v,extend(t){m.initReasoningPlugin(t)}})},computed:{previewContent({value:t}){return m.clearEmptyReasoning(t)}},methods:{handleClick({target:t}){if(t.nodeName==="IMG"){const r=[...this.$el.querySelectorAll("img").values()].map(i=>i.src);if(r.length===0)return;this.$store.dispatch("previewImage",{index:t.src,list:r})}}}},p={};var x=d(w,h,g,!1,C,"260a6756",null,null);function C(t){for(let r in p)this[r]=p[r]}var ht=function(){return x.exports}();export{ht as default};
|
||||
@@ -1 +1 @@
|
||||
import{n as p,l as o}from"./app.817c3a7e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var e=function(){var r=this,t=r.$createElement,m=r._self._c||t;return m("div")},n=[];const l={mounted(){o==="zh"||o==="zh-CHT"?window.location.href=$A.mainUrl("site/zh/price.html"):window.location.href=$A.mainUrl("site/en/price.html")}},i={};var a=p(l,e,n,!1,s,null,null,null);function s(r){for(let t in i)this[t]=i[t]}var rt=function(){return a.exports}();export{rt as default};
|
||||
import{n as p,l as o}from"./app.2491f23f.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var e=function(){var r=this,t=r.$createElement,m=r._self._c||t;return m("div")},n=[];const l={mounted(){o==="zh"||o==="zh-CHT"?window.location.href=$A.mainUrl("site/zh/price.html"):window.location.href=$A.mainUrl("site/en/price.html")}},i={};var a=p(l,e,n,!1,s,null,null,null);function s(r){for(let t in i)this[t]=i[t]}var rt=function(){return a.exports}();export{rt as default};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{m as e}from"./vuex.cc7cb26e.js";import{V as a,t as s,n}from"./app.817c3a7e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var p=function(){var t=this,i=t.$createElement,o=t._self._c||i;return o("div",{staticClass:"page-invite"},[o("PageTitle",{attrs:{title:t.$L("\u52A0\u5165\u9879\u76EE")}}),t.loadIng>0?o("div",{staticClass:"invite-load"},[o("Loading")],1):o("div",{staticClass:"invite-warp"},[t.project.id>0?o("Card",[o("p",{attrs:{slot:"title"},domProps:{innerHTML:t._s(t.transformEmojiToHtml(t.project.name))},slot:"title"}),t.project.desc?o("div",{staticClass:"invite-desc user-select-auto"},[o("VMPreviewNostyle",{attrs:{value:t.project.desc}})],1):o("div",[t._v(t._s(t.$L("\u6682\u65E0\u4ECB\u7ECD")))]),o("div",{staticClass:"invite-footer"},[t.already?o("Button",{attrs:{type:"success",icon:"md-checkmark-circle-outline"},on:{click:t.goProject}},[t._v(t._s(t.$L("\u5DF2\u52A0\u5165")))]):o("Button",{attrs:{type:"primary",loading:t.joinLoad>0},on:{click:t.joinProject}},[t._v(t._s(t.$L("\u52A0\u5165\u9879\u76EE")))])],1)]):o("Card",[o("p",[t._v(t._s(t.$L("\u9080\u8BF7\u5730\u5740\u4E0D\u5B58\u5728\u6216\u5DF2\u88AB\u5220\u9664\uFF01")))])])],1)],1)},c=[];const m={components:{VMPreviewNostyle:a},data(){return{loadIng:0,joinLoad:0,already:!1,project:{}}},computed:{...e(["dialogId","windowPortrait"])},watch:{$route:{handler(t){var i,o;t.name=="manage-project-invite"&&(this.code=((i=t.query)==null?void 0:i.code)||((o=t.params)==null?void 0:o.inviteId)||"",this.getData(),this.wakeApp())},immediate:!0}},methods:{transformEmojiToHtml:s,getData(){this.loadIng++,this.$store.dispatch("call",{url:"project/invite/info",data:{code:this.code}}).then(({data:t})=>{this.already=t.already,this.project=t.project}).catch(()=>{this.project={}}).finally(t=>{this.loadIng--})},joinProject(){this.joinLoad++,this.$store.dispatch("call",{url:"project/invite/join",data:{code:this.code}}).then(({data:t})=>{this.already=t.already,this.project=t.project,this.goProject()}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.joinLoad--})},goProject(){this.$nextTick(()=>{$A.goForward({name:"manage-project",params:{projectId:this.project.id}})})},wakeApp(){if(!$A.Electron&&!$A.isEEUIApp&&navigator.userAgent.indexOf("MicroMessenger")===-1&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))try{/Android/i.test(navigator.userAgent)?window.open("dootask://"+route.fullPath):window.location.href="dootask://"+route.fullPath}catch{}}}},r={};var d=n(m,p,c,!1,l,"76c7ed6a",null,null);function l(t){for(let i in r)this[i]=r[i]}var rt=function(){return d.exports}();export{rt as default};
|
||||
import{m as e}from"./vuex.cc7cb26e.js";import{V as a,t as s,n}from"./app.2491f23f.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var p=function(){var t=this,i=t.$createElement,o=t._self._c||i;return o("div",{staticClass:"page-invite"},[o("PageTitle",{attrs:{title:t.$L("\u52A0\u5165\u9879\u76EE")}}),t.loadIng>0?o("div",{staticClass:"invite-load"},[o("Loading")],1):o("div",{staticClass:"invite-warp"},[t.project.id>0?o("Card",[o("p",{attrs:{slot:"title"},domProps:{innerHTML:t._s(t.transformEmojiToHtml(t.project.name))},slot:"title"}),t.project.desc?o("div",{staticClass:"invite-desc user-select-auto"},[o("VMPreviewNostyle",{attrs:{value:t.project.desc}})],1):o("div",[t._v(t._s(t.$L("\u6682\u65E0\u4ECB\u7ECD")))]),o("div",{staticClass:"invite-footer"},[t.already?o("Button",{attrs:{type:"success",icon:"md-checkmark-circle-outline"},on:{click:t.goProject}},[t._v(t._s(t.$L("\u5DF2\u52A0\u5165")))]):o("Button",{attrs:{type:"primary",loading:t.joinLoad>0},on:{click:t.joinProject}},[t._v(t._s(t.$L("\u52A0\u5165\u9879\u76EE")))])],1)]):o("Card",[o("p",[t._v(t._s(t.$L("\u9080\u8BF7\u5730\u5740\u4E0D\u5B58\u5728\u6216\u5DF2\u88AB\u5220\u9664\uFF01")))])])],1)],1)},c=[];const m={components:{VMPreviewNostyle:a},data(){return{loadIng:0,joinLoad:0,already:!1,project:{}}},computed:{...e(["dialogId","windowPortrait"])},watch:{$route:{handler(t){var i,o;t.name=="manage-project-invite"&&(this.code=((i=t.query)==null?void 0:i.code)||((o=t.params)==null?void 0:o.inviteId)||"",this.getData(),this.wakeApp())},immediate:!0}},methods:{transformEmojiToHtml:s,getData(){this.loadIng++,this.$store.dispatch("call",{url:"project/invite/info",data:{code:this.code}}).then(({data:t})=>{this.already=t.already,this.project=t.project}).catch(()=>{this.project={}}).finally(t=>{this.loadIng--})},joinProject(){this.joinLoad++,this.$store.dispatch("call",{url:"project/invite/join",data:{code:this.code}}).then(({data:t})=>{this.already=t.already,this.project=t.project,this.goProject()}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.joinLoad--})},goProject(){this.$nextTick(()=>{$A.goForward({name:"manage-project",params:{projectId:this.project.id}})})},wakeApp(){if(!$A.Electron&&!$A.isEEUIApp&&navigator.userAgent.indexOf("MicroMessenger")===-1&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))try{/Android/i.test(navigator.userAgent)?window.open("dootask://"+route.fullPath):window.location.href="dootask://"+route.fullPath}catch{}}}},r={};var d=n(m,p,c,!1,l,"76c7ed6a",null,null);function l(t){for(let i in r)this[i]=r[i]}var rt=function(){return d.exports}();export{rt as default};
|
||||
@@ -1 +1 @@
|
||||
import{R as o}from"./ReportDetail.e8fff613.js";import{n as p}from"./app.817c3a7e.js";import"./vuex.cc7cb26e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var m=function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("div",{staticClass:"electron-report"},[e("PageTitle",{attrs:{title:t.$L("\u62A5\u544A\u8BE6\u60C5")}}),e("ReportDetail",{attrs:{data:t.detailData,type:t.type}})],1)},a=[];const s={components:{ReportDetail:o},data(){return{type:"view",detailData:{}}},computed:{reportId(){const{reportDetailId:t}=this.$route.params;return t}},watch:{reportId:{handler(){this.getDetail()},immediate:!0}},methods:{getDetail(){if(!this.reportId)return;const t={};/^\d+$/.test(this.reportId)?(t.id=this.reportId,this.type="view"):(t.code=this.reportId,this.type="share"),this.$store.dispatch("call",{url:"report/detail",data:t,spinner:600}).then(({data:r})=>{this.detailData=r}).catch(({msg:r})=>{$A.messageError(r)})}}},i={};var n=p(s,m,a,!1,l,"dfc32b6c",null,null);function l(t){for(let r in i)this[r]=i[r]}var et=function(){return n.exports}();export{et as default};
|
||||
import{R as o}from"./ReportDetail.d3a73923.js";import{n as p}from"./app.2491f23f.js";import"./vuex.cc7cb26e.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var m=function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("div",{staticClass:"electron-report"},[e("PageTitle",{attrs:{title:t.$L("\u62A5\u544A\u8BE6\u60C5")}}),e("ReportDetail",{attrs:{data:t.detailData,type:t.type}})],1)},a=[];const s={components:{ReportDetail:o},data(){return{type:"view",detailData:{}}},computed:{reportId(){const{reportDetailId:t}=this.$route.params;return t}},watch:{reportId:{handler(){this.getDetail()},immediate:!0}},methods:{getDetail(){if(!this.reportId)return;const t={};/^\d+$/.test(this.reportId)?(t.id=this.reportId,this.type="view"):(t.code=this.reportId,this.type="share"),this.$store.dispatch("call",{url:"report/detail",data:t,spinner:600}).then(({data:r})=>{this.detailData=r}).catch(({msg:r})=>{$A.messageError(r)})}}},i={};var n=p(s,m,a,!1,l,"dfc32b6c",null,null);function l(t){for(let r in i)this[r]=i[r]}var et=function(){return n.exports}();export{et as default};
|
||||
@@ -1 +1 @@
|
||||
import{R as e}from"./ReportEdit.e3369e09.js";import{n as p}from"./app.817c3a7e.js";import"./openpgp_hi.15f91b1d.js";import"./vuex.cc7cb26e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var m=function(){var t=this,r=t.$createElement,i=t._self._c||r;return i("div",{staticClass:"electron-report"},[i("PageTitle",{attrs:{title:t.title}}),i("ReportEdit",{attrs:{id:t.reportEditId},on:{saveSuccess:t.saveSuccess}})],1)},s=[];const n={components:{ReportEdit:e},data(){return{detail:{}}},computed:{reportEditId(){if(/^\d+$/.test(this.detail.id))return parseInt(this.detail.id);const{reportEditId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)},title(){return this.$L(this.reportEditId>0?"\u4FEE\u6539\u62A5\u544A":"\u65B0\u589E\u62A5\u544A")}},methods:{saveSuccess(t){this.detail=t,this.$isSubElectron&&($A.Electron.sendMessage("broadcastCommand",{channel:"reportSaveSuccess",payload:t}),window.close())}}},o={};var a=p(n,m,s,!1,d,"607d2035",null,null);function d(t){for(let r in o)this[r]=o[r]}var it=function(){return a.exports}();export{it as default};
|
||||
import{R as e}from"./ReportEdit.8231e26d.js";import{n as p}from"./app.2491f23f.js";import"./openpgp_hi.15f91b1d.js";import"./vuex.cc7cb26e.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var m=function(){var t=this,r=t.$createElement,i=t._self._c||r;return i("div",{staticClass:"electron-report"},[i("PageTitle",{attrs:{title:t.title}}),i("ReportEdit",{attrs:{id:t.reportEditId},on:{saveSuccess:t.saveSuccess}})],1)},s=[];const n={components:{ReportEdit:e},data(){return{detail:{}}},computed:{reportEditId(){if(/^\d+$/.test(this.detail.id))return parseInt(this.detail.id);const{reportEditId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)},title(){return this.$L(this.reportEditId>0?"\u4FEE\u6539\u62A5\u544A":"\u65B0\u589E\u62A5\u544A")}},methods:{saveSuccess(t){this.detail=t,this.$isSubElectron&&($A.Electron.sendMessage("broadcastCommand",{channel:"reportSaveSuccess",payload:t}),window.close())}}},o={};var a=p(n,m,s,!1,d,"607d2035",null,null);function d(t){for(let r in o)this[r]=o[r]}var it=function(){return a.exports}();export{it as default};
|
||||
@@ -1 +1 @@
|
||||
import{_ as m}from"./openpgp_hi.15f91b1d.js";import{P as l}from"./photoswipe.a7142509.js";import{n as h}from"./app.817c3a7e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var d=function(){var i=this,t=i.$createElement,r=i._self._c||t;return r("div")},u=[];const c={props:{className:{type:String,default:()=>"preview-image-swipe-"+Math.round(Math.random()*1e4)},urlList:{type:Array,default:()=>[]},initialIndex:{type:Number,default:0}},data(){return{lightbox:null}},beforeDestroy(){var i;(i=this.lightbox)==null||i.destroy()},watch:{urlList:{handler(i){var n;let t=!1,r=!1;(n=this.lightbox)==null||n.destroy();const s=i.map(o=>{if($A.isJson(o)){if(parseInt(o.width)>0&&parseInt(o.height)>0)return o;o=o.src}return r=!0,{html:`<div class="preview-image-swipe"><img src="${o}"/></div>`}});this.lightbox=new l({dataSource:s,escKey:!1,mainClass:this.className+" no-dark-content",showHideAnimationType:"none",pswpModule:()=>m(()=>import("./photoswipe.a7142509.js").then(function(o){return o.p}),["js/build/photoswipe.a7142509.js","js/build/photoswipe.0fb72215.css"])}),this.lightbox.on("change",o=>{!r||$A.loadScript("js/pinch-zoom.umd.min.js").then(f=>{document.querySelector(`.${this.className}`).querySelectorAll(".preview-image-swipe").forEach(e=>{e.getAttribute("data-init-pinch-zoom")!=="init"&&(e.setAttribute("data-init-pinch-zoom","init"),e.querySelector("img").addEventListener("pointermove",a=>{t&&a.stopPropagation()}),new PinchZoom.default(e,{draggableUnzoomed:!1,onDragStart:()=>{t=!0},onDragEnd:()=>{t=!1}}))})})}),this.lightbox.on("close",()=>{this.$emit("on-close")}),this.lightbox.on("destroy",()=>{this.$emit("on-destroy")}),this.lightbox.init(),this.lightbox.loadAndOpen(this.initialIndex)},immediate:!0},initialIndex(i){var t;(t=this.lightbox)==null||t.loadAndOpen(i)}}},p={};var _=h(c,d,u,!1,g,null,null,null);function g(i){for(let t in p)this[t]=p[t]}var lt=function(){return _.exports}();export{lt as default};
|
||||
import{_ as m}from"./openpgp_hi.15f91b1d.js";import{P as l}from"./photoswipe.a7142509.js";import{n as h}from"./app.2491f23f.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var d=function(){var i=this,t=i.$createElement,r=i._self._c||t;return r("div")},u=[];const c={props:{className:{type:String,default:()=>"preview-image-swipe-"+Math.round(Math.random()*1e4)},urlList:{type:Array,default:()=>[]},initialIndex:{type:Number,default:0}},data(){return{lightbox:null}},beforeDestroy(){var i;(i=this.lightbox)==null||i.destroy()},watch:{urlList:{handler(i){var n;let t=!1,r=!1;(n=this.lightbox)==null||n.destroy();const s=i.map(o=>{if($A.isJson(o)){if(parseInt(o.width)>0&&parseInt(o.height)>0)return o;o=o.src}return r=!0,{html:`<div class="preview-image-swipe"><img src="${o}"/></div>`}});this.lightbox=new l({dataSource:s,escKey:!1,mainClass:this.className+" no-dark-content",showHideAnimationType:"none",pswpModule:()=>m(()=>import("./photoswipe.a7142509.js").then(function(o){return o.p}),["js/build/photoswipe.a7142509.js","js/build/photoswipe.0fb72215.css"])}),this.lightbox.on("change",o=>{!r||$A.loadScript("js/pinch-zoom.umd.min.js").then(f=>{document.querySelector(`.${this.className}`).querySelectorAll(".preview-image-swipe").forEach(e=>{e.getAttribute("data-init-pinch-zoom")!=="init"&&(e.setAttribute("data-init-pinch-zoom","init"),e.querySelector("img").addEventListener("pointermove",a=>{t&&a.stopPropagation()}),new PinchZoom.default(e,{draggableUnzoomed:!1,onDragStart:()=>{t=!0},onDragEnd:()=>{t=!1}}))})})}),this.lightbox.on("close",()=>{this.$emit("on-close")}),this.lightbox.on("destroy",()=>{this.$emit("on-destroy")}),this.lightbox.init(),this.lightbox.loadAndOpen(this.initialIndex)},immediate:!0},initialIndex(i){var t;(t=this.lightbox)==null||t.loadAndOpen(i)}}},p={};var _=h(c,d,u,!1,g,null,null,null);function g(i){for(let t in p)this[t]=p[t]}var lt=function(){return _.exports}();export{lt as default};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{b as i}from"./TaskDetail.38815236.js";import{m as s}from"./vuex.cc7cb26e.js";import{n as a}from"./app.817c3a7e.js";import"./add.423bc480.js";import"./DialogWrapper.0c7cd033.js";import"./index.b69b5f25.js";import"./vue-virtual-scroll-list-hi.15e3c1fb.js";import"./@babel.f9bcab46.js";import"./vue.fd9b772e.js";import"./lodash.18c5398d.js";import"./ImgUpload.e96999cf.js";import"./TEditor.cc94d929.js";import"./tinymce.24840f82.js";import"./jquery.16b446fd.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"electron-task"},[r("PageTitle",{attrs:{title:t.taskInfo.name}}),t.loadIng>0?r("Loading"):r("TaskDetail",{ref:"taskDetail",attrs:{"task-id":t.taskInfo.id,"open-task":t.taskInfo,"can-update-blur":t.canUpdateBlur}})],1)},p=[];const m={components:{TaskDetail:i},data(){return{loadIng:0,canUpdateBlur:!0}},mounted(){document.addEventListener("keydown",this.shortcutEvent),this.$isSubElectron&&(window.__onBeforeUnload=()=>{if(this.$store.dispatch("onBeforeUnload"),this.$refs.taskDetail.checkUpdate())return this.canUpdateBlur=!1,$A.modalConfirm({content:"\u4FEE\u6539\u7684\u5185\u5BB9\u5C1A\u672A\u4FDD\u5B58\uFF0C\u771F\u7684\u8981\u653E\u5F03\u4FEE\u6539\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u653E\u5F03",onOk:()=>{this.$Electron.sendMessage("windowDestroy")},onCancel:()=>{this.$refs.taskDetail.checkUpdate(!1),this.canUpdateBlur=!0}}),!0})},beforeDestroy(){document.removeEventListener("keydown",this.shortcutEvent)},computed:{...s(["cacheTasks"]),taskId(){const{taskId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)},taskInfo(){return this.cacheTasks.find(({id:t})=>t===this.taskId)||{}}},watch:{taskId:{handler(){this.getInfo()},immediate:!0}},methods:{getInfo(){this.taskId<=0||(this.loadIng++,this.$store.dispatch("getTaskOne",{task_id:this.taskId,archived:"all"}).then(()=>{this.$store.dispatch("getTaskContent",this.taskId),this.$store.dispatch("getTaskFiles",this.taskId),this.$store.dispatch("getTaskForParent",this.taskId).catch(()=>{}),this.$store.dispatch("getTaskPriority",1e3)}).catch(({msg:t})=>{$A.modalError({content:t,onOk:()=>{this.$Electron&&window.close()}})}).finally(t=>{this.loadIng--}))},shortcutEvent(t){(t.metaKey||t.ctrlKey)&&t.keyCode===83&&(t.preventDefault(),this.$refs.taskDetail.checkUpdate(!0))}}},o={};var c=a(m,n,p,!1,d,"30e163fc",null,null);function d(t){for(let e in o)this[e]=o[e]}var dt=function(){return c.exports}();export{dt as default};
|
||||
import{b as i}from"./TaskDetail.7964a4f4.js";import{m as s}from"./vuex.cc7cb26e.js";import{n as a}from"./app.2491f23f.js";import"./add.8683a68c.js";import"./DialogWrapper.b27f1bec.js";import"./index.29780965.js";import"./vue-virtual-scroll-list-hi.15e3c1fb.js";import"./@babel.f9bcab46.js";import"./vue.fd9b772e.js";import"./lodash.18c5398d.js";import"./ImgUpload.ce006941.js";import"./TEditor.ebf01275.js";import"./tinymce.24840f82.js";import"./jquery.15cce809.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"electron-task"},[r("PageTitle",{attrs:{title:t.taskInfo.name}}),t.loadIng>0?r("Loading"):r("TaskDetail",{ref:"taskDetail",attrs:{"task-id":t.taskInfo.id,"open-task":t.taskInfo,"can-update-blur":t.canUpdateBlur}})],1)},p=[];const m={components:{TaskDetail:i},data(){return{loadIng:0,canUpdateBlur:!0}},mounted(){document.addEventListener("keydown",this.shortcutEvent),this.$isSubElectron&&(window.__onBeforeUnload=()=>{if(this.$store.dispatch("onBeforeUnload"),this.$refs.taskDetail.checkUpdate())return this.canUpdateBlur=!1,$A.modalConfirm({content:"\u4FEE\u6539\u7684\u5185\u5BB9\u5C1A\u672A\u4FDD\u5B58\uFF0C\u771F\u7684\u8981\u653E\u5F03\u4FEE\u6539\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u653E\u5F03",onOk:()=>{this.$Electron.sendMessage("windowDestroy")},onCancel:()=>{this.$refs.taskDetail.checkUpdate(!1),this.canUpdateBlur=!0}}),!0})},beforeDestroy(){document.removeEventListener("keydown",this.shortcutEvent)},computed:{...s(["cacheTasks"]),taskId(){const{taskId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)},taskInfo(){return this.cacheTasks.find(({id:t})=>t===this.taskId)||{}}},watch:{taskId:{handler(){this.getInfo()},immediate:!0}},methods:{getInfo(){this.taskId<=0||(this.loadIng++,this.$store.dispatch("getTaskOne",{task_id:this.taskId,archived:"all"}).then(()=>{this.$store.dispatch("getTaskContent",this.taskId),this.$store.dispatch("getTaskFiles",this.taskId),this.$store.dispatch("getTaskForParent",this.taskId).catch(()=>{}),this.$store.dispatch("getTaskPriority",1e3)}).catch(({msg:t})=>{$A.modalError({content:t,onOk:()=>{this.$Electron&&window.close()}})}).finally(t=>{this.loadIng--}))},shortcutEvent(t){(t.metaKey||t.ctrlKey)&&t.keyCode===83&&(t.preventDefault(),this.$refs.taskDetail.checkUpdate(!0))}}},o={};var c=a(m,n,p,!1,d,"30e163fc",null,null);function d(t){for(let e in o)this[e]=o[e]}var dt=function(){return c.exports}();export{dt as default};
|
||||
@@ -1 +1 @@
|
||||
import e from"./TEditor.cc94d929.js";import{n as s}from"./app.817c3a7e.js";import"./tinymce.24840f82.js";import"./@babel.f9bcab46.js";import"./ImgUpload.e96999cf.js";import"./vuex.cc7cb26e.js";import"./jquery.16b446fd.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var a=function(){var t=this,i=t.$createElement,r=t._self._c||i;return r("div",{staticClass:"single-task-content"},[r("PageTitle",{attrs:{title:t.pageName}}),t.loadIng>0?r("Loading"):t.info?r("div",{staticClass:"file-preview"},[t.showHeader?r("div",{staticClass:"edit-header"},[r("div",{staticClass:"header-title"},[r("div",{staticClass:"title-name user-select-auto"},[t._v(t._s(t.pageName))]),r("Tag",{attrs:{color:"default"}},[t._v(t._s(t.$L("\u53EA\u8BFB")))]),r("div",{staticClass:"refresh"},[r("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getInfo}})],1)],1)]):t._e(),r("div",{staticClass:"content-body user-select-auto"},[r("TEditor",{attrs:{value:t.info.content,height:"100%",readOnly:""}})],1)]):t._e()],1)},n=[];const m={components:{TEditor:e},data(){return{loadIng:0,info:null,showHeader:!$A.isEEUIApp}},mounted(){},computed:{taskId(){return this.$route.params?$A.runNum(this.$route.params.taskId):0},historyId(){return this.$route.query?$A.runNum(this.$route.query.history_id):0},pageName(){return this.$route.query&&this.$route.query.history_title?this.$route.query.history_title:this.info?`${this.info.name} [${this.info.created_at}]`:""}},watch:{$route:{handler(){this.getInfo()},immediate:!0}},methods:{getInfo(){setTimeout(t=>{this.loadIng++},600),this.$store.dispatch("call",{url:"project/task/content",data:{task_id:this.taskId,history_id:this.historyId}}).then(({data:t})=>{this.info=t}).catch(({msg:t})=>{$A.modalError({content:t,onOk:()=>{window.close()}})}).finally(t=>{this.loadIng--})}}},o={};var p=s(m,a,n,!1,l,"f0b8a17c",null,null);function l(t){for(let i in o)this[i]=o[i]}var et=function(){return p.exports}();export{et as default};
|
||||
import e from"./TEditor.ebf01275.js";import{n as s}from"./app.2491f23f.js";import"./tinymce.24840f82.js";import"./@babel.f9bcab46.js";import"./ImgUpload.ce006941.js";import"./vuex.cc7cb26e.js";import"./jquery.15cce809.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var a=function(){var t=this,i=t.$createElement,r=t._self._c||i;return r("div",{staticClass:"single-task-content"},[r("PageTitle",{attrs:{title:t.pageName}}),t.loadIng>0?r("Loading"):t.info?r("div",{staticClass:"file-preview"},[t.showHeader?r("div",{staticClass:"edit-header"},[r("div",{staticClass:"header-title"},[r("div",{staticClass:"title-name user-select-auto"},[t._v(t._s(t.pageName))]),r("Tag",{attrs:{color:"default"}},[t._v(t._s(t.$L("\u53EA\u8BFB")))]),r("div",{staticClass:"refresh"},[r("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getInfo}})],1)],1)]):t._e(),r("div",{staticClass:"content-body user-select-auto"},[r("TEditor",{attrs:{value:t.info.content,height:"100%",readOnly:""}})],1)]):t._e()],1)},n=[];const m={components:{TEditor:e},data(){return{loadIng:0,info:null,showHeader:!$A.isEEUIApp}},mounted(){},computed:{taskId(){return this.$route.params?$A.runNum(this.$route.params.taskId):0},historyId(){return this.$route.query?$A.runNum(this.$route.query.history_id):0},pageName(){return this.$route.query&&this.$route.query.history_title?this.$route.query.history_title:this.info?`${this.info.name} [${this.info.created_at}]`:""}},watch:{$route:{handler(){this.getInfo()},immediate:!0}},methods:{getInfo(){setTimeout(t=>{this.loadIng++},600),this.$store.dispatch("call",{url:"project/task/content",data:{task_id:this.taskId,history_id:this.historyId}}).then(({data:t})=>{this.info=t}).catch(({msg:t})=>{$A.modalError({content:t,onOk:()=>{window.close()}})}).finally(t=>{this.loadIng--})}}},o={};var p=s(m,a,n,!1,l,"f0b8a17c",null,null);function l(t){for(let i in o)this[i]=o[i]}var et=function(){return p.exports}();export{et as default};
|
||||
@@ -1 +1 @@
|
||||
import{m as a}from"./vuex.cc7cb26e.js";import{n as s}from"./app.817c3a7e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var n=function(){var t=this,o=t.$createElement,r=t._self._c||o;return r("div",{staticClass:"setting-item submit"},[r("Form",t._b({ref:"formData",attrs:{model:t.formData,rules:t.ruleData},nativeOn:{submit:function(e){e.preventDefault()}}},"Form",t.formOptions,!1),[r("FormItem",{attrs:{label:t.$L("\u9009\u62E9\u4E3B\u9898"),prop:"theme"}},[r("Select",{attrs:{placeholder:t.$L("\u9009\u9879\u4E3B\u9898")},model:{value:t.formData.theme,callback:function(e){t.$set(t.formData,"theme",e)},expression:"formData.theme"}},t._l(t.themeList,function(e,m){return r("Option",{key:m,attrs:{value:e.value}},[t._v(t._s(t.$L(e.name)))])}),1)],1)],1),r("div",{staticClass:"setting-footer"},[r("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),r("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},p=[];const l={data(){return{loadIng:0,formData:{theme:""},ruleData:{}}},mounted(){this.initData()},computed:{...a(["themeConf","themeList","formOptions"])},methods:{initData(){this.$set(this.formData,"theme",this.themeConf),this.formData_bak=$A.cloneJSON(this.formData)},submitForm(){this.$refs.formData.validate(t=>{t&&this.$store.dispatch("setTheme",this.formData.theme).then(o=>{var r;!o||($A.messageSuccess("\u4FDD\u5B58\u6210\u529F"),(r=this.$Electron)==null||r.sendMessage("reloadPreloadWindow"))})})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)}}},i={};var f=s(l,n,p,!1,c,null,null,null);function c(t){for(let o in i)this[o]=i[o]}var et=function(){return f.exports}();export{et as default};
|
||||
import{m as a}from"./vuex.cc7cb26e.js";import{n as s}from"./app.2491f23f.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var n=function(){var t=this,o=t.$createElement,r=t._self._c||o;return r("div",{staticClass:"setting-item submit"},[r("Form",t._b({ref:"formData",attrs:{model:t.formData,rules:t.ruleData},nativeOn:{submit:function(e){e.preventDefault()}}},"Form",t.formOptions,!1),[r("FormItem",{attrs:{label:t.$L("\u9009\u62E9\u4E3B\u9898"),prop:"theme"}},[r("Select",{attrs:{placeholder:t.$L("\u9009\u9879\u4E3B\u9898")},model:{value:t.formData.theme,callback:function(e){t.$set(t.formData,"theme",e)},expression:"formData.theme"}},t._l(t.themeList,function(e,m){return r("Option",{key:m,attrs:{value:e.value}},[t._v(t._s(t.$L(e.name)))])}),1)],1)],1),r("div",{staticClass:"setting-footer"},[r("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),r("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},p=[];const l={data(){return{loadIng:0,formData:{theme:""},ruleData:{}}},mounted(){this.initData()},computed:{...a(["themeConf","themeList","formOptions"])},methods:{initData(){this.$set(this.formData,"theme",this.themeConf),this.formData_bak=$A.cloneJSON(this.formData)},submitForm(){this.$refs.formData.validate(t=>{t&&this.$store.dispatch("setTheme",this.formData.theme).then(o=>{var r;!o||($A.messageSuccess("\u4FDD\u5B58\u6210\u529F"),(r=this.$Electron)==null||r.sendMessage("reloadPreloadWindow"))})})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)}}},i={};var f=s(l,n,p,!1,c,null,null,null);function c(t){for(let o in i)this[o]=i[o]}var et=function(){return f.exports}();export{et as default};
|
||||
@@ -1 +1 @@
|
||||
import{n as e}from"./app.817c3a7e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var m=function(){var t=this,o=t.$createElement,r=t._self._c||o;return r("div",{staticClass:"token-transfer"},[r("Loading")],1)},p=[];const n={mounted(){this.goNext1()},methods:{goNext1(){const t=$A.urlParameterAll();t.token&&this.$store.dispatch("call",{url:"users/info",header:{token:t.token}}).then(o=>{this.$store.dispatch("saveUserInfo",o.data),this.goNext2()}).catch(o=>{this.goForward({name:"login"},!0)})},goNext2(){let t=decodeURIComponent($A.getObject(this.$route.query,"from"));t?window.location.replace(t):this.goForward({name:"manage-dashboard"},!0)}}},i={};var a=e(n,m,p,!1,s,"11ad2646",null,null);function s(t){for(let o in i)this[o]=i[o]}var tt=function(){return a.exports}();export{tt as default};
|
||||
import{n as e}from"./app.2491f23f.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var m=function(){var t=this,o=t.$createElement,r=t._self._c||o;return r("div",{staticClass:"token-transfer"},[r("Loading")],1)},p=[];const n={mounted(){this.goNext1()},methods:{goNext1(){const t=$A.urlParameterAll();t.token&&this.$store.dispatch("call",{url:"users/info",header:{token:t.token}}).then(o=>{this.$store.dispatch("saveUserInfo",o.data),this.goNext2()}).catch(o=>{this.goForward({name:"login"},!0)})},goNext2(){let t=decodeURIComponent($A.getObject(this.$route.query,"from"));t?window.location.replace(t):this.goForward({name:"manage-dashboard"},!0)}}},i={};var a=e(n,m,p,!1,s,"11ad2646",null,null);function s(t){for(let o in i)this[o]=i[o]}var tt=function(){return a.exports}();export{tt as default};
|
||||
@@ -1 +1 @@
|
||||
import{n as e}from"./app.817c3a7e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var s=function(){var t=this,i=t.$createElement,r=t._self._c||i;return r("div",{staticClass:"valid-wrap"},[r("div",{staticClass:"valid-box"},[r("div",{staticClass:"valid-title"},[t._v(t._s(t.$L("\u9A8C\u8BC1\u90AE\u7BB1")))]),!t.success&&!t.error?r("Spin",{attrs:{size:"large"}}):t._e(),t.success?r("div",{staticClass:"validation-text"},[r("p",[t._v(t._s(t.$L("\u60A8\u7684\u90AE\u7BB1\u5DF2\u901A\u8FC7\u9A8C\u8BC1")))]),r("p",[t._v(t._s(t.$L("\u4ECA\u540E\u60A8\u53EF\u4EE5\u901A\u8FC7\u6B64\u90AE\u7BB1\u91CD\u7F6E\u60A8\u7684\u5E10\u53F7\u5BC6\u7801")))])]):t._e(),t.error?r("div",{staticClass:"validation-text"},[r("div",[t._v(t._s(t.errorText))])]):t._e(),t.success?r("div",{attrs:{slot:"footer"},slot:"footer"},[r("Button",{attrs:{type:"primary",long:""},on:{click:t.userLogout}},[t._v(t._s(t.$L("\u8FD4\u56DE\u9996\u9875")))])],1):t._e()],1)])},a=[];const m={data(){return{success:!1,error:!1,errorText:this.$L("\u94FE\u63A5\u5DF2\u8FC7\u671F\uFF0C\u5DF2\u91CD\u65B0\u53D1\u9001")}},mounted(){this.verificationEmail()},methods:{verificationEmail(){this.$store.dispatch("call",{url:"users/email/verification",data:{code:this.$route.query.code}}).then(()=>{this.success=!0,this.error=!1}).catch(({data:t,msg:i})=>{t.code===2?this.goForward({name:"index",query:{action:"index"}},!0):(this.success=!1,this.error=!0,this.errorText=this.$L(i))})},userLogout(){this.$store.dispatch("logout",!1)}}},o={};var p=e(m,s,a,!1,c,"763444c4",null,null);function c(t){for(let i in o)this[i]=o[i]}var tt=function(){return p.exports}();export{tt as default};
|
||||
import{n as e}from"./app.2491f23f.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var s=function(){var t=this,i=t.$createElement,r=t._self._c||i;return r("div",{staticClass:"valid-wrap"},[r("div",{staticClass:"valid-box"},[r("div",{staticClass:"valid-title"},[t._v(t._s(t.$L("\u9A8C\u8BC1\u90AE\u7BB1")))]),!t.success&&!t.error?r("Spin",{attrs:{size:"large"}}):t._e(),t.success?r("div",{staticClass:"validation-text"},[r("p",[t._v(t._s(t.$L("\u60A8\u7684\u90AE\u7BB1\u5DF2\u901A\u8FC7\u9A8C\u8BC1")))]),r("p",[t._v(t._s(t.$L("\u4ECA\u540E\u60A8\u53EF\u4EE5\u901A\u8FC7\u6B64\u90AE\u7BB1\u91CD\u7F6E\u60A8\u7684\u5E10\u53F7\u5BC6\u7801")))])]):t._e(),t.error?r("div",{staticClass:"validation-text"},[r("div",[t._v(t._s(t.errorText))])]):t._e(),t.success?r("div",{attrs:{slot:"footer"},slot:"footer"},[r("Button",{attrs:{type:"primary",long:""},on:{click:t.userLogout}},[t._v(t._s(t.$L("\u8FD4\u56DE\u9996\u9875")))])],1):t._e()],1)])},a=[];const m={data(){return{success:!1,error:!1,errorText:this.$L("\u94FE\u63A5\u5DF2\u8FC7\u671F\uFF0C\u5DF2\u91CD\u65B0\u53D1\u9001")}},mounted(){this.verificationEmail()},methods:{verificationEmail(){this.$store.dispatch("call",{url:"users/email/verification",data:{code:this.$route.query.code}}).then(()=>{this.success=!0,this.error=!1}).catch(({data:t,msg:i})=>{t.code===2?this.goForward({name:"index",query:{action:"index"}},!0):(this.success=!1,this.error=!0,this.errorText=this.$L(i))})},userLogout(){this.$store.dispatch("logout",!1)}}},o={};var p=e(m,s,a,!1,c,"763444c4",null,null);function c(t){for(let i in o)this[i]=o[i]}var tt=function(){return p.exports}();export{tt as default};
|
||||
@@ -1 +1 @@
|
||||
import m from"./preview.ec796a92.js";import{n as e}from"./app.817c3a7e.js";import"./openpgp_hi.15f91b1d.js";import"./index.40a8e116.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var p=function(){var t=this,o=t.$createElement,r=t._self._c||o;return r("div",{staticClass:"setting-item submit"},[r("div",{staticClass:"version-box"},[t.loadIng?r("div",{staticClass:"version-load"},[t._v(t._s(t.$L("\u52A0\u8F7D\u4E2D...")))]):r("VMPreview",{attrs:{value:t.updateLog}})],1)])},s=[];const a={components:{VMPreview:m},data(){return{loadIng:0,updateLog:""}},mounted(){this.getLog()},methods:{getLog(){this.loadIng++,this.$store.dispatch("call",{url:"system/get/updatelog",data:{take:50}}).then(({data:t})=>{this.updateLog=t.updateLog}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.loadIng--})}}},i={};var n=e(a,p,s,!1,l,null,null,null);function l(t){for(let o in i)this[o]=i[o]}var it=function(){return n.exports}();export{it as default};
|
||||
import m from"./preview.3c67cf40.js";import{n as e}from"./app.2491f23f.js";import"./openpgp_hi.15f91b1d.js";import"./index.40a8e116.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var p=function(){var t=this,o=t.$createElement,r=t._self._c||o;return r("div",{staticClass:"setting-item submit"},[r("div",{staticClass:"version-box"},[t.loadIng?r("div",{staticClass:"version-load"},[t._v(t._s(t.$L("\u52A0\u8F7D\u4E2D...")))]):r("VMPreview",{attrs:{value:t.updateLog}})],1)])},s=[];const a={components:{VMPreview:m},data(){return{loadIng:0,updateLog:""}},mounted(){this.getLog()},methods:{getLog(){this.loadIng++,this.$store.dispatch("call",{url:"system/get/updatelog",data:{take:50}}).then(({data:t})=>{this.updateLog=t.updateLog}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.loadIng--})}}},i={};var n=e(a,p,s,!1,l,null,null,null);function l(t){for(let o in i)this[o]=i[o]}var it=function(){return n.exports}();export{it as default};
|
||||
@@ -1 +1 @@
|
||||
import{n as p}from"./app.817c3a7e.js";import"./jquery.16b446fd.js";import"./@babel.f9bcab46.js";import"./dayjs.495f600d.js";import"./localforage.be4775a0.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var n=function(){var i=this,t=i.$createElement,r=i._self._c||t;return r("div",{ref:"view",staticClass:"common-preview-video"},[i.item.src?r("video",{attrs:{width:i.videoStyle("width"),height:i.videoStyle("height"),controls:"",autoplay:""}},[r("source",{attrs:{src:i.item.src,type:"video/mp4"}})]):i._e()])},s=[];const d={props:{item:{type:Object,default:()=>({src:"",width:0,height:0})}},data(){return{}},mounted(){},methods:{videoStyle(i){let{width:t,height:r}=this.item;const o=this.windowWidth,e=this.windowHeight;return t>o&&(r=r*o/t,t=o),r>e&&(t=t*e/r,r=e),i==="width"?t:i==="height"?r:{width:`${t}px`,height:`${r}px`}}}},m={};var h=p(d,n,s,!1,a,"1115e79e",null,null);function a(i){for(let t in m)this[t]=m[t]}var rt=function(){return h.exports}();export{rt as default};
|
||||
import{n as p}from"./app.2491f23f.js";import"./jquery.15cce809.js";import"./@babel.f9bcab46.js";import"./dayjs.7adb259e.js";import"./localforage.7983a366.js";import"./markdown-it.bda97caf.js";import"./mdurl.ce6c1dd8.js";import"./uc.micro.8d343c98.js";import"./entities.48a44fec.js";import"./linkify-it.c5e8196e.js";import"./punycode.js.4b3f125a.js";import"./highlight.js.ab8aeea4.js";import"./markdown-it-link-attributes.e1d5d151.js";import"./@traptitech.897ae552.js";import"./vue.fd9b772e.js";import"./vuex.cc7cb26e.js";import"./openpgp_hi.15f91b1d.js";import"./axios.79c8b3d5.js";import"./mitt.1ea0a2a3.js";import"./quill-hi.654cb53d.js";import"./parchment.d5c5924e.js";import"./quill-delta.f1b7ce48.js";import"./fast-diff.f17881f3.js";import"./lodash.clonedeep.e8ef3f14.js";import"./lodash.isequal.d6a986d0.js";import"./eventemitter3.78b735ad.js";import"./lodash-es.df04b444.js";import"./quill-mention-hi.41f02fd4.js";import"./view-design-hi.ee3249c3.js";import"./vue-router.2d566cd7.js";import"./vue-clipboard2.50be9c5e.js";import"./clipboard.058ef547.js";import"./vuedraggable.9fd6afed.js";import"./sortablejs.d74243d9.js";import"./vue-resize-observer.c3c9ca4e.js";import"./element-sea.1d49e96e.js";import"./deepmerge.cecf392e.js";import"./resize-observer-polyfill.0bdc1850.js";import"./throttle-debounce.7c3948b2.js";import"./babel-helper-vue-jsx-merge-props.5ed215c3.js";import"./normalize-wheel.2a034b9f.js";import"./async-validator.49abba38.js";import"./babel-runtime.4773988a.js";import"./core-js.314b4a1d.js";var n=function(){var i=this,t=i.$createElement,r=i._self._c||t;return r("div",{ref:"view",staticClass:"common-preview-video"},[i.item.src?r("video",{attrs:{width:i.videoStyle("width"),height:i.videoStyle("height"),controls:"",autoplay:""}},[r("source",{attrs:{src:i.item.src,type:"video/mp4"}})]):i._e()])},s=[];const d={props:{item:{type:Object,default:()=>({src:"",width:0,height:0})}},data(){return{}},mounted(){},methods:{videoStyle(i){let{width:t,height:r}=this.item;const o=this.windowWidth,e=this.windowHeight;return t>o&&(r=r*o/t,t=o),r>e&&(t=t*e/r,r=e),i==="width"?t:i==="height"?r:{width:`${t}px`,height:`${r}px`}}}},m={};var h=p(d,n,s,!1,a,"1115e79e",null,null);function a(i){for(let t in m)this[t]=m[t]}var rt=function(){return h.exports}();export{rt as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
2
resources/assets/js/app.js
vendored
2
resources/assets/js/app.js
vendored
@@ -2,8 +2,6 @@ const isElectron = !!(window && window.process && window.process.type && window.
|
||||
const isEEUIApp = window && window.navigator && /eeui/i.test(window.navigator.userAgent);
|
||||
const isSoftware = isElectron || isEEUIApp;
|
||||
|
||||
document.getElementById("app")?.setAttribute("data-preload", "false");
|
||||
|
||||
import {languageName, switchLanguage as $L} from "./language";
|
||||
import {isLocalHost} from "./components/Replace/utils";
|
||||
|
||||
|
||||
@@ -106,7 +106,6 @@
|
||||
<p><span>ID:</span>{{ item.id }}</p>
|
||||
<p><span>{{ $L('清理时间') }}:</span>{{ item.clear_day }}</p>
|
||||
<p><span>Webhook:</span>{{ item.webhook_url || '-' }}</p>
|
||||
<p><span>{{ $L('Webhook事件') }}:</span>{{ formatWebhookEvents(item.webhook_events) }}</p>
|
||||
</div>
|
||||
<div class="modal-item-btns">
|
||||
<Button icon="md-chatbubbles" @click="applyClick({value: 'mybot-chat'}, item)">{{ $L('开始聊天') }}</Button>
|
||||
@@ -141,13 +140,6 @@
|
||||
<FormItem prop="webhook_url" label="Webhook">
|
||||
<Input v-model="mybotModifyData.webhook_url" :maxlength="255" :show-word-limit="0.9" type="textarea" placeholder="Webhook"/>
|
||||
</FormItem>
|
||||
<FormItem prop="webhook_events" :label="$L('Webhook事件')">
|
||||
<CheckboxGroup v-model="mybotModifyData.webhook_events">
|
||||
<Checkbox v-for="option in webhookEventOptions" :key="option.value" :label="option.value">
|
||||
{{ $L(option.label) }}
|
||||
</Checkbox>
|
||||
</CheckboxGroup>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<div slot="footer" class="adaption">
|
||||
<Button type="default" @click="mybotModifyShow=false">{{ $L('取消') }}</Button>
|
||||
@@ -371,12 +363,6 @@ export default {
|
||||
mybotModifyShow: false,
|
||||
mybotModifyData: {},
|
||||
mybotModifyLoad: 0,
|
||||
webhookEventOptions: [
|
||||
{value: 'message', label: '接收消息'},
|
||||
{value: 'dialog_open', label: '打开会话'},
|
||||
{value: 'member_join', label: '成员加入'},
|
||||
{value: 'member_leave', label: '成员退出'},
|
||||
],
|
||||
//
|
||||
aibotShow: false,
|
||||
aibotList: AIBotList,
|
||||
@@ -470,37 +456,6 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
normalizeWebhookEvents(events = [], useFallback = false) {
|
||||
if (!Array.isArray(events)) {
|
||||
events = events ? [events] : [];
|
||||
}
|
||||
const allowed = this.webhookEventOptions.map(item => item.value);
|
||||
const result = events.filter(item => allowed.includes(item));
|
||||
if (result.length) {
|
||||
return Array.from(new Set(result));
|
||||
}
|
||||
return useFallback ? ['message'] : [];
|
||||
},
|
||||
enhanceMybotItem(item = {}) {
|
||||
const data = $A.cloneJSON(item || {});
|
||||
let events = data.webhook_events;
|
||||
if (typeof events === 'undefined' || events === null) {
|
||||
events = ['message'];
|
||||
}
|
||||
events = this.normalizeWebhookEvents(events, false);
|
||||
if (!events.length) {
|
||||
events = [];
|
||||
}
|
||||
data.webhook_events = events;
|
||||
return data;
|
||||
},
|
||||
formatWebhookEvents(events) {
|
||||
const values = this.normalizeWebhookEvents(events, false);
|
||||
const labels = this.webhookEventOptions
|
||||
.filter(option => values.includes(option.value))
|
||||
.map(option => this.$L(option.label));
|
||||
return labels.length ? labels.join('、') : '-';
|
||||
},
|
||||
getLogoClass(name) {
|
||||
name = name.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
||||
return name
|
||||
@@ -593,7 +548,7 @@ export default {
|
||||
this.$store.dispatch("call", {
|
||||
url: 'users/bot/list',
|
||||
}).then(({data}) => {
|
||||
this.mybotList = (data.list || []).map(item => this.enhanceMybotItem(item));
|
||||
this.mybotList = data.list;
|
||||
}).finally(_ => {
|
||||
this.mybotLoad--
|
||||
});
|
||||
@@ -606,7 +561,7 @@ export default {
|
||||
},
|
||||
// 添加修改我的机器人
|
||||
addMybot(info) {
|
||||
this.mybotModifyData = this.enhanceMybotItem(info)
|
||||
this.mybotModifyData = $A.cloneJSON(info)
|
||||
this.mybotModifyShow = true;
|
||||
},
|
||||
// 删除我的机器人
|
||||
@@ -645,12 +600,11 @@ export default {
|
||||
onMybotModify() {
|
||||
this.mybotModifyLoad++
|
||||
this.$store.dispatch("editUserBot", this.mybotModifyData).then(({data, msg}) => {
|
||||
const botData = this.enhanceMybotItem(data);
|
||||
const index = this.mybotList.findIndex(item => item.id === botData.id);
|
||||
const index = this.mybotList.findIndex(item => item.id === data.id);
|
||||
if (index > -1) {
|
||||
this.mybotList.splice(index, 1, botData);
|
||||
this.mybotList.splice(index, 1, data);
|
||||
} else {
|
||||
this.mybotList.unshift(botData);
|
||||
this.mybotList.unshift(data);
|
||||
}
|
||||
this.mybotModifyShow = false;
|
||||
this.mybotModifyData = {};
|
||||
|
||||
@@ -462,13 +462,6 @@
|
||||
<FormItem v-if="typeof modifyData.webhook_url !== 'undefined'" prop="webhook_url" label="Webhook">
|
||||
<Input v-model="modifyData.webhook_url" :maxlength="255" />
|
||||
</FormItem>
|
||||
<FormItem v-if="typeof modifyData.webhook_events !== 'undefined'" prop="webhook_events" :label="$L('Webhook事件')">
|
||||
<CheckboxGroup v-model="modifyData.webhook_events">
|
||||
<Checkbox v-for="option in webhookEventOptions" :key="option.value" :label="option.value">
|
||||
{{$L(option.label)}}
|
||||
</Checkbox>
|
||||
</CheckboxGroup>
|
||||
</FormItem>
|
||||
</template>
|
||||
</Form>
|
||||
<div slot="footer" class="adaption">
|
||||
@@ -775,12 +768,6 @@ export default {
|
||||
modifyAiShow: false,
|
||||
modifyData: {},
|
||||
modifyLoad: 0,
|
||||
webhookEventOptions: [
|
||||
{value: 'message', label: '接收消息'},
|
||||
{value: 'dialog_open', label: '打开会话'},
|
||||
{value: 'member_join', label: '成员加入'},
|
||||
{value: 'member_leave', label: '成员退出'},
|
||||
],
|
||||
|
||||
openId: 0,
|
||||
errorId: 0,
|
||||
@@ -1462,28 +1449,6 @@ export default {
|
||||
|
||||
methods: {
|
||||
transformEmojiToHtml,
|
||||
normalizeWebhookEvents(events = [], useFallback = false) {
|
||||
if (!Array.isArray(events)) {
|
||||
events = events ? [events] : [];
|
||||
}
|
||||
const allowed = this.webhookEventOptions.map(item => item.value);
|
||||
const result = events.filter(item => allowed.includes(item));
|
||||
if (result.length) {
|
||||
return Array.from(new Set(result));
|
||||
}
|
||||
return useFallback ? ['message'] : [];
|
||||
},
|
||||
prepareWebhookEvents(events, useFallback = false) {
|
||||
let value = events;
|
||||
if (typeof value === 'undefined' || value === null) {
|
||||
value = useFallback ? ['message'] : [];
|
||||
}
|
||||
value = this.normalizeWebhookEvents(value, false);
|
||||
if (!value.length && useFallback) {
|
||||
return ['message'];
|
||||
}
|
||||
return value;
|
||||
},
|
||||
/**
|
||||
* 获取会话基本信息
|
||||
* @param dialog_id
|
||||
@@ -2762,7 +2727,6 @@ export default {
|
||||
clear_day: 0,
|
||||
webhook_url: '',
|
||||
system_name: '',
|
||||
webhook_events: this.prepareWebhookEvents([], true),
|
||||
})
|
||||
this.modifyLoad++;
|
||||
this.$store.dispatch("call", {
|
||||
@@ -2774,7 +2738,6 @@ export default {
|
||||
this.modifyData.clear_day = data.clear_day
|
||||
this.modifyData.webhook_url = data.webhook_url
|
||||
this.modifyData.system_name = data.system_name
|
||||
this.modifyData.webhook_events = this.prepareWebhookEvents(data.webhook_events, true)
|
||||
}).finally(() => {
|
||||
this.modifyLoad--;
|
||||
})
|
||||
@@ -2929,7 +2892,6 @@ export default {
|
||||
name: this.modifyData.name,
|
||||
clear_day: this.modifyData.clear_day,
|
||||
webhook_url: this.modifyData.webhook_url,
|
||||
webhook_events: this.normalizeWebhookEvents(this.modifyData.webhook_events, false),
|
||||
dialog_id: this.modifyData.dialog_id
|
||||
}).then(({msg}) => {
|
||||
$A.messageSuccess(msg);
|
||||
|
||||
@@ -5,107 +5,116 @@
|
||||
:fullscreen="isFullscreen"
|
||||
:mask-closable="false"
|
||||
:footer-hide="true"
|
||||
width="420">
|
||||
width="600">
|
||||
<div class="user-detail-body">
|
||||
<div class="profile-header">
|
||||
<div class="cover-photo"></div>
|
||||
<div class="profile-avatar">
|
||||
<UserAvatar
|
||||
:userid="userData.userid"
|
||||
:size="80"
|
||||
:show-state-dot="false"
|
||||
@on-click="onOpenAvatar"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-content">
|
||||
<div class="user-info-top">
|
||||
<span class="username">@{{userData.nickname || 'Arnoldy'}}</span>
|
||||
<h1 class="fullname">{{userData.nickname || 'Arnoldy Chafe'}}</h1>
|
||||
<div class="meta">
|
||||
<span>{{userData.address || 'Bandung'}}</span>
|
||||
<span class="separator">|</span>
|
||||
<span>Joined {{$A.newDateString(userData.line_at, 'MMM YYYY')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="profile-actions">
|
||||
<Button type="primary" icon="ios-person-add-outline">{{$L('Follow')}}</Button>
|
||||
<Button icon="ios-chatbubble-outline">{{$L('Message')}}</Button>
|
||||
<Button icon="ios-more"></Button>
|
||||
</div>
|
||||
|
||||
<div class="profile-bio">
|
||||
<p>{{userData.introduction || 'CEO System D, Because your satisfaction is everything & Standing out from the rest, and that\'s what we want you to be as well.'}}</p>
|
||||
</div>
|
||||
|
||||
<div class="profile-information">
|
||||
<h2>{{$L('Information')}}</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<Icon type="ios-globe-outline" />
|
||||
<span class="label">{{$L('Website')}}</span>
|
||||
<span class="value">www.Arnoldy.com</span>
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="ios-mail-outline" />
|
||||
<span class="label">{{$L('Email')}}</span>
|
||||
<span class="value">Hello@adalahreza.com</span>
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="ios-call-outline" />
|
||||
<span class="label">{{$L('Phone')}}</span>
|
||||
<span class="value">+62 517 218 92 00</span>
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="ios-calendar-outline" />
|
||||
<span class="label">{{$L('Joined')}}</span>
|
||||
<span class="value">{{$A.newDateString(userData.line_at, 'DD MMMM, YYYY')}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="profile-tags" @click="onOpenTagsModal">
|
||||
<div v-if="displayTags.length" class="tags-list">
|
||||
<Tag
|
||||
v-for="tag in displayTags"
|
||||
:key="tag.id"
|
||||
:color="tag.recognized ? 'primary' : 'default'"
|
||||
class="tag-pill">{{tag.name}}</Tag>
|
||||
<Tag v-if="!displayTags.length" class="tag-pill">UI Designer</Tag>
|
||||
<Tag v-if="!displayTags.length" class="tag-pill">UX Designer</Tag>
|
||||
<Tag v-if="!displayTags.length" class="tag-pill">Design System</Tag>
|
||||
<Tag v-if="!displayTags.length" class="tag-pill">Product</Tag>
|
||||
<Tag v-if="!displayTags.length" class="tag-pill">Succesfull</Tag>
|
||||
</div>
|
||||
<span v-else class="tags-empty">{{$L('暂无个性标签')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<UserAvatar
|
||||
:userid="userData.userid"
|
||||
:size="120"
|
||||
:show-state-dot="false"
|
||||
@on-click="onOpenAvatar"/>
|
||||
<ul class="user-select-auto">
|
||||
<li class="user-name">
|
||||
<h1>{{userData.nickname}}</h1>
|
||||
<em v-if="userData.delete_at" class="deleted no-dark-content">{{$L('已删除')}}</em>
|
||||
<em v-else-if="userData.disable_at" class="disabled no-dark-content">{{$L('已离职')}}</em>
|
||||
</li>
|
||||
<li v-if="userData.userid != userId && commonDialog.total !== null">
|
||||
<span>{{$L('共同群聊')}}: </span>
|
||||
<a href="javascript:void(0)" @click="commonDialogShow=true">{{ $L('(*)个', commonDialog.total) }}</a>
|
||||
</li>
|
||||
<template v-if="!userData.bot">
|
||||
<li>
|
||||
<span>{{$L('部门')}}: </span>
|
||||
{{userData.department_name || '-'}}
|
||||
</li>
|
||||
<li>
|
||||
<span>{{$L('职位/职称')}}: </span>
|
||||
{{userData.profession || '-'}}
|
||||
</li>
|
||||
<li>
|
||||
<span>{{$L('最后在线')}}: </span>
|
||||
{{$A.newDateString(userData.line_at, 'YYYY-MM-DD HH:mm') || '-'}}
|
||||
</li>
|
||||
<li v-if="userData.delete_at">
|
||||
<strong><span>{{$L('删除时间')}}: </span>{{$A.newDateString(userData.delete_at, 'YYYY-MM-DD HH:mm')}}</strong>
|
||||
</li>
|
||||
<li v-else-if="userData.disable_at">
|
||||
<strong><span>{{$L('离职时间')}}: </span>{{$A.newDateString(userData.disable_at, 'YYYY-MM-DD HH:mm')}}</strong>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
<Button icon="md-chatbubbles" :disabled="!!userData.delete_at" @click="onOpenDialog">{{ $L('开始聊天') }}</Button>
|
||||
</div>
|
||||
<UserTagsModal
|
||||
v-if="userData.userid"
|
||||
v-model="tagModalVisible"
|
||||
:userid="userData.userid"
|
||||
@updated="onTagsUpdated"/>
|
||||
|
||||
<!-- 共同群组 -->
|
||||
<Modal v-model="commonDialogShow" :title="$L('共同群组') + ' (' + $L('(*)个', commonDialog.total) + ')'" :footer-hide="true" width="500">
|
||||
<div class="common-dialog-content">
|
||||
<div v-if="commonDialogLoading > 0 && commonDialog.list.length === 0" class="loading-wrapper">
|
||||
<Loading/>
|
||||
</div>
|
||||
<div v-else-if="commonDialogList.length === 0" class="empty-wrapper">
|
||||
<div class="empty-content">
|
||||
<Icon type="ios-people-outline" size="48"/>
|
||||
<p>{{$L('暂无共同群组')}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="dialog-list">
|
||||
<div
|
||||
v-for="dialog in commonDialogList"
|
||||
:key="dialog.id"
|
||||
class="dialog-item"
|
||||
@click="onOpenCommonDialogChat(dialog)">
|
||||
<div class="dialog-avatar">
|
||||
<EAvatar v-if="dialog.avatar" :src="dialog.avatar" :size="42"></EAvatar>
|
||||
<i v-else-if="dialog.group_type=='department'" class="taskfont icon-avatar department"></i>
|
||||
<i v-else-if="dialog.group_type=='project'" class="taskfont icon-avatar project"></i>
|
||||
<i v-else-if="dialog.group_type=='task'" class="taskfont icon-avatar task"></i>
|
||||
<i v-else-if="dialog.group_type=='okr'" class="taskfont icon-avatar task"></i>
|
||||
<Icon v-else class="icon-avatar" type="ios-people" />
|
||||
</div>
|
||||
<div class="dialog-info">
|
||||
<div class="dialog-name" v-html="transformEmojiToHtml(dialog.name)"></div>
|
||||
<div class="dialog-meta">
|
||||
<span class="member-count">{{$L('(*)人', dialog.people || 0)}}</span>
|
||||
<span v-if="dialog.last_at" class="last-time">{{$A.timeFormat(dialog.last_at)}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<Icon class="enter-icon" type="ios-arrow-forward" />
|
||||
</div>
|
||||
<div v-if="commonDialog.has_more" class="load-more-wrapper">
|
||||
<Button type="primary" @click="loadCommonDialogList(true)" :loading="commonDialogLoading > 0">{{$L('加载更多')}}</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
</ModalAlive>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import emitter from "../../../store/events";
|
||||
import transformEmojiToHtml from "../../../utils/emoji";
|
||||
import {mapState} from "vuex";
|
||||
import UserTagsModal from "./UserTagsModal.vue";
|
||||
|
||||
export default {
|
||||
name: 'UserDetail',
|
||||
|
||||
components: {UserTagsModal},
|
||||
|
||||
data() {
|
||||
return {
|
||||
userData: {
|
||||
userid: 0
|
||||
},
|
||||
|
||||
showModal: false,
|
||||
tagModalVisible: false,
|
||||
|
||||
commonDialog: {
|
||||
userid: null,
|
||||
total: null,
|
||||
list: [],
|
||||
page: 1,
|
||||
has_more: false,
|
||||
},
|
||||
commonDialogShow: false,
|
||||
commonDialogLoading: 0,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -119,6 +128,13 @@ export default {
|
||||
|
||||
watch: {
|
||||
...mapState(['cacheUserBasic']),
|
||||
|
||||
commonDialogShow() {
|
||||
if (!this.commonDialogShow || this.commonDialog.list.length > 0) {
|
||||
return;
|
||||
}
|
||||
this.loadCommonDialogList(false);
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
@@ -126,19 +142,14 @@ export default {
|
||||
return windowWidth < 576
|
||||
},
|
||||
|
||||
displayTags() {
|
||||
return Array.isArray(this.userData.personal_tags) ? this.userData.personal_tags : [];
|
||||
commonDialogList() {
|
||||
return this.commonDialog.list || [];
|
||||
},
|
||||
|
||||
personalTagTotal() {
|
||||
if (typeof this.userData.personal_tags_total === 'number') {
|
||||
return this.userData.personal_tags_total;
|
||||
}
|
||||
return this.displayTags.length;
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
transformEmojiToHtml,
|
||||
|
||||
onShow(userid) {
|
||||
if (!/^\d+$/.test(userid)) {
|
||||
return
|
||||
@@ -146,16 +157,16 @@ export default {
|
||||
this.$store.dispatch("showSpinner", 600)
|
||||
this.$store.dispatch('getUserData', userid).then(user => {
|
||||
this.userData = user;
|
||||
this.ensureTagDefaults();
|
||||
this.showModal = true;
|
||||
this.loadCommonDialogCount()
|
||||
}).finally(_ => {
|
||||
this.$store.dispatch("hiddenSpinner")
|
||||
});
|
||||
},
|
||||
|
||||
onHide() {
|
||||
this.showModal = false;
|
||||
this.tagModalVisible = false;
|
||||
this.commonDialogShow = false;
|
||||
this.showModal = false
|
||||
},
|
||||
|
||||
onOpenAvatar() {
|
||||
@@ -170,31 +181,102 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
ensureTagDefaults() {
|
||||
if (!Array.isArray(this.userData.personal_tags)) {
|
||||
this.$set(this.userData, 'personal_tags', []);
|
||||
}
|
||||
if (typeof this.userData.personal_tags_total !== 'number') {
|
||||
this.$set(this.userData, 'personal_tags_total', this.userData.personal_tags.length);
|
||||
}
|
||||
},
|
||||
|
||||
onOpenTagsModal() {
|
||||
if (!this.userData.userid) {
|
||||
loadCommonDialogCount() {
|
||||
const target_userid = this.userData.userid;
|
||||
const previousUserId = this.commonDialog.userid;
|
||||
if (!target_userid) {
|
||||
this.commonDialog = {
|
||||
...this.commonDialog,
|
||||
userid: target_userid || null,
|
||||
total: null,
|
||||
list: [],
|
||||
page: 1,
|
||||
has_more: false,
|
||||
};
|
||||
return;
|
||||
}
|
||||
this.tagModalVisible = true;
|
||||
|
||||
if (previousUserId !== target_userid) {
|
||||
this.commonDialog = {
|
||||
...this.commonDialog,
|
||||
userid: target_userid,
|
||||
total: null,
|
||||
list: [],
|
||||
page: 1,
|
||||
has_more: false,
|
||||
};
|
||||
}
|
||||
|
||||
const cacheMap = this.$store.state.dialogCommonCountCache || {};
|
||||
const cached = cacheMap[String(target_userid)];
|
||||
if (cached && typeof cached.total !== 'undefined') {
|
||||
this.commonDialog = {
|
||||
...this.commonDialog,
|
||||
total: cached.total,
|
||||
};
|
||||
}
|
||||
|
||||
this.$store.dispatch('call', {
|
||||
url: 'dialog/common/list',
|
||||
data: {
|
||||
target_userid,
|
||||
only_count: 'yes'
|
||||
}
|
||||
}).then(({data}) => {
|
||||
if (target_userid !== this.userData.userid) {
|
||||
return
|
||||
}
|
||||
const parsedTotal = Number(data.total);
|
||||
const total = Number.isNaN(parsedTotal) ? 0 : parsedTotal;
|
||||
this.commonDialog = {
|
||||
...this.commonDialog,
|
||||
userid: target_userid,
|
||||
total,
|
||||
list: [],
|
||||
page: 1,
|
||||
has_more: false,
|
||||
};
|
||||
this.$store.commit('common/dialog/count/save', {
|
||||
userid: target_userid,
|
||||
total,
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
onTagsUpdated({top, total}) {
|
||||
this.$set(this.userData, 'personal_tags', Array.isArray(top) ? top : []);
|
||||
this.$set(this.userData, 'personal_tags_total', typeof total === 'number' ? total : this.userData.personal_tags.length);
|
||||
loadCommonDialogList(loadMore = false) {
|
||||
this.commonDialogLoading++;
|
||||
const target_userid = this.userData.userid;
|
||||
this.$store.dispatch('call', {
|
||||
url: 'dialog/common/list',
|
||||
data: {
|
||||
target_userid,
|
||||
page: loadMore ? this.commonDialog.page + 1 : 1
|
||||
}
|
||||
}).then(({data}) => {
|
||||
if (target_userid !== this.userData.userid) {
|
||||
return;
|
||||
}
|
||||
this.commonDialog = {
|
||||
...this.commonDialog,
|
||||
list: loadMore ? [...this.commonDialog.list, ...data.data] : data.data,
|
||||
total: data.total,
|
||||
page: data.current_page,
|
||||
has_more: !!data.next_page_url
|
||||
}
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg || this.$L('加载失败'));
|
||||
}).finally(() => {
|
||||
this.commonDialogLoading--;
|
||||
});
|
||||
},
|
||||
|
||||
onOpenCommonDialogChat(dialog) {
|
||||
this.$store.dispatch("openDialog", dialog.id).then(() => {
|
||||
this.onHide();
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// The styles will be moved to the SCSS file as requested.
|
||||
// This scoped style block can be removed if not needed for specific overrides.
|
||||
</style>
|
||||
|
||||
@@ -1,459 +0,0 @@
|
||||
<template>
|
||||
<ModalAlive
|
||||
v-model="visible"
|
||||
class-name="user-tags-manage-modal"
|
||||
:mask-closable="false"
|
||||
:footer-hide="true"
|
||||
width="520"
|
||||
:closable="true">
|
||||
<div class="tag-modal-container">
|
||||
<div class="tag-modal-header">
|
||||
<h3>{{$L('个性标签管理')}}</h3>
|
||||
<p class="tag-modal-meta">
|
||||
<span>{{$L('当前共(*)个标签', total)}}</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="tag-modal-form">
|
||||
<Input
|
||||
v-model="newTagName"
|
||||
:maxlength="20"
|
||||
:disabled="pending.add"
|
||||
:placeholder="$L('请输入个性标签')"
|
||||
@on-enter="handleAdd">
|
||||
<Button
|
||||
slot="append"
|
||||
type="primary"
|
||||
:loading="pending.add"
|
||||
@click="handleAdd">{{$L('添加')}}</Button>
|
||||
</Input>
|
||||
</div>
|
||||
<div class="tag-modal-body">
|
||||
<div v-if="loading > 0 && tags.length === 0" class="tag-loading">
|
||||
<Loading />
|
||||
</div>
|
||||
<div v-else-if="tags.length === 0" class="tag-empty">
|
||||
<Icon type="ios-pricetags-outline" size="32" />
|
||||
<p>{{$L('还没有个性标签,快来添加吧~')}}</p>
|
||||
</div>
|
||||
<ul v-else class="tag-list">
|
||||
<li
|
||||
v-for="tag in tags"
|
||||
:key="tag.id"
|
||||
class="tag-item"
|
||||
:class="{'is-editing': editId === tag.id}">
|
||||
<div class="tag-item-main">
|
||||
<div class="tag-name" v-if="editId !== tag.id">
|
||||
<Tag :color="tag.recognized ? 'primary' : 'default'" class="tag-pill">{{tag.name}}</Tag>
|
||||
</div>
|
||||
<div class="tag-name edit" v-else>
|
||||
<Input
|
||||
ref="editInput"
|
||||
size="small"
|
||||
v-model="editName"
|
||||
:maxlength="20"
|
||||
:disabled="isPending(tag.id, 'edit')"
|
||||
@on-enter="confirmEdit(tag)"/>
|
||||
</div>
|
||||
<div class="tag-actions">
|
||||
<Button
|
||||
type="text"
|
||||
size="small"
|
||||
class="recognize-btn"
|
||||
:loading="isPending(tag.id, 'recognize')"
|
||||
@click="toggleRecognize(tag)">
|
||||
<Icon type="md-thumbs-up" />
|
||||
<span>{{tag.recognition_total}}</span>
|
||||
<span class="recognize-text">{{$L('认可')}}</span>
|
||||
</Button>
|
||||
<template v-if="editId === tag.id">
|
||||
<Button
|
||||
type="primary"
|
||||
size="small"
|
||||
:loading="isPending(tag.id, 'edit')"
|
||||
@click="confirmEdit(tag)">{{$L('保存')}}</Button>
|
||||
<Button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="cancelEdit">{{$L('取消')}}</Button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<Button
|
||||
v-if="tag.can_edit"
|
||||
type="text"
|
||||
size="small"
|
||||
@click="startEdit(tag)">{{$L('编辑')}}</Button>
|
||||
<Button
|
||||
v-if="tag.can_delete"
|
||||
type="text"
|
||||
size="small"
|
||||
:loading="isPending(tag.id, 'delete')"
|
||||
@click="confirmDelete(tag)">{{$L('删除')}}</Button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tag-meta-info" v-if="tag.created_by_name">
|
||||
<span>{{$L('由(*)创建', tag.created_by_name)}}</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</ModalAlive>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'UserTagsModal',
|
||||
props: {
|
||||
value: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
userid: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: this.value,
|
||||
loading: 0,
|
||||
tags: [],
|
||||
newTagName: '',
|
||||
editId: null,
|
||||
editName: '',
|
||||
pending: {
|
||||
add: false,
|
||||
tagId: null,
|
||||
type: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
userId() {
|
||||
return this.$store.state.userId;
|
||||
},
|
||||
total() {
|
||||
return this.tags.length;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value(v) {
|
||||
this.visible = v;
|
||||
if (v) {
|
||||
this.openModal();
|
||||
}
|
||||
},
|
||||
visible(v) {
|
||||
this.$emit('input', v);
|
||||
if (!v) {
|
||||
this.resetInlineState();
|
||||
}
|
||||
},
|
||||
userid() {
|
||||
if (this.visible) {
|
||||
this.loadTags();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openModal() {
|
||||
this.resetInlineState();
|
||||
this.loadTags();
|
||||
},
|
||||
resetInlineState() {
|
||||
this.newTagName = '';
|
||||
this.editId = null;
|
||||
this.editName = '';
|
||||
this.pending = {
|
||||
add: false,
|
||||
tagId: null,
|
||||
type: ''
|
||||
};
|
||||
},
|
||||
setPending(type, tagId = null) {
|
||||
if (type === 'add') {
|
||||
this.pending.add = true;
|
||||
} else {
|
||||
this.pending.tagId = tagId;
|
||||
this.pending.type = type;
|
||||
}
|
||||
},
|
||||
clearPending(type) {
|
||||
if (type === 'add') {
|
||||
this.pending.add = false;
|
||||
} else if (this.pending.type === type) {
|
||||
this.pending.tagId = null;
|
||||
this.pending.type = '';
|
||||
}
|
||||
},
|
||||
isPending(tagId, type) {
|
||||
return this.pending.tagId === tagId && this.pending.type === type;
|
||||
},
|
||||
loadTags() {
|
||||
if (!this.userid) {
|
||||
return;
|
||||
}
|
||||
this.loading++;
|
||||
this.$store.dispatch('call', {
|
||||
url: 'users/tags/lists',
|
||||
data: {userid: this.userid},
|
||||
}).then(({data}) => {
|
||||
this.applyTagData(data);
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg || this.$L('加载失败'));
|
||||
}).finally(() => {
|
||||
this.loading--;
|
||||
});
|
||||
},
|
||||
applyTagData(data) {
|
||||
const list = Array.isArray(data?.list) ? data.list : [];
|
||||
this.tags = list;
|
||||
const top = Array.isArray(data?.top) ? data.top : list.slice(0, 10);
|
||||
const total = typeof data?.total === 'number' ? data.total : list.length;
|
||||
this.emitUpdated({list, top, total});
|
||||
},
|
||||
emitUpdated(payload) {
|
||||
this.$emit('updated', payload);
|
||||
if (this.userid === this.$store.state.userInfo.userid) {
|
||||
const info = Object.assign({}, this.$store.state.userInfo, {
|
||||
personal_tags: payload.top,
|
||||
personal_tags_total: payload.total
|
||||
});
|
||||
this.$store.dispatch('saveUserInfoBase', info);
|
||||
}
|
||||
this.$store.dispatch('saveUserBasic', {
|
||||
userid: this.userid,
|
||||
personal_tags: payload.top,
|
||||
personal_tags_total: payload.total
|
||||
});
|
||||
},
|
||||
handleAdd() {
|
||||
const name = this.newTagName.trim();
|
||||
if (!name) {
|
||||
$A.messageError(this.$L('请输入个性标签'));
|
||||
return;
|
||||
}
|
||||
if (name.length > 20) {
|
||||
$A.messageError(this.$L('标签名称最多只能设置20个字'));
|
||||
return;
|
||||
}
|
||||
if (this.pending.add) {
|
||||
return;
|
||||
}
|
||||
this.setPending('add');
|
||||
this.$store.dispatch('call', {
|
||||
url: 'users/tags/add',
|
||||
method: 'post',
|
||||
data: {userid: this.userid, name},
|
||||
}).then(({data, msg}) => {
|
||||
this.applyTagData(data);
|
||||
this.newTagName = '';
|
||||
if (msg) {
|
||||
$A.messageSuccess(msg);
|
||||
}
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg || this.$L('添加失败'));
|
||||
}).finally(() => {
|
||||
this.clearPending('add');
|
||||
});
|
||||
},
|
||||
startEdit(tag) {
|
||||
this.editId = tag.id;
|
||||
this.editName = tag.name;
|
||||
this.$nextTick(() => {
|
||||
const input = this.$refs.editInput;
|
||||
if (input && input.focus) {
|
||||
input.focus();
|
||||
} else if (Array.isArray(input) && input.length > 0 && input[0].focus) {
|
||||
input[0].focus();
|
||||
}
|
||||
});
|
||||
},
|
||||
cancelEdit() {
|
||||
this.editId = null;
|
||||
this.editName = '';
|
||||
},
|
||||
confirmEdit(tag) {
|
||||
const name = this.editName.trim();
|
||||
if (!name) {
|
||||
$A.messageError(this.$L('请输入个性标签'));
|
||||
return;
|
||||
}
|
||||
if (name.length > 20) {
|
||||
$A.messageError(this.$L('标签名称最多只能设置20个字'));
|
||||
return;
|
||||
}
|
||||
if (name === tag.name) {
|
||||
this.cancelEdit();
|
||||
return;
|
||||
}
|
||||
if (this.isPending(tag.id, 'edit')) {
|
||||
return;
|
||||
}
|
||||
this.setPending('edit', tag.id);
|
||||
this.$store.dispatch('call', {
|
||||
url: 'users/tags/update',
|
||||
method: 'post',
|
||||
data: {tag_id: tag.id, name},
|
||||
}).then(({data, msg}) => {
|
||||
this.applyTagData(data);
|
||||
this.cancelEdit();
|
||||
if (msg) {
|
||||
$A.messageSuccess(msg);
|
||||
}
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg || this.$L('保存失败'));
|
||||
}).finally(() => {
|
||||
this.clearPending('edit');
|
||||
});
|
||||
},
|
||||
confirmDelete(tag) {
|
||||
if (this.isPending(tag.id, 'delete')) {
|
||||
return;
|
||||
}
|
||||
$A.modalConfirm({
|
||||
title: this.$L('删除标签'),
|
||||
content: this.$L('确定要删除该标签吗?'),
|
||||
onOk: () => {
|
||||
this.deleteTag(tag);
|
||||
}
|
||||
});
|
||||
},
|
||||
deleteTag(tag) {
|
||||
this.setPending('delete', tag.id);
|
||||
this.$store.dispatch('call', {
|
||||
url: 'users/tags/delete',
|
||||
method: 'post',
|
||||
data: {tag_id: tag.id},
|
||||
}).then(({data, msg}) => {
|
||||
this.applyTagData(data);
|
||||
if (msg) {
|
||||
$A.messageSuccess(msg);
|
||||
}
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg || this.$L('删除失败'));
|
||||
}).finally(() => {
|
||||
this.clearPending('delete');
|
||||
});
|
||||
},
|
||||
toggleRecognize(tag) {
|
||||
if (this.isPending(tag.id, 'recognize')) {
|
||||
return;
|
||||
}
|
||||
this.setPending('recognize', tag.id);
|
||||
this.$store.dispatch('call', {
|
||||
url: 'users/tags/recognize',
|
||||
method: 'post',
|
||||
data: {tag_id: tag.id},
|
||||
}).then(({data, msg}) => {
|
||||
this.applyTagData(data);
|
||||
if (msg) {
|
||||
$A.messageSuccess(msg);
|
||||
}
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg || this.$L('操作失败'));
|
||||
}).finally(() => {
|
||||
this.clearPending('recognize');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.user-tags-manage-modal {
|
||||
.tag-modal-container {
|
||||
padding: 16px 20px 12px;
|
||||
}
|
||||
.tag-modal-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 12px;
|
||||
h3 {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.tag-modal-meta {
|
||||
margin: 0;
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
.tag-modal-form {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.tag-modal-body {
|
||||
max-height: 360px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.tag-loading {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 40px 0;
|
||||
}
|
||||
.tag-empty {
|
||||
text-align: center;
|
||||
padding: 32px 0;
|
||||
color: #909399;
|
||||
p {
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
.tag-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
.tag-item {
|
||||
border: 1px solid var(--divider-color, #ebeef5);
|
||||
border-radius: 6px;
|
||||
padding: 10px 12px;
|
||||
margin-bottom: 12px;
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
&.is-editing {
|
||||
background-color: rgba(64, 158, 255, 0.08);
|
||||
}
|
||||
.tag-item-main {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
.tag-name {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
&.edit {
|
||||
max-width: 220px;
|
||||
}
|
||||
}
|
||||
.tag-pill {
|
||||
cursor: default;
|
||||
}
|
||||
.tag-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
.recognize-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
.recognize-text {
|
||||
font-size: 12px;
|
||||
color: #606266;
|
||||
}
|
||||
}
|
||||
}
|
||||
.tag-meta-info {
|
||||
margin-top: 6px;
|
||||
font-size: 12px;
|
||||
color: #a0a3a6;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1241,7 +1241,7 @@ export default {
|
||||
x: event.clientX - containerRect.left + scrollLeft,
|
||||
y: event.clientY - containerRect.top + scrollTop,
|
||||
};
|
||||
this.dragSelecting = true;
|
||||
this.dragSelecting = this.windowLandscape;
|
||||
this.dragSelectStart = start;
|
||||
this.dragSelectRect = {
|
||||
left: start.x,
|
||||
@@ -1249,12 +1249,7 @@ export default {
|
||||
width: 0,
|
||||
height: 0,
|
||||
};
|
||||
this.dragSelectStyle = {
|
||||
left: `${start.x - scrollLeft}px`,
|
||||
top: `${start.y - scrollTop}px`,
|
||||
width: '0px',
|
||||
height: '0px',
|
||||
};
|
||||
this.setDragSelectStyle(this.dragSelectRect);
|
||||
this.dragSelectContainerSize = {
|
||||
width: container.scrollWidth,
|
||||
height: container.scrollHeight,
|
||||
@@ -1298,12 +1293,7 @@ export default {
|
||||
const height = Math.abs(start.y - currentY);
|
||||
const rect = {left, top, width, height};
|
||||
this.dragSelectRect = rect;
|
||||
this.dragSelectStyle = {
|
||||
left: `${left - scrollLeft}px`,
|
||||
top: `${top - scrollTop}px`,
|
||||
width: `${width}px`,
|
||||
height: `${height}px`,
|
||||
};
|
||||
this.setDragSelectStyle(rect);
|
||||
if (!this.dragSelectMoved && (width > 3 || height > 3)) {
|
||||
this.dragSelectMoved = true;
|
||||
}
|
||||
@@ -1391,6 +1381,19 @@ export default {
|
||||
this.selectedItems = next;
|
||||
},
|
||||
|
||||
setDragSelectStyle(rect) {
|
||||
if (!rect) {
|
||||
this.dragSelectStyle = {};
|
||||
return;
|
||||
}
|
||||
this.dragSelectStyle = {
|
||||
left: `${rect.left}px`,
|
||||
top: `${rect.top}px`,
|
||||
width: `${rect.width}px`,
|
||||
height: `${rect.height}px`,
|
||||
};
|
||||
},
|
||||
|
||||
rectsIntersect(a, b) {
|
||||
if (!a || !b) {
|
||||
return false;
|
||||
|
||||
@@ -22,64 +22,19 @@
|
||||
<FormItem :label="$L('职位/职称')" prop="profession">
|
||||
<Input v-model="formData.profession" :maxlength="20" :placeholder="$L('请输入职位/职称')"></Input>
|
||||
</FormItem>
|
||||
<FormItem :label="$L('生日')" prop="birthday">
|
||||
<DatePicker
|
||||
v-model="formData.birthday"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
:placeholder="$L('请选择生日')"
|
||||
confirm
|
||||
transfer/>
|
||||
</FormItem>
|
||||
<FormItem :label="$L('地址')" prop="address">
|
||||
<Input v-model="formData.address" :maxlength="100" :placeholder="$L('请输入地址')"></Input>
|
||||
</FormItem>
|
||||
<FormItem :label="$L('个人简介')" prop="introduction">
|
||||
<Input
|
||||
v-model="formData.introduction"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
:autosize="{ minRows: 2, maxRows: 8 }"
|
||||
:maxlength="500"
|
||||
:placeholder="$L('请输入个人简介')"></Input>
|
||||
</FormItem>
|
||||
<FormItem :label="$L('个性标签')">
|
||||
<div class="user-tags-preview" @click="openTagModal">
|
||||
<template v-if="displayTags.length">
|
||||
<Tag
|
||||
v-for="tag in displayTags"
|
||||
:key="tag.id"
|
||||
:color="tag.recognized ? 'primary' : 'default'"
|
||||
class="tag-pill">{{tag.name}}</Tag>
|
||||
</template>
|
||||
<span v-else class="tags-empty">{{$L('暂无个性标签')}}</span>
|
||||
<span v-if="personalTagTotal > displayTags.length" class="tags-total">{{$L('共(*)个', personalTagTotal)}}</span>
|
||||
<Button type="text" size="small" class="manage-button" @click.stop="openTagModal">
|
||||
<Icon type="md-create" />
|
||||
{{$L('管理')}}
|
||||
</Button>
|
||||
</div>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<div class="setting-footer">
|
||||
<Button :loading="loadIng > 0" type="primary" @click="submitForm">{{$L('提交')}}</Button>
|
||||
<Button :loading="loadIng > 0" @click="resetForm" style="margin-left: 8px">{{$L('重置')}}</Button>
|
||||
</div>
|
||||
<UserTagsModal
|
||||
v-if="userInfo.userid"
|
||||
v-model="tagModalVisible"
|
||||
:userid="userInfo.userid"
|
||||
@updated="onTagsUpdated"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ImgUpload from "../../../components/ImgUpload";
|
||||
import UserTagsModal from "../components/UserTagsModal.vue";
|
||||
import {mapState} from "vuex";
|
||||
export default {
|
||||
components: {ImgUpload, UserTagsModal},
|
||||
components: {ImgUpload},
|
||||
data() {
|
||||
return {
|
||||
loadIng: 0,
|
||||
@@ -89,10 +44,7 @@ export default {
|
||||
email: '',
|
||||
tel: '',
|
||||
nickname: '',
|
||||
profession: '',
|
||||
birthday: '',
|
||||
address: '',
|
||||
introduction: ''
|
||||
profession: ''
|
||||
},
|
||||
|
||||
ruleData: {
|
||||
@@ -108,10 +60,6 @@ export default {
|
||||
{type: 'string', min: 2, message: this.$L('昵称长度至少2位!'), trigger: 'change'}
|
||||
]
|
||||
},
|
||||
|
||||
tagModalVisible: false,
|
||||
personalTags: [],
|
||||
personalTagTotal: 0,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -119,10 +67,6 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userInfo', 'formOptions']),
|
||||
|
||||
displayTags() {
|
||||
return this.personalTags;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
userInfo() {
|
||||
@@ -136,19 +80,7 @@ export default {
|
||||
this.$set(this.formData, 'tel', this.userInfo.tel);
|
||||
this.$set(this.formData, 'nickname', typeof this.userInfo.nickname_original !== "undefined" ? this.userInfo.nickname_original : this.userInfo.nickname);
|
||||
this.$set(this.formData, 'profession', this.userInfo.profession);
|
||||
this.$set(this.formData, 'birthday', this.userInfo.birthday || '');
|
||||
this.$set(this.formData, 'address', this.userInfo.address || '');
|
||||
this.$set(this.formData, 'introduction', this.userInfo.introduction || '');
|
||||
this.formData_bak = $A.cloneJSON(this.formData);
|
||||
this.syncPersonalTags();
|
||||
},
|
||||
|
||||
syncPersonalTags() {
|
||||
const tags = Array.isArray(this.userInfo.personal_tags) ? this.userInfo.personal_tags : [];
|
||||
this.personalTags = tags.slice(0, 10);
|
||||
this.personalTagTotal = typeof this.userInfo.personal_tags_total === 'number'
|
||||
? this.userInfo.personal_tags_total
|
||||
: this.personalTags.length;
|
||||
},
|
||||
|
||||
submitForm() {
|
||||
@@ -174,50 +106,7 @@ export default {
|
||||
|
||||
resetForm() {
|
||||
this.formData = $A.cloneJSON(this.formData_bak);
|
||||
},
|
||||
|
||||
openTagModal() {
|
||||
if (!this.userInfo.userid) {
|
||||
return;
|
||||
}
|
||||
this.tagModalVisible = true;
|
||||
},
|
||||
|
||||
onTagsUpdated({top, total}) {
|
||||
this.personalTags = Array.isArray(top) ? top : [];
|
||||
this.personalTagTotal = typeof total === 'number' ? total : this.personalTags.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.user-tags-preview {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
min-height: 32px;
|
||||
cursor: pointer;
|
||||
|
||||
.tag-pill {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tags-empty {
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.tags-total {
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.manage-button {
|
||||
margin-left: auto;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,125 +1,84 @@
|
||||
.common-user-detail-modal {
|
||||
.ivu-modal-content {
|
||||
border-radius: 16px;
|
||||
}
|
||||
.ivu-modal-body {
|
||||
padding: 0 !important;
|
||||
}
|
||||
.user-detail-body {
|
||||
.profile-header {
|
||||
position: relative;
|
||||
height: 120px;
|
||||
.cover-photo {
|
||||
background: #1a2c47;
|
||||
height: 80px;
|
||||
border-top-left-radius: 16px;
|
||||
border-top-right-radius: 16px;
|
||||
}
|
||||
.profile-avatar {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
border: 4px solid #fff;
|
||||
border-radius: 50%;
|
||||
.user-avatar {
|
||||
display: block;
|
||||
.ivu-modal {
|
||||
max-width: 90%;
|
||||
|
||||
&.ivu-modal-fullscreen {
|
||||
max-width: none;
|
||||
|
||||
.ivu-modal-content {
|
||||
margin-top: calc(var(--status-bar-height) + 46px);
|
||||
margin-bottom: 0;
|
||||
border-top-left-radius: 18px !important;
|
||||
border-top-right-radius: 18px !important;
|
||||
|
||||
.ivu-modal-body {
|
||||
.user-detail-body {
|
||||
padding-bottom: var(--navigation-bar-height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.profile-content {
|
||||
padding: 16px 24px 24px;
|
||||
text-align: center;
|
||||
|
||||
.user-info-top {
|
||||
.username {
|
||||
color: #808695;
|
||||
font-size: 14px;
|
||||
}
|
||||
.fullname {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
margin: 4px 0;
|
||||
}
|
||||
.meta {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #808695;
|
||||
font-size: 12px;
|
||||
.separator {
|
||||
margin: 0 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ivu-modal-content {
|
||||
overflow: hidden;
|
||||
|
||||
.profile-actions {
|
||||
margin: 16px 0;
|
||||
.ivu-modal-body {
|
||||
padding: 0 !important;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
}
|
||||
flex-direction: column;
|
||||
|
||||
.profile-bio {
|
||||
color: #515a6e;
|
||||
line-height: 1.5;
|
||||
margin: 16px 0;
|
||||
}
|
||||
.user-detail-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding: 84px 24px;
|
||||
|
||||
.profile-information {
|
||||
text-align: left;
|
||||
background-color: #f8f8f9;
|
||||
padding: 16px;
|
||||
border-radius: 8px;
|
||||
.avatar-wrapper {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 16px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
> ul {
|
||||
width: 80%;
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
> li {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 12px auto;
|
||||
|
||||
li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 8px 0;
|
||||
font-size: 14px;
|
||||
&.user-name {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ivu-icon {
|
||||
font-size: 20px;
|
||||
margin-right: 12px;
|
||||
color: #808695;
|
||||
}
|
||||
> em {
|
||||
font-style: normal;
|
||||
&.disabled,
|
||||
&.deleted {
|
||||
display: inline-block;
|
||||
margin-left: 2px;
|
||||
white-space: nowrap;
|
||||
font-size: 12px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
padding: 0 6px;
|
||||
border-radius: 3px;
|
||||
transform: scale(0.9);
|
||||
transform-origin: right center;
|
||||
color: #ffffff;
|
||||
background-color: #ED4014;
|
||||
}
|
||||
}
|
||||
|
||||
.label {
|
||||
color: #515a6e;
|
||||
}
|
||||
|
||||
.value {
|
||||
margin-left: auto;
|
||||
color: #17233d;
|
||||
font-weight: 500;
|
||||
> span {
|
||||
flex-shrink: 0;
|
||||
opacity: 0.8;
|
||||
padding-right: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.profile-tags {
|
||||
margin-top: 24px;
|
||||
cursor: pointer;
|
||||
.tags-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
justify-content: center;
|
||||
}
|
||||
.ivu-tag {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,15 +152,9 @@
|
||||
|
||||
.setting-item {
|
||||
.ivu-input,
|
||||
.ivu-select-default,
|
||||
.ivu-date-picker,
|
||||
.user-tags-preview {
|
||||
.ivu-select-default {
|
||||
max-width: 460px;
|
||||
}
|
||||
.ivu-date-picker,
|
||||
.user-tags-preview {
|
||||
width: 100%;
|
||||
}
|
||||
.ivu-form {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user