diff --git a/common/include/dialog_ui/js/pages/index/index.css b/common/include/dialog_ui/js/pages/index/index.css
index b87a3962adeda987fcc5ff2a8d8a48dacdccfdbd..997f0c8af087e0a65c72efeeddec3f8fd665cbf6 100644
--- a/common/include/dialog_ui/js/pages/index/index.css
+++ b/common/include/dialog_ui/js/pages/index/index.css
@@ -7,8 +7,8 @@
}
.title {
- font-size: 48px;
- line-height: 70px;
+ font-size: 80px;
+ line-height: 150px;
font-weight: 800;
}
@@ -16,26 +16,26 @@
width: 85%;
margin-top: 10%;
text-align: center;
- height: 45px;
+ height: 100px;
}
.but1 {
- width: 40%;
- height: 36px;
- font-size: 26px;
+ width: 30%;
+ height: 80px;
+ font-size: 50px;
margin-left: 10%;
}
.but2 {
- width: 20%;
- height: 36px;
- font-size: 26px;
+ width: 30%;
+ height: 80px;
+ font-size: 50px;
margin-left: 55%;
}
.title-list {
- font-size: 38px;
- line-height: 40px;
+ font-size: 70px;
+ line-height: 100px;
font-weight: 800;
}
diff --git a/common/include/dm_constants.h b/common/include/dm_constants.h
index 7878b42661bc2549346f6e0e6ca7596d3cc8b51b..1206f3909740ac8325d19fdcb5f1a940afb2e817 100644
--- a/common/include/dm_constants.h
+++ b/common/include/dm_constants.h
@@ -175,9 +175,9 @@ const std::string ETH_PORT = "ETH_PORT";
// ACE
const int32_t ACE_X = 50;
-const int32_t ACE_Y = 200;
-const int32_t ACE_WIDTH = 400;
-const int32_t ACE_HEIGHT = 200;
+const int32_t ACE_Y = 300;
+const int32_t ACE_WIDTH = 600;
+const int32_t ACE_HEIGHT = 400;
} // namespace DistributedHardware
} // namespace OHOS
#endif
diff --git a/ext/input_pin_dialog/dialog_ui/js/pages/index/index.css b/ext/input_pin_dialog/dialog_ui/js/pages/index/index.css
index cf763b2ac3189d4cca6fde7322153616eb97f076..fc2207c2f9f7e3d00aa2e2d32073cbfbf2ea34ec 100644
--- a/ext/input_pin_dialog/dialog_ui/js/pages/index/index.css
+++ b/ext/input_pin_dialog/dialog_ui/js/pages/index/index.css
@@ -7,44 +7,47 @@
}
.title {
- font-size: 48px;
- line-height: 40px;
+ font-size: 80px;
+ line-height: 100px;
font-weight: 800;
}
.title-list {
- font-size: 30px;
- line-height: 35px;
+ font-size: 60px;
+ line-height: 60px;
font-weight: 800;
}
.title-error {
- font-size: 15px;
- line-height: 20px;
+ font-size: 30px;
+ line-height: 40px;
font-weight: 800;
color: #ff0000;
}
.title-pin {
- font-size: 30px;
- line-height: 35px;
+ font-size: 60px;
+ line-height: 80px;
font-weight: 800;
}
.but {
- margin: 10px 20px 10px 20px;
width: 85%;
- height: 40px;
+ margin-top: 10%;
+ text-align: center;
+ height: 100px;
}
.but1 {
- width: 80px;
- height: 36px;
- font-size: 26px;
+ width: 30%;
+ height: 80px;
+ font-size: 50px;
+ margin-left: 10%;
}
.but2 {
- width: 80px;
- height: 36px;
- font-size: 26px;
+ width: 30%;
+ height: 80px;
+ font-size: 50px;
+ margin-left: 55%;
}
\ No newline at end of file
diff --git a/ext/input_pin_dialog/dialog_ui/js/pages/index/index.hml b/ext/input_pin_dialog/dialog_ui/js/pages/index/index.hml
index 7f629df7a555519cf5e30f2191be38a589090b70..004278185a4098862e7eb9f65b0f7cbf1930007c 100644
--- a/ext/input_pin_dialog/dialog_ui/js/pages/index/index.hml
+++ b/ext/input_pin_dialog/dialog_ui/js/pages/index/index.hml
@@ -12,10 +12,10 @@
PIN码输入错误,请重新输入
-
diff --git a/ext/pin_auth/include/pin_auth.h b/ext/pin_auth/include/pin_auth.h
index b2636e0afdd1ce1906183fe10649debb1a3825ea..dca2e7e7f9e12b4679d778c7d4a9b893f46c129d 100644
--- a/ext/pin_auth/include/pin_auth.h
+++ b/ext/pin_auth/include/pin_auth.h
@@ -30,7 +30,7 @@ class PinAuth : public IAuthentication {
public:
PinAuth();
~PinAuth();
- int32_t ShowAuthInfo(int32_t code) override;
+ int32_t ShowAuthInfo(int32_t code, std::shared_ptr authManager) override;
int32_t StartAuth(int32_t code, std::shared_ptr authManager) override;
int32_t VerifyAuthentication(std::string pinToken, int32_t code, const std::string &authParam) override;
diff --git a/ext/pin_auth/include/pin_auth_ui.h b/ext/pin_auth/include/pin_auth_ui.h
index 61575797f893e15ade0b58883a0820823fbe6fb8..5ff26c3e1634b9bfb1ae370b8349b8c0ebab3ebe 100644
--- a/ext/pin_auth/include/pin_auth_ui.h
+++ b/ext/pin_auth/include/pin_auth_ui.h
@@ -26,7 +26,7 @@ namespace DistributedHardware {
class PinAuthUi {
public:
PinAuthUi();
- int32_t ShowPinDialog(int32_t code);
+ int32_t ShowPinDialog(int32_t code, std::shared_ptr authManager);
int32_t InputPinDialog(int32_t code, std::shared_ptr authManager);
private:
diff --git a/ext/pin_auth/src/pin_auth.cpp b/ext/pin_auth/src/pin_auth.cpp
index 138abc56fa23141fe5a180e07d6bdeca3b271edd..0bbadd15f7aa503e771432a132e9512f1834eec8 100644
--- a/ext/pin_auth/src/pin_auth.cpp
+++ b/ext/pin_auth/src/pin_auth.cpp
@@ -33,9 +33,9 @@ PinAuth::~PinAuth()
{
}
-int32_t PinAuth::ShowAuthInfo(int32_t code)
+int32_t PinAuth::ShowAuthInfo(int32_t code, std::shared_ptr authManager)
{
- return pinAuthUi_->ShowPinDialog(code);
+ return pinAuthUi_->ShowPinDialog(code, authManager);
}
int32_t PinAuth::StartAuth(int32_t code, std::shared_ptr authManager)
diff --git a/ext/pin_auth/src/pin_auth_ui.cpp b/ext/pin_auth/src/pin_auth_ui.cpp
index a3cfeefe271caa8d20a610b19cd8124fa35476ff..51f76bdb4ce70a6218f42bd8850ef686cadeea7f 100644
--- a/ext/pin_auth/src/pin_auth_ui.cpp
+++ b/ext/pin_auth/src/pin_auth_ui.cpp
@@ -28,7 +28,7 @@ PinAuthUi::PinAuthUi()
LOGI("AuthUi constructor");
}
-int32_t PinAuthUi::ShowPinDialog(int32_t code)
+int32_t PinAuthUi::ShowPinDialog(int32_t code, std::shared_ptr authManager)
{
LOGI("ShowPinDialog start");
nlohmann::json jsonObj;
@@ -41,9 +41,14 @@ int32_t PinAuthUi::ShowPinDialog(int32_t code)
params,
OHOS::Rosen::WindowType::WINDOW_TYPE_SYSTEM_ALARM_WINDOW,
ACE_X, ACE_Y, ACE_WIDTH, ACE_HEIGHT,
- [](int32_t id, const std::string& event, const std::string& params) {
- LOGI("CancelDialog start id:%d,event:%s,parms:%s", id, event.c_str(), params.c_str());
- Ace::UIServiceMgrClient::GetInstance()->CancelDialog(id);
+ [authManager](int32_t id, const std::string& event, const std::string& params) {
+ if (strcmp(params.c_str(), "0") == 0) {
+ authManager->ClosePage(id);
+ }
+ if (strcmp(params.c_str(), "1") == 0) {
+ LOGI("CancelDialog start id:%d,event:%s,parms:%s", id, event.c_str(), params.c_str());
+ Ace::UIServiceMgrClient::GetInstance()->CancelDialog(id);
+ }
});
LOGI("ShowConfigDialog end");
return DM_OK;
diff --git a/ext/show_pin_dialog/dialog_ui/js/pages/index/index.css b/ext/show_pin_dialog/dialog_ui/js/pages/index/index.css
index feb20b4fd6d734135fa8b35d2a8fce28b34b69f2..3807fd55e1c7672f2b6d75d04e7e1170b8931405 100644
--- a/ext/show_pin_dialog/dialog_ui/js/pages/index/index.css
+++ b/ext/show_pin_dialog/dialog_ui/js/pages/index/index.css
@@ -7,25 +7,25 @@
}
.title {
- font-size: 48px;
- line-height: 50px;
+ font-size: 80px;
+ line-height: 120px;
font-weight: 800;
}
.title-list {
- font-size: 38px;
- line-height: 40px;
+ font-size: 60px;
+ line-height: 100px;
font-weight: 800;
}
.title-pin {
- font-size: 48px;
- line-height: 50px;
+ font-size: 60px;
+ line-height: 100px;
font-weight: 800;
}
.but {
- width: 100%;
- font-size: 26px;
- height: 36px;
+ width: 80px;
+ font-size: 50px;
+ height: 80px;
}
\ No newline at end of file
diff --git a/ext/show_pin_dialog/dialog_ui/js/pages/index/index.js b/ext/show_pin_dialog/dialog_ui/js/pages/index/index.js
index 114655c3a4d334a82a2e5a2186be08df84bea372..3a55ac1cc8215df26437b036c9f92ec5dbb7568d 100644
--- a/ext/show_pin_dialog/dialog_ui/js/pages/index/index.js
+++ b/ext/show_pin_dialog/dialog_ui/js/pages/index/index.js
@@ -6,6 +6,7 @@ export default {
},
onInit() {
console.info('getParams: ' + router.getParams());
+ callNativeHandler("EVENT_CONFIRM", "0");
},
onConfirm() {
console.info('click confirm');
diff --git a/services/devicemanagerservice/include/authentication/authentication.h b/services/devicemanagerservice/include/authentication/authentication.h
index 43c486511f474a6ff795b3554e82bb8a6f4f4665..67ca0c3ee86b1e0fccae4eb20927cda40dc3a829 100644
--- a/services/devicemanagerservice/include/authentication/authentication.h
+++ b/services/devicemanagerservice/include/authentication/authentication.h
@@ -24,7 +24,7 @@ class DmAuthManager;
class IAuthentication {
public:
virtual ~IAuthentication() = default;
- virtual int32_t ShowAuthInfo(int32_t code) = 0;
+ virtual int32_t ShowAuthInfo(int32_t code, std::shared_ptr authManager) = 0;
virtual int32_t StartAuth(int32_t code, std::shared_ptr authManager) = 0;
virtual int32_t VerifyAuthentication(std::string pinToken, int32_t code, const std::string &authParam) = 0;
};
diff --git a/services/devicemanagerservice/include/authentication/dm_auth_manager.h b/services/devicemanagerservice/include/authentication/dm_auth_manager.h
index 6b0298ec907ad3c7c70e83bf738b05e8cb741d5f..a24f9d45d6a58adf253a7b9b9f47d11f882e3b69 100644
--- a/services/devicemanagerservice/include/authentication/dm_auth_manager.h
+++ b/services/devicemanagerservice/include/authentication/dm_auth_manager.h
@@ -86,6 +86,7 @@ typedef struct DmAuthRequestContext {
std::string appThumbnail;
std::string token;
int32_t reason;
+ int32_t aceId;
std::vector syncGroupList;
} DmAuthRequestContext;
@@ -112,6 +113,7 @@ typedef struct DmAuthResponseContext {
int64_t requestId;
int32_t code;
int32_t state;
+ int32_t aceId;
std::vector syncGroupList;
} DmAuthResponseContext;
@@ -162,6 +164,7 @@ public:
int32_t GetAuthenticationParam(DmAuthParam &authParam);
int32_t OnUserOperation(int32_t action);
void UserSwitchEventCallback(void);
+ void ClosePage(const int32_t &id);
private:
std::shared_ptr softbusConnector_;
diff --git a/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp b/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp
index 1e9976f44f3f49ccf3613bbc1dfaa33a1fabfc96..009b3f371e1ac23c18fe3969564ad327e0754a7a 100644
--- a/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp
+++ b/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp
@@ -547,7 +547,7 @@ void DmAuthManager::AuthenticateFinish()
LOGI("DmAuthManager::AuthenticateFinish start");
if (authResponseState_ != nullptr) {
if (authResponseState_->GetStateType() == AuthState::AUTH_RESPONSE_FINISH) {
- CancelDisplay();
+ Ace::UIServiceMgrClient::GetInstance()->CancelDialog(authResponseContext_->aceId);
}
if (!timerMap_.empty()) {
for (auto &iter : timerMap_) {
@@ -569,7 +569,7 @@ void DmAuthManager::AuthenticateFinish()
}
if (authResponseContext_->state == AuthState::AUTH_REQUEST_INPUT) {
- CancelDisplay();
+ Ace::UIServiceMgrClient::GetInstance()->CancelDialog(authResponseContext_->aceId);
}
listener_->OnAuthResult(authRequestContext_->hostPkgName, authRequestContext_->deviceId,
@@ -688,7 +688,7 @@ void DmAuthManager::ShowAuthInfoDialog()
}
ptr = authenticationMap_[1];
LOGI("ShowAuthInfoDialog code:%d", authResponseContext_->code);
- ptr->ShowAuthInfo(authResponseContext_->code);
+ ptr->ShowAuthInfo(authResponseContext_->code, shared_from_this());
}
void DmAuthManager::ShowStartAuthDialog()
@@ -785,5 +785,10 @@ void DmAuthManager::VerifyPinAuthAuthentication(const std::string &action)
}
LOGI("DmAuthManager::VerifyAuthentication complete");
}
+
+void DmAuthManager::ClosePage(const int32_t &id)
+{
+ authResponseContext_->aceId = id;
+}
} // namespace DistributedHardware
} // namespace OHOS