all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Shan Shaji <s.shaji@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox_login_manager 4/4] cleanup: run dart format command to fix formatting
Date: Tue,  4 Nov 2025 18:38:09 +0100	[thread overview]
Message-ID: <20251104173809.90052-5-s.shaji@proxmox.com> (raw)
In-Reply-To: <20251104173809.90052-1-s.shaji@proxmox.com>

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
 lib/proxmox_login_form.dart | 255 ++++++++++++++++++------------------
 1 file changed, 128 insertions(+), 127 deletions(-)

diff --git a/lib/proxmox_login_form.dart b/lib/proxmox_login_form.dart
index 30f2ef8..67febab 100644
--- a/lib/proxmox_login_form.dart
+++ b/lib/proxmox_login_form.dart
@@ -304,150 +304,151 @@ class _ProxmoxLoginPageState extends State<ProxmoxLoginPage> {
         ),
       ),
       child: Scaffold(
-        backgroundColor: ProxmoxColors.supportBlue,
-        body: SafeArea(
-          child: Stack(
-          children: [
-            SingleChildScrollView(
-              child: ConstrainedBox(
-                constraints: BoxConstraints.tightFor(
-                  height: MediaQuery.sizeOf(context).height -
-                      MediaQuery.viewPaddingOf(context).bottom -
-                      MediaQuery.viewPaddingOf(context).top,
-                ),
-                child: Padding(
-                    padding: EdgeInsets.symmetric(
-                      horizontal: MediaQuery.maybeOrientationOf(context) ==
-                              Orientation.portrait
-                          ? 12
-                          : 8,
+          backgroundColor: ProxmoxColors.supportBlue,
+          body: SafeArea(
+            child: Stack(
+              children: [
+                SingleChildScrollView(
+                  child: ConstrainedBox(
+                    constraints: BoxConstraints.tightFor(
+                      height: MediaQuery.sizeOf(context).height -
+                          MediaQuery.viewPaddingOf(context).bottom -
+                          MediaQuery.viewPaddingOf(context).top,
                     ),
-                    child: FutureBuilder<List<PveAccessDomainModel?>?>(
-                        future: _accessDomains,
-                        builder: (context, snapshot) {
-                          return Form(
-                            key: _formKey,
-                            onChanged: () {
-                              setState(() {
-                                _submitButtonEnabled =
-                                    _formKey.currentState!.validate();
-                              });
-                            },
-                            child: Column(
-                              mainAxisAlignment: MainAxisAlignment.center,
-                              children: [
-                                Expanded(
-                                  child: Align(
+                    child: Padding(
+                      padding: EdgeInsets.symmetric(
+                        horizontal: MediaQuery.maybeOrientationOf(context) ==
+                                Orientation.portrait
+                            ? 12
+                            : 8,
+                      ),
+                      child: FutureBuilder<List<PveAccessDomainModel?>?>(
+                          future: _accessDomains,
+                          builder: (context, snapshot) {
+                            return Form(
+                              key: _formKey,
+                              onChanged: () {
+                                setState(() {
+                                  _submitButtonEnabled =
+                                      _formKey.currentState!.validate();
+                                });
+                              },
+                              child: Column(
+                                mainAxisAlignment: MainAxisAlignment.center,
+                                children: [
+                                  Expanded(
+                                      child: Align(
                                     alignment: Alignment.center,
                                     child: Image.asset(
                                       'assets/images/proxmox_logo_symbol_wordmark.png',
                                       package: 'proxmox_login_manager',
                                     ),
-                                  )
-                                ),
-                                ProxmoxLoginForm(
-                                  originController: _originController,
-                                  originValidator: (value) {
-                                    if (value == null || value.isEmpty) {
-                                      return 'Please enter origin';
-                                    }
-                                    try {
-                                      normalizeUrl(value);
-                                      return null;
-                                    } on FormatException catch (_) {
-                                      return 'Invalid URI';
-                                    } on Exception catch (e) {
-                                      return 'Invalid URI: $e';
-                                    }
-                                  },
-                                  usernameController: _usernameController,
-                                  passwordController: _passwordController,
-                                  accessDomains: snapshot.data,
-                                  selectedDomain: _selectedDomain,
-                                  onSavePasswordChanged: (value) {
-                                    _savePasswordCB = value;
-                                  },
-                                  canSavePassword: _canSavePassword,
-                                  passwordSaved: widget.password != null,
-                                  onDomainChanged: (value) {
-                                    setState(() {
-                                      _selectedDomain = value;
-                                    });
-                                  },
-                                  onOriginSubmitted: () {
-                                    final isValid =
-                                        _formKey.currentState!.validate();
-                                    setState(() {
-                                      _submitButtonEnabled = isValid;
-                                    });
-                                    if (isValid) {
+                                  )),
+                                  ProxmoxLoginForm(
+                                    originController: _originController,
+                                    originValidator: (value) {
+                                      if (value == null || value.isEmpty) {
+                                        return 'Please enter origin';
+                                      }
+                                      try {
+                                        normalizeUrl(value);
+                                        return null;
+                                      } on FormatException catch (_) {
+                                        return 'Invalid URI';
+                                      } on Exception catch (e) {
+                                        return 'Invalid URI: $e';
+                                      }
+                                    },
+                                    usernameController: _usernameController,
+                                    passwordController: _passwordController,
+                                    accessDomains: snapshot.data,
+                                    selectedDomain: _selectedDomain,
+                                    onSavePasswordChanged: (value) {
+                                      _savePasswordCB = value;
+                                    },
+                                    canSavePassword: _canSavePassword,
+                                    passwordSaved: widget.password != null,
+                                    onDomainChanged: (value) {
                                       setState(() {
-                                        _accessDomains = _getAccessDomains();
+                                        _selectedDomain = value;
                                       });
-                                    }
-                                  },
-                                  onPasswordSubmitted: _submitButtonEnabled
-                                      ? () {
-                                          final isValid =
-                                              _formKey.currentState!.validate();
-                                          setState(() {
-                                            _submitButtonEnabled = isValid;
-                                          });
-                                          if (isValid) {
-                                            _onLoginButtonPressed();
+                                    },
+                                    onOriginSubmitted: () {
+                                      final isValid =
+                                          _formKey.currentState!.validate();
+                                      setState(() {
+                                        _submitButtonEnabled = isValid;
+                                      });
+                                      if (isValid) {
+                                        setState(() {
+                                          _accessDomains = _getAccessDomains();
+                                        });
+                                      }
+                                    },
+                                    onPasswordSubmitted: _submitButtonEnabled
+                                        ? () {
+                                            final isValid = _formKey
+                                                .currentState!
+                                                .validate();
+                                            setState(() {
+                                              _submitButtonEnabled = isValid;
+                                            });
+                                            if (isValid) {
+                                              _onLoginButtonPressed();
+                                            }
                                           }
-                                        }
-                                      : null,
-                                ),
-                                Expanded(
-                                  child: Align(
-                                    alignment: Alignment.bottomCenter,
-                                    child: SizedBox(
-                                      width: MediaQuery.of(context).size.width,
-                                      child: TextButton(
-                                        onPressed: _submitButtonEnabled
-                                            ? () {
-                                                final isValid = _formKey
-                                                    .currentState!
-                                                    .validate();
-                                                setState(() {
-                                                  _submitButtonEnabled =
-                                                      isValid;
-                                                });
-                                                if (isValid) {
-                                                  if (snapshot.hasData) {
-                                                    _onLoginButtonPressed();
-                                                  } else {
-                                                    setState(() {
-                                                      _accessDomains =
-                                                          _getAccessDomains();
-                                                    });
+                                        : null,
+                                  ),
+                                  Expanded(
+                                    child: Align(
+                                      alignment: Alignment.bottomCenter,
+                                      child: SizedBox(
+                                        width:
+                                            MediaQuery.of(context).size.width,
+                                        child: TextButton(
+                                          onPressed: _submitButtonEnabled
+                                              ? () {
+                                                  final isValid = _formKey
+                                                      .currentState!
+                                                      .validate();
+                                                  setState(() {
+                                                    _submitButtonEnabled =
+                                                        isValid;
+                                                  });
+                                                  if (isValid) {
+                                                    if (snapshot.hasData) {
+                                                      _onLoginButtonPressed();
+                                                    } else {
+                                                      setState(() {
+                                                        _accessDomains =
+                                                            _getAccessDomains();
+                                                      });
+                                                    }
                                                   }
                                                 }
-                                              }
-                                            : null,
-                                        child: const Text('Continue'),
+                                              : null,
+                                          child: const Text('Continue'),
+                                        ),
                                       ),
                                     ),
                                   ),
-                                ),
-                              ],
-                            ),
-                          );
-                        }),
+                                ],
+                              ),
+                            );
+                          }),
+                    ),
                   ),
                 ),
-              ),
-            IconButton(
-              icon: const Icon(Icons.close),
-              tooltip: "Close",
-              onPressed: () => Navigator.of(context).pop(),
+                IconButton(
+                  icon: const Icon(Icons.close),
+                  tooltip: "Close",
+                  onPressed: () => Navigator.of(context).pop(),
+                ),
+                if (_progressModel.inProgress > 0)
+                  ProxmoxProgressOverlay(message: _progressModel.message),
+              ],
             ),
-            if (_progressModel.inProgress > 0)
-              ProxmoxProgressOverlay(message: _progressModel.message),
-          ],
-        ),
-      )),
+          )),
     );
   }
 
-- 
2.50.1



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  parent reply	other threads:[~2025-11-04 17:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-04 17:38 [pve-devel] [PATCH proxmox_login_manager 0/4] fix #6983: ui: make cosmetic changes inside the login screen Shan Shaji
2025-11-04 17:38 ` [pve-devel] [PATCH proxmox_login_manager 1/4] fix: ui: disable continue button by default in login form Shan Shaji
2025-11-04 17:38 ` [pve-devel] [PATCH proxmox_login_manager 2/4] fix: ui: add more padding around the form in portrait mode Shan Shaji
2025-11-04 17:38 ` [pve-devel] [PATCH proxmox_login_manager 3/4] fix: ui: remove app bar and stack the close button on body Shan Shaji
2025-11-04 17:38 ` Shan Shaji [this message]
2025-11-11 14:05 ` [pve-devel] [PATCH proxmox_login_manager 0/4] fix #6983: ui: make cosmetic changes inside the login screen Shan Shaji

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251104173809.90052-5-s.shaji@proxmox.com \
    --to=s.shaji@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal