mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-12-25 01:46:41 +08:00
[feat] request macOS system permissions by showing a prompt on startup
This commit is contained in:
@@ -75,5 +75,8 @@
|
||||
#define SELF_HOSTED_SERVER_CONFIG_OK_BUTTON_PADDING_EN 91
|
||||
#define UPDATE_NOTIFICATION_OK_BUTTON_PADDING_CN 162
|
||||
#define UPDATE_NOTIFICATION_OK_BUTTON_PADDING_EN 146
|
||||
|
||||
#define REQUEST_PERMISSION_WINDOW_WIDTH_CN 180
|
||||
#define REQUEST_PERMISSION_WINDOW_HEIGHT_CN 128
|
||||
#define REQUEST_PERMISSION_WINDOW_WIDTH_EN 380
|
||||
#define REQUEST_PERMISSION_WINDOW_HEIGHT_EN 122
|
||||
#endif
|
||||
@@ -188,6 +188,27 @@ static std::vector<std::string> minimize_to_tray = {
|
||||
"Minimize to system tray when exit:"};
|
||||
static std::vector<LPCWSTR> exit_program = {L"退出", L"Exit"};
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
static std::vector<std::string> request_permissions = {
|
||||
reinterpret_cast<const char*>(u8"权限请求"), "Request Permissions"};
|
||||
static std::vector<std::string> screen_recording_permission = {
|
||||
reinterpret_cast<const char*>(u8"录屏权限"), "Screen Recording Permission"};
|
||||
static std::vector<std::string> accessibility_permission = {
|
||||
reinterpret_cast<const char*>(u8"键鼠权限"), "Keyboard & Mouse Permission"};
|
||||
static std::vector<std::string> permission_granted = {
|
||||
reinterpret_cast<const char*>(u8"已授权"), "Granted"};
|
||||
static std::vector<std::string> permission_denied = {
|
||||
reinterpret_cast<const char*>(u8"未授权"), "Denied"};
|
||||
static std::vector<std::string> open_screen_recording_settings = {
|
||||
reinterpret_cast<const char*>(u8"打开录屏设置"),
|
||||
"Open Screen Recording Settings"};
|
||||
static std::vector<std::string> open_keyboard_mouse_settings = {
|
||||
reinterpret_cast<const char*>(u8"打开键鼠设置"),
|
||||
"Open Keyboard & Mouse Settings"};
|
||||
static std::vector<std::string> permission_required_message = {
|
||||
reinterpret_cast<const char*>(u8"应用需要以下权限才能正常工作:"),
|
||||
"The application requires the following permissions to work properly:"};
|
||||
#endif
|
||||
} // namespace localization
|
||||
} // namespace crossdesk
|
||||
#endif
|
||||
Reference in New Issue
Block a user