fix a bug
This commit is contained in:
@@ -94,10 +94,6 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||||||
|
|
||||||
protected static function booted()
|
protected static function booted()
|
||||||
{
|
{
|
||||||
static::retrieved(function (self $user) {
|
|
||||||
$user->use_capacity = $user->images()->sum('size');
|
|
||||||
});
|
|
||||||
|
|
||||||
static::creating(function (self $user) {
|
static::creating(function (self $user) {
|
||||||
// 默认组
|
// 默认组
|
||||||
$user->group_id = Group::query()->where('is_default', true)->value('id');
|
$user->group_id = Group::query()->where('is_default', true)->value('id');
|
||||||
@@ -112,6 +108,11 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||||||
return new Attribute(fn () => Utils::getAvatar($this->email));
|
return new Attribute(fn () => Utils::getAvatar($this->email));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function useCapacity(): Attribute
|
||||||
|
{
|
||||||
|
return new Attribute(fn () => $this->images()->sum('size'));
|
||||||
|
}
|
||||||
|
|
||||||
public function group(): BelongsTo
|
public function group(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Group::class, 'group_id', 'id');
|
return $this->belongsTo(Group::class, 'group_id', 'id');
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
1
public/css/markdown-css/github-markdown-light.css
Normal file
1
public/css/markdown-css/github-markdown-light.css
Normal file
File diff suppressed because one or more lines are too long
@@ -20,5 +20,6 @@
|
|||||||
"/js/echarts/echarts.min.js": "/js/echarts/echarts.min.js",
|
"/js/echarts/echarts.min.js": "/js/echarts/echarts.min.js",
|
||||||
"/js/masonry/masonry.pkgd.min.js": "/js/masonry/masonry.pkgd.min.js",
|
"/js/masonry/masonry.pkgd.min.js": "/js/masonry/masonry.pkgd.min.js",
|
||||||
"/js/imagesloaded/imagesloaded.pkgd.min.js": "/js/imagesloaded/imagesloaded.pkgd.min.js",
|
"/js/imagesloaded/imagesloaded.pkgd.min.js": "/js/imagesloaded/imagesloaded.pkgd.min.js",
|
||||||
"/css/markdown-css/github-markdown.css": "/css/markdown-css/github-markdown.css"
|
"/css/markdown-css/github-markdown.css": "/css/markdown-css/github-markdown.css",
|
||||||
|
"/css/markdown-css/github-markdown-light.css": "/css/markdown-css/github-markdown-light.css"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
@section('title', '系统设置')
|
@section('title', '系统设置')
|
||||||
|
|
||||||
@push('styles')
|
@push('styles')
|
||||||
<link rel="stylesheet" href="{{ asset('css/markdown-css/github-markdown.css') }}">
|
<link rel="stylesheet" href="{{ asset('css/markdown-css/github-markdown-light.css') }}">
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
<x-app-layout>
|
<x-app-layout>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@push('styles')
|
@push('styles')
|
||||||
<link rel="stylesheet" href="{{ asset('css/markdown-css/github-markdown.css') }}">
|
<link rel="stylesheet" href="{{ asset('css/markdown-css/github-markdown-light.css') }}">
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
<x-guest-layout>
|
<x-guest-layout>
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ module.exports = {
|
|||||||
fontFamily: {
|
fontFamily: {
|
||||||
sans: ['Nunito', ...defaultTheme.fontFamily.sans],
|
sans: ['Nunito', ...defaultTheme.fontFamily.sans],
|
||||||
},
|
},
|
||||||
|
boxShadow: {
|
||||||
|
custom: '6px 6px 30px 11px rgba(0, 0, 0, 0.03)',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -54,3 +54,4 @@ mix.copy('node_modules/imagesloaded/imagesloaded.pkgd.min.js', 'public/js/images
|
|||||||
|
|
||||||
// markdown css
|
// markdown css
|
||||||
mix.copy('node_modules/github-markdown-css/github-markdown.css', 'public/css/markdown-css')
|
mix.copy('node_modules/github-markdown-css/github-markdown.css', 'public/css/markdown-css')
|
||||||
|
mix.copy('node_modules/github-markdown-css/github-markdown-light.css', 'public/css/markdown-css')
|
||||||
|
|||||||
Reference in New Issue
Block a user