Flow2: Refactor UI into Flow2AuthWidget only and improve Flow2Auth
authorMichael Schuster <michael@schuster.ms>
Mon, 23 Dec 2019 05:51:46 +0000 (06:51 +0100)
committerMichael Schuster <48932272+misch7@users.noreply.github.com>
Tue, 24 Dec 2019 06:46:57 +0000 (07:46 +0100)
commit8b5f09305c82c55aad6908ef4ca0d7bf4970700f
treee39145faa09459d168ebf0f892658bbd83a1cc89
parent6d033f2964370f7761f65ad4b8a23dbc26fe6ed6
Flow2: Refactor UI into Flow2AuthWidget only and improve Flow2Auth

- Flow2AuthCredsPage:
  - Remove .ui file and embed Flow2AuthWidget into layout

- Flow2AuthWidget:
  - Make use generic for Flow2AuthCredsPage and WebFlowCredentialsDialog
  - Fix _errorLabel to render HTML tags instead of dumping them as plain text

- Flow2Auth:
  - Explicitly start auth with startAuth(account) instead of using constructor
  - Take control of copying the auth link to clipboard
  - Request a new auth link on copying, to avoid expiry invalidation
  - Use signals statusChanged() and result() to be more verbose (status, errors)
  - Change timer invocation and add safety bool's to avoid weird behaviour when
    the user triggers multiple link-copy calls (fetchNewToken)

Signed-off-by: Michael Schuster <michael@schuster.ms>
src/gui/CMakeLists.txt
src/gui/creds/flow2auth.cpp
src/gui/creds/flow2auth.h
src/gui/creds/webflowcredentialsdialog.cpp
src/gui/creds/webflowcredentialsdialog.h
src/gui/wizard/flow2authcredspage.cpp
src/gui/wizard/flow2authcredspage.h
src/gui/wizard/flow2authcredspage.ui [deleted file]
src/gui/wizard/flow2authwidget.cpp
src/gui/wizard/flow2authwidget.h