sailfish-safe

Sailfish frontend for safe(1)
git clone git://git.z3bra.org/sailfish-safe.git
Log | Files | Refs | README | LICENSE

harbour-safe.qml (2024B)


      1 /*
      2  *   Copyright (C) 2019  Daniel Vrátil <dvratil@kde.org>
      3  *                 2021  Willy Goiffon <contact@z3bra.org>
      4  *
      5  *   This program is free software: you can redistribute it and/or modify
      6  *   it under the terms of the GNU General Public License as published by
      7  *   the Free Software Foundation, either version 3 of the License, or
      8  *   (at your option) any later version.
      9  *
     10  *   This program is distributed in the hope that it will be useful,
     11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
     12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13  *   GNU General Public License for more details.
     14  *
     15  *   You should have received a copy of the GNU General Public License
     16  *   along with this program.  If not, see <https://www.gnu.org/licenses/>.
     17  */
     18 
     19 import QtQuick 2.0
     20 import Sailfish.Silica 1.0
     21 import "pages"
     22 import harbour.safe 0.1
     23 
     24 ApplicationWindow
     25 {
     26     id: app
     27 
     28     PasswordSortProxyModel {
     29         id: passwordsModel
     30 
     31         dynamicSortFilter: true
     32         isSortLocaleAware: true
     33         sortCaseSensitivity: Qt.CaseInsensitive
     34 
     35         sourceModel: PasswordsModel {}
     36     }
     37 
     38     PasswordFilterModel {
     39         id: filterModel
     40 
     41         sourceModel: passwordsModel
     42     }
     43 
     44     Component {
     45         id: passphraseRequester
     46 
     47         PassphraseRequester {}
     48     }
     49 
     50     Component {
     51         id: searchPage
     52 
     53         SearchPage {
     54             model: filterModel
     55         }
     56     }
     57 
     58     Component {
     59         id: passwordsPage
     60 
     61         PasswordListPage {
     62             model: passwordsModel
     63             onFolderSelected: {
     64                 var newPage = passwordsPage.createObject(app, {
     65                         "rootIndex": index,
     66                         "currentPath": currentPath + "/" + name
     67                 });
     68                 app.pageStack.push(newPage)
     69             }
     70         }
     71     }
     72 
     73     cover: Qt.resolvedUrl("cover/CoverPage.qml")
     74 
     75     allowedOrientations: defaultAllowedOrientations
     76 
     77     Component.onCompleted: {
     78         app.pageStack.push(passwordsPage.createObject(app));
     79     }
     80 }