Added first step section to cloud password settings.

This commit is contained in:
23rd 2022-05-05 21:46:17 +03:00
parent fbd9437775
commit 5a4d1a1e85
5 changed files with 83 additions and 0 deletions

View File

@ -1074,6 +1074,8 @@ PRIVATE
profile/profile_cover_drop_area.h profile/profile_cover_drop_area.h
settings/cloud_password/settings_cloud_password_common.cpp settings/cloud_password/settings_cloud_password_common.cpp
settings/cloud_password/settings_cloud_password_common.h settings/cloud_password/settings_cloud_password_common.h
settings/cloud_password/settings_cloud_password_start.cpp
settings/cloud_password/settings_cloud_password_start.h
settings/settings_advanced.cpp settings/settings_advanced.cpp
settings/settings_advanced.h settings/settings_advanced.h
settings/settings_blocked_peers.cpp settings/settings_blocked_peers.cpp

Binary file not shown.

View File

@ -4,5 +4,6 @@
<file alias="blocked_peers_empty.tgs">../../animations/blocked_peers_empty.tgs</file> <file alias="blocked_peers_empty.tgs">../../animations/blocked_peers_empty.tgs</file>
<file alias="filters.tgs">../../animations/filters.tgs</file> <file alias="filters.tgs">../../animations/filters.tgs</file>
<file alias="local_passcode_enter.tgs">../../animations/local_passcode_enter.tgs</file> <file alias="local_passcode_enter.tgs">../../animations/local_passcode_enter.tgs</file>
<file alias="cloud_password/intro.tgs">../../animations/cloud_password/intro.tgs</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -0,0 +1,63 @@
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "settings/cloud_password/settings_cloud_password_start.h"
#include "lang/lang_keys.h"
#include "settings/cloud_password/settings_cloud_password_common.h"
#include "ui/widgets/buttons.h"
#include "ui/wrap/vertical_layout.h"
#include "styles/style_settings.h"
namespace Settings {
namespace CloudPassword {
class Start : public TypedAbstractStep<Start> {
public:
using TypedAbstractStep::TypedAbstractStep;
[[nodiscard]] rpl::producer<QString> title() override;
void setupContent();
};
rpl::producer<QString> Start::title() {
return tr::lng_settings_cloud_password_start_title();
}
void Start::setupContent() {
const auto content = Ui::CreateChild<Ui::VerticalLayout>(this);
SetupHeader(
content,
u"cloud_password/intro"_q,
showFinishes(),
tr::lng_settings_cloud_password_start_title(),
tr::lng_settings_cloud_password_start_about());
AddSkip(content, st::settingLocalPasscodeDescriptionBottomSkip);
AddSkipInsteadOfField(content);
AddSkipInsteadOfField(content);
AddSkipInsteadOfError(content);
AddDoneButton(
content,
tr::lng_settings_cloud_password_password_subtitle()
)->setClickedCallback([=] {
});
Ui::ResizeFitChild(this, content);
}
} // namespace CloudPassword
Type CloudPasswordStartId() {
return CloudPassword::Start::Id();
}
} // namespace Settings

View File

@ -0,0 +1,17 @@
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#include "settings/settings_type.h"
namespace Settings {
Type CloudPasswordStartId();
} // namespace Settings