mirror of
https://github.com/lsky-org/lsky-pro.git
synced 2025-01-05 10:27:39 +08:00
fix a bug
This commit is contained in:
parent
cff42566c8
commit
b61db2b31a
@ -94,10 +94,6 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
|
||||
protected static function booted()
|
||||
{
|
||||
static::retrieved(function (self $user) {
|
||||
$user->use_capacity = $user->images()->sum('size');
|
||||
});
|
||||
|
||||
static::creating(function (self $user) {
|
||||
// 默认组
|
||||
$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));
|
||||
}
|
||||
|
||||
public function useCapacity(): Attribute
|
||||
{
|
||||
return new Attribute(fn () => $this->images()->sum('size'));
|
||||
}
|
||||
|
||||
public function group(): BelongsTo
|
||||
{
|
||||
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/masonry/masonry.pkgd.min.js": "/js/masonry/masonry.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', '系统设置')
|
||||
|
||||
@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
|
||||
|
||||
<x-app-layout>
|
||||
|
@ -1,5 +1,5 @@
|
||||
@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
|
||||
|
||||
<x-guest-layout>
|
||||
|
@ -13,6 +13,9 @@ module.exports = {
|
||||
fontFamily: {
|
||||
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
|
||||
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')
|
||||
|
Loading…
Reference in New Issue
Block a user