mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-11 04:09:45 +00:00
feat: 个人设置 rdp smart size可配置 (#12021)
Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
@@ -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')
|
||||
|
Reference in New Issue
Block a user