mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
update name access level
This commit is contained in:
parent
d6272bed98
commit
6c3dd46c2a
1 changed files with 13 additions and 15 deletions
|
|
@ -25,9 +25,6 @@ class Auth
|
||||||
// Dependencies
|
// Dependencies
|
||||||
public Page $page;
|
public Page $page;
|
||||||
|
|
||||||
// Requirements
|
|
||||||
public GtkEntry $name;
|
|
||||||
|
|
||||||
// Defaults
|
// Defaults
|
||||||
public const DIALOG_DEFAULT_RESPONSE = GtkResponseType::CANCEL;
|
public const DIALOG_DEFAULT_RESPONSE = GtkResponseType::CANCEL;
|
||||||
public const DIALOG_FORMAT_SECONDARY_TEXT = 'Select identity';
|
public const DIALOG_FORMAT_SECONDARY_TEXT = 'Select identity';
|
||||||
|
|
@ -43,34 +40,35 @@ class Auth
|
||||||
public const DIALOG_CONTENT_OPTION_NAME_PLACEHOLDER = 'Local name (optional)';
|
public const DIALOG_CONTENT_OPTION_NAME_PLACEHOLDER = 'Local name (optional)';
|
||||||
|
|
||||||
// Extras
|
// Extras
|
||||||
private array $_options = [];
|
private array $_options = []; // GtkRadioButton
|
||||||
|
private GtkEntry $_name;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
Page $page,
|
Page $page
|
||||||
) {
|
) {
|
||||||
// Init dependencies
|
// Init dependencies
|
||||||
$this->page = $page;
|
$this->page = $page;
|
||||||
|
|
||||||
// Init requirements
|
// Init extras
|
||||||
$this->name = new GtkEntry;
|
$this->_name = new GtkEntry;
|
||||||
|
|
||||||
$this->name->set_alignment(
|
$this->_name->set_alignment(
|
||||||
$this::DIALOG_CONTENT_OPTION_NAME_ALIGNMENT
|
$this::DIALOG_CONTENT_OPTION_NAME_ALIGNMENT
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->name->set_placeholder_text(
|
$this->_name->set_placeholder_text(
|
||||||
_($this::DIALOG_CONTENT_OPTION_NAME_PLACEHOLDER)
|
_($this::DIALOG_CONTENT_OPTION_NAME_PLACEHOLDER)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->name->set_margin_start(
|
$this->_name->set_margin_start(
|
||||||
$this::DIALOG_CONTENT_OPTION_NAME_MARGIN
|
$this::DIALOG_CONTENT_OPTION_NAME_MARGIN
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->name->set_margin_end(
|
$this->_name->set_margin_end(
|
||||||
$this::DIALOG_CONTENT_OPTION_NAME_MARGIN
|
$this::DIALOG_CONTENT_OPTION_NAME_MARGIN
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->name->set_margin_bottom(
|
$this->_name->set_margin_bottom(
|
||||||
$this::DIALOG_CONTENT_OPTION_NAME_MARGIN
|
$this::DIALOG_CONTENT_OPTION_NAME_MARGIN
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -150,7 +148,7 @@ class Auth
|
||||||
if (!$id)
|
if (!$id)
|
||||||
{
|
{
|
||||||
$content->add(
|
$content->add(
|
||||||
$this->name,
|
$this->_name,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
0
|
0
|
||||||
|
|
@ -194,7 +192,7 @@ class Auth
|
||||||
$this->page->container->browser->database->identity->add(
|
$this->page->container->browser->database->identity->add(
|
||||||
$identity->crt(),
|
$identity->crt(),
|
||||||
$identity->key(),
|
$identity->key(),
|
||||||
$this->name->get_text() ? $this->name->get_text() : null
|
$this->_name->get_text() ? $this->_name->get_text() : null
|
||||||
),
|
),
|
||||||
$this->page->navbar->request->getValue()
|
$this->page->navbar->request->getValue()
|
||||||
);
|
);
|
||||||
|
|
@ -253,7 +251,7 @@ class Auth
|
||||||
if (!$id)
|
if (!$id)
|
||||||
{
|
{
|
||||||
// Update sensibility
|
// Update sensibility
|
||||||
$this->name->set_sensitive(
|
$this->_name->set_sensitive(
|
||||||
$option->get_active()
|
$option->get_active()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue