diff --git a/apps/dataset/serializers/image_serializers.py b/apps/dataset/serializers/image_serializers.py index 694b6dea5..3ee477f28 100644 --- a/apps/dataset/serializers/image_serializers.py +++ b/apps/dataset/serializers/image_serializers.py @@ -41,4 +41,7 @@ class ImageSerializer(serializers.Serializer): raise NotFound404(404, "不存在的图片") if image.image_name.endswith('.svg'): return HttpResponse(image.image, status=200, headers={'Content-Type': 'image/svg+xml'}) + # gif + elif image.image_name.endswith('.gif'): + return HttpResponse(image.image, status=200, headers={'Content-Type': 'image/gif'}) return HttpResponse(image.image, status=200, headers={'Content-Type': 'image/png'}) diff --git a/ui/src/views/theme/index.vue b/ui/src/views/theme/index.vue index ba337f7c8..61ce313d4 100644 --- a/ui/src/views/theme/index.vue +++ b/ui/src/views/theme/index.vue @@ -305,7 +305,7 @@ function resetTheme() { function resetForm(val: string) { themeForm.value = - val === 'base' + val === 'login' ? { ...themeForm.value, theme: themeForm.value.theme,