init
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
This commit is contained in:
74
Telegram/SourceFiles/passport/passport_panel_password.h
Normal file
74
Telegram/SourceFiles/passport/passport_panel_password.h
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
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 "ui/rp_widget.h"
|
||||
#include "base/object_ptr.h"
|
||||
|
||||
namespace Ui {
|
||||
class PasswordInput;
|
||||
class FlatLabel;
|
||||
class LinkButton;
|
||||
class RoundButton;
|
||||
class UserpicButton;
|
||||
class VerticalLayout;
|
||||
} // namespace Ui
|
||||
|
||||
namespace Passport {
|
||||
|
||||
class PanelController;
|
||||
|
||||
class PanelAskPassword : public Ui::RpWidget {
|
||||
public:
|
||||
PanelAskPassword(
|
||||
QWidget *parent,
|
||||
not_null<PanelController*> controller);
|
||||
|
||||
void submit();
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
void focusInEvent(QFocusEvent *e) override;
|
||||
|
||||
private:
|
||||
void updateControlsGeometry();
|
||||
void showError(const QString &error);
|
||||
void hideError();
|
||||
void recover();
|
||||
|
||||
not_null<PanelController*> _controller;
|
||||
|
||||
object_ptr<Ui::UserpicButton> _userpic;
|
||||
object_ptr<Ui::FlatLabel> _about1;
|
||||
object_ptr<Ui::FlatLabel> _about2;
|
||||
object_ptr<Ui::PasswordInput> _password;
|
||||
object_ptr<Ui::FlatLabel> _hint = { nullptr };
|
||||
object_ptr<Ui::FlatLabel> _error = { nullptr };
|
||||
object_ptr<Ui::RoundButton> _submit;
|
||||
object_ptr<Ui::LinkButton> _forgot;
|
||||
|
||||
};
|
||||
|
||||
class PanelNoPassword : public Ui::RpWidget {
|
||||
public:
|
||||
PanelNoPassword(
|
||||
QWidget *parent,
|
||||
not_null<PanelController*> controller);
|
||||
|
||||
private:
|
||||
void setupContent();
|
||||
void refreshBottom();
|
||||
|
||||
not_null<PanelController*> _controller;
|
||||
|
||||
not_null<Ui::VerticalLayout*> _inner;
|
||||
base::unique_qptr<Ui::RpWidget> _about;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Passport
|
||||
Reference in New Issue
Block a user