feat: 个人设置 rdp smart size可配置 (#12021)

Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
fit2bot
2023-11-02 18:51:17 +08:00
committed by GitHub
parent 53d8f716eb
commit eee119eba1
3 changed files with 17 additions and 2 deletions

View File

@@ -3,7 +3,10 @@ import json
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from users.const import RDPResolution, KeyboardLayout, RDPClientOption, AppletConnectionMethod
from users.const import (
RDPResolution, RDPSmartSize, KeyboardLayout,
RDPClientOption, AppletConnectionMethod
)
class MultipleChoiceField(serializers.MultipleChoiceField):
@@ -37,6 +40,12 @@ class GraphicsSerializer(serializers.Serializer):
choices=RDPClientOption.choices, default={RDPClientOption.FULL_SCREEN},
label=_('RDP client option'), required=False
)
rdp_smart_size = serializers.ChoiceField(
RDPSmartSize.choices, default=RDPSmartSize.DISABLE,
required=False, label=_('Rdp smart size'),
help_text=_('Determines whether the client computer should scale the content on the remote '
'computer to fit the window size of the client computer when the window is resized.')
)
applet_connection_method = serializers.ChoiceField(
AppletConnectionMethod.choices, default=AppletConnectionMethod.WEB,
required=False, label=_('Remote application connection method')