Skip to content

Commit

Permalink
Minor update (#1460)
Browse files Browse the repository at this point in the history
- 后台上传设置增加 avif 类型
- 后台 Avatar 头像支持原生懒加载
  • Loading branch information
vndroid committed Jun 14, 2022
1 parent 7f7b24d commit 4095850
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion var/Widget/Base/Comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public function gravatar(int $size = 32, ?string $default = null)
Comments::pluginHandle()->trigger($plugged)->gravatar($size, $rating, $default, $this);
if (!$plugged) {
$url = Common::gravatarUrl($this->mail, $size, $rating, $default, $this->request->isSecure());
echo '<img class="avatar" src="' . $url . '" alt="' .
echo '<img class="avatar" loading="lazy" src="' . $url . '" alt="' .
$this->author . '" width="' . $size . '" height="' . $size . '" />';
}
}
Expand Down
2 changes: 1 addition & 1 deletion var/Widget/Options/General.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public function form(): Form
}

$attachmentTypesOptions = [
'@image@' => _t('图片文件') . ' <code>(gif jpg jpeg png tiff bmp webp)</code>',
'@image@' => _t('图片文件') . ' <code>(gif jpg jpeg png tiff bmp webp avif)</code>',
'@media@' => _t('多媒体文件') . ' <code>(mp3 mp4 mov wmv wma rmvb rm avi flv ogg oga ogv)</code>',
'@doc@' => _t('常用档案文件') . ' <code>(txt doc docx xls xlsx ppt pptx zip rar pdf)</code>',
'@other@' => _t(
Expand Down

0 comments on commit 4095850

Please sign in to comment.