Warning, /utilities/keysmith/src/contents/ui/HOTPAccountEntryView.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  * SPDX-License-Identifier: GPL-3.0-or-later
0003  * SPDX-FileCopyrightText: 2020 Johan Ouwerkerk <jm.ouwerkerk@gmail.com>
0004  */
0005 
0006 import org.kde.kirigami as Kirigami
0007 
0008 AccountEntryViewBase {
0009     /*
0010      * WARNING: AccountEntryViewBase is a derivative of SwipeListItem and SwipeListem instances *must* be
0011      * called `listItem`. This took *way* too long to figure out. If you change it, things will break for example the
0012      * flood fill effect when pressing a list entry on Android.
0013      */
0014     id: listItem
0015 
0016     actions: [
0017         Kirigami.Action {
0018             icon.name: "documentinfo"
0019             text: i18nc("Button to show details of a single account", "Show details")
0020             enabled: listItem.alive
0021             onTriggered: {
0022                 listItem.actionTriggered();
0023                 applicationWindow().pageStack.pushDialogLayer(listItem.details);
0024             }
0025         },
0026         Kirigami.Action {
0027             icon.name: "edit-delete"
0028             text: i18nc("Button for removal of a single account", "Delete account")
0029             enabled: listItem.alive
0030             onTriggered: {
0031                 listItem.actionTriggered();
0032                 listItem.sheet.open();
0033             }
0034         },
0035         Kirigami.Action {
0036             icon.name: "go-next" // "view-refresh"
0037             text: "Next token"
0038             enabled: listItem.alive
0039             onTriggered: {
0040                 listItem.actionTriggered();
0041                 listItem.account.advanceCounter(1);
0042             }
0043         }
0044     ]
0045 
0046     contentItem: TokenEntryViewLabels {
0047         accountName: account.name
0048         tokenValue: account.token
0049         labelColor: listItem.labelColor
0050     }
0051 }