Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ build*/
tests/report/*
.transifexrc
.cache/

.cursor/
# for snipe
src/global_util/dbus/*
6 changes: 6 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ file_filter = translations/dde-session-shell_<lang>.ts
source_file = translations/dde-session-shell_en.ts
source_lang = en
type = QT

[o:linuxdeepin:p:deepin-desktop-environment:r:login-gesture]
file_filter = plugins/login-gesture/translations/login-gesture_<lang>.ts
source_file = plugins/login-gesture/translations/login-gesture_en.ts
source_lang = en
type = QT
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ set(LOCK_SRCS
src/widgets/passworderrortipswidget.cpp
src/widgets/passworderrortipswidget.h
src/global_util/dbusconstant.h
src/global_util/signal_bridge.h
)

link_libraries(
Expand Down Expand Up @@ -324,8 +325,15 @@ set(GREETER_SRCS
src/lightdm-deepin-greeter/logincontent.cpp
src/lightdm-deepin-greeter/logintipswindow.cpp
src/lightdm-deepin-greeter/sessionwidget.cpp
src/global_util/signal_bridge.h
)

if (USE_DEEPIN_WAYLAND)
set(GREETER_SRCS
${GREETER_SRCS}
)
endif(USE_DEEPIN_WAYLAND)

add_executable(lightdm-deepin-greeter
${GREETER_SRCS}
${QRCS}
Expand Down
10 changes: 10 additions & 0 deletions configs/org.deepin.dde.lightdm-deepin-greeter.json
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,16 @@
"description": "是否长按小眼睛显示密码,true-鼠按长按小眼睛才显示密码,false-鼠标点击一下就一直显示密码",
"permissions": "readwrite",
"visibility": "private"
},
"mfaSequence":{
"value": {"userType":"","authSequence":[]},
"serial": 0,
"flags": ["global"],
"name": "mfaSequence",
"name[zh_CN]": "多因认证时控制前端按认证顺序展示UI",
"description": "userType可用值,all:代表所有用户,adDomain:代表域用户,其它可选还有default、native,authSequence中的数组即代表认证类型的顺序",
"permissions": "readwrite",
"visibility": "private"
}
}
}
20 changes: 20 additions & 0 deletions configs/org.deepin.dde.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,26 @@
"description": "是否长按小眼睛显示密码,true-鼠按长按小眼睛才显示密码,false-鼠标点击一下就一直显示密码",
"permissions": "readwrite",
"visibility": "private"
},
"mfaSequence":{
"value": {"userType":"","authSequence":[]},
"serial": 0,
"flags": ["global"],
"name": "mfaSequence",
"name[zh_CN]": "多因认证时控制前端按认证顺序展示UI",
"description": "userType可用值,all:代表所有用户,adDomain:代表域用户,其它可选还有default、native,authSequence中的数组即代表认证类型的顺序",
"permissions": "readwrite",
"visibility": "private"
},
"enableShutdownBlackWidget":{
"value": true,
"serial": 0,
"flags": ["global"],
"name": "enableShutdownBlackWidget",
"name[zh_CN]": "是否打开关机、重启黑屏界面",
"description": "是否打开关机、重启黑屏界面;false:不开,true:开启。默认值为true;",
"permissions": "readwrite",
"visibility": "private"
}
}
}
22 changes: 19 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${dist:Depends},
libssl1.1,
libxcb-util0 | libxcb-util1,
dde-dconfig-daemon,
dde-wayland-config(>>1.0.10-1)
dde-wayland-config(>>1.0.10-1),
dss-wechat-auth-plugin
Provides: lightdm-greeter,
deepin-greeter-wayland
Recommends: onboard,
dss-captcha-plugin,
dss-network-plugin,
dde-wallpaper-cache,
dss-wechat-auth-plugin
dde-wallpaper-cache
Conflicts: dde-workspace,
deepin-notifications,
dde-session-ui (<< 5.0.0),
Expand All @@ -70,3 +71,18 @@ Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: deepin desktop-environment - dde-session-shell module development files
DDE Session Shell module development files of deepin desktop-environment

Package: dde-gesture-login
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, ${dist:Depends},
deepin-desktop-schemas (>=5.9.14),
dde-daemon (>=5.13.12),
startdde (>=5.10.24),
deepin-authenticate(>=1.2.27),
libssl-dev,
dde-dconfig-daemon,
dde-wayland-config(>>1.0.10-1)
Conflicts: dss-gesture-login-plugin
Description: deepin desktop-environment - dde-session-shell login plugin files
reset-pattern-dialog - modify gesture password enrolled, or create new gesture password
liblogin-gesture.so - support gesture password login on greeter and lock
6 changes: 6 additions & 0 deletions debian/dde-gesture-login.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
usr/share/dde-gesture-login/translations
usr/lib/dde-session-shell/modules/liblogin-gesture.so
usr/lib/dde-control-center/reset-pattern-dialog
usr/share/dsg/configs/org.deepin.dde.lock/org.deepin.dde.dss-login-gesture.json
usr/share/dsg/configs/org.deepin.dde.lightdm-deepin-greeter/org.deepin.dde.dss-login-gesture.json
lib/dde-session-shell/modules/config.d/login-gesture.json
21 changes: 21 additions & 0 deletions debian/dde-gesture-login.postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh

set -e

if getent passwd deepin-password-admin >/dev/null; then
if which deluser >/dev/null; then
deluser --system deepin-password-admin -q || echo "Could not remove deepin-password-admin user."
fi
fi

if getent group deepin-password-admin >/dev/null; then
if which delgroup >/dev/null; then
delgroup --system deepin-password-admin || echo "Could not remove deepin-password-admin group."
fi
fi

chown deepin-daemon:deepin-daemon /usr/lib/dde-control-center/reset-pattern-dialog
chmod 500 /usr/lib/dde-control-center/reset-pattern-dialog

#DEBHELPER#
exit 0
4 changes: 4 additions & 0 deletions debian/dde-gesture-login.sysusers
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This file is part of dde-control-center
#Type Name ID GECOS Home directory Shell
u deepin-daemon - "" - -

15 changes: 10 additions & 5 deletions debian/dde-session-shell.install
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
etc
usr/bin
usr/share
usr/share/applications
usr/share/deepin-debug-config
usr/share/dsg
usr/share/glib-2.0
usr/share/xgreeters
usr/share/dde-session-shell/greeters.d/x
usr/share/dde-session-shell/greeters.d/wayland
usr/share/dbus-1
usr/share/deepin-authentication
usr/share/deepin-log-viewer
usr/share/dde-session-shell
usr/share/lightdm/lightdm.conf.d
usr/lib/dde-session-shell/modules
usr/lib/*/security
usr/lib/dde-session-shell/modules/libone-key-login.so
usr/lib/*/security
2 changes: 1 addition & 1 deletion files/wayland/lightdm-deepin-greeter-wayland
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ device_handle(){
local touchpad=$(dbus_values_get_bool "$dbus_touchpad")

if [ "$touchpad" = "true" ]; then
dbus-send --session --dest=org.kde.KWin "$input" org.freedesktop.DBus.Properties.Set string:"org.kde.KWin.InputDevice" string:"tapToClick" variant:boolean:true
dbus-send --session --print-reply --dest=org.kde.KWin "$input" org.freedesktop.DBus.Properties.Set string:"org.kde.KWin.InputDevice" string:"tapToClick" variant:boolean:true
fi
}

Expand Down
3 changes: 2 additions & 1 deletion interface/base_module_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ class BaseModuleInterface
LoginType, // 登陆插件
TrayType, // 托盘插件
FullManagedLoginType, // 全托管插件
IpcAssistLoginType // 用于接收厂商密码插件
IpcAssistLoginType, // 用于接收厂商密码插件
PasswordExtendLoginType, // 密码认证扩展插件,需要两个都认证通过后
};

/**
Expand Down
5 changes: 4 additions & 1 deletion interface/login_module_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ enum AuthType {
AT_FingerVein = 1 << 5, // 指静脉
AT_Iris = 1 << 6, // 虹膜
AT_Passkey = 1 << 7, // 安全密钥
AT_Pattern = 1 << 8, // 手势
AT_PAM = 1 << 29, // PAM
AT_Custom = 1 << 30, // 自定义
AT_All = -1 // all
Expand All @@ -98,7 +99,9 @@ enum AuthState {
AS_Ended, // 认证已结束,调用 End 之后,每种成功关闭的都会发送此信号,当某种认证类型被锁定时,也会触发此信号
AS_Locked, // 认证已锁定,当认证类型锁定时,触发此信号。该信号不会给出锁定等待时间信息
AS_Recover, // 设备恢复,需要调用 Start 重新开启认证,对应 AS_Exception
AS_Unlocked // 认证解锁,对应 AS_Locked
AS_Unlocked, // 认证解锁,对应 AS_Locked
AS_Unknown, // 未知状态
AS_VerifyCode, // 需要验证码
};

/**
Expand Down
6 changes: 5 additions & 1 deletion lupdate.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash
lupdate ./ -ts -no-obsolete -locations none translations/dde-session-shell_en.ts
lupdate ./interface ./src ./tests -ts -no-obsolete -locations none translations/dde-session-shell_en.ts
cd plugins/login-gesture
./lupdate.sh
cd ../../

#tx push -s -b m20 # Push the files that need to be translated
#tx pull -s -b m20 # Pull the translated files
1 change: 1 addition & 0 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ if (DISABLE_DSS_SNIPE)
endif()
# add_subdirectory(examples)
# add_subdirectory(assist_login)
# add_subdirectory("login-gesture")
72 changes: 72 additions & 0 deletions plugins/login-gesture/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
find_package(DtkWidget REQUIRED)
find_package(DtkCore REQUIRED)

include(GNUInstallDirs)

include_directories(
${DFrameworkDBus_INCLUDE_DIRS}
global
src
resetDialog
utils
)

link_libraries(
${Qt_LIBS}
${DtkWidget_LIBRARIES}
${DtkCore_LIBRARIES}
crypt
)

set(LIB_NAME login-gesture)
set(BIN_NAME reset-pattern-dialog)

file(GLOB_RECURSE SHARED_SOURCE
${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/utils/*.cpp
)

file(GLOB_RECURSE LIB_SOURCE
${CMAKE_CURRENT_SOURCE_DIR}/loginPlugin/*.cpp
)

file(GLOB_RECURSE RESET_SOURCE
${CMAKE_CURRENT_SOURCE_DIR}/resetDialog/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/resetDialog/*.qrc
)

if (CMAKE_BUILD_TYPE STREQUAL "Debug")
ADD_DEFINITIONS(-DQM_FILES_DIR="${CMAKE_BINARY_DIR}/plugins/login-gesture/translations")
else()
ADD_DEFINITIONS(-DQM_FILES_DIR="/usr/share/dde-gesture-login/translations")
endif()

set(QRCS
${CMAKE_CURRENT_SOURCE_DIR}/gesture.qrc
)

add_library(${LIB_NAME} SHARED
${SHARED_SOURCE}
${LIB_SOURCE}
${QRCS}
)
set_target_properties(${LIB_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)

add_executable(${BIN_NAME}
${SHARED_SOURCE}
${RESET_SOURCE}
${QRCS}
)

execute_process(COMMAND bash "${CMAKE_CURRENT_SOURCE_DIR}/translate_generation.sh"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

install(TARGETS ${LIB_NAME} LIBRARY DESTINATION lib/dde-session-shell/modules)
install(TARGETS ${BIN_NAME} DESTINATION lib/dde-control-center)

file(GLOB QM_FILES "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.qm")
install(FILES ${QM_FILES} DESTINATION share/dde-gesture-login/translations)

install(FILES configs/login-gesture.json DESTINATION /lib/dde-session-shell/modules/config.d)
install(FILES configs/org.deepin.dde.dss-login-gesture.json DESTINATION ${CMAKE_INSTALL_DATADIR}/dsg/configs/org.deepin.dde.lock)
install(FILES configs/org.deepin.dde.dss-login-gesture.json DESTINATION ${CMAKE_INSTALL_DATADIR}/dsg/configs/org.deepin.dde.lightdm-deepin-greeter)
20 changes: 20 additions & 0 deletions plugins/login-gesture/configs/login-gesture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"pluginEnabled": {
"lock": {
"dconfig": {
"appid": "org.deepin.dde.lock",
"resource": "org.deepin.dde.dss-login-gesture",
"subpath": "",
"key": "pluginEnabled"
}
},
"greeter": {
"dconfig": {
"appid": "org.deepin.dde.lightdm-deepin-greeter",
"resource": "org.deepin.dde.dss-login-gesture",
"subpath": "",
"key": "pluginEnabled"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"magic": "dsg.config.meta",
"version": "1.0",
"contents": {
"pluginEnabled": {
"value": false,
"serial": 0,
"flags": ["global"],
"name": "PluginEnabled",
"name[zh_CN]": "是否启用插件",
"description[zh_CN]": "是否启用插件,默认为否。",
"permissions": "readwrite",
"visibility": "private"
}
}
}
5 changes: 5 additions & 0 deletions plugins/login-gesture/gesture.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/">
<file>icons/firstEnroll.svg</file>
</qresource>
</RCC>
35 changes: 35 additions & 0 deletions plugins/login-gesture/icons/firstEnroll.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions plugins/login-gesture/login.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"api": "2.0.0"
}
Loading
Loading