mirror of
https://github.com/lsky-org/lsky-pro.git
synced 2025-01-08 11:57:52 +08:00
原图保护增加清除缓存功能
This commit is contained in:
parent
45021411ae
commit
485b326c96
@ -41,8 +41,8 @@
|
||||
- [Fontawesome](https://fontawesome.com)
|
||||
- [Echarts](https://echarts.apache.org)
|
||||
- [Intervention/image](https://github.com/Intervention/image)
|
||||
- [league/flysystem](https://flysystem.thephpleague.com)
|
||||
- [overtrue](https://github.com/overtrue)
|
||||
- [league](https://github.com/thephpleague)
|
||||
- [Jquery](https://jquery.com)
|
||||
- [jQuery-File-Upload](https://github.com/blueimp/jQuery-File-Upload)
|
||||
- [Alpinejs](https://alpinejs.dev/)
|
||||
|
@ -7,9 +7,11 @@ namespace App\Http\Controllers\Admin;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\Admin\GroupRequest;
|
||||
use App\Models\Group;
|
||||
use App\Models\Image;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\View\View;
|
||||
|
||||
@ -95,4 +97,16 @@ class GroupController extends Controller
|
||||
}
|
||||
return $this->success('删除成功');
|
||||
}
|
||||
|
||||
public function clearCache(Request $request): Response
|
||||
{
|
||||
/** @var Group $group */
|
||||
if ($group = Group::query()->find($request->route('id'))) {
|
||||
/** @var Image $image */
|
||||
foreach ($group->images()->select('key')->cursor() as $image) {
|
||||
Cache::forget('image_'.$image->key);
|
||||
}
|
||||
}
|
||||
return $this->success('清除成功');
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ use App\Utils;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Support\Collection;
|
||||
@ -19,6 +20,7 @@ use Illuminate\Support\Collection;
|
||||
* @property Carbon $updated_at
|
||||
* @property Carbon $created_at
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection $users
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection $images
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection $strategies
|
||||
*/
|
||||
class Group extends Model
|
||||
@ -89,6 +91,11 @@ class Group extends Model
|
||||
return $this->hasMany(User::class, 'group_id', 'id');
|
||||
}
|
||||
|
||||
public function images(): HasMany
|
||||
{
|
||||
return $this->hasMany(Image::class, 'group_id', 'id');
|
||||
}
|
||||
|
||||
public function strategies(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Strategy::class, 'group_strategy', 'group_id', 'strategy_id');
|
||||
|
12
composer.lock
generated
12
composer.lock
generated
@ -417,16 +417,16 @@
|
||||
},
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.212.6",
|
||||
"version": "3.212.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "fcb57b1f840938813e83f521e169914a076b3be9"
|
||||
"reference": "7f4c976df8a0fbe8d786e4b479d44e22478ce8af"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/fcb57b1f840938813e83f521e169914a076b3be9",
|
||||
"reference": "fcb57b1f840938813e83f521e169914a076b3be9",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/7f4c976df8a0fbe8d786e4b479d44e22478ce8af",
|
||||
"reference": "7f4c976df8a0fbe8d786e4b479d44e22478ce8af",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -502,9 +502,9 @@
|
||||
"support": {
|
||||
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
||||
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.212.6"
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.212.7"
|
||||
},
|
||||
"time": "2022-03-10T19:14:38+00:00"
|
||||
"time": "2022-03-11T19:14:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "brick/math",
|
||||
|
2400
public/css/app.css
2400
public/css/app.css
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1,206 @@
|
||||
.nav-header{color:#999;display:block;font-size:11px;font-weight:700;line-height:20px;padding:3px 15px;text-shadow:0 1px 0 hsla(0,0%,100%,.5);text-transform:uppercase}.dropdown-menu{background-clip:padding-box;background-color:#fff;border:0;border-radius:6px;box-shadow:0 5px 10px hsla(0,0%,68%,.3);display:none;float:left;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;left:0;list-style:none;margin:2px 0 0;min-width:160px;padding:5px 0;position:absolute;text-align:left;top:100%;z-index:1000}.dropdown-menu.pull-right{left:auto;right:0}.dropdown-menu .divider{background-color:#e5e5e5;border-bottom:1px solid #f5f5f5;height:1px;margin:9px 1px;overflow:hidden}.dropdown-menu a{clear:both;color:#333;display:block;font-weight:400;line-height:20px;padding:5px 20px;text-decoration:none;white-space:nowrap}.dropdown-menu .disabled>a:hover{background-color:transparent;cursor:default;text-decoration:none}.dropdown-menu .dropdown-submenu:hover>a,.dropdown-menu li>a:focus,.dropdown-menu li>a:hover{background-color:#627aff;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-repeat:repeat-x;color:#fff;text-decoration:none}.dropdown-menu .active>a,.dropdown-menu .active>a:hover{background-color:#627aff;background-image:linear-gradient(180deg,#08c,#0077b3);background-repeat:repeat-x;color:#fff;outline:0;text-decoration:none}.dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999}.dropdown-menu .open{*z-index:1000}.dropdown-menu .open>.dropdown-menu{display:block}.dropdown-menu .pull-right>.dropdown-menu{left:auto;right:0}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-bottom:4px solid #000;border-top:0;content:"\2191"}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{bottom:100%;margin-bottom:1px;top:auto}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{border-radius:0 6px 6px 6px;left:100%;margin-left:-1px;margin-top:-6px;top:0}.dropdown-submenu>.dropdown-menu.drop-left{left:-100%}.dropdown-submenu:hover .dropdown-menu{display:block}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu>a:after{border-color:transparent transparent transparent #ccc;border-style:solid;border-width:5px 0 5px 5px;content:" ";display:block;float:right;height:0;margin-right:-10px;margin-top:5px;width:0}.dropdown .dropdown-menu .nav-header{padding-left:20px;padding-right:20px}.dropdown-context .nav-header{cursor:default}.dropdown-context .dropdown-submenu:hover .dropdown-menu{display:none}.dropdown-context .dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-context-up:before,.dropdown-context:before{border-bottom:7px solid rgba(0,0,0,.2);border-left:7px solid transparent;border-right:7px solid transparent;content:"";display:inline-block;left:9px;position:absolute;top:-7px}.dropdown-context-up:after,.dropdown-context:after{border-bottom:6px solid #fff;border-left:6px solid transparent;border-right:6px solid transparent;content:"";display:inline-block;left:10px;position:absolute;top:-6px}.dropdown-context-up:after,.dropdown-context-up:before{bottom:-7px;top:auto;z-index:9999}.dropdown-context-up:before{border:7px solid transparent;border-bottom:none;border-top-color:#ccc}.dropdown-context-up:after{border:6px solid transparent;border-bottom:none;border-top-color:#fff}.dropdown-context-sub:after,.dropdown-context-sub:before{display:none}.compressed-context a{font-size:13px;padding-bottom:0;padding-left:14px;padding-top:0}.compressed-context .divider{margin:5px 1px}.compressed-context .nav-header{padding:1px 13px}
|
||||
.nav-header {
|
||||
display: block;
|
||||
padding: 3px 15px;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
line-height: 20px;
|
||||
color: #999;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.dropdown-menu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
display: none;
|
||||
float: left;
|
||||
min-width: 160px;
|
||||
padding: 5px 0;
|
||||
margin: 2px 0 0;
|
||||
list-style: none;
|
||||
background-color: #ffffff;
|
||||
border: 0;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 5px 10px rgba(173, 173, 173, 0.3);
|
||||
background-clip: padding-box;
|
||||
text-align: left;
|
||||
}
|
||||
.dropdown-menu.pull-right {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
.dropdown-menu .divider {
|
||||
height: 1px;
|
||||
margin: 9px 1px;
|
||||
overflow: hidden;
|
||||
background-color: #e5e5e5;
|
||||
border-bottom: 1px solid #f5f5f5;
|
||||
}
|
||||
.dropdown-menu a {
|
||||
display: block;
|
||||
padding: 5px 20px;
|
||||
clear: both;
|
||||
font-weight: normal;
|
||||
line-height: 20px;
|
||||
color: #333333;
|
||||
white-space: nowrap;
|
||||
text-decoration: none;
|
||||
}
|
||||
.dropdown-menu .disabled > a:hover {
|
||||
text-decoration: none;
|
||||
cursor: default;
|
||||
background-color: transparent;
|
||||
}
|
||||
.dropdown-menu li > a:hover,
|
||||
.dropdown-menu li > a:focus,
|
||||
.dropdown-menu .dropdown-submenu:hover > a {
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
background-color: #627aff;
|
||||
background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.dropdown-menu .active > a,
|
||||
.dropdown-menu .active > a:hover {
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
background-color: #627aff;
|
||||
background-image: linear-gradient(to bottom, #0088cc, #0077b3);
|
||||
background-repeat: repeat-x;
|
||||
outline: 0;
|
||||
}
|
||||
.dropdown-menu .disabled > a,
|
||||
.dropdown-menu .disabled > a:hover {
|
||||
color: #999999;
|
||||
}
|
||||
.dropdown-menu .open {
|
||||
*z-index: 1000;
|
||||
}
|
||||
.dropdown-menu .open > .dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
.dropdown-menu .pull-right > .dropdown-menu {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
.dropup .caret,
|
||||
.navbar-fixed-bottom .dropdown .caret {
|
||||
border-top: 0;
|
||||
border-bottom: 4px solid #000000;
|
||||
content: "\2191";
|
||||
}
|
||||
.dropup .dropdown-menu,
|
||||
.navbar-fixed-bottom .dropdown .dropdown-menu {
|
||||
top: auto;
|
||||
bottom: 100%;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
.dropdown-submenu {
|
||||
position: relative;
|
||||
}
|
||||
.dropdown-submenu > .dropdown-menu {
|
||||
top: 0;
|
||||
left: 100%;
|
||||
margin-top: -6px;
|
||||
margin-left: -1px;
|
||||
border-radius: 0 6px 6px 6px;
|
||||
}
|
||||
.dropdown-submenu > .dropdown-menu.drop-left {
|
||||
left: -100%;
|
||||
}
|
||||
.dropdown-submenu:hover .dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
.dropdown-submenu:hover > a:after {
|
||||
border-left-color: #ffffff;
|
||||
}
|
||||
.dropdown-submenu > a:after {
|
||||
display: block;
|
||||
float: right;
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin-top: 5px;
|
||||
margin-right: -10px;
|
||||
border-color: transparent;
|
||||
border-left-color: #cccccc;
|
||||
border-style: solid;
|
||||
border-width: 5px 0 5px 5px;
|
||||
content: " ";
|
||||
}
|
||||
.dropdown .dropdown-menu .nav-header {
|
||||
padding-right: 20px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
/**
|
||||
* Context Styles
|
||||
*/
|
||||
.dropdown-context .nav-header {
|
||||
cursor: default;
|
||||
}
|
||||
.dropdown-context .dropdown-submenu:hover .dropdown-menu {
|
||||
display: none;
|
||||
}
|
||||
.dropdown-context .dropdown-submenu:hover > .dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
.dropdown-context:before,
|
||||
.dropdown-context-up:before {
|
||||
position: absolute;
|
||||
top: -7px;
|
||||
left: 9px;
|
||||
display: inline-block;
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom: 7px solid #ccc;
|
||||
border-left: 7px solid transparent;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.2);
|
||||
content: '';
|
||||
}
|
||||
.dropdown-context:after,
|
||||
.dropdown-context-up:after {
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
left: 10px;
|
||||
display: inline-block;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid #ffffff;
|
||||
border-left: 6px solid transparent;
|
||||
content: '';
|
||||
}
|
||||
.dropdown-context-up:before,
|
||||
.dropdown-context-up:after {
|
||||
top: auto;
|
||||
bottom: -7px;
|
||||
z-index: 9999;
|
||||
}
|
||||
.dropdown-context-up:before {
|
||||
border-right: 7px solid transparent;
|
||||
border-top: 7px solid #ccc;
|
||||
border-bottom: none;
|
||||
border-left: 7px solid transparent;
|
||||
}
|
||||
.dropdown-context-up:after {
|
||||
border-right: 6px solid transparent;
|
||||
border-top: 6px solid #ffffff;
|
||||
border-left: 6px solid transparent;
|
||||
border-bottom: none;
|
||||
}
|
||||
.dropdown-context-sub:before,
|
||||
.dropdown-context-sub:after {
|
||||
display: none;
|
||||
}
|
||||
.compressed-context a {
|
||||
padding-left: 14px;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
.compressed-context .divider {
|
||||
margin: 5px 1px;
|
||||
}
|
||||
.compressed-context .nav-header {
|
||||
padding: 1px 13px;
|
||||
}
|
||||
|
||||
|
4608
public/css/fontawesome.css
vendored
4608
public/css/fontawesome.css
vendored
File diff suppressed because one or more lines are too long
@ -1 +1,54 @@
|
||||
.images-grid{margin:0 auto}.images-grid:after{clear:both;content:"";display:block}.grid-item,.grid-sizer{padding:8px;width:50%}.grid-item{float:left}.grid-item>div{transition:all .3s}.grid-item>div:hover{box-shadow:15.8px 21.3px 83.8px rgba(0,0,0,.07),102px 137px 196px rgba(0,0,0,.035);margin-top:-5px}@media screen and (min-width:640px){.grid-item,.grid-sizer{width:33.333%}}@media screen and (min-width:768px){.grid-item,.grid-sizer{width:25%}}@media screen and (min-width:1024px){.grid-item,.grid-sizer{width:20%}}@media screen and (min-width:1280px){.grid-item,.grid-sizer{width:12.5%}}@media screen and (min-width:1536px){.grid-item,.grid-sizer{width:10%}}
|
||||
.images-grid {
|
||||
margin: 0 auto;
|
||||
}
|
||||
.images-grid:after {
|
||||
content: '';
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
.grid-sizer,
|
||||
.grid-item {
|
||||
padding: 8px;
|
||||
width: calc(50%);
|
||||
}
|
||||
.grid-item {
|
||||
float: left;
|
||||
}
|
||||
.grid-item > div {
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.grid-item > div:hover {
|
||||
margin-top: -5px;
|
||||
box-shadow: 15.8px 21.3px 83.8px rgba(0, 0, 0, 0.07), 102px 137px 196px rgba(0, 0, 0, 0.035);
|
||||
}
|
||||
@media screen and (min-width: 640px) {
|
||||
.grid-sizer,
|
||||
.grid-item {
|
||||
width: calc(33.333%);
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 768px) {
|
||||
.grid-sizer,
|
||||
.grid-item {
|
||||
width: calc(25%);
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 1024px) {
|
||||
.grid-sizer,
|
||||
.grid-item {
|
||||
width: calc(20%);
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 1280px) {
|
||||
.grid-sizer,
|
||||
.grid-item {
|
||||
width: calc(12.5%);
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 1536px) {
|
||||
.grid-sizer,
|
||||
.grid-item {
|
||||
width: calc(10%);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,4 +3,108 @@
|
||||
* http://miromannino.github.io/Justified-Gallery/
|
||||
* Copyright (c) 2020 Miro Mannino
|
||||
* Licensed under the MIT license.
|
||||
*/.justified-gallery{width:100%;position:relative;overflow:hidden}.justified-gallery>a,.justified-gallery>div,.justified-gallery>figure{position:absolute;display:inline-block;overflow:hidden;filter:"alpha(opacity=10)";opacity:.1;margin:0;padding:0}.justified-gallery>a>a>img,.justified-gallery>a>a>svg,.justified-gallery>a>img,.justified-gallery>a>svg,.justified-gallery>div>a>img,.justified-gallery>div>a>svg,.justified-gallery>div>img,.justified-gallery>div>svg,.justified-gallery>figure>a>img,.justified-gallery>figure>a>svg,.justified-gallery>figure>img,.justified-gallery>figure>svg{position:absolute;top:50%;left:50%;margin:0;padding:0;border:none;filter:"alpha(opacity=0)";opacity:0}.justified-gallery>a>.jg-caption,.justified-gallery>div>.jg-caption,.justified-gallery>figure>.jg-caption{display:none;position:absolute;bottom:0;padding:5px;background-color:#000;left:0;right:0;margin:0;color:#fff;font-size:12px;font-weight:300;font-family:sans-serif}.justified-gallery>a>.jg-caption.jg-caption-visible,.justified-gallery>div>.jg-caption.jg-caption-visible,.justified-gallery>figure>.jg-caption.jg-caption-visible{display:initial;filter:"alpha(opacity=70)";opacity:.7;-webkit-transition:opacity .5s ease-in;-moz-transition:opacity .5s ease-in;-o-transition:opacity .5s ease-in;transition:opacity .5s ease-in}.justified-gallery>.jg-entry-visible{filter:"alpha(opacity=100)";opacity:1;background:0 0}.justified-gallery>.jg-entry-visible>a>img,.justified-gallery>.jg-entry-visible>a>svg,.justified-gallery>.jg-entry-visible>img,.justified-gallery>.jg-entry-visible>svg{filter:"alpha(opacity=100)";opacity:1;-webkit-transition:opacity .5s ease-in;-moz-transition:opacity .5s ease-in;-o-transition:opacity .5s ease-in;transition:opacity .5s ease-in}.justified-gallery>.jg-filtered{display:none}.justified-gallery>.jg-spinner{position:absolute;bottom:0;margin-left:-24px;padding:10px 0 10px 0;left:50%;filter:"alpha(opacity=100)";opacity:1;overflow:initial}.justified-gallery>.jg-spinner>span{display:inline-block;filter:"alpha(opacity=0)";opacity:0;width:8px;height:8px;margin:0 4px 0 4px;background-color:#000;border-radius:6px}
|
||||
*/
|
||||
.justified-gallery {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.justified-gallery > a,
|
||||
.justified-gallery > div,
|
||||
.justified-gallery > figure {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
/* background: #888888; To have gray placeholders while the gallery is loading with waitThumbnailsLoad = false */
|
||||
filter: "alpha(opacity=10)";
|
||||
opacity: 0.1;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.justified-gallery > a > img,
|
||||
.justified-gallery > div > img,
|
||||
.justified-gallery > figure > img,
|
||||
.justified-gallery > a > a > img,
|
||||
.justified-gallery > div > a > img,
|
||||
.justified-gallery > figure > a > img,
|
||||
.justified-gallery > a > svg,
|
||||
.justified-gallery > div > svg,
|
||||
.justified-gallery > figure > svg,
|
||||
.justified-gallery > a > a > svg,
|
||||
.justified-gallery > div > a > svg,
|
||||
.justified-gallery > figure > a > svg {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
filter: "alpha(opacity=0)";
|
||||
opacity: 0;
|
||||
}
|
||||
.justified-gallery > a > .jg-caption,
|
||||
.justified-gallery > div > .jg-caption,
|
||||
.justified-gallery > figure > .jg-caption {
|
||||
display: none;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
padding: 5px;
|
||||
background-color: #000000;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: 0;
|
||||
color: white;
|
||||
font-size: 12px;
|
||||
font-weight: 300;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
.justified-gallery > a > .jg-caption.jg-caption-visible,
|
||||
.justified-gallery > div > .jg-caption.jg-caption-visible,
|
||||
.justified-gallery > figure > .jg-caption.jg-caption-visible {
|
||||
display: initial;
|
||||
filter: "alpha(opacity=70)";
|
||||
opacity: 0.7;
|
||||
-webkit-transition: opacity 500ms ease-in;
|
||||
-moz-transition: opacity 500ms ease-in;
|
||||
-o-transition: opacity 500ms ease-in;
|
||||
transition: opacity 500ms ease-in;
|
||||
}
|
||||
.justified-gallery > .jg-entry-visible {
|
||||
filter: "alpha(opacity=100)";
|
||||
opacity: 1;
|
||||
background: none;
|
||||
}
|
||||
.justified-gallery > .jg-entry-visible > img,
|
||||
.justified-gallery > .jg-entry-visible > a > img,
|
||||
.justified-gallery > .jg-entry-visible > svg,
|
||||
.justified-gallery > .jg-entry-visible > a > svg {
|
||||
filter: "alpha(opacity=100)";
|
||||
opacity: 1;
|
||||
-webkit-transition: opacity 500ms ease-in;
|
||||
-moz-transition: opacity 500ms ease-in;
|
||||
-o-transition: opacity 500ms ease-in;
|
||||
transition: opacity 500ms ease-in;
|
||||
}
|
||||
.justified-gallery > .jg-filtered {
|
||||
display: none;
|
||||
}
|
||||
.justified-gallery > .jg-spinner {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
margin-left: -24px;
|
||||
padding: 10px 0 10px 0;
|
||||
left: 50%;
|
||||
filter: "alpha(opacity=100)";
|
||||
opacity: 1;
|
||||
overflow: initial;
|
||||
}
|
||||
.justified-gallery > .jg-spinner > span {
|
||||
display: inline-block;
|
||||
filter: "alpha(opacity=0)";
|
||||
opacity: 0;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin: 0 4px 0 4px;
|
||||
background-color: #000;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
2
public/css/viewer-js/viewer.min.css
vendored
2
public/css/viewer-js/viewer.min.css
vendored
File diff suppressed because one or more lines are too long
38370
public/js/app.js
38370
public/js/app.js
File diff suppressed because one or more lines are too long
1605
public/js/blueimp-file-upload/jquery.fileupload.js
vendored
1605
public/js/blueimp-file-upload/jquery.fileupload.js
vendored
File diff suppressed because one or more lines are too long
@ -1 +1,227 @@
|
||||
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery)}((function(e){"use strict";var t=0,r=e,n="parseJSON";"JSON"in window&&"parse"in JSON&&(r=JSON,n="parse"),e.ajaxTransport("iframe",(function(r){if(r.async){var n,a,o,i=r.initialIframeSrc||"javascript:false;";return{send:function(p,f){(n=e('<form style="display:none;"></form>')).attr("accept-charset",r.formAcceptCharset),o=/\?/.test(r.url)?"&":"?","DELETE"===r.type?(r.url=r.url+o+"_method=DELETE",r.type="POST"):"PUT"===r.type?(r.url=r.url+o+"_method=PUT",r.type="POST"):"PATCH"===r.type&&(r.url=r.url+o+"_method=PATCH",r.type="POST"),a=e('<iframe src="'+i+'" name="iframe-transport-'+(t+=1)+'"></iframe>').on("load",(function(){var t,o=e.isArray(r.paramName)?r.paramName:[r.paramName];a.off("load").on("load",(function(){var t;try{if(!(t=a.contents()).length||!t[0].firstChild)throw new Error}catch(e){t=void 0}f(200,"success",{iframe:t}),e('<iframe src="'+i+'"></iframe>').appendTo(n),window.setTimeout((function(){n.remove()}),0)})),n.prop("target",a.prop("name")).prop("action",r.url).prop("method",r.type),r.formData&&e.each(r.formData,(function(t,r){e('<input type="hidden"/>').prop("name",r.name).val(r.value).appendTo(n)})),r.fileInput&&r.fileInput.length&&"POST"===r.type&&(t=r.fileInput.clone(),r.fileInput.after((function(e){return t[e]})),r.paramName&&r.fileInput.each((function(t){e(this).prop("name",o[t]||r.paramName)})),n.append(r.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data"),r.fileInput.removeAttr("form")),window.setTimeout((function(){n.submit(),t&&t.length&&r.fileInput.each((function(r,n){var a=e(t[r]);e(n).prop("name",a.prop("name")).attr("form",a.attr("form")),a.replaceWith(n)}))}),0)})),n.append(a).appendTo(document.body)},abort:function(){a&&a.off("load").prop("src",i),n&&n.remove()}}}})),e.ajaxSetup({converters:{"iframe text":function(t){return t&&e(t[0].body).text()},"iframe json":function(t){return t&&r[n](e(t[0].body).text())},"iframe html":function(t){return t&&e(t[0].body).html()},"iframe xml":function(t){var r=t&&t[0];return r&&e.isXMLDoc(r)?r:e.parseXML(r.XMLDocument&&r.XMLDocument.xml||e(r.body).html())},"iframe script":function(t){return t&&e.globalEval(e(t[0].body).text())}}})}));
|
||||
/*
|
||||
* jQuery Iframe Transport Plugin
|
||||
* https://github.com/blueimp/jQuery-File-Upload
|
||||
*
|
||||
* Copyright 2011, Sebastian Tschan
|
||||
* https://blueimp.net
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
/* global define, require */
|
||||
|
||||
(function (factory) {
|
||||
'use strict';
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// Register as an anonymous AMD module:
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
// Node/CommonJS:
|
||||
factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals:
|
||||
factory(window.jQuery);
|
||||
}
|
||||
})(function ($) {
|
||||
'use strict';
|
||||
|
||||
// Helper variable to create unique names for the transport iframes:
|
||||
var counter = 0,
|
||||
jsonAPI = $,
|
||||
jsonParse = 'parseJSON';
|
||||
|
||||
if ('JSON' in window && 'parse' in JSON) {
|
||||
jsonAPI = JSON;
|
||||
jsonParse = 'parse';
|
||||
}
|
||||
|
||||
// The iframe transport accepts four additional options:
|
||||
// options.fileInput: a jQuery collection of file input fields
|
||||
// options.paramName: the parameter name for the file form data,
|
||||
// overrides the name property of the file input field(s),
|
||||
// can be a string or an array of strings.
|
||||
// options.formData: an array of objects with name and value properties,
|
||||
// equivalent to the return data of .serializeArray(), e.g.:
|
||||
// [{name: 'a', value: 1}, {name: 'b', value: 2}]
|
||||
// options.initialIframeSrc: the URL of the initial iframe src,
|
||||
// by default set to "javascript:false;"
|
||||
$.ajaxTransport('iframe', function (options) {
|
||||
if (options.async) {
|
||||
// javascript:false as initial iframe src
|
||||
// prevents warning popups on HTTPS in IE6:
|
||||
// eslint-disable-next-line no-script-url
|
||||
var initialIframeSrc = options.initialIframeSrc || 'javascript:false;',
|
||||
form,
|
||||
iframe,
|
||||
addParamChar;
|
||||
return {
|
||||
send: function (_, completeCallback) {
|
||||
form = $('<form style="display:none;"></form>');
|
||||
form.attr('accept-charset', options.formAcceptCharset);
|
||||
addParamChar = /\?/.test(options.url) ? '&' : '?';
|
||||
// XDomainRequest only supports GET and POST:
|
||||
if (options.type === 'DELETE') {
|
||||
options.url = options.url + addParamChar + '_method=DELETE';
|
||||
options.type = 'POST';
|
||||
} else if (options.type === 'PUT') {
|
||||
options.url = options.url + addParamChar + '_method=PUT';
|
||||
options.type = 'POST';
|
||||
} else if (options.type === 'PATCH') {
|
||||
options.url = options.url + addParamChar + '_method=PATCH';
|
||||
options.type = 'POST';
|
||||
}
|
||||
// IE versions below IE8 cannot set the name property of
|
||||
// elements that have already been added to the DOM,
|
||||
// so we set the name along with the iframe HTML markup:
|
||||
counter += 1;
|
||||
iframe = $(
|
||||
'<iframe src="' +
|
||||
initialIframeSrc +
|
||||
'" name="iframe-transport-' +
|
||||
counter +
|
||||
'"></iframe>'
|
||||
).on('load', function () {
|
||||
var fileInputClones,
|
||||
paramNames = $.isArray(options.paramName)
|
||||
? options.paramName
|
||||
: [options.paramName];
|
||||
iframe.off('load').on('load', function () {
|
||||
var response;
|
||||
// Wrap in a try/catch block to catch exceptions thrown
|
||||
// when trying to access cross-domain iframe contents:
|
||||
try {
|
||||
response = iframe.contents();
|
||||
// Google Chrome and Firefox do not throw an
|
||||
// exception when calling iframe.contents() on
|
||||
// cross-domain requests, so we unify the response:
|
||||
if (!response.length || !response[0].firstChild) {
|
||||
throw new Error();
|
||||
}
|
||||
} catch (e) {
|
||||
response = undefined;
|
||||
}
|
||||
// The complete callback returns the
|
||||
// iframe content document as response object:
|
||||
completeCallback(200, 'success', { iframe: response });
|
||||
// Fix for IE endless progress bar activity bug
|
||||
// (happens on form submits to iframe targets):
|
||||
$('<iframe src="' + initialIframeSrc + '"></iframe>').appendTo(
|
||||
form
|
||||
);
|
||||
window.setTimeout(function () {
|
||||
// Removing the form in a setTimeout call
|
||||
// allows Chrome's developer tools to display
|
||||
// the response result
|
||||
form.remove();
|
||||
}, 0);
|
||||
});
|
||||
form
|
||||
.prop('target', iframe.prop('name'))
|
||||
.prop('action', options.url)
|
||||
.prop('method', options.type);
|
||||
if (options.formData) {
|
||||
$.each(options.formData, function (index, field) {
|
||||
$('<input type="hidden"/>')
|
||||
.prop('name', field.name)
|
||||
.val(field.value)
|
||||
.appendTo(form);
|
||||
});
|
||||
}
|
||||
if (
|
||||
options.fileInput &&
|
||||
options.fileInput.length &&
|
||||
options.type === 'POST'
|
||||
) {
|
||||
fileInputClones = options.fileInput.clone();
|
||||
// Insert a clone for each file input field:
|
||||
options.fileInput.after(function (index) {
|
||||
return fileInputClones[index];
|
||||
});
|
||||
if (options.paramName) {
|
||||
options.fileInput.each(function (index) {
|
||||
$(this).prop('name', paramNames[index] || options.paramName);
|
||||
});
|
||||
}
|
||||
// Appending the file input fields to the hidden form
|
||||
// removes them from their original location:
|
||||
form
|
||||
.append(options.fileInput)
|
||||
.prop('enctype', 'multipart/form-data')
|
||||
// enctype must be set as encoding for IE:
|
||||
.prop('encoding', 'multipart/form-data');
|
||||
// Remove the HTML5 form attribute from the input(s):
|
||||
options.fileInput.removeAttr('form');
|
||||
}
|
||||
window.setTimeout(function () {
|
||||
// Submitting the form in a setTimeout call fixes an issue with
|
||||
// Safari 13 not triggering the iframe load event after resetting
|
||||
// the load event handler, see also:
|
||||
// https://github.com/blueimp/jQuery-File-Upload/issues/3633
|
||||
form.submit();
|
||||
// Insert the file input fields at their original location
|
||||
// by replacing the clones with the originals:
|
||||
if (fileInputClones && fileInputClones.length) {
|
||||
options.fileInput.each(function (index, input) {
|
||||
var clone = $(fileInputClones[index]);
|
||||
// Restore the original name and form properties:
|
||||
$(input)
|
||||
.prop('name', clone.prop('name'))
|
||||
.attr('form', clone.attr('form'));
|
||||
clone.replaceWith(input);
|
||||
});
|
||||
}
|
||||
}, 0);
|
||||
});
|
||||
form.append(iframe).appendTo(document.body);
|
||||
},
|
||||
abort: function () {
|
||||
if (iframe) {
|
||||
// javascript:false as iframe src aborts the request
|
||||
// and prevents warning popups on HTTPS in IE6.
|
||||
iframe.off('load').prop('src', initialIframeSrc);
|
||||
}
|
||||
if (form) {
|
||||
form.remove();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// The iframe transport returns the iframe content document as response.
|
||||
// The following adds converters from iframe to text, json, html, xml
|
||||
// and script.
|
||||
// Please note that the Content-Type for JSON responses has to be text/plain
|
||||
// or text/html, if the browser doesn't include application/json in the
|
||||
// Accept header, else IE will show a download dialog.
|
||||
// The Content-Type for XML responses on the other hand has to be always
|
||||
// application/xml or text/xml, so IE properly parses the XML response.
|
||||
// See also
|
||||
// https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation
|
||||
$.ajaxSetup({
|
||||
converters: {
|
||||
'iframe text': function (iframe) {
|
||||
return iframe && $(iframe[0].body).text();
|
||||
},
|
||||
'iframe json': function (iframe) {
|
||||
return iframe && jsonAPI[jsonParse]($(iframe[0].body).text());
|
||||
},
|
||||
'iframe html': function (iframe) {
|
||||
return iframe && $(iframe[0].body).html();
|
||||
},
|
||||
'iframe xml': function (iframe) {
|
||||
var xmlDoc = iframe && iframe[0];
|
||||
return xmlDoc && $.isXMLDoc(xmlDoc)
|
||||
? xmlDoc
|
||||
: $.parseXML(
|
||||
(xmlDoc.XMLDocument && xmlDoc.XMLDocument.xml) ||
|
||||
$(xmlDoc.body).html()
|
||||
);
|
||||
},
|
||||
'iframe script': function (iframe) {
|
||||
return iframe && $.globalEval($(iframe[0].body).text());
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
806
public/js/blueimp-file-upload/jquery.ui.widget.js
vendored
806
public/js/blueimp-file-upload/jquery.ui.widget.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
public/js/clipboard/clipboard.min.js
vendored
8
public/js/clipboard/clipboard.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1 +1,2 @@
|
||||
/* copy-image-clipboard 2.1.2 - Licensed MIT @ Luan Eduardo da Costa */
|
||||
var CopyImageClipboard=function(n){"use strict";function t(n,t,o,e){return new(o||(o=Promise))((function(i,r){function c(n){try{a(e.next(n))}catch(n){r(n)}}function u(n){try{a(e.throw(n))}catch(n){r(n)}}function a(n){var t;n.done?i(n.value):(t=n.value,t instanceof o?t:new o((function(n){n(t)}))).then(c,u)}a((e=e.apply(n,t||[])).next())}))}function o(n){return t(this,void 0,void 0,(function*(){const t=yield fetch(`${n}`);return yield t.blob()}))}function e(n){return n.type.includes("jpeg")}function i(n){return n.type.includes("png")}function r(n){return t(this,void 0,void 0,(function*(){return new Promise((function(t,o){const e=document.createElement("img");e.crossOrigin="anonymous",e.src=n,e.onload=function(n){const o=n.target;t(o)},e.onabort=o,e.onerror=o}))}))}function c(n){return t(this,void 0,void 0,(function*(){return new Promise((function(t,o){const e=document.createElement("canvas"),i=e.getContext("2d");if(i){const{width:r,height:c}=n;e.width=r,e.height=c,i.drawImage(n,0,0,r,c),e.toBlob((function(n){n?t(n):o("Cannot get blob from image element")}),"image/png",1)}}))}))}function u(n){return t(this,void 0,void 0,(function*(){const t=URL.createObjectURL(n),o=yield r(t);return yield c(o)}))}function a(n){return t(this,void 0,void 0,(function*(){const t={[n.type]:n},o=new ClipboardItem(t);yield navigator.clipboard.write([o])}))}return n.canCopyImagesToClipboard=function(){var n;const t="undefined"!=typeof fetch,o="undefined"!=typeof ClipboardItem,e=!!(null===(n=null===navigator||void 0===navigator?void 0:navigator.clipboard)||void 0===n?void 0:n.write);return t&&o&&e},n.convertBlobToPng=u,n.copyBlobToClipboard=a,n.copyImageToClipboard=function(n){return t(this,void 0,void 0,(function*(){const t=yield o(n);if(e(t)){const n=yield u(t);return yield a(n),t}if(i(t))return yield a(t),t;throw new Error("Cannot copy this type of image to clipboard")}))},n.createImageElement=r,n.getBlobFromImageElement=c,n.getBlobFromImageSource=o,n.isJpegBlob=e,n.isPngBlob=i,n.requestClipboardWritePermission=function(){var n;return t(this,void 0,void 0,(function*(){if(!(null===(n=null===navigator||void 0===navigator?void 0:navigator.permissions)||void 0===n?void 0:n.query))return!1;const{state:t}=yield navigator.permissions.query({name:"clipboard-write"});return"granted"===t}))},Object.defineProperty(n,"__esModule",{value:!0}),n}({});
|
||||
|
@ -1 +1,185 @@
|
||||
window.context=window.context||function(){let e={fadeSpeed:100,filter:function(e){},above:"auto",preventDoubleContext:!0,compress:!1};function t(o,n,d,i){let a=i?" dropdown-context-sub":"",s=e.compress?" compressed-context":"",f=$('<ul class="dropdown-menu dropdown-context'+a+s+'" id="dropdown-'+d+'"></ul>'),l=0,r="";for(;l<n.length;l++){if(void 0!==n[l].divider)f.append('<li class="divider"></li>');else if(void 0!==n[l].header)f.append('<li class="nav-header">'+n[l].header+"</li>");else{let e;void 0===n[l].href&&(n[l].href="javascript:void(0)"),void 0!==n[l].target&&(r=' target="'+n[l].target+'"'),e=void 0!==n[l].subMenu?$('<li class="dropdown-submenu"><a tabindex="-1" href="'+n[l].href+'">'+n[l].text+"</a></li>"):$('<li><a tabindex="-1" href="'+n[l].href+'"'+r+">"+n[l].text+"</a></li>"),"function"==typeof n[l].visible&&(n[l].visible(o)||e.hide());let i=e.find("a");if(void 0!==n[l].classes)for(const e in n[l].classes)i.addClass(n[l].classes[e]);if(void 0!==n[l].attributes)for(const e in n[l].attributes)i.attr(e,n[l].attributes[e]);if(void 0!==n[l].action){let e="event-"+(new Date).getTime()*Math.floor(1e5*Math.random()),t=n[l].action;i.attr("id",e),$("#"+e).addClass("context-event"),$(document).on("click","#"+e,(function(){t.call(this,o)}))}if(f.append(e),void 0!==n[l].subMenu){let e=t(o,n[l].subMenu,d,!0);f.find("li:last").append(e)}}"function"==typeof e.filter&&e.filter(f.find("li:last"))}return f}return{init:function(t){e=$.extend({},e,t),$(document).on("click","html",(function(){$(".dropdown-context").fadeOut(e.fadeSpeed,(function(){$(".dropdown-context").css({display:""}).find(".drop-left").removeClass("drop-left")}))})),e.preventDoubleContext&&$(document).on("contextmenu",".dropdown-context",(function(e){e.preventDefault()})),$(document).on("mouseenter",".dropdown-submenu",(function(){let e=$(this).find(".dropdown-context-sub:first");e.width()+e.offset().left>window.innerWidth&&e.addClass("drop-left")}))},settings:function(t){e=$.extend({},e,t)},attach:function(o,n){let d=(n=n||{}).data||{},i=(new Date).getTime();$(document).on("contextmenu",o,(function(a){a.preventDefault(),a.stopPropagation();let s=a.target.closest(o);"function"==typeof n.beforeOpen&&n.beforeOpen.call(a,s);let f=t(s,d,i);$("body .dropdown-menu.dropdown-context").remove(),$("body").append(f),$(".dropdown-context:not(.dropdown-context-sub)").hide();let l=$("#dropdown-"+i);if("boolean"==typeof e.above&&e.above)l.addClass("dropdown-context-up").css({top:a.pageY-20-$("#dropdown-"+i).height(),left:a.pageX-13}).fadeIn(e.fadeSpeed);else if("string"==typeof e.above&&"auto"===e.above){l.removeClass("dropdown-context-up");let t=l.height()+12;a.pageY+t>$("html").height()?l.addClass("dropdown-context-up").css({top:a.pageY-20-t,left:a.pageX-13}).fadeIn(e.fadeSpeed):l.css({top:a.pageY+10,left:a.pageX-13}).fadeIn(e.fadeSpeed)}"function"==typeof n.afterOpen&&n.afterOpen.call(a,s,l.get(0))}))},destroy:function(e){$(document).off("contextmenu",e).off("click",".context-event")}}}();
|
||||
/*
|
||||
* Context.js
|
||||
* Copyright Jacob Kelley, Modified by WispX
|
||||
* MIT License
|
||||
*/
|
||||
window.context = window.context || (function () {
|
||||
|
||||
let options = {
|
||||
fadeSpeed: 100,
|
||||
filter: function ($obj) {
|
||||
// Modify $obj, Do not return
|
||||
},
|
||||
above: 'auto',
|
||||
preventDoubleContext: true,
|
||||
compress: false
|
||||
};
|
||||
|
||||
function initialize(opts) {
|
||||
|
||||
options = $.extend({}, options, opts);
|
||||
|
||||
$(document).on('click', 'html', function () {
|
||||
$('.dropdown-context').fadeOut(options.fadeSpeed, function () {
|
||||
$('.dropdown-context').css({display: ''}).find('.drop-left').removeClass('drop-left');
|
||||
});
|
||||
});
|
||||
if (options.preventDoubleContext) {
|
||||
$(document).on('contextmenu', '.dropdown-context', function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
$(document).on('mouseenter', '.dropdown-submenu', function () {
|
||||
let $sub = $(this).find('.dropdown-context-sub:first'),
|
||||
subWidth = $sub.width(),
|
||||
subLeft = $sub.offset().left,
|
||||
collision = (subWidth + subLeft) > window.innerWidth;
|
||||
if (collision) {
|
||||
$sub.addClass('drop-left');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function updateOptions(opts) {
|
||||
options = $.extend({}, options, opts);
|
||||
}
|
||||
|
||||
function buildMenu(event, data, id, subMenu) {
|
||||
let subClass = (subMenu) ? ' dropdown-context-sub' : '',
|
||||
compressed = options.compress ? ' compressed-context' : '',
|
||||
$menu = $('<ul class="dropdown-menu dropdown-context' + subClass + compressed + '" id="dropdown-' + id + '"></ul>');
|
||||
let i = 0, linkTarget = '';
|
||||
for (i; i < data.length; i++) {
|
||||
if (typeof data[i].divider !== 'undefined') {
|
||||
$menu.append('<li class="divider"></li>');
|
||||
} else if (typeof data[i].header !== 'undefined') {
|
||||
$menu.append('<li class="nav-header">' + data[i].header + '</li>');
|
||||
} else {
|
||||
if (typeof data[i].href == 'undefined') {
|
||||
data[i].href = 'javascript:void(0)';
|
||||
}
|
||||
if (typeof data[i].target !== 'undefined') {
|
||||
linkTarget = ' target="' + data[i].target + '"';
|
||||
}
|
||||
let $sub;
|
||||
if (typeof data[i].subMenu !== 'undefined') {
|
||||
$sub = $('<li class="dropdown-submenu"><a tabindex="-1" href="' + data[i].href + '">' + data[i].text + '</a></li>');
|
||||
} else {
|
||||
$sub = $('<li><a tabindex="-1" href="' + data[i].href + '"' + linkTarget + '>' + data[i].text + '</a></li>');
|
||||
}
|
||||
// show or hide?
|
||||
if (typeof data[i].visible === 'function') {
|
||||
if (! data[i].visible(event)) {
|
||||
$sub.hide();
|
||||
}
|
||||
}
|
||||
let $a = $sub.find('a');
|
||||
// custom classes
|
||||
if (typeof data[i].classes !== 'undefined') {
|
||||
for (const classKey in data[i].classes) {
|
||||
$a.addClass(data[i].classes[classKey]);
|
||||
}
|
||||
}
|
||||
// custom attributes
|
||||
if (typeof data[i].attributes !== 'undefined') {
|
||||
for (const attributesKey in data[i].attributes) {
|
||||
$a.attr(attributesKey, data[i].attributes[attributesKey]);
|
||||
}
|
||||
}
|
||||
// click callback
|
||||
if (typeof data[i].action !== 'undefined') {
|
||||
let actionID = 'event-' + new Date().getTime() * Math.floor(Math.random() * 100000),
|
||||
eventAction = data[i].action;
|
||||
$a.attr('id', actionID);
|
||||
$('#' + actionID).addClass('context-event');
|
||||
$(document).on('click', '#' + actionID, function () {
|
||||
eventAction.call(this, event);
|
||||
});
|
||||
}
|
||||
$menu.append($sub);
|
||||
if (typeof data[i].subMenu != 'undefined') {
|
||||
let subMenuData = buildMenu(event, data[i].subMenu, id, true);
|
||||
$menu.find('li:last').append(subMenuData);
|
||||
}
|
||||
}
|
||||
if (typeof options.filter == 'function') {
|
||||
options.filter($menu.find('li:last'));
|
||||
}
|
||||
}
|
||||
return $menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加菜单
|
||||
* @param selector 被右击元素
|
||||
* @param opts 参数 {
|
||||
* data: Array[Object] {
|
||||
* text: String, // 文本
|
||||
* classes: Array, // class
|
||||
* attributes: Object, // 属性
|
||||
* action: Function, // 点击后的回调 function (e) {}
|
||||
* visible: Function, // 函数返回bool类型,表示显示或隐藏按钮 function (e) {}
|
||||
* }
|
||||
* beforeOpen: Function, // 打开前 function (item) {}
|
||||
* afterOpen: Function, // 打开后 function (item, dropdown) {}
|
||||
* }
|
||||
*/
|
||||
function addContext(selector, opts) {
|
||||
opts = opts || {};
|
||||
let data = opts.data || {};
|
||||
let id = new Date().getTime();
|
||||
|
||||
$(document).on('contextmenu', selector, function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
let item = e.target.closest(selector);
|
||||
typeof opts.beforeOpen === 'function' && opts.beforeOpen.call(e, item);
|
||||
|
||||
let $menu = buildMenu(item, data, id);
|
||||
// clear dropdowns
|
||||
$('body .dropdown-menu.dropdown-context').remove();
|
||||
// create dropdown
|
||||
$('body').append($menu);
|
||||
|
||||
$('.dropdown-context:not(.dropdown-context-sub)').hide();
|
||||
|
||||
let $dd = $("#dropdown-" + id);
|
||||
|
||||
if (typeof options.above == 'boolean' && options.above) {
|
||||
$dd.addClass('dropdown-context-up').css({
|
||||
top: e.pageY - 20 - $('#dropdown-' + id).height(),
|
||||
left: e.pageX - 13
|
||||
}).fadeIn(options.fadeSpeed);
|
||||
} else if (typeof options.above == 'string' && options.above === 'auto') {
|
||||
$dd.removeClass('dropdown-context-up');
|
||||
let autoH = $dd.height() + 12;
|
||||
if ((e.pageY + autoH) > $('html').height()) {
|
||||
$dd.addClass('dropdown-context-up').css({
|
||||
top: e.pageY - 20 - autoH,
|
||||
left: e.pageX - 13
|
||||
}).fadeIn(options.fadeSpeed);
|
||||
} else {
|
||||
$dd.css({
|
||||
top: e.pageY + 10,
|
||||
left: e.pageX - 13
|
||||
}).fadeIn(options.fadeSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
typeof opts.afterOpen === 'function' && opts.afterOpen.call(e, item, $dd.get(0));
|
||||
});
|
||||
}
|
||||
|
||||
function destroyContext(selector) {
|
||||
$(document).off('contextmenu', selector).off('click', '.context-event');
|
||||
}
|
||||
|
||||
return {
|
||||
init: initialize,
|
||||
settings: updateOptions,
|
||||
attach: addContext,
|
||||
destroy: destroyContext
|
||||
};
|
||||
})();
|
||||
|
2
public/js/dragselect/ds.min.js
vendored
2
public/js/dragselect/ds.min.js
vendored
File diff suppressed because one or more lines are too long
46
public/js/echarts/echarts.min.js
vendored
46
public/js/echarts/echarts.min.js
vendored
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
10
public/js/masonry/masonry.pkgd.min.js
vendored
10
public/js/masonry/masonry.pkgd.min.js
vendored
File diff suppressed because one or more lines are too long
11
public/js/viewer-js/viewer.min.js
vendored
11
public/js/viewer-js/viewer.min.js
vendored
File diff suppressed because one or more lines are too long
@ -125,6 +125,12 @@
|
||||
<dt class="text-sm font-medium text-gray-500">软件版本</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{ \App\Utils::config(\App\Enums\ConfigKey::AppVersion) }}</dd>
|
||||
</div>
|
||||
<div class="bg-white px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
||||
<dt class="text-sm font-medium text-gray-500">官方网站</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
<a target="_blank" class="hover:text-blue-500" href="https://www.lsky.pro">https://www.lsky.pro</a>
|
||||
</dd>
|
||||
</div>
|
||||
<div class="bg-white px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
||||
<dt class="text-sm font-medium text-gray-500">使用手册</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
|
@ -153,6 +153,10 @@
|
||||
<label for="configs[image_cache_ttl]" class="block text-sm font-medium text-gray-700">图片缓存时间(秒)</label>
|
||||
<x-input type="number" name="configs[image_cache_ttl]" id="configs[image_cache_ttl]" autocomplete="image_cache_ttl" placeholder="请输入受保护图片的缓存时间,不填或填0表示不缓存" value="{{ $group->configs['image_cache_ttl'] }}" />
|
||||
</div>
|
||||
|
||||
<a href="javascript:void(0)" id="clear-cache" class="text-sm text-red-500">
|
||||
<i class="fas fa-trash text-xs"></i> <span>清除缓存</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div data-tab="watermark" class="hidden grid grid-cols-6 gap-6">
|
||||
@ -290,6 +294,20 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#clear-cache').click(function () {
|
||||
if ($(this).hasClass('text-red-100')) return;
|
||||
|
||||
$(this).removeClass('text-red-400').addClass('text-red-300').find('span').text('清除中...');
|
||||
axios.delete('{{ route('admin.group.cache.clear', ['id' => $group->id]) }}').then(response => {
|
||||
$(this).removeClass('text-red-300').addClass('text-red-400').find('span').text('清除缓存');
|
||||
if (response.data.status) {
|
||||
toastr.success(response.data.message);
|
||||
} else {
|
||||
toastr.error(response.data.message);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
@ -83,6 +83,7 @@ Route::group(['prefix' => 'admin', 'middleware' => ['auth.admin']], function ()
|
||||
Route::get('{id}', [AdminGroupController::class, 'edit'])->name('admin.group.edit');
|
||||
Route::put('{id}', [AdminGroupController::class, 'update'])->name('admin.group.update');
|
||||
Route::delete('{id}', [AdminGroupController::class, 'delete'])->name('admin.group.delete');
|
||||
Route::delete('{id}/clear-cache', [AdminGroupController::class, 'clearCache'])->name('admin.group.cache.clear');
|
||||
});
|
||||
|
||||
Route::group(['prefix' => 'strategies'], function () {
|
||||
|
Loading…
Reference in New Issue
Block a user