Commit Graph

13 Commits (master)

Author SHA1 Message Date
Johan Ouwerkerk fb953ed677 feat!: respond to D-Bus activation
Minimal support for requesting window activation in response to
activation requests from D-Bus.

This provides minimal support for xdg D-Bus activation in Keysmith:
only the activation signal itself is handled; the DBus API for opening
URLs is not implemented.

Issues: #18
2021-05-03 04:03:24 +00:00
Johan Ouwerkerk ea19844300 refactor: proxy commandline arguments
Add a 'proxy' to forward external API calls into the main application
control flow. Right now it only supports forwarding commandline
arguments, but this construct is already useful as a starting point for
future D-Bus API support.
2021-05-03 04:03:24 +00:00
Johan Ouwerkerk 7274dc4f25 refactor: introduce "view models"
This change prepares Keysmith for moving logic away from QML to C++

 - Added view model classes for each defined Navigation::Page instance
 - Added 'flows' to provide a C++ equivalent for control flow logic
   which currently still resides in QML

The purpose the view model classes is to provide data (properties) and
actions (methods to invoke) to the QML page UI. These are relatively
thin wrappers to expose the C++ state (Store) and logic (flows) as an
easy to use API for the QML UI.
2021-05-03 04:03:24 +00:00
Johan Ouwerkerk bdcdb85bb6 refactor: introduce store for application state
The 'Store' is a convenient wrapper for injecting a dependency on the
entire application state (root) so it can be re-used by independent
flows of C++ logic. It will be used both to provide data to the view
models for the QML UI, and as a way to record results of actions
dispatched from the UI.

With this change the following (additional) state is defined:

 - OverviewState, which will be used to track state that determines how
   the AccountsOverview QML UI should render and what features are
   enabled/disabled in it. This state may be manipulated as a a
   side-effect of various interactios with arbitrary pages.
 - FlowState, which will be used to track state about which control/
   logic flows have completed and whether or not something is currently
   running. This is will be used to avoid distracting the user from an
   active UX flow with random unrelated prompts.
2021-05-03 04:03:24 +00:00
Johan Ouwerkerk 12e060923e refactor: UI (page) navigation from C++ code
An app::Navigation class is introduced with an API very similar to the
Kirigami.PageRouter in QML. This new class is responsible for pusing
populated view model classes from C++ into QML ownership and triggering
appropriate navigation events. On the QML side a signal handler
forwards these calls to the Kirigami.PageRouter to perform the actual
navigation in the UI.

This construct paves the way for moving state transition and related
logic out of QML and towards C++, since this logic is currently mostly
concerned with page navigation in Keysmith. Ultimately that transition
should make the QML (page) views more easily re-usable.
2021-05-03 04:03:24 +00:00
Johan Ouwerkerk 4425795211 feat: add basic support for accepting otpauth:// URIs from the commandline
This change is a building block towards receiving decoded QR codes from other applications and adding corresponding accounts in Keysmith.

Issues: #7, #14
2020-10-27 18:08:31 +01:00
Johan Ouwerkerk 937a48bed7 chore: prune a few CMakeLists.txt files 2020-10-27 18:08:31 +01:00
Johan Ouwerkerk dadd9d3973 chore: implement fixes suggested by static analysis
These are potentially blocking the basic QR parsing feature from landing.

See-Also: https://invent.kde.org/utilities/keysmith/-/merge_requests/57
2020-10-24 18:57:13 +02:00
Johan Ouwerkerk f16eba4505 Plumbing for asking for passwords from QML
This change introduces a model to signal the UI what password "scenario" is
applicable and provides the necessary plumbing to expose it QML.
2020-04-23 18:59:17 +02:00
Johan Ouwerkerk f04b15340f Fix TODO items about logging for C++ code 2020-04-14 19:45:29 +02:00
Johan Ouwerkerk b451bd2556 Fix up licensing for REUSE compliance.
This adds licensing and copyright information where missing and normalises
existing licensing/copyright statements to SPDX metadata tags.
2020-04-10 13:34:31 +02:00
Johan Ouwerkerk 41d94024c2 Add basic clipboard support for copying tokens 2020-04-04 11:35:43 +02:00
Johan Ouwerkerk 1f15fb6e08 Introduce an 'application context' (sub)module for Keysmtih.
This module is meant to simplify consumption of various Keysmith objects in QML by not having to expose/manage all C++ dependencies.
2020-01-28 06:49:06 +00:00