mirror of
https://github.com/QRouland/UTPass.git
synced 2025-07-04 19:22:27 +00:00
Compare commits
47 Commits
0.0.1
...
8ec593becc
Author | SHA1 | Date | |
---|---|---|---|
8ec593becc | |||
b022e30a89 | |||
063f66e99a | |||
6ac11e2da7 | |||
46145241fc | |||
399173b776 | |||
365e530efc | |||
3aa99791b8 | |||
80a5055b78 | |||
5e5a092da1 | |||
d33932be6d | |||
7418894456 | |||
63d53caad5 | |||
62c19f8ff9 | |||
37c481ece1 | |||
c6d7a025ff | |||
cec4e7dabc | |||
a9b979b011 | |||
42efea67d8 | |||
1818d3d7e8 | |||
df5321644a | |||
774019f4d0 | |||
a1b87a7b45 | |||
5d92b767a7 | |||
6a419c5a05 | |||
5bb5d36630 | |||
3264c26358 | |||
d53a012565 | |||
49c992aa8d | |||
123df71a5b | |||
fab14a395e | |||
cd3dc273b0 | |||
30727fde23 | |||
a6113f26ec | |||
09a58ee24b | |||
a722e7c261 | |||
17a533a2ef | |||
98ae4cc3d9 | |||
b48d9381f2 | |||
378e19e205 | |||
2e98d4356b | |||
7e4ef02f8c | |||
418b64a191 | |||
96e79d97c4 | |||
ace251c209 | |||
ae52834946 | |||
4f036e2d95 |
@ -5,8 +5,7 @@ suffix=none
|
|||||||
--align-reference=name
|
--align-reference=name
|
||||||
--convert-tabs
|
--convert-tabs
|
||||||
--attach-namespaces
|
--attach-namespaces
|
||||||
--max-code-length=100
|
--max-code-length=120
|
||||||
--max-instatement-indent=120
|
|
||||||
--pad-header
|
--pad-header
|
||||||
--pad-oper
|
--pad-oper
|
||||||
--lineend=linux
|
--lineend=linux
|
||||||
|
2
.github/FUNDING.yml
vendored
Normal file
2
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
ko_fi: qrouland # Replace with a single Ko-fi username
|
||||||
|
|
13
.gitignore
vendored
13
.gitignore
vendored
@ -1,5 +1,6 @@
|
|||||||
# Builds dirs
|
# Builds dirs
|
||||||
build*
|
build*
|
||||||
|
.cache
|
||||||
|
|
||||||
# IDE & Devs tools
|
# IDE & Devs tools
|
||||||
.clickable
|
.clickable
|
||||||
@ -10,13 +11,7 @@ build*
|
|||||||
*.kdev4
|
*.kdev4
|
||||||
*swp
|
*swp
|
||||||
scripts
|
scripts
|
||||||
|
CMakeLists.txt.*
|
||||||
|
|
||||||
# Third parties ouput dir
|
# venv
|
||||||
libs/third/local
|
venv
|
||||||
|
|
||||||
|
|
||||||
# desktop
|
|
||||||
desktop
|
|
||||||
|
|
||||||
# Test (Not Ready yet !)
|
|
||||||
tests
|
|
||||||
|
30
.gitmodules
vendored
30
.gitmodules
vendored
@ -1,30 +0,0 @@
|
|||||||
[submodule "third/gpgme"]
|
|
||||||
path = libs/gpg/gpgme
|
|
||||||
url = https://github.com/gpg/gpgme
|
|
||||||
[submodule "third/libassuan"]
|
|
||||||
path = libs/gpg/libassuan
|
|
||||||
url = https://github.com/gpg/libassuan
|
|
||||||
[submodule "third/libgpg-error"]
|
|
||||||
path = libs/gpg/libgpg-error
|
|
||||||
url = https://github.com/gpg/libgpg-error
|
|
||||||
[submodule "third/gnupg"]
|
|
||||||
path = libs/gpg/gnupg
|
|
||||||
url = https://github.com/gpg/gnupg
|
|
||||||
[submodule "libs/utils/quazip"]
|
|
||||||
path = libs/quazip
|
|
||||||
url = https://github.com/stachenov/quazip
|
|
||||||
[submodule "libs/gpg/gpgme"]
|
|
||||||
path = libs/gpg/gpgme
|
|
||||||
url = https://github.com/gpg/gpgme
|
|
||||||
[submodule "libs/gpg/libassuan"]
|
|
||||||
path = libs/gpg/libassuan
|
|
||||||
url = https://github.com/gpg/libassuan
|
|
||||||
[submodule "libs/gpg/libgpg-error"]
|
|
||||||
path = libs/gpg/libgpg-error
|
|
||||||
url = https://github.com/gpg/libgpg-error
|
|
||||||
[submodule "libs/gpg/gnupg"]
|
|
||||||
path = libs/gpg/gnupg
|
|
||||||
url = https://github.com/gpg/gnupg
|
|
||||||
[submodule "libs/quazip"]
|
|
||||||
path = libs/quazip
|
|
||||||
url = https://github.com/stachenov/quazip
|
|
@ -3,6 +3,10 @@ cmake_minimum_required(VERSION 3.5.1)
|
|||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
|
|
||||||
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
|
set(CMAKE_BUILD_TYPE "Release")
|
||||||
|
endif()
|
||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND dpkg-architecture -qDEB_HOST_ARCH
|
COMMAND dpkg-architecture -qDEB_HOST_ARCH
|
||||||
OUTPUT_VARIABLE CLICK_ARCH
|
OUTPUT_VARIABLE CLICK_ARCH
|
||||||
@ -28,11 +32,22 @@ set(PROJECT_NAME "UTPass")
|
|||||||
set(FULL_PROJECT_NAME "utpass.qrouland")
|
set(FULL_PROJECT_NAME "utpass.qrouland")
|
||||||
set(CMAKE_INSTALL_PREFIX /)
|
set(CMAKE_INSTALL_PREFIX /)
|
||||||
set(DATA_DIR /)
|
set(DATA_DIR /)
|
||||||
set(BIN_DIR ${DATA_DIR}lib/bin)
|
|
||||||
set(DESKTOP_FILE_NAME ${PROJECT_NAME}.desktop)
|
set(DESKTOP_FILE_NAME ${PROJECT_NAME}.desktop)
|
||||||
|
|
||||||
|
if(NOT TESTS_PATH)
|
||||||
|
set(TESTS_PATH "./tests")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
configure_file(main.in.cpp main.cpp)
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} main.cpp)
|
add_executable(${PROJECT_NAME} main.cpp)
|
||||||
qt5_use_modules(${PROJECT_NAME} Gui Qml Quick)
|
qt5_use_modules(${PROJECT_NAME} Gui Qml Quick QuickTest)
|
||||||
|
|
||||||
|
if(TESTS_RUNNER)
|
||||||
|
qt5_use_modules(${PROJECT_NAME} QuickTest)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
|
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||||
|
|
||||||
@ -41,20 +56,13 @@ configure_file(${CMAKE_CURRENT_BINARY_DIR}/manifest.json ${CMAKE_CURRENT_BINARY_
|
|||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json DESTINATION ${CMAKE_INSTALL_PREFIX})
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest_.json DESTINATION ${DATA_DIR})
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest_.json DESTINATION ${DATA_DIR})
|
||||||
|
|
||||||
#install(DIRECTORY desktop DESTINATION ${DATA_DIR})
|
|
||||||
|
|
||||||
install(FILES ${PROJECT_NAME}.apparmor DESTINATION ${DATA_DIR})
|
install(FILES ${PROJECT_NAME}.apparmor DESTINATION ${DATA_DIR})
|
||||||
install(FILES ${PROJECT_NAME}.contenthub DESTINATION ${DATA_DIR})
|
install(FILES ${PROJECT_NAME}.contenthub DESTINATION ${DATA_DIR})
|
||||||
install(FILES LICENSE DESTINATION ${DATA_DIR})
|
install(FILES LICENSE DESTINATION ${DATA_DIR})
|
||||||
install(DIRECTORY qml DESTINATION ${DATA_DIR})
|
install(DIRECTORY qml DESTINATION ${DATA_DIR})
|
||||||
install(DIRECTORY assets DESTINATION ${DATA_DIR})
|
install(DIRECTORY assets DESTINATION ${DATA_DIR})
|
||||||
file(GLOB_RECURSE BIN_FILES
|
|
||||||
"build/${ARCH_TRIPLET}/gpg/local/bin/*")
|
|
||||||
install(
|
|
||||||
FILES ${BIN_FILES}
|
|
||||||
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
|
||||||
DESTINATION ${BIN_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
file(GLOB_RECURSE I18N_SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/po qml/*.qml qml/*.js)
|
file(GLOB_RECURSE I18N_SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/po qml/*.qml qml/*.js)
|
||||||
@ -79,6 +87,9 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE_NAME} DESTINATION ${DAT
|
|||||||
|
|
||||||
add_subdirectory(po)
|
add_subdirectory(po)
|
||||||
add_subdirectory(plugins)
|
add_subdirectory(plugins)
|
||||||
|
if(TESTS_RUNNER)
|
||||||
|
add_subdirectory(tests/plugins)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
add_custom_target(${PROJECT_NAME}_FILES ALL SOURCES ${PROJECT_SRC_FILES})
|
add_custom_target(${PROJECT_NAME}_FILES ALL SOURCES ${PROJECT_SRC_FILES})
|
||||||
|
|
||||||
|
58
README.md
58
README.md
@ -8,35 +8,36 @@ UTPass is avalaible on the [OpenStore](open-store.io)
|
|||||||
|
|
||||||
[](https://open-store.io/app/utpass.qrouland)
|
[](https://open-store.io/app/utpass.qrouland)
|
||||||
|
|
||||||
## Build & Tests
|
|
||||||
|
|
||||||
See [Build & Tests wiki page](https://taiga.rdrive.ovh/project/utpass/wiki/build-tests)
|
|
||||||
|
|
||||||
## Contributing & Issues
|
|
||||||
|
|
||||||
See [Contributing wiki page](https://taiga.rdrive.ovh/project/utpass/wiki/contributing)
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
The goal is to be closest possible of the features offer by [ZX2C4’s pass command line application](https://www.passwordstore.org/).
|
The goal is to be closest possible of the features offer by [ZX2C4’s pass command line application](https://www.passwordstore.org/).
|
||||||
See [Features wiki page](https://taiga.rdrive.ovh/project/utpass/wiki/contributing) for details.
|
See [Features wiki page](https://taiga.rdrive.ovh/project/utpass/wiki/contributing) for details.
|
||||||
|
|
||||||
## License
|
## Export/Import
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
Assuming that there are already passwords in another device using [ZX2C4’s pass command line application](https://www.passwordstore.org/) and, therefore, that [gpg keys](https://gnupg.org/) have been previously generated for encryption purposes, these may be helpful commands:
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
Export gpg private keys in order to decrypt passwords:
|
||||||
it under the terms of the GNU General Public License as published by
|
```
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
gpg --output keys.gpg --export-secret-keys
|
||||||
(at your option) any later version.
|
```
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
Export passwords, assuming they reside in *.password-store* folder:
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
```
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
zip passwords.zip -r .password-store/
|
||||||
GNU General Public License for more details.
|
```
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
Both files have the correct format for UTPass to import them and work as intended. It is highly recommended to remove them after imported to **UTPass**.
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
|
## Build & Tests
|
||||||
|
|
||||||
|
See [Build & Tests wiki page](https://github.com/QRouland/UTPass/wiki/Build-&-Tests)
|
||||||
|
|
||||||
|
## Contributing & Issues
|
||||||
|
|
||||||
|
See [Contributing wiki page](https://github.com/QRouland/UTPass/wiki/Contributing)
|
||||||
|
|
||||||
|
|
||||||
## Useful Links
|
## Useful Links
|
||||||
@ -45,4 +46,23 @@ Some useful links related to UTPass development :
|
|||||||
* [Ubports](https://ubports.com/) : Ubuntu Touch Community
|
* [Ubports](https://ubports.com/) : Ubuntu Touch Community
|
||||||
* [ZX2C4’s pass command line application](https://www.passwordstore.org/) : the standard unix password manager.
|
* [ZX2C4’s pass command line application](https://www.passwordstore.org/) : the standard unix password manager.
|
||||||
* [Clickable](https://github.com/bhdouglass/clickable) : Compile, build, and deploy Ubuntu Touch click packages
|
* [Clickable](https://github.com/bhdouglass/clickable) : Compile, build, and deploy Ubuntu Touch click packages
|
||||||
|
* [GnuPG](https://gnupg.org/): The GNU Privacy Guard
|
||||||
* [Gpgme](https://www.gnupg.org/software/gpgme/index.html) : GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications
|
* [Gpgme](https://www.gnupg.org/software/gpgme/index.html) : GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications
|
||||||
|
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"policy_groups": [
|
"policy_groups": [
|
||||||
"content_exchange"
|
"content_exchange",
|
||||||
|
"networking"
|
||||||
],
|
],
|
||||||
"policy_version": 16.04
|
"policy_version": 20.04
|
||||||
}
|
}
|
||||||
|
@ -4,4 +4,4 @@ Exec=UTPass
|
|||||||
Icon=assets/logo.svg
|
Icon=assets/logo.svg
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
X-Ubuntu-Touch=true
|
X-Lomiri-Touch=true
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"template": "cmake",
|
|
||||||
"kill": "UTPass",
|
|
||||||
"scripts": {
|
|
||||||
"style": "echo 'Astyle :' && astyle --options=.astylerc main.cpp && astyle --options=.astylerc --recursive 'plugins/*.cpp,*.h' && echo 'QmlFmt :' && qmlfmt -l tests && qmlfmt -w tests && qmlfmt -l qml && qmlfmt -w qml"
|
|
||||||
},
|
|
||||||
"libraries": {
|
|
||||||
"gpg": {
|
|
||||||
"template": "cmake",
|
|
||||||
"make_jobs": 4,
|
|
||||||
"dependencies_build": [
|
|
||||||
"texinfo",
|
|
||||||
"gpgsm",
|
|
||||||
"bison"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"quazip": {
|
|
||||||
"template": "cmake",
|
|
||||||
"make_jobs": 4
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
34
clickable.yaml
Normal file
34
clickable.yaml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
clickable_minimum_required: 8
|
||||||
|
builder: cmake
|
||||||
|
kill: UTPass
|
||||||
|
|
||||||
|
scripts:
|
||||||
|
style: >-
|
||||||
|
echo 'Running Astyle :' && astyle --options=.astylerc --recursive '*.cpp,*.h' --exclude=build && echo 'Running QmlFormat' && find . -name "*.qml" -exec qmlformat -i {} \; && echo 'Success'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dependencies_target:
|
||||||
|
- libgpgmepp-dev
|
||||||
|
- libgpgme-dev
|
||||||
|
- libgit2-dev
|
||||||
|
- libquazip5-dev
|
||||||
|
- gpg
|
||||||
|
|
||||||
|
install_lib:
|
||||||
|
- "libgpg-error.so.0.28.0"
|
||||||
|
- "libassuan.so*"
|
||||||
|
- "libgpgme.so*"
|
||||||
|
- "libgpgmepp.so*"
|
||||||
|
- "libqgpgme.so*"
|
||||||
|
- "libgit2.so*"
|
||||||
|
- "libquazip5.so*"
|
||||||
|
- "libmbedtls.so*"
|
||||||
|
- "libmbedx509.so*"
|
||||||
|
- "libmbedcrypto.so*"
|
||||||
|
- "libhttp_parser.so*"
|
||||||
|
- "libssh2.so*"
|
||||||
|
|
||||||
|
install_bin:
|
||||||
|
- "gpg"
|
@ -1,68 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.5.1)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
||||||
include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
|
|
||||||
|
|
||||||
execute_process(
|
|
||||||
COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
|
|
||||||
OUTPUT_VARIABLE ARCH_TRIPLET
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
||||||
)
|
|
||||||
|
|
||||||
execute_process (
|
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/clean.sh ${ARCH_TRIPLET}
|
|
||||||
)
|
|
||||||
|
|
||||||
set(EXTERNAL_LIBS "${CMAKE_CURRENT_BINARY_DIR}/local/")
|
|
||||||
set(THIRD_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
||||||
set(LIBGPGERROR_PATH "${THIRD_PATH}/libgpg-error")
|
|
||||||
set(LIBASSUAN_PATH "${THIRD_PATH}/libassuan")
|
|
||||||
set(LIBGPGME_PATH "${THIRD_PATH}/gpgme")
|
|
||||||
set(GNUPG_PATH "${THIRD_PATH}/gnupg")
|
|
||||||
|
|
||||||
ExternalProject_Add(
|
|
||||||
LibGpgError
|
|
||||||
INSTALL_DIR ${EXTERNAL_LIBS}
|
|
||||||
DOWNLOAD_COMMAND ""
|
|
||||||
SOURCE_DIR ${LIBGPGERROR_PATH}
|
|
||||||
CONFIGURE_COMMAND <SOURCE_DIR>/autogen.sh && <SOURCE_DIR>/configure --prefix=${EXTERNAL_LIBS} --enable-static=yes --enable-shared=no --with-pic=yes --enable-maintainer-mode --host ${ARCH_TRIPLET} --disable-doc --disable-dependency-tracking
|
|
||||||
BUILD_IN_SOURCE 1
|
|
||||||
BUILD_COMMAND make
|
|
||||||
INSTALL_COMMAND make install
|
|
||||||
)
|
|
||||||
|
|
||||||
ExternalProject_Add(
|
|
||||||
LibGpgAssuan
|
|
||||||
DEPENDS LibGpgError
|
|
||||||
INSTALL_DIR ${EXTERNAL_LIBS}
|
|
||||||
DOWNLOAD_COMMAND ""
|
|
||||||
SOURCE_DIR ${LIBASSUAN_PATH}
|
|
||||||
CONFIGURE_COMMAND <SOURCE_DIR>/autogen.sh && <SOURCE_DIR>/configure --prefix=${EXTERNAL_LIBS} --enable-static=yes --enable-shared=no --with-pic=yes --enable-maintainer-mode --with-libgpg-error-prefix=${EXTERNAL_LIBS} --host ${ARCH_TRIPLET} --disable-doc --disable-dependency-tracking
|
|
||||||
BUILD_IN_SOURCE 1
|
|
||||||
BUILD_COMMAND make
|
|
||||||
INSTALL_COMMAND make install
|
|
||||||
)
|
|
||||||
|
|
||||||
ExternalProject_Add(
|
|
||||||
LibGpgme
|
|
||||||
DEPENDS LibGpgError LibGpgAssuan
|
|
||||||
INSTALL_DIR ${EXTERNAL_LIBS}
|
|
||||||
DOWNLOAD_COMMAND ""
|
|
||||||
SOURCE_DIR ${LIBGPGME_PATH}
|
|
||||||
CONFIGURE_COMMAND <SOURCE_DIR>/autogen.sh && <SOURCE_DIR>/configure --enable-languages=cpp,qt --enable-static=yes --enable-shared=no --with-pic=yes --prefix=${EXTERNAL_LIBS} --enable-maintainer-mode --with-libgpg-error-prefix=${EXTERNAL_LIBS} --with-libassuan-prefix=${EXTERNAL_LIBS} --host ${ARCH_TRIPLET} --disable-doc --disable-largefile --disable-dependency-tracking
|
|
||||||
BUILD_IN_SOURCE 1
|
|
||||||
BUILD_COMMAND make
|
|
||||||
INSTALL_COMMAND make install
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
ExternalProject_Add(
|
|
||||||
Gnupg
|
|
||||||
DEPENDS LibGpgError LibGpgAssuan
|
|
||||||
INSTALL_DIR ${EXTERNAL_LIBS}
|
|
||||||
DOWNLOAD_COMMAND ""
|
|
||||||
SOURCE_DIR ${GNUPG_PATH}
|
|
||||||
CONFIGURE_COMMAND <SOURCE_DIR>/autogen.sh && <SOURCE_DIR>/configure --prefix=${EXTERNAL_LIBS} --with-libgpg-error-prefix=${EXTERNAL_LIBS} --with-libassuan-prefix=${EXTERNAL_LIBS} --enable-maintainer-mode --with-libassuan-prefix=${EXTERNAL_LIBS} --host ${ARCH_TRIPLET} --disable-doc --disable-dependency-tracking
|
|
||||||
BUILD_IN_SOURCE 1
|
|
||||||
BUILD_COMMAND make
|
|
||||||
INSTALL_COMMAND make install
|
|
||||||
)
|
|
@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
|
|
||||||
|
|
||||||
if [ ! -z "$1" ] && [ -d $SCRIPTPATH/../../build/$1/gpg ]; then
|
|
||||||
rm -rf $SCRIPTPATH/../../build/$1/gpg
|
|
||||||
fi
|
|
||||||
|
|
||||||
git submodule update --init --recursive
|
|
||||||
|
|
||||||
for LIB in $SCRIPTPATH/*/
|
|
||||||
do
|
|
||||||
echo $LIB
|
|
||||||
cd $LIB && git clean -xdf && git reset --hard HEAD
|
|
||||||
done
|
|
Submodule libs/gpg/gnupg deleted from 8ae6a246be
Submodule libs/gpg/gpgme deleted from ea11c2a13c
Submodule libs/gpg/libassuan deleted from 4de3154ea6
Submodule libs/gpg/libgpg-error deleted from 85f427fd28
Submodule libs/quazip deleted from 4df6c7412e
@ -6,6 +6,10 @@
|
|||||||
#include <QtQml>
|
#include <QtQml>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef TEST_RUNNER
|
||||||
|
#include <QtQuickTest/quicktest.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
qDebug() << "Starting app from main.cpp";
|
qDebug() << "Starting app from main.cpp";
|
||||||
@ -13,6 +17,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
QGuiApplication::setApplicationName("utpass.qrouland");
|
QGuiApplication::setApplicationName("utpass.qrouland");
|
||||||
|
|
||||||
|
#ifndef TEST_RUNNER
|
||||||
auto *view = new QQuickView();
|
auto *view = new QQuickView();
|
||||||
view->setSource(QUrl(QStringLiteral("qml/Main.qml")));
|
view->setSource(QUrl(QStringLiteral("qml/Main.qml")));
|
||||||
view->setResizeMode(QQuickView::SizeRootObjectToView);
|
view->setResizeMode(QQuickView::SizeRootObjectToView);
|
||||||
@ -23,4 +28,7 @@ int main(int argc, char *argv[])
|
|||||||
Q_ARG(QVariant, QVariant::fromValue(mainView))
|
Q_ARG(QVariant, QVariant::fromValue(mainView))
|
||||||
);
|
);
|
||||||
return QGuiApplication::exec();
|
return QGuiApplication::exec();
|
||||||
|
#else
|
||||||
|
return quick_test_main(argc, argv, "@TESTS_PATH@", "@TESTS_PATH@");
|
||||||
|
#endif
|
||||||
}
|
}
|
@ -10,7 +10,7 @@
|
|||||||
"content-hub": "UTPass.contenthub"
|
"content-hub": "UTPass.contenthub"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": "0.0.1",
|
"version": "0.0.3-dev",
|
||||||
"maintainer": "Quentin Rouland <quentin@qrouland.com>",
|
"maintainer": "Quentin Rouland <quentin@qrouland.com>",
|
||||||
"framework" : "ubuntu-sdk-16.04"
|
"framework" : "ubuntu-sdk-20.04"
|
||||||
}
|
}
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
|
add_subdirectory(Git)
|
||||||
add_subdirectory(Pass)
|
add_subdirectory(Pass)
|
||||||
add_subdirectory(Utils)
|
add_subdirectory(Utils)
|
||||||
|
37
plugins/Git/CMakeLists.txt
Normal file
37
plugins/Git/CMakeLists.txt
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
|
||||||
|
set(PLUGIN "Git")
|
||||||
|
|
||||||
|
set(
|
||||||
|
SRC
|
||||||
|
plugin.cpp
|
||||||
|
libgit.cpp
|
||||||
|
git.cpp
|
||||||
|
utils.h
|
||||||
|
)
|
||||||
|
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
|
||||||
|
OUTPUT_VARIABLE ARCH_TRIPLET
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
if(ARCH_TRIPLET STREQUAL "")
|
||||||
|
set(ARCH_TRIPLET x86_64-linux-gnu)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(${PLUGIN} MODULE ${SRC})
|
||||||
|
set_target_properties(${PLUGIN} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PLUGIN})
|
||||||
|
qt5_use_modules(${PLUGIN} Qml Quick DBus)
|
||||||
|
|
||||||
|
|
||||||
|
add_library(libgit2 SHARED IMPORTED)
|
||||||
|
set_property(TARGET libgit2 PROPERTY IMPORTED_LOCATION "/usr/lib/${ARCH_TRIPLET}/libgit2.so")
|
||||||
|
|
||||||
|
target_link_libraries(${PLUGIN} libgit2)
|
||||||
|
|
||||||
|
|
||||||
|
set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")
|
||||||
|
install(TARGETS ${PLUGIN} DESTINATION ${QT_IMPORTS_DIR}/${PLUGIN}/)
|
||||||
|
install(FILES qmldir DESTINATION ${QT_IMPORTS_DIR}/${PLUGIN}/)
|
79
plugins/Git/git.cpp
Normal file
79
plugins/Git/git.cpp
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
#include <QUrl>
|
||||||
|
#include <QtCore/QDir>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QStandardPaths>
|
||||||
|
|
||||||
|
|
||||||
|
#include "git.h"
|
||||||
|
#include "libgit.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
|
QDir Git::clone_setup()
|
||||||
|
{
|
||||||
|
QDir tmp_dir(QStandardPaths::writableLocation( QStandardPaths::CacheLocation).append("/clone"));
|
||||||
|
|
||||||
|
tmp_dir.removeRecursively();
|
||||||
|
qDebug() << "Temp dir path is " << tmp_dir.absolutePath();
|
||||||
|
|
||||||
|
return tmp_dir;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Git::clone_tear_down(QDir tmp_dir)
|
||||||
|
{
|
||||||
|
return tmp_dir.removeRecursively();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Git::move_to_destination(QString path, QDir tmp_dir)
|
||||||
|
{
|
||||||
|
qDebug() << "Removing password_store " << path;
|
||||||
|
QDir destination_dir(path);
|
||||||
|
destination_dir.removeRecursively();
|
||||||
|
|
||||||
|
qDebug() << "Moving cloned content to destination dir";
|
||||||
|
QDir dir;
|
||||||
|
qDebug() << tmp_dir.absolutePath() << " to " << destination_dir.absolutePath();
|
||||||
|
return dir.rename(tmp_dir.absolutePath(), destination_dir.absolutePath()); // TODO Better error handling
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
bool Git::clone(QString url, QString path, mode_type mode) //, GitPlugin::RepoType type, QString pass)
|
||||||
|
{
|
||||||
|
auto v = overload {
|
||||||
|
[](const Unset & x) { return "Unset"; },
|
||||||
|
[](const HTTP & x) { return "Unset"; },
|
||||||
|
[](const HTTPAuth & x) { return "HTTPAuth"; },
|
||||||
|
[](const SSHAuth & x) { return "SSHAuth"; },
|
||||||
|
[](const SSHKey & x) { return "SSHKey"; },
|
||||||
|
};
|
||||||
|
qInfo() << "Cloning " << url << " to destination " << path << " using " << std::visit(v, mode);
|
||||||
|
|
||||||
|
LibGit::instance()->set_mode(mode);
|
||||||
|
auto tmp_dir = this->clone_setup();
|
||||||
|
|
||||||
|
qDebug() << "Cloning " << url << " to tmp dir " << tmp_dir.absolutePath();
|
||||||
|
auto ret = LibGit::instance()->clone(url, tmp_dir.absolutePath()); // TODO Better error handling
|
||||||
|
|
||||||
|
if (ret) {
|
||||||
|
this->move_to_destination(path, tmp_dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
this->clone_tear_down(tmp_dir);
|
||||||
|
LibGit::instance()->set_mode(Unset());
|
||||||
|
|
||||||
|
return ret ;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Git::clone_http(QString url, QString path) //, GitPlugin::RepoType type, QString pass)
|
||||||
|
{
|
||||||
|
HTTP mode = {};
|
||||||
|
return this->clone(url, path, mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Git::clone_http_pass(QString url, QString path, QString pass)
|
||||||
|
{
|
||||||
|
HTTPAuth mode = { pass };
|
||||||
|
return this->clone(url, path, mode);
|
||||||
|
}
|
32
plugins/Git/git.h
Normal file
32
plugins/Git/git.h
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#ifndef GIT_H
|
||||||
|
#define GIT_H
|
||||||
|
|
||||||
|
#include <QUrl>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QtCore/QDir>
|
||||||
|
|
||||||
|
#include "libgit.h"
|
||||||
|
|
||||||
|
class Git : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private:
|
||||||
|
QDir clone_setup();
|
||||||
|
bool move_to_destination(QString path, QDir tmp_dir);
|
||||||
|
bool clone_tear_down(QDir tmp_dir);
|
||||||
|
bool clone(QString url, QString path, mode_type mode);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
Git() = default;
|
||||||
|
~Git() override = default;
|
||||||
|
|
||||||
|
Q_INVOKABLE bool clone_http(QString url, QString path);
|
||||||
|
Q_INVOKABLE bool clone_http_pass(QString url, QString path, QString pass);
|
||||||
|
// Q_INVOKABLE bool clone_ssh_pass(QString url, QString path, QString pass);
|
||||||
|
// Q_INVOKABLE bool clone_ssh_key(QString url, QString path, QString pub_key, QString priv_key, QString passphrase);
|
||||||
|
// Q_INVOKABLE bool update(QUrl url, QString path);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
89
plugins/Git/libgit.cpp
Normal file
89
plugins/Git/libgit.cpp
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
#include <QUrl>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
#include <type_traits>
|
||||||
|
extern "C" {
|
||||||
|
#include <git2.h>
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "libgit.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
LibGit::LibGit()
|
||||||
|
{
|
||||||
|
git_libgit2_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
LibGit::~LibGit()
|
||||||
|
{
|
||||||
|
git_libgit2_shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
void LibGit::set_mode(mode_type type)
|
||||||
|
{
|
||||||
|
this->mode = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
int LibGit::credentials_cb(git_cred **out, const char *url, const char *username_from_url,
|
||||||
|
unsigned int allowed_types, void *payload)
|
||||||
|
{
|
||||||
|
// TODO : More precise Error Handling for UI
|
||||||
|
auto instance = LibGit::instance();
|
||||||
|
auto v = overload {
|
||||||
|
[](const Unset & x)
|
||||||
|
{
|
||||||
|
qDebug() << "credentials_cb : Unset ";
|
||||||
|
qWarning() << "credentials_cb : callback should never be call for Unset ";
|
||||||
|
return (int) GIT_EUSER;
|
||||||
|
},
|
||||||
|
[](const HTTP & x)
|
||||||
|
{
|
||||||
|
qDebug() << "credentials_cb : HTTP ";
|
||||||
|
qWarning() << "credentials_cb : callback should never be call for HTTP ";
|
||||||
|
return (int) GIT_EUSER;
|
||||||
|
},
|
||||||
|
[&out, &username_from_url](const HTTPAuth & x)
|
||||||
|
{
|
||||||
|
qDebug() << "credentials_cb : HTTPAuth ";
|
||||||
|
if (!username_from_url) {
|
||||||
|
qWarning() << "credentials_cb : no username provided ";
|
||||||
|
return (int) GIT_EUSER;
|
||||||
|
}
|
||||||
|
return git_cred_userpass_plaintext_new(out, username_from_url, x.pass.toLocal8Bit().constData());
|
||||||
|
},
|
||||||
|
[&](const SSHAuth & x)
|
||||||
|
{
|
||||||
|
qWarning() << "credentials_cb : SSHAuth to be implemented ";
|
||||||
|
return (int) GIT_EUSER;
|
||||||
|
}, // TODO
|
||||||
|
[&](const SSHKey & x)
|
||||||
|
{
|
||||||
|
qWarning() << "credentials_cb : SSHKey to be implemented ";
|
||||||
|
return (int) GIT_EUSER;
|
||||||
|
} // TODO
|
||||||
|
};
|
||||||
|
return std::visit(v, instance->mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool LibGit::clone(QString url, QString path)
|
||||||
|
{
|
||||||
|
git_repository *repo = NULL;
|
||||||
|
git_clone_options opts = GIT_CLONE_OPTIONS_INIT;
|
||||||
|
|
||||||
|
opts.fetch_opts.callbacks.credentials = *credentials_cb;
|
||||||
|
|
||||||
|
int ret = git_clone(&repo, url.toLocal8Bit().data(), path.toLocal8Bit().data(), &opts);
|
||||||
|
if (ret != 0) {
|
||||||
|
qDebug() << git_error_last()->message;
|
||||||
|
}
|
||||||
|
if (repo) {
|
||||||
|
git_repository_free(repo);
|
||||||
|
}
|
||||||
|
return ret == 0; // TODO Clean error handling to return specifics errors for the ui
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
46
plugins/Git/libgit.h
Normal file
46
plugins/Git/libgit.h
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
#ifndef LIBGIT_H
|
||||||
|
#define LIBGIT_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QUrl>
|
||||||
|
#include <git2/clone.h>
|
||||||
|
extern "C" {
|
||||||
|
#include <git2/transport.h>
|
||||||
|
}
|
||||||
|
#include <memory>
|
||||||
|
#include <variant>
|
||||||
|
|
||||||
|
struct Unset { };
|
||||||
|
struct HTTP { };
|
||||||
|
struct HTTPAuth {
|
||||||
|
QString pass;
|
||||||
|
};
|
||||||
|
struct SSHAuth { };
|
||||||
|
struct SSHKey { };
|
||||||
|
typedef std::variant<Unset, HTTP, HTTPAuth, SSHAuth, SSHKey> mode_type;
|
||||||
|
|
||||||
|
class LibGit
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
LibGit();
|
||||||
|
|
||||||
|
mode_type mode;
|
||||||
|
|
||||||
|
static int credentials_cb(git_cred **out, const char *url, const char *username_from_url,
|
||||||
|
unsigned int allowed_types, void *payload);
|
||||||
|
|
||||||
|
public:
|
||||||
|
~LibGit();
|
||||||
|
static std::shared_ptr<LibGit> instance()
|
||||||
|
{
|
||||||
|
static std::shared_ptr<LibGit> s{new LibGit};
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
LibGit(LibGit const &) = delete;
|
||||||
|
void operator=(LibGit const &) = delete;
|
||||||
|
|
||||||
|
bool clone(QString url, QString path);
|
||||||
|
void set_mode(mode_type type);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
13
plugins/Git/plugin.cpp
Normal file
13
plugins/Git/plugin.cpp
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#include <QtQml>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
|
#include "plugin.h"
|
||||||
|
#include "git.h"
|
||||||
|
|
||||||
|
|
||||||
|
void GitPlugin::registerTypes(const char *uri)
|
||||||
|
{
|
||||||
|
//@uri Git
|
||||||
|
qmlRegisterSingletonType<Git>(uri, 1, 0, "Git", [](QQmlEngine *, QJSEngine *) -> QObject * { return new Git; });
|
||||||
|
|
||||||
|
}
|
16
plugins/Git/plugin.h
Normal file
16
plugins/Git/plugin.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef GITPLUGIN_H
|
||||||
|
#define GITPLUGIN_H
|
||||||
|
|
||||||
|
#include <QQmlExtensionPlugin>
|
||||||
|
|
||||||
|
class GitPlugin : public QQmlExtensionPlugin
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PLUGIN_METADATA(IID
|
||||||
|
"org.qt-project.Qt.QQmlExtensionInterface")
|
||||||
|
|
||||||
|
public:
|
||||||
|
void registerTypes(const char *uri) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
2
plugins/Git/qmldir
Normal file
2
plugins/Git/qmldir
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
module Git
|
||||||
|
plugin Git
|
11
plugins/Git/utils.h
Normal file
11
plugins/Git/utils.h
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#ifndef UTILS_H
|
||||||
|
#define UTILS_H
|
||||||
|
|
||||||
|
template<class... Ts>
|
||||||
|
struct overload : Ts... {
|
||||||
|
using Ts::operator()...;
|
||||||
|
};
|
||||||
|
template<class... Ts>
|
||||||
|
overload(Ts...) -> overload<Ts...>;
|
||||||
|
|
||||||
|
#endif // UTILS_H
|
@ -1,4 +1,4 @@
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
|
||||||
set(PLUGIN "Pass")
|
set(PLUGIN "Pass")
|
||||||
|
|
||||||
set(
|
set(
|
||||||
@ -26,29 +26,26 @@ add_library(${PLUGIN} MODULE ${SRC})
|
|||||||
set_target_properties(${PLUGIN} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PLUGIN})
|
set_target_properties(${PLUGIN} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PLUGIN})
|
||||||
qt5_use_modules(${PLUGIN} Qml Quick DBus)
|
qt5_use_modules(${PLUGIN} Qml Quick DBus)
|
||||||
|
|
||||||
set(EXTERNAL_LIBS "${CMAKE_SOURCE_DIR}/build/${ARCH_TRIPLET}/gpg/local/")
|
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${EXTERNAL_LIBS}/include)
|
add_library(gpgerror SHARED IMPORTED)
|
||||||
|
set_property(TARGET gpgerror PROPERTY IMPORTED_LOCATION "/usr/lib/${ARCH_TRIPLET}/libgpg-error.so.0.28.0")
|
||||||
|
|
||||||
add_library(GpgError STATIC IMPORTED)
|
add_library(libassuan SHARED IMPORTED)
|
||||||
set_property(TARGET GpgError PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libgpg-error.a")
|
set_property(TARGET libassuan PROPERTY IMPORTED_LOCATION "/usr/lib/${ARCH_TRIPLET}/libassuan.so")
|
||||||
|
|
||||||
add_library(GpgAssuan STATIC IMPORTED)
|
add_library(libgpgme SHARED IMPORTED)
|
||||||
set_property(TARGET GpgAssuan PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libassuan.a")
|
set_property(TARGET libgpgme PROPERTY IMPORTED_LOCATION "/usr/lib/${ARCH_TRIPLET}/libgpgme.so")
|
||||||
|
|
||||||
add_library(Gpgme STATIC IMPORTED)
|
add_library(libgpgmepp SHARED IMPORTED)
|
||||||
set_property(TARGET Gpgme PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libgpgme.a")
|
set_property(TARGET libgpgmepp PROPERTY IMPORTED_LOCATION "/usr/lib/${ARCH_TRIPLET}/libgpgmepp.so")
|
||||||
|
|
||||||
add_library(Gpgmepp STATIC IMPORTED)
|
add_library(libqgpgme SHARED IMPORTED)
|
||||||
set_property(TARGET Gpgmepp PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libgpgmepp.a")
|
set_property(TARGET libqgpgme PROPERTY IMPORTED_LOCATION "/usr/lib/${ARCH_TRIPLET}/libqgpgme.so")
|
||||||
|
|
||||||
add_library(QGpgme STATIC IMPORTED)
|
|
||||||
set_property(TARGET QGpgme PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libqgpgme.a")
|
|
||||||
|
|
||||||
target_link_libraries(${PLUGIN} QGpgme Gpgmepp Gpgme GpgAssuan GpgError)
|
target_link_libraries(${PLUGIN} gpgerror libassuan libgpgme libgpgmepp libqgpgme)
|
||||||
|
|
||||||
|
|
||||||
set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")
|
set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")
|
||||||
|
|
||||||
install(TARGETS ${PLUGIN} DESTINATION ${QT_IMPORTS_DIR}/${PLUGIN}/)
|
install(TARGETS ${PLUGIN} DESTINATION ${QT_IMPORTS_DIR}/${PLUGIN}/)
|
||||||
install(FILES qmldir DESTINATION ${QT_IMPORTS_DIR}/${PLUGIN}/)
|
install(FILES qmldir DESTINATION ${QT_IMPORTS_DIR}/${PLUGIN}/)
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QtCore/QStandardPaths>
|
#include <QtCore/QStandardPaths>
|
||||||
|
|
||||||
|
|
||||||
#include <gpgme.h>
|
#include <gpgme.h>
|
||||||
#include <gpgme++/data.h>
|
#include <gpgme++/data.h>
|
||||||
#include <gpgme++/global.h>
|
#include <gpgme++/global.h>
|
||||||
@ -24,8 +23,8 @@
|
|||||||
#include <qgpgme/changeownertrustjob.h>
|
#include <qgpgme/changeownertrustjob.h>
|
||||||
|
|
||||||
#include "gpg.h"
|
#include "gpg.h"
|
||||||
#include "pass.h"
|
|
||||||
#include "passphraseprovider.h"
|
#include "passphraseprovider.h"
|
||||||
|
#include "qprocess.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -37,11 +36,9 @@ Gpg::Gpg()
|
|||||||
{
|
{
|
||||||
m_window = nullptr;
|
m_window = nullptr;
|
||||||
|
|
||||||
initializeLibrary();
|
|
||||||
|
|
||||||
Gpg::initGpgConfig();
|
Gpg::initGpgConfig();
|
||||||
|
|
||||||
auto error = checkEngine(OpenPGP);
|
auto error = checkEngine(OpenPGP);
|
||||||
if (error) {
|
if (error) {
|
||||||
qDebug() << "Code Error : " << error.code();
|
qDebug() << "Code Error : " << error.code();
|
||||||
qDebug() << "Error str : " << error.asString();
|
qDebug() << "Error str : " << error.asString();
|
||||||
@ -66,15 +63,33 @@ QString Gpg::initGpgHome()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString Gpg::findCommandPath(const QString &command)
|
||||||
|
{
|
||||||
|
// Retrieve the PATH environment variable
|
||||||
|
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||||
|
QString pathEnv = env.value("PATH");
|
||||||
|
|
||||||
|
// Split the PATH by colon
|
||||||
|
QStringList pathDirs = pathEnv.split(":", QString::SkipEmptyParts);
|
||||||
|
|
||||||
|
// Check each directory in the PATH
|
||||||
|
foreach (const QString &dir, pathDirs) {
|
||||||
|
QFileInfo fileInfo(QDir(dir).filePath(command));
|
||||||
|
|
||||||
|
// If the file exists and is executable, return the path
|
||||||
|
if (fileInfo.exists() && fileInfo.isExecutable()) {
|
||||||
|
return fileInfo.absoluteFilePath();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return QString::null;
|
||||||
|
}
|
||||||
|
|
||||||
QString Gpg::initGpgExec()
|
QString Gpg::initGpgExec()
|
||||||
{
|
{
|
||||||
QString path = QDir::currentPath().append("/lib/bin/gpg");
|
QString path = findCommandPath("gpg");
|
||||||
QFileInfo file(path);
|
if (path.isNull()) {
|
||||||
if (!file.isFile()) {
|
qFatal("No valid gpg exec found !");
|
||||||
qFatal("GNUPGEXEC file not found !");
|
|
||||||
}
|
|
||||||
if (!file.isExecutable()) {
|
|
||||||
qFatal("GNUPGEXEC file not executable !");
|
|
||||||
}
|
}
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
@ -82,20 +97,30 @@ QString Gpg::initGpgExec()
|
|||||||
|
|
||||||
void Gpg::initGpgConfig()
|
void Gpg::initGpgConfig()
|
||||||
{
|
{
|
||||||
auto home = initGpgHome();
|
initializeLibrary();
|
||||||
auto exec = initGpgExec();
|
gpgme_set_global_flag("disable-gpgconf", "1");
|
||||||
|
|
||||||
|
QString home = initGpgHome();
|
||||||
|
qDebug() << "Gpg home is " << home;
|
||||||
|
QString exec = initGpgExec();
|
||||||
|
qDebug() << "Gpg exec is " << exec;
|
||||||
|
|
||||||
QFile agentConf(home + QStringLiteral("/gpg-agent.conf"));
|
QFile agentConf(home + QStringLiteral("/gpg-agent.conf"));
|
||||||
agentConf.remove();
|
agentConf.remove();
|
||||||
agentConf.open(QIODevice::WriteOnly);
|
agentConf.open(QIODevice::WriteOnly);
|
||||||
agentConf.write("allow-loopback-pinentry");
|
agentConf.write("allow-loopback-pinentry\n");
|
||||||
agentConf.close();
|
agentConf.close();
|
||||||
|
|
||||||
gpgme_set_engine_info (
|
auto err = gpgme_set_engine_info (
|
||||||
GPGME_PROTOCOL_OpenPGP,
|
GPGME_PROTOCOL_OpenPGP,
|
||||||
exec.toLocal8Bit().data(),
|
exec.toLocal8Bit().data(),
|
||||||
home.toLocal8Bit().data()
|
home.toLocal8Bit().data()
|
||||||
);
|
);
|
||||||
|
if (err != GPG_ERR_NO_ERROR) {
|
||||||
|
qDebug() << "Error code : " << err;
|
||||||
|
qDebug() << "Error str : " << gpg_strerror(err);
|
||||||
|
qFatal("GPGME set engine info failed !");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -174,13 +199,13 @@ Error Gpg::encryptToFile(QString str, QString path, QString uid, bool ascii_armo
|
|||||||
|
|
||||||
|
|
||||||
QPair<Error, std::vector< GpgME::Key >> Gpg::getAllKeys ( bool remote, const bool include_sigs,
|
QPair<Error, std::vector< GpgME::Key >> Gpg::getAllKeys ( bool remote, const bool include_sigs,
|
||||||
bool validate )
|
bool validate )
|
||||||
{
|
{
|
||||||
return getKeys(QString(""), remote, include_sigs, validate);
|
return getKeys(QString(""), remote, include_sigs, validate);
|
||||||
}
|
}
|
||||||
|
|
||||||
QPair<Error, std::vector<Key>> Gpg::getKeys(QString pattern_uid, bool remote, bool include_sigs,
|
QPair<Error, std::vector<Key >> Gpg::getKeys(QString pattern_uid, bool remote, bool include_sigs,
|
||||||
bool validate)
|
bool validate)
|
||||||
{
|
{
|
||||||
qDebug() << "Getting the keys " << pattern_uid;
|
qDebug() << "Getting the keys " << pattern_uid;
|
||||||
auto job = std::unique_ptr<KeyListJob>(openpgp()->keyListJob(remote, include_sigs, validate));
|
auto job = std::unique_ptr<KeyListJob>(openpgp()->keyListJob(remote, include_sigs, validate));
|
||||||
@ -189,7 +214,7 @@ QPair<Error, std::vector<Key>> Gpg::getKeys(QString pattern_uid, bool remote, bo
|
|||||||
auto result = job->exec(QStringList() << pattern_uid, false, keys);
|
auto result = job->exec(QStringList() << pattern_uid, false, keys);
|
||||||
|
|
||||||
qDebug() << "Got the keys " << pattern_uid;
|
qDebug() << "Got the keys " << pattern_uid;
|
||||||
return QPair<Error, std::vector< Key >>(result.error(), keys);
|
return QPair<Error, std::vector< Key >> (result.error(), keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,15 +13,15 @@ class Gpg
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
Gpg();
|
Gpg();
|
||||||
|
|
||||||
QObject *m_window;
|
QObject *m_window;
|
||||||
|
|
||||||
|
QString findCommandPath(const QString &command);
|
||||||
QString initGpgHome();
|
QString initGpgHome();
|
||||||
QString initGpgExec();
|
QString initGpgExec();
|
||||||
void initGpgConfig();
|
void initGpgConfig();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
~Gpg();
|
|
||||||
|
|
||||||
static std::shared_ptr<Gpg> instance()
|
static std::shared_ptr<Gpg> instance()
|
||||||
{
|
{
|
||||||
static std::shared_ptr<Gpg> s{new Gpg};
|
static std::shared_ptr<Gpg> s{new Gpg};
|
||||||
@ -41,11 +41,11 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
QPair< Error, std::vector< Key > > getAllKeys(bool remote = false, bool include_sigs = {}, bool
|
QPair<Error, std::vector<Key >> getAllKeys(bool remote = false, bool include_sigs = {}, bool
|
||||||
validate = false);
|
validate = false);
|
||||||
QPair<Error, std::vector<Key>> getKeys( QString pattern_uid, bool remote = false,
|
QPair<Error, std::vector<Key >> getKeys( QString pattern_uid, bool remote = false,
|
||||||
bool include_sigs = false,
|
bool include_sigs = false,
|
||||||
bool validate = false);
|
bool validate = false);
|
||||||
QPair<Error, Key> getKey( QString uid, bool remote = false, bool include_sigs = false,
|
QPair<Error, Key> getKey( QString uid, bool remote = false, bool include_sigs = false,
|
||||||
bool validate = false);
|
bool validate = false);
|
||||||
QPair<Error, QString> decrypt( QByteArray cipherText);
|
QPair<Error, QString> decrypt( QByteArray cipherText);
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
#include "pass.h"
|
#include "pass.h"
|
||||||
#include "gpg.h"
|
#include "gpg.h"
|
||||||
#include "passphraseprovider.h"
|
|
||||||
#include "passkeymodel.h"
|
#include "passkeymodel.h"
|
||||||
|
|
||||||
|
|
||||||
@ -18,49 +17,48 @@ void Pass::init(QObject *window)
|
|||||||
if (!window) {
|
if (!window) {
|
||||||
qFatal("window is invalid. Abording.");
|
qFatal("window is invalid. Abording.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Gpg::instance()->setWindow(window);
|
Gpg::instance()->setWindow(window);
|
||||||
|
|
||||||
QDir dir(m_password_store);
|
QDir dir(m_password_store);
|
||||||
if (!dir.exists())
|
if (!dir.exists()) {
|
||||||
dir.mkpath(".");
|
dir.mkpath(".");
|
||||||
qDebug() << "Password Store is :" << m_password_store;
|
}
|
||||||
|
qInfo() << "Password Store is :" << m_password_store;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Pass::decrypt(QUrl url)
|
void Pass::decrypt(QUrl url)
|
||||||
{
|
{
|
||||||
qDebug() << "Start decrypting";
|
qInfo() << "Decrypting";
|
||||||
auto decrypt_ret = Gpg::instance()->decryptFromFile(url.toLocalFile());
|
auto decrypt_ret = Gpg::instance()->decryptFromFile(url.toLocalFile());
|
||||||
if (decrypt_ret.first) {
|
if (decrypt_ret.first) {
|
||||||
qDebug() << "Decrypt Failed";
|
qInfo() << "Decrypt Failed";
|
||||||
emit decryptFailed();
|
emit decryptFailed();
|
||||||
} else if (decrypt_ret.second.isNull()) {
|
} else if (decrypt_ret.second.isNull()) {
|
||||||
qDebug() << "Decrypt Canceled";
|
qInfo() << "Decrypt Canceled";
|
||||||
emit decryptCanceled();
|
emit decryptCanceled();
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Decrypt OK";
|
qInfo() << "Decrypt OK";
|
||||||
emit decrypted(decrypt_ret.second);
|
emit decrypted(decrypt_ret.second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Pass::gpgDeleteKeyId(QString id)
|
bool Pass::gpgDeleteKeyId(QString id)
|
||||||
{
|
{
|
||||||
qDebug() << "Start deleting Key id " << id;
|
qInfo() << "Deleting Key id " << id;
|
||||||
return !Gpg::instance()->deleteKeyId(id);
|
return !Gpg::instance()->deleteKeyId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Pass::gpgImportKeyFromFile(QUrl url)
|
bool Pass::gpgImportKeyFromFile(QUrl url)
|
||||||
{
|
{
|
||||||
qDebug() << "Start importing Key from " << url;
|
qInfo() << "Importing Key from " << url;
|
||||||
return !Gpg::instance()->importKeysFromFile(url.toLocalFile());
|
return !Gpg::instance()->importKeysFromFile(url.toLocalFile());
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant Pass::gpgGetAllKeysModel()
|
QVariant Pass::gpgGetAllKeysModel()
|
||||||
{
|
{
|
||||||
|
qInfo() << "Getting all key form gpg ";
|
||||||
return QVariant::fromValue(PassKeyModel::keysToPassKeyQObjectList(
|
return QVariant::fromValue(PassKeyModel::keysToPassKeyQObjectList(
|
||||||
Gpg::instance()->getAllKeys().second));
|
Gpg::instance()->getAllKeys().second));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Pass::getPasswordStore()
|
|
||||||
{
|
|
||||||
return m_password_store;
|
|
||||||
}
|
|
||||||
|
@ -9,6 +9,9 @@
|
|||||||
class Pass : public QObject
|
class Pass : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_PROPERTY(QString password_store READ password_store)
|
||||||
|
|
||||||
|
private:
|
||||||
QString m_password_store;
|
QString m_password_store;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
@ -16,13 +19,16 @@ signals:
|
|||||||
void decryptCanceled();
|
void decryptCanceled();
|
||||||
void decryptFailed();
|
void decryptFailed();
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Pass();
|
Pass();
|
||||||
~Pass() override = default;
|
~Pass() override = default;
|
||||||
|
|
||||||
|
QString password_store() const
|
||||||
|
{
|
||||||
|
return m_password_store;
|
||||||
|
}
|
||||||
|
|
||||||
Q_INVOKABLE void init(QObject *window);
|
Q_INVOKABLE void init(QObject *window);
|
||||||
Q_INVOKABLE QString getPasswordStore();
|
|
||||||
Q_INVOKABLE void decrypt(QUrl url);
|
Q_INVOKABLE void decrypt(QUrl url);
|
||||||
Q_INVOKABLE bool gpgDeleteKeyId(QString id);
|
Q_INVOKABLE bool gpgDeleteKeyId(QString id);
|
||||||
Q_INVOKABLE bool gpgImportKeyFromFile(QUrl url);
|
Q_INVOKABLE bool gpgImportKeyFromFile(QUrl url);
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#include <QEventLoop>
|
#include <QEventLoop>
|
||||||
#include <QSemaphore>
|
#include <QSemaphore>
|
||||||
#include <gpgme++/interfaces/passphraseprovider.h>
|
#include <gpgme++/interfaces/passphraseprovider.h>
|
||||||
#include "passphraseprovider.h"
|
|
||||||
#include "gpg.h"
|
#include "gpg.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
|
||||||
set(PLUGIN "Utils")
|
set(PLUGIN "Utils")
|
||||||
|
|
||||||
set(
|
set(
|
||||||
@ -23,15 +23,10 @@ add_library(${PLUGIN} MODULE ${SRC})
|
|||||||
set_target_properties(${PLUGIN} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PLUGIN})
|
set_target_properties(${PLUGIN} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PLUGIN})
|
||||||
qt5_use_modules(${PLUGIN} Qml Quick DBus)
|
qt5_use_modules(${PLUGIN} Qml Quick DBus)
|
||||||
|
|
||||||
set(EXTERNAL_LIBS "${CMAKE_SOURCE_DIR}/build/${ARCH_TRIPLET}/quazip/install/")
|
add_library(libquazip5 SHARED IMPORTED)
|
||||||
|
set_property(TARGET libquazip5 PROPERTY IMPORTED_LOCATION "/usr/lib/${ARCH_TRIPLET}/libquazip5.so")
|
||||||
INCLUDE_DIRECTORIES(${EXTERNAL_LIBS}/include)
|
|
||||||
|
|
||||||
add_library(quazip STATIC IMPORTED)
|
|
||||||
set_property(TARGET quazip PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libquazip5.a")
|
|
||||||
|
|
||||||
target_link_libraries(${PLUGIN} quazip)
|
|
||||||
|
|
||||||
|
target_link_libraries(${PLUGIN} libquazip5)
|
||||||
|
|
||||||
set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")
|
set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")
|
||||||
|
|
||||||
|
@ -7,8 +7,6 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
Utils::Utils() {};
|
|
||||||
|
|
||||||
bool Utils::unzip(QUrl zip_url, QString dir_out_path)
|
bool Utils::unzip(QUrl zip_url, QString dir_out_path)
|
||||||
{
|
{
|
||||||
auto tmp_dir_path = QStandardPaths::writableLocation(
|
auto tmp_dir_path = QStandardPaths::writableLocation(
|
||||||
@ -31,7 +29,7 @@ bool Utils::unzip(QUrl zip_url, QString dir_out_path)
|
|||||||
|
|
||||||
qDebug() << "Guessing if it should remove a single root folder";
|
qDebug() << "Guessing if it should remove a single root folder";
|
||||||
QStringList files_in_tmp_dir = tmp_dir.entryList(QDir::AllEntries | QDir::Hidden |
|
QStringList files_in_tmp_dir = tmp_dir.entryList(QDir::AllEntries | QDir::Hidden |
|
||||||
QDir::NoDotAndDotDot);
|
QDir::NoDotAndDotDot);
|
||||||
|
|
||||||
auto dir_import_path =
|
auto dir_import_path =
|
||||||
files_in_tmp_dir.length() == 1 ?
|
files_in_tmp_dir.length() == 1 ?
|
||||||
|
@ -10,7 +10,7 @@ class Utils : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Utils();
|
Utils() = default;
|
||||||
~Utils() override = default;
|
~Utils() override = default;
|
||||||
|
|
||||||
Q_INVOKABLE bool unzip(QUrl zip_url, QString dir_out);
|
Q_INVOKABLE bool unzip(QUrl zip_url, QString dir_out);
|
||||||
|
190
po/ca.po
Normal file
190
po/ca.po
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
# UTPass
|
||||||
|
# Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
# This file is distributed under the same license as the utpass.qrouland package.
|
||||||
|
# Joan CiberSheep <cibersheep@gmail.com>, 2019.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: utpass.qrouland\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2019-09-21 14:01+0000\n"
|
||||||
|
"PO-Revision-Date: 2019-09-30 08:53+0000\n"
|
||||||
|
"Last-Translator: Joan CiberSheep <cibersheep@gmail.com>\n"
|
||||||
|
"Language-Team: Catalan <https://translate-ut.org/projects/utpass/utpass/ca/>"
|
||||||
|
"\n"
|
||||||
|
"Language: ca\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 3.8\n"
|
||||||
|
|
||||||
|
#: ../qml/components/FileDir.qml:71
|
||||||
|
msgid "Decryption failed !"
|
||||||
|
msgstr "Ha fallat la desencriptació"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/DoubleValidationDialog.qml:28
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:29
|
||||||
|
#: ../qml/dialogs/SimpleValidationDialog.qml:19
|
||||||
|
msgid "Ok"
|
||||||
|
msgstr "D'acord"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/DoubleValidationDialog.qml:44
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:41
|
||||||
|
#: ../qml/dialogs/SimpleValidationDialog.qml:30
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr "Cancel·la"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/ErrorDialog.qml:12
|
||||||
|
msgid "Error !"
|
||||||
|
msgstr "Error"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/ErrorDialog.qml:15 ../qml/dialogs/SuccessDialog.qml:15
|
||||||
|
msgid "OK"
|
||||||
|
msgstr "D'acord"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:7
|
||||||
|
msgid "Authentication required"
|
||||||
|
msgstr "Es requereix autenticació"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:8
|
||||||
|
msgid "Enter passphrase:"
|
||||||
|
msgstr "Entreu la frase de pas:"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:20
|
||||||
|
msgid "passphrase"
|
||||||
|
msgstr "frase de pas"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/SuccessDialog.qml:12
|
||||||
|
msgid "Success !"
|
||||||
|
msgstr "Èxit"
|
||||||
|
|
||||||
|
#: ../qml/pages/headers/MainHeader.qml:8 ../qml/pages/headers/StackHeader.qml:8
|
||||||
|
#: UTPass.desktop.in.h:1
|
||||||
|
msgid "UTPass"
|
||||||
|
msgstr "UTPass"
|
||||||
|
|
||||||
|
#: ../qml/pages/headers/MainHeader.qml:23
|
||||||
|
msgid "Search"
|
||||||
|
msgstr "Cerca"
|
||||||
|
|
||||||
|
#: ../qml/pages/headers/MainHeader.qml:51 ../qml/pages/settings/Settings.qml:14
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Paràmetres"
|
||||||
|
|
||||||
|
#: ../qml/pages/headers/MainHeader.qml:58 ../qml/pages/Info.qml:11
|
||||||
|
msgid "Info"
|
||||||
|
msgstr "Informació"
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:50
|
||||||
|
msgid "<b>Version</b>"
|
||||||
|
msgstr "<b>Versió</b>"
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:68
|
||||||
|
msgid "<b>Maintainer</>"
|
||||||
|
msgstr "<b>Manteniment</>"
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:90
|
||||||
|
msgid "Suggest improvement(s) or report a bug(s)"
|
||||||
|
msgstr "Suggeriu millores o informeu d'un error"
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:94
|
||||||
|
msgid "Access to the source code"
|
||||||
|
msgstr "Accediu al codi font"
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:101
|
||||||
|
msgid "Released under the terms of the GNU GPL v3"
|
||||||
|
msgstr "Publicada sota els termes de la GNU GPL v3"
|
||||||
|
|
||||||
|
#: ../qml/pages/PasswordList.qml:23
|
||||||
|
msgid "Back"
|
||||||
|
msgstr "Enrere"
|
||||||
|
|
||||||
|
#: ../qml/pages/PasswordList.qml:43
|
||||||
|
msgid ""
|
||||||
|
"No password found<br>You can import a password store zip in the settings"
|
||||||
|
msgstr ""
|
||||||
|
"No s'ha trobat cap contrasenya<br>Podeu un importar un zip de contrasenyes a "
|
||||||
|
"la configuració"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportKeyFile.qml:17
|
||||||
|
msgid "GPG Key Import"
|
||||||
|
msgstr "Importa clau GPG"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportKeyFile.qml:69
|
||||||
|
msgid "Key import failed !"
|
||||||
|
msgstr "Ha fallat la importació de la clau"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportKeyFile.qml:76
|
||||||
|
msgid "Key successfully imported !"
|
||||||
|
msgstr "S'ha importat la clau amb èxit"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportZip.qml:17
|
||||||
|
msgid "Zip Password Store Import"
|
||||||
|
msgstr "Importa zip de contrasenyes"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportZip.qml:72
|
||||||
|
msgid ""
|
||||||
|
"Importing a new zip will delete<br>any existing password store!<br>Continue ?"
|
||||||
|
msgstr ""
|
||||||
|
"A l'Importar un nou zip s'eliminarà<br>qualsevol contrasenya desada "
|
||||||
|
"anteriorment<br>Voleu continuar ?"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportZip.qml:82
|
||||||
|
msgid "Password store import failed !"
|
||||||
|
msgstr "Ha fallat la importació de contrasenyes"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportZip.qml:89
|
||||||
|
msgid "Password store sucessfully imported !"
|
||||||
|
msgstr "S'han importat les contrasenyes amb èxit"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:16
|
||||||
|
msgid "Info Keys"
|
||||||
|
msgstr "Informació de la clau"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:44
|
||||||
|
msgid "Key id : %1"
|
||||||
|
msgstr "Identificació de la clau: %1"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:49
|
||||||
|
msgid "Delete this key"
|
||||||
|
msgstr "Elimina aquesta clau"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:68
|
||||||
|
msgid "You're are about to delete<br>%1<br>Continue ?"
|
||||||
|
msgstr "Esteu a punt d'eliminar<br>%1<br>Voleu continuar?"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:71
|
||||||
|
msgid "%1<br>will be definitively removed.<br>Continue ?"
|
||||||
|
msgstr "%1<br>s'eliminarà definitivament.<br>Voleu continuar?"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:87
|
||||||
|
msgid "Key removal failed !"
|
||||||
|
msgstr "Ha fallat l'eliminació de la clau"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:94
|
||||||
|
msgid "Key successfully deleted !"
|
||||||
|
msgstr "S'ha eliminat la clau amb èxit"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:28
|
||||||
|
msgid "GPG"
|
||||||
|
msgstr "GPG"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:32
|
||||||
|
msgid "Import a GPG key file"
|
||||||
|
msgstr "Importa un fitxer de clau GPG"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:36
|
||||||
|
msgid "Show GPG keys"
|
||||||
|
msgstr "Mostra les claus GPG"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:43
|
||||||
|
msgid "Password Store"
|
||||||
|
msgstr "Contrasenyes desades"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:47
|
||||||
|
msgid "Import a Password Store Zip"
|
||||||
|
msgstr "Importa un zip de contrasenyes"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:56
|
||||||
|
msgid "Warning: importing delete any exiting Password Store"
|
||||||
|
msgstr "Alertau: s'eliminarà qualsevol contrasenya desada a l'importar"
|
193
po/es.po
Normal file
193
po/es.po
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
# UTPass
|
||||||
|
# Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
# This file is distributed under the same license as the utpass.qrouland package.
|
||||||
|
# Advocatux <advocatux@airpost.net>, 2019.
|
||||||
|
# Reda <redxxiii@zaclys.net>, 2019.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: utpass.qrouland\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2019-09-21 14:01+0000\n"
|
||||||
|
"PO-Revision-Date: 2019-09-30 08:53+0000\n"
|
||||||
|
"Last-Translator: Advocatux <advocatux@airpost.net>\n"
|
||||||
|
"Language-Team: Spanish <https://translate-ut.org/projects/utpass/utpass/es/>"
|
||||||
|
"\n"
|
||||||
|
"Language: es\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 3.8\n"
|
||||||
|
|
||||||
|
#: ../qml/components/FileDir.qml:71
|
||||||
|
msgid "Decryption failed !"
|
||||||
|
msgstr "¡Falló el descifrado!"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/DoubleValidationDialog.qml:28
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:29
|
||||||
|
#: ../qml/dialogs/SimpleValidationDialog.qml:19
|
||||||
|
msgid "Ok"
|
||||||
|
msgstr "Aceptar"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/DoubleValidationDialog.qml:44
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:41
|
||||||
|
#: ../qml/dialogs/SimpleValidationDialog.qml:30
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr "Cancelar"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/ErrorDialog.qml:12
|
||||||
|
msgid "Error !"
|
||||||
|
msgstr "¡Error!"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/ErrorDialog.qml:15 ../qml/dialogs/SuccessDialog.qml:15
|
||||||
|
msgid "OK"
|
||||||
|
msgstr "Aceptar"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:7
|
||||||
|
msgid "Authentication required"
|
||||||
|
msgstr "Se requiere autentificación"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:8
|
||||||
|
msgid "Enter passphrase:"
|
||||||
|
msgstr "Introducir contraseña:"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:20
|
||||||
|
msgid "passphrase"
|
||||||
|
msgstr "contraseña"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/SuccessDialog.qml:12
|
||||||
|
msgid "Success !"
|
||||||
|
msgstr "¡Correcto!"
|
||||||
|
|
||||||
|
#: ../qml/pages/headers/MainHeader.qml:8 ../qml/pages/headers/StackHeader.qml:8
|
||||||
|
#: UTPass.desktop.in.h:1
|
||||||
|
msgid "UTPass"
|
||||||
|
msgstr "UTPass"
|
||||||
|
|
||||||
|
#: ../qml/pages/headers/MainHeader.qml:23
|
||||||
|
msgid "Search"
|
||||||
|
msgstr "Buscar"
|
||||||
|
|
||||||
|
#: ../qml/pages/headers/MainHeader.qml:51 ../qml/pages/settings/Settings.qml:14
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Configuración"
|
||||||
|
|
||||||
|
#: ../qml/pages/headers/MainHeader.qml:58 ../qml/pages/Info.qml:11
|
||||||
|
msgid "Info"
|
||||||
|
msgstr "Información"
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:50
|
||||||
|
msgid "<b>Version</b>"
|
||||||
|
msgstr "<b>Versión</b>"
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:68
|
||||||
|
msgid "<b>Maintainer</>"
|
||||||
|
msgstr "<b>Mantenedor</b>"
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:90
|
||||||
|
msgid "Suggest improvement(s) or report a bug(s)"
|
||||||
|
msgstr "Sugerir mejora(s) o reportar problema(s)"
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:94
|
||||||
|
msgid "Access to the source code"
|
||||||
|
msgstr "Acceso al código fuente"
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:101
|
||||||
|
msgid "Released under the terms of the GNU GPL v3"
|
||||||
|
msgstr "Publicado bajo los términos de la GNU GPL v3"
|
||||||
|
|
||||||
|
#: ../qml/pages/PasswordList.qml:23
|
||||||
|
msgid "Back"
|
||||||
|
msgstr "Atrás"
|
||||||
|
|
||||||
|
#: ../qml/pages/PasswordList.qml:43
|
||||||
|
msgid ""
|
||||||
|
"No password found<br>You can import a password store zip in the settings"
|
||||||
|
msgstr ""
|
||||||
|
"No se han encontrado contraseñas<br>Puede importar un archivo zip de "
|
||||||
|
"almacenamiento de contraseñas en la configuración"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportKeyFile.qml:17
|
||||||
|
msgid "GPG Key Import"
|
||||||
|
msgstr "Importar clave GPG"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportKeyFile.qml:69
|
||||||
|
msgid "Key import failed !"
|
||||||
|
msgstr "¡Falló la importación de la clave!"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportKeyFile.qml:76
|
||||||
|
msgid "Key successfully imported !"
|
||||||
|
msgstr "¡Clave importada correctamente!"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportZip.qml:17
|
||||||
|
msgid "Zip Password Store Import"
|
||||||
|
msgstr "Importar zip de almacenamiento de contraseñas"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportZip.qml:72
|
||||||
|
msgid ""
|
||||||
|
"Importing a new zip will delete<br>any existing password store!<br>Continue ?"
|
||||||
|
msgstr ""
|
||||||
|
"¡La importación de un nuevo zip borrará<br>cualquier contraseña "
|
||||||
|
"almacenada!<br>¿Continuar?"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportZip.qml:82
|
||||||
|
msgid "Password store import failed !"
|
||||||
|
msgstr "¡Falló la importación del archivo de contraseñas!"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportZip.qml:89
|
||||||
|
msgid "Password store sucessfully imported !"
|
||||||
|
msgstr ""
|
||||||
|
"¡La importación del archivo de contraseñas se ha realizado correctamente!"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:16
|
||||||
|
msgid "Info Keys"
|
||||||
|
msgstr "Información de las claves"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:44
|
||||||
|
msgid "Key id : %1"
|
||||||
|
msgstr "Identificador de clave: %1"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:49
|
||||||
|
msgid "Delete this key"
|
||||||
|
msgstr "Eliminar esta clave"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:68
|
||||||
|
msgid "You're are about to delete<br>%1<br>Continue ?"
|
||||||
|
msgstr "Está a punto de eliminar<br>%1<br>¿Continuar?"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:71
|
||||||
|
msgid "%1<br>will be definitively removed.<br>Continue ?"
|
||||||
|
msgstr "1%<br>será eliminada definitivamente.<br>¿Continuar?"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:87
|
||||||
|
msgid "Key removal failed !"
|
||||||
|
msgstr "¡Falló la eliminación de la clave!"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:94
|
||||||
|
msgid "Key successfully deleted !"
|
||||||
|
msgstr "¡La clave ha sido eliminada correctamente!"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:28
|
||||||
|
msgid "GPG"
|
||||||
|
msgstr "GPG"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:32
|
||||||
|
msgid "Import a GPG key file"
|
||||||
|
msgstr "Importar un archivo de clave GPG"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:36
|
||||||
|
msgid "Show GPG keys"
|
||||||
|
msgstr "Mostrar las claves GPG"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:43
|
||||||
|
msgid "Password Store"
|
||||||
|
msgstr "Archivo de contraseñas"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:47
|
||||||
|
msgid "Import a Password Store Zip"
|
||||||
|
msgstr "Importar un archivo Zip de contraseñas"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:56
|
||||||
|
msgid "Warning: importing delete any exiting Password Store"
|
||||||
|
msgstr ""
|
||||||
|
"Advertencia: Importar elimina cualquier archivo de contraseñas existente"
|
191
po/fr.po
Normal file
191
po/fr.po
Normal file
@ -0,0 +1,191 @@
|
|||||||
|
# UTPass
|
||||||
|
# Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
# This file is distributed under the same license as the utpass.qrouland package.
|
||||||
|
# Anne17 <>anneonyme017@netcourrier.com>, 2019.
|
||||||
|
# Quentin Rouland <quentin@qrouland.com>, 2019.
|
||||||
|
# Reda <redxxiii@zaclys.net>, 2019.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: utpass.qrouland\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2019-09-21 14:01+0000\n"
|
||||||
|
"PO-Revision-Date: 2019-10-05 17:01+0000\n"
|
||||||
|
"Last-Translator: Reda <redxxiii@zaclys.net>\n"
|
||||||
|
"Language-Team: French <https://translate-ut.org/projects/utpass/utpass/fr/>\n"
|
||||||
|
"Language: fr\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
||||||
|
"X-Generator: Weblate 3.8\n"
|
||||||
|
|
||||||
|
#: ../qml/components/FileDir.qml:71
|
||||||
|
msgid "Decryption failed !"
|
||||||
|
msgstr "Échec du déchiffrement !"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/DoubleValidationDialog.qml:28
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:29
|
||||||
|
#: ../qml/dialogs/SimpleValidationDialog.qml:19
|
||||||
|
msgid "Ok"
|
||||||
|
msgstr "Valider"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/DoubleValidationDialog.qml:44
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:41
|
||||||
|
#: ../qml/dialogs/SimpleValidationDialog.qml:30
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr "Annuler"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/ErrorDialog.qml:12
|
||||||
|
msgid "Error !"
|
||||||
|
msgstr "Erreur !"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/ErrorDialog.qml:15 ../qml/dialogs/SuccessDialog.qml:15
|
||||||
|
msgid "OK"
|
||||||
|
msgstr "Valider"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:7
|
||||||
|
msgid "Authentication required"
|
||||||
|
msgstr "Authentification nécessaire"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:8
|
||||||
|
msgid "Enter passphrase:"
|
||||||
|
msgstr "Saisissez votre mot de passe :"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:20
|
||||||
|
msgid "passphrase"
|
||||||
|
msgstr "Mot de passe"
|
||||||
|
|
||||||
|
#: ../qml/dialogs/SuccessDialog.qml:12
|
||||||
|
msgid "Success !"
|
||||||
|
msgstr "Réussite !"
|
||||||
|
|
||||||
|
#: ../qml/pages/headers/MainHeader.qml:8 ../qml/pages/headers/StackHeader.qml:8
|
||||||
|
#: UTPass.desktop.in.h:1
|
||||||
|
msgid "UTPass"
|
||||||
|
msgstr "UTPass"
|
||||||
|
|
||||||
|
#: ../qml/pages/headers/MainHeader.qml:23
|
||||||
|
msgid "Search"
|
||||||
|
msgstr "Rechercher"
|
||||||
|
|
||||||
|
#: ../qml/pages/headers/MainHeader.qml:51 ../qml/pages/settings/Settings.qml:14
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Paramètres"
|
||||||
|
|
||||||
|
#: ../qml/pages/headers/MainHeader.qml:58 ../qml/pages/Info.qml:11
|
||||||
|
msgid "Info"
|
||||||
|
msgstr "Infos"
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:50
|
||||||
|
msgid "<b>Version</b>"
|
||||||
|
msgstr "<b>Version</b>"
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:68
|
||||||
|
msgid "<b>Maintainer</>"
|
||||||
|
msgstr "<b>Mainteneur</>"
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:90
|
||||||
|
msgid "Suggest improvement(s) or report a bug(s)"
|
||||||
|
msgstr "Suggérer des améliorations ou signaler des problèmes"
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:94
|
||||||
|
msgid "Access to the source code"
|
||||||
|
msgstr "Accéder au code source"
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:101
|
||||||
|
msgid "Released under the terms of the GNU GPL v3"
|
||||||
|
msgstr "Distribuée sous les termes de la GNU GPL v3"
|
||||||
|
|
||||||
|
#: ../qml/pages/PasswordList.qml:23
|
||||||
|
msgid "Back"
|
||||||
|
msgstr "Retour"
|
||||||
|
|
||||||
|
#: ../qml/pages/PasswordList.qml:43
|
||||||
|
msgid ""
|
||||||
|
"No password found<br>You can import a password store zip in the settings"
|
||||||
|
msgstr ""
|
||||||
|
"Aucun mot de passe trouvé<br>Vous pouvez importer un fichier zip de stockage "
|
||||||
|
"de mots de passe dans les paramètres"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportKeyFile.qml:17
|
||||||
|
msgid "GPG Key Import"
|
||||||
|
msgstr "Importation de clé GPG"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportKeyFile.qml:69
|
||||||
|
msgid "Key import failed !"
|
||||||
|
msgstr "L'importation de la clé a échoué !"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportKeyFile.qml:76
|
||||||
|
msgid "Key successfully imported !"
|
||||||
|
msgstr "Clé importée avec succès !"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportZip.qml:17
|
||||||
|
msgid "Zip Password Store Import"
|
||||||
|
msgstr "Importation d'un fichier zip de mots de passe"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportZip.qml:72
|
||||||
|
msgid ""
|
||||||
|
"Importing a new zip will delete<br>any existing password store!<br>Continue ?"
|
||||||
|
msgstr ""
|
||||||
|
"L'importation d'un nouveau zip supprimera<br>tout mot de passe stocké!<br>"
|
||||||
|
"Continuer ?"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportZip.qml:82
|
||||||
|
msgid "Password store import failed !"
|
||||||
|
msgstr "L'importation du fichier de mots de passe a échoué !"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportZip.qml:89
|
||||||
|
msgid "Password store sucessfully imported !"
|
||||||
|
msgstr "L'importation du fichier de mots de passe a réussi !"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:16
|
||||||
|
msgid "Info Keys"
|
||||||
|
msgstr "Informations sur les clés"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:44
|
||||||
|
msgid "Key id : %1"
|
||||||
|
msgstr "Identifiant de la clé : %1"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:49
|
||||||
|
msgid "Delete this key"
|
||||||
|
msgstr "Supprimer cette clé"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:68
|
||||||
|
msgid "You're are about to delete<br>%1<br>Continue ?"
|
||||||
|
msgstr "Vous êtes sur le point de supprimer<br>%1<br>Voulez-vous continuer ?"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:71
|
||||||
|
msgid "%1<br>will be definitively removed.<br>Continue ?"
|
||||||
|
msgstr "%1<br>sera définitivement supprimée.<br>Voulez-vous continuer ?"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:87
|
||||||
|
msgid "Key removal failed !"
|
||||||
|
msgstr "La suppression de clé a échoué !"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/InfoKeys.qml:94
|
||||||
|
msgid "Key successfully deleted !"
|
||||||
|
msgstr "La clé a été supprimée avec succès !"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:28
|
||||||
|
msgid "GPG"
|
||||||
|
msgstr "GPG"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:32
|
||||||
|
msgid "Import a GPG key file"
|
||||||
|
msgstr "Importer un fichier de clés GPG"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:36
|
||||||
|
msgid "Show GPG keys"
|
||||||
|
msgstr "Afficher les clés GPG"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:43
|
||||||
|
msgid "Password Store"
|
||||||
|
msgstr "Fichier de mots de passe"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:47
|
||||||
|
msgid "Import a Password Store Zip"
|
||||||
|
msgstr "Importer un fichier Zip de mots de passe"
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:56
|
||||||
|
msgid "Warning: importing delete any exiting Password Store"
|
||||||
|
msgstr "Attention : l'importation supprime les fichiers précédents"
|
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: utpass.qrouland\n"
|
"Project-Id-Version: utpass.qrouland\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2019-09-21 14:01+0000\n"
|
"POT-Creation-Date: 2025-01-13 20:49+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -17,169 +17,204 @@ msgstr ""
|
|||||||
"Content-Type: text/plain; charset=CHARSET\n"
|
"Content-Type: text/plain; charset=CHARSET\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: ../qml/components/FileDir.qml:71
|
#: ../qml/components/FileDir.qml:72
|
||||||
msgid "Decryption failed !"
|
msgid "Decryption failed !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/dialogs/DoubleValidationDialog.qml:28
|
|
||||||
#: ../qml/dialogs/PassphraseDialog.qml:29
|
|
||||||
#: ../qml/dialogs/SimpleValidationDialog.qml:19
|
|
||||||
msgid "Ok"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../qml/dialogs/DoubleValidationDialog.qml:44
|
|
||||||
#: ../qml/dialogs/PassphraseDialog.qml:41
|
|
||||||
#: ../qml/dialogs/SimpleValidationDialog.qml:30
|
|
||||||
msgid "Cancel"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../qml/dialogs/ErrorDialog.qml:12
|
#: ../qml/dialogs/ErrorDialog.qml:12
|
||||||
msgid "Error !"
|
msgid "Error !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/dialogs/ErrorDialog.qml:15 ../qml/dialogs/SuccessDialog.qml:15
|
#: ../qml/dialogs/ErrorDialog.qml:16
|
||||||
msgid "OK"
|
msgid "Close"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/dialogs/PassphraseDialog.qml:7
|
#: ../qml/dialogs/PassphraseDialog.qml:15
|
||||||
msgid "Authentication required"
|
msgid "Authentication required"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/dialogs/PassphraseDialog.qml:8
|
#: ../qml/dialogs/PassphraseDialog.qml:16
|
||||||
msgid "Enter passphrase:"
|
msgid "Enter passphrase:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/dialogs/PassphraseDialog.qml:20
|
#: ../qml/dialogs/PassphraseDialog.qml:21
|
||||||
msgid "passphrase"
|
msgid "passphrase"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:29
|
||||||
|
#: ../qml/dialogs/SimpleValidationDialog.qml:9
|
||||||
|
msgid "Ok"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../qml/dialogs/PassphraseDialog.qml:41
|
||||||
|
#: ../qml/dialogs/SimpleValidationDialog.qml:33
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/dialogs/SuccessDialog.qml:12
|
#: ../qml/dialogs/SuccessDialog.qml:12
|
||||||
msgid "Success !"
|
msgid "Success !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/headers/MainHeader.qml:8 ../qml/pages/headers/StackHeader.qml:8
|
#: ../qml/dialogs/SuccessDialog.qml:16
|
||||||
|
msgid "OK"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:61
|
||||||
|
msgid "<b>Version</b>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:82
|
||||||
|
msgid "<b>Maintainer</>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:109
|
||||||
|
msgid "Suggest improvement(s) or report a bug(s)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:114
|
||||||
|
msgid "Access to the source code"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:122
|
||||||
|
msgid "Released under the terms of the GNU GPL v3"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../qml/pages/Info.qml:131 ../qml/pages/headers/MainHeader.qml:33
|
||||||
|
msgid "Info"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../qml/pages/PasswordList.qml:26
|
||||||
|
msgid ""
|
||||||
|
"No password found<br>You can import a password store by cloning or importing "
|
||||||
|
"a zip in the settings"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../qml/pages/PasswordList.qml:65
|
||||||
|
msgid "Back"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../qml/pages/headers/MainHeader.qml:9 ../qml/pages/headers/StackHeader.qml:9
|
||||||
#: UTPass.desktop.in.h:1
|
#: UTPass.desktop.in.h:1
|
||||||
msgid "UTPass"
|
msgid "UTPass"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/headers/MainHeader.qml:23
|
#: ../qml/pages/headers/MainHeader.qml:26 ../qml/pages/settings/Settings.qml:70
|
||||||
msgid "Search"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../qml/pages/headers/MainHeader.qml:51 ../qml/pages/settings/Settings.qml:14
|
|
||||||
msgid "Settings"
|
msgid "Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/headers/MainHeader.qml:58 ../qml/pages/Info.qml:11
|
#: ../qml/pages/headers/MainHeader.qml:57
|
||||||
msgid "Info"
|
msgid "Search"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/Info.qml:50
|
#: ../qml/pages/settings/ImportGitClone.qml:36
|
||||||
msgid "<b>Version</b>"
|
msgid "Repo Url"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/Info.qml:68
|
#: ../qml/pages/settings/ImportGitClone.qml:53
|
||||||
msgid "<b>Maintainer</>"
|
msgid "Password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/Info.qml:90
|
#: ../qml/pages/settings/ImportGitClone.qml:70
|
||||||
msgid "Suggest improvement(s) or report a bug(s)"
|
msgid "Clone"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/Info.qml:94
|
#: ../qml/pages/settings/ImportGitClone.qml:90
|
||||||
msgid "Access to the source code"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../qml/pages/Info.qml:101
|
|
||||||
msgid "Released under the terms of the GNU GPL v3"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../qml/pages/PasswordList.qml:23
|
|
||||||
msgid "Back"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../qml/pages/PasswordList.qml:43
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"No password found<br>You can import a password store zip in the settings"
|
"Importing a git repo will delete<br>any existing password store!"
|
||||||
|
"<br>Continue ?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/ImportKeyFile.qml:17
|
#: ../qml/pages/settings/ImportGitClone.qml:91
|
||||||
msgid "GPG Key Import"
|
#: ../qml/pages/settings/ImportZip.qml:62 ../qml/pages/settings/InfoKeys.qml:77
|
||||||
|
msgid "Yes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/ImportKeyFile.qml:69
|
#: ../qml/pages/settings/ImportGitClone.qml:104
|
||||||
|
msgid "An error occured during git clone !"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportGitClone.qml:113
|
||||||
|
#: ../qml/pages/settings/ImportZip.qml:84
|
||||||
|
msgid "Password store sucessfully imported !"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportGitClone.qml:125
|
||||||
|
msgid "Git Clone Import"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/ImportKeyFile.qml:57
|
||||||
msgid "Key import failed !"
|
msgid "Key import failed !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/ImportKeyFile.qml:76
|
#: ../qml/pages/settings/ImportKeyFile.qml:66
|
||||||
msgid "Key successfully imported !"
|
msgid "Key successfully imported !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/ImportZip.qml:17
|
#: ../qml/pages/settings/ImportKeyFile.qml:77
|
||||||
msgid "Zip Password Store Import"
|
msgid "GPG Key Import"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/ImportZip.qml:72
|
#: ../qml/pages/settings/ImportZip.qml:61
|
||||||
msgid ""
|
msgid ""
|
||||||
"Importing a new zip will delete<br>any existing password store!<br>Continue ?"
|
"Importing a new zip will delete<br>any existing password store!<br>Continue ?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/ImportZip.qml:82
|
#: ../qml/pages/settings/ImportZip.qml:75
|
||||||
msgid "Password store import failed !"
|
msgid "Password store import failed !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/ImportZip.qml:89
|
#: ../qml/pages/settings/ImportZip.qml:96
|
||||||
msgid "Password store sucessfully imported !"
|
msgid "Zip Password Store Import"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/InfoKeys.qml:16
|
#: ../qml/pages/settings/InfoKeys.qml:41
|
||||||
msgid "Info Keys"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../qml/pages/settings/InfoKeys.qml:44
|
|
||||||
msgid "Key id : %1"
|
msgid "Key id : %1"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/InfoKeys.qml:49
|
#: ../qml/pages/settings/InfoKeys.qml:54
|
||||||
msgid "Delete this key"
|
msgid "Delete this key"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/InfoKeys.qml:68
|
#: ../qml/pages/settings/InfoKeys.qml:76
|
||||||
msgid "You're are about to delete<br>%1<br>Continue ?"
|
msgid "You're are about to delete<br>%1<br>Continue ?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/InfoKeys.qml:71
|
#: ../qml/pages/settings/InfoKeys.qml:94
|
||||||
msgid "%1<br>will be definitively removed.<br>Continue ?"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../qml/pages/settings/InfoKeys.qml:87
|
|
||||||
msgid "Key removal failed !"
|
msgid "Key removal failed !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/InfoKeys.qml:94
|
#: ../qml/pages/settings/InfoKeys.qml:103
|
||||||
msgid "Key successfully deleted !"
|
msgid "Key successfully deleted !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/Settings.qml:28
|
#: ../qml/pages/settings/InfoKeys.qml:114
|
||||||
|
msgid "Info Keys"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:23
|
||||||
msgid "GPG"
|
msgid "GPG"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/Settings.qml:32
|
#: ../qml/pages/settings/Settings.qml:29
|
||||||
msgid "Import a GPG key file"
|
msgid "Import a GPG key file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/Settings.qml:36
|
#: ../qml/pages/settings/Settings.qml:34
|
||||||
msgid "Show GPG keys"
|
msgid "Show GPG keys"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/Settings.qml:43
|
#: ../qml/pages/settings/Settings.qml:42
|
||||||
msgid "Password Store"
|
msgid "Password Store"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/Settings.qml:47
|
#: ../qml/pages/settings/Settings.qml:48
|
||||||
|
msgid "Import a Password Store using Git"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../qml/pages/settings/Settings.qml:53
|
||||||
msgid "Import a Password Store Zip"
|
msgid "Import a Password Store Zip"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../qml/pages/settings/Settings.qml:56
|
#: ../qml/pages/settings/Settings.qml:62
|
||||||
msgid "Warning: importing delete any exiting Password Store"
|
msgid "Warning: importing delete any exiting Password Store"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
52
qml/Main.qml
52
qml/Main.qml
@ -1,50 +1,48 @@
|
|||||||
|
import Lomiri.Components 1.3
|
||||||
|
import Lomiri.Components.Popups 1.3
|
||||||
|
import Pass 1.0
|
||||||
import QtQuick 2.4
|
import QtQuick 2.4
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import Ubuntu.Components.Popups 1.3
|
|
||||||
import Pass 1.0
|
|
||||||
import "dialogs"
|
import "dialogs"
|
||||||
|
|
||||||
MainView {
|
MainView {
|
||||||
|
//theme.name: "Lomiri.Components.Themes.SuruDark"
|
||||||
|
|
||||||
id: root
|
id: root
|
||||||
objectName: "mainView"
|
|
||||||
applicationName: "utpass.qrouland"
|
|
||||||
|
|
||||||
automaticOrientation: false
|
|
||||||
|
|
||||||
width: units.gu(48)
|
|
||||||
height: units.gu(80)
|
|
||||||
|
|
||||||
signal responsePassphraseDialog(bool canceled, string passphrase)
|
signal responsePassphraseDialog(bool canceled, string passphrase)
|
||||||
|
|
||||||
function initPass(rootView) {
|
function initPass(rootView) {
|
||||||
Pass.init(rootView)
|
Pass.init(rootView);
|
||||||
|
pageStack.push(Qt.resolvedUrl("pages/PasswordList.qml"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function callPassphraseDialog(useridHint, description, previousWasBad) {
|
function callPassphraseDialog(useridHint, description, previousWasBad) {
|
||||||
//TODO use parameters to impove passphrase dialog
|
//TODO use parameters to impove passphrase dialog
|
||||||
var passphraseDialog = PopupUtils.open(
|
var passphraseDialog = PopupUtils.open(Qt.resolvedUrl("dialogs/PassphraseDialog.qml"));
|
||||||
Qt.resolvedUrl("dialogs/PassphraseDialog.qml"))
|
passphraseDialog.activateFocus();
|
||||||
passphraseDialog.activateFocus()
|
var validated = function validated(passphrase) {
|
||||||
|
responsePassphraseDialog(false, passphrase);
|
||||||
var validated = function (passphrase) {
|
};
|
||||||
responsePassphraseDialog(false, passphrase)
|
var canceled = function canceled() {
|
||||||
}
|
responsePassphraseDialog(true, "");
|
||||||
|
};
|
||||||
var canceled = function () {
|
passphraseDialog.validated.connect(validated);
|
||||||
responsePassphraseDialog(true, "")
|
passphraseDialog.canceled.connect(canceled);
|
||||||
}
|
|
||||||
|
|
||||||
passphraseDialog.validated.connect(validated)
|
|
||||||
passphraseDialog.canceled.connect(canceled)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
objectName: "mainView"
|
||||||
|
applicationName: "utpass.qrouland"
|
||||||
|
automaticOrientation: false
|
||||||
|
width: units.gu(48)
|
||||||
|
height: units.gu(80)
|
||||||
|
|
||||||
PageStack {
|
PageStack {
|
||||||
id: pageStack
|
id: pageStack
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
pageStack.push(Qt.resolvedUrl("pages/PasswordList.qml"))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
import QtQuick 2.4
|
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import "../styles"
|
import "../styles"
|
||||||
|
import Lomiri.Components 1.3
|
||||||
|
import QtQuick 2.4
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: copyText
|
id: copyText
|
||||||
property string text
|
|
||||||
|
|
||||||
|
property string text
|
||||||
property bool commonBorder: true
|
property bool commonBorder: true
|
||||||
property int lBorderwidth: 0
|
property int lBorderwidth: 0
|
||||||
property int rBorderwidth: 0
|
property int rBorderwidth: 0
|
||||||
property int tBorderwidth: 0
|
property int tBorderwidth: 0
|
||||||
property int bBorderwidth: 0
|
property int bBorderwidth: 0
|
||||||
property int commonBorderWidth: 0
|
property int commonBorderWidth: 0
|
||||||
property string borderColor: UbuntuColors.warmGrey
|
property string borderColor: LomiriColors.warmGrey
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: units.gu(6)
|
height: units.gu(6)
|
||||||
@ -33,26 +33,27 @@ Item {
|
|||||||
anchors.rightMargin: units.gu(2)
|
anchors.rightMargin: units.gu(2)
|
||||||
height: units.gu(4)
|
height: units.gu(4)
|
||||||
name: "edit-copy"
|
name: "edit-copy"
|
||||||
color: UbuntuColors.orange
|
color: LomiriColors.orange
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onPressed: {
|
onPressed: {
|
||||||
parent.color = UbuntuColors.warmGrey
|
parent.color = LomiriColors.warmGrey;
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var mimeData = Clipboard.newData()
|
var mimeData = Clipboard.newData();
|
||||||
mimeData.text = copyText.text
|
mimeData.text = copyText.text;
|
||||||
Clipboard.push(mimeData)
|
Clipboard.push(mimeData);
|
||||||
}
|
}
|
||||||
onReleased: {
|
onReleased: {
|
||||||
parent.color = theme.palette.normal.background
|
parent.color = theme.palette.normal.background;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomBorder {
|
CustomBorder {
|
||||||
id: cb
|
id: cb
|
||||||
|
|
||||||
commonBorder: copyText.commonBorder
|
commonBorder: copyText.commonBorder
|
||||||
lBorderwidth: copyText.lBorderwidth
|
lBorderwidth: copyText.lBorderwidth
|
||||||
rBorderwidth: copyText.rBorderwidth
|
rBorderwidth: copyText.rBorderwidth
|
||||||
@ -60,5 +61,7 @@ Item {
|
|||||||
bBorderwidth: copyText.bBorderwidth
|
bBorderwidth: copyText.bBorderwidth
|
||||||
borderColor: copyText.borderColor
|
borderColor: copyText.borderColor
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,32 +1,33 @@
|
|||||||
import QtQuick 2.4
|
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import "../styles"
|
import "../styles"
|
||||||
|
import Lomiri.Components 1.3
|
||||||
|
import QtQuick 2.4
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: externalLink
|
id: externalLink
|
||||||
|
|
||||||
property string url
|
property string url
|
||||||
property string text
|
property string text
|
||||||
|
|
||||||
property bool commonBorder: true
|
property bool commonBorder: true
|
||||||
property int lBorderwidth: 0
|
property int lBorderwidth: 0
|
||||||
property int rBorderwidth: 0
|
property int rBorderwidth: 0
|
||||||
property int tBorderwidth: 0
|
property int tBorderwidth: 0
|
||||||
property int bBorderwidth: 0
|
property int bBorderwidth: 0
|
||||||
property int commonBorderWidth: 0
|
property int commonBorderWidth: 0
|
||||||
property string borderColor: UbuntuColors.warmGrey
|
property string borderColor: LomiriColors.warmGrey
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: units.gu(6)
|
height: units.gu(6)
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
color: theme.palette.normal.background
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: externalLink.text
|
text: externalLink.text
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: units.gu(2)
|
anchors.leftMargin: units.gu(2)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
color: theme.palette.normal.backgroundText
|
||||||
}
|
}
|
||||||
|
|
||||||
Icon {
|
Icon {
|
||||||
@ -36,18 +37,19 @@ Item {
|
|||||||
width: units.gu(4)
|
width: units.gu(4)
|
||||||
height: units.gu(4)
|
height: units.gu(4)
|
||||||
name: "go-next"
|
name: "go-next"
|
||||||
color: UbuntuColors.orange
|
color: LomiriColors.orange
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Qt.openUrlExternally(externalLink.url)
|
Qt.openUrlExternally(externalLink.url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomBorder {
|
CustomBorder {
|
||||||
id: cb
|
id: cb
|
||||||
|
|
||||||
commonBorder: externalLink.commonBorder
|
commonBorder: externalLink.commonBorder
|
||||||
lBorderwidth: externalLink.lBorderwidth
|
lBorderwidth: externalLink.lBorderwidth
|
||||||
rBorderwidth: externalLink.rBorderwidth
|
rBorderwidth: externalLink.rBorderwidth
|
||||||
@ -55,5 +57,7 @@ Item {
|
|||||||
bBorderwidth: externalLink.bBorderwidth
|
bBorderwidth: externalLink.bBorderwidth
|
||||||
borderColor: externalLink.borderColor
|
borderColor: externalLink.borderColor
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,28 @@
|
|||||||
import QtQuick 2.4
|
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import Ubuntu.Components.Popups 1.3
|
|
||||||
import Pass 1.0
|
|
||||||
import "../styles"
|
|
||||||
import "../dialogs"
|
import "../dialogs"
|
||||||
|
import "../styles"
|
||||||
|
import Lomiri.Components 1.3
|
||||||
|
import Lomiri.Components.Popups 1.3
|
||||||
|
import Lomiri.Components.Themes 1.3
|
||||||
|
import Pass 1.0
|
||||||
|
import QtQuick 2.4
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: fileDir
|
id: fileDir
|
||||||
|
|
||||||
property string activePasswordName
|
property string activePasswordName
|
||||||
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
height: units.gu(5)
|
height: units.gu(5)
|
||||||
|
color: theme.palette.normal.background
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: fileBaseName
|
text: fileBaseName
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: units.gu(2)
|
anchors.leftMargin: units.gu(2)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
color: theme.palette.normal.backgroundText
|
||||||
}
|
}
|
||||||
|
|
||||||
Icon {
|
Icon {
|
||||||
@ -27,31 +31,27 @@ Component {
|
|||||||
anchors.rightMargin: units.gu(2)
|
anchors.rightMargin: units.gu(2)
|
||||||
height: units.gu(4)
|
height: units.gu(4)
|
||||||
name: fileIsDir ? "go-next" : "lock"
|
name: fileIsDir ? "go-next" : "lock"
|
||||||
color: UbuntuColors.orange
|
color: LomiriColors.orange
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (fileIsDir) {
|
if (fileIsDir) {
|
||||||
folderModel.folder = folderModel.folder + "/" + fileName
|
folderModel.folder = folderModel.folder + "/" + fileName;
|
||||||
backAction.visible = true
|
backAction.visible = true;
|
||||||
} else {
|
} else {
|
||||||
fileDir.activePasswordName = fileBaseName
|
fileDir.activePasswordName = fileBaseName;
|
||||||
|
Pass.onDecrypted.connect(function(text) {
|
||||||
Pass.onDecrypted.connect(function (text) {
|
pageStack.push(Qt.resolvedUrl("../pages/Password.qml"), {
|
||||||
pageStack.push(Qt.resolvedUrl("../pages/Password.qml"),
|
"plainText": text,
|
||||||
{
|
"title": fileDir.activePasswordName
|
||||||
"plainText": text,
|
});
|
||||||
"title": fileDir.activePasswordName
|
});
|
||||||
})
|
Pass.onDecryptFailed.connect(function() {
|
||||||
})
|
PopupUtils.open(passwordPageDecryptError);
|
||||||
|
});
|
||||||
Pass.onDecryptFailed.connect(function () {
|
Pass.decrypt(folderModel.folder + "/" + fileName);
|
||||||
PopupUtils.open(passwordPageDecryptError)
|
|
||||||
})
|
|
||||||
|
|
||||||
Pass.decrypt(folderModel.folder + "/" + fileName)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -62,17 +62,18 @@ Component {
|
|||||||
rBorderwidth: 0
|
rBorderwidth: 0
|
||||||
tBorderwidth: 0
|
tBorderwidth: 0
|
||||||
bBorderwidth: 1
|
bBorderwidth: 1
|
||||||
borderColor: UbuntuColors.warmGrey
|
borderColor: LomiriColors.warmGrey
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: passwordPageDecryptError
|
id: passwordPageDecryptError
|
||||||
|
|
||||||
ErrorDialog {
|
ErrorDialog {
|
||||||
textError: i18n.tr("Decryption failed !")
|
textError: i18n.tr("Decryption failed !")
|
||||||
onDialogClosed: {
|
|
||||||
pageStack.pop()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,35 +1,35 @@
|
|||||||
import QtQuick 2.4
|
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import "../styles"
|
import "../styles"
|
||||||
|
import Lomiri.Components 1.3
|
||||||
|
import QtQuick 2.4
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: pageStackLink
|
id: pageStackLink
|
||||||
|
|
||||||
property string page
|
property string page
|
||||||
property var params: {
|
property var params: {
|
||||||
|
|
||||||
}
|
}
|
||||||
property string text
|
property string text
|
||||||
|
|
||||||
property bool commonBorder: true
|
property bool commonBorder: true
|
||||||
property int lBorderwidth: 0
|
property int lBorderwidth: 0
|
||||||
property int rBorderwidth: 0
|
property int rBorderwidth: 0
|
||||||
property int tBorderwidth: 0
|
property int tBorderwidth: 0
|
||||||
property int bBorderwidth: 0
|
property int bBorderwidth: 0
|
||||||
property int commonBorderWidth: 0
|
property int commonBorderWidth: 0
|
||||||
property string borderColor: UbuntuColors.warmGrey
|
property string borderColor: LomiriColors.warmGrey
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: units.gu(6)
|
height: units.gu(6)
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
color: theme.palette.normal.background
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: pageStackLink.text
|
text: pageStackLink.text
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: units.gu(2)
|
anchors.leftMargin: units.gu(2)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
color: theme.palette.normal.backgroundText
|
||||||
}
|
}
|
||||||
|
|
||||||
Icon {
|
Icon {
|
||||||
@ -39,18 +39,19 @@ Item {
|
|||||||
width: units.gu(4)
|
width: units.gu(4)
|
||||||
height: units.gu(4)
|
height: units.gu(4)
|
||||||
name: "go-next"
|
name: "go-next"
|
||||||
color: UbuntuColors.orange
|
color: LomiriColors.orange
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
pageStack.push(page, params)
|
pageStack.push(page, params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomBorder {
|
CustomBorder {
|
||||||
id: cb
|
id: cb
|
||||||
|
|
||||||
commonBorder: pageStackLink.commonBorder
|
commonBorder: pageStackLink.commonBorder
|
||||||
lBorderwidth: pageStackLink.lBorderwidth
|
lBorderwidth: pageStackLink.lBorderwidth
|
||||||
rBorderwidth: pageStackLink.rBorderwidth
|
rBorderwidth: pageStackLink.rBorderwidth
|
||||||
@ -58,5 +59,7 @@ Item {
|
|||||||
bBorderwidth: pageStackLink.bBorderwidth
|
bBorderwidth: pageStackLink.bBorderwidth
|
||||||
borderColor: pageStackLink.borderColor
|
borderColor: pageStackLink.borderColor
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,52 +0,0 @@
|
|||||||
import QtQuick 2.4
|
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import Ubuntu.Components.Popups 1.3
|
|
||||||
|
|
||||||
Dialog {
|
|
||||||
id: doubleValidationDialog
|
|
||||||
|
|
||||||
property int nb_validation: 0
|
|
||||||
property string text1
|
|
||||||
property string text2
|
|
||||||
|
|
||||||
signal doubleValidated
|
|
||||||
signal canceled
|
|
||||||
|
|
||||||
Text {
|
|
||||||
visible: nb_validation == 0
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
text: text1
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
visible: nb_validation == 1
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
text: text2
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
|
||||||
text: i18n.tr("Ok")
|
|
||||||
color: UbuntuColors.green
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
if (nb_validation == 1) {
|
|
||||||
nb_validation = 0
|
|
||||||
doubleValidated()
|
|
||||||
PopupUtils.close(doubleValidationDialog)
|
|
||||||
} else {
|
|
||||||
nb_validation += 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
|
||||||
id: cancelButton
|
|
||||||
text: i18n.tr("Cancel")
|
|
||||||
color: UbuntuColors.red
|
|
||||||
onClicked: {
|
|
||||||
nb_validation = 0
|
|
||||||
canceled()
|
|
||||||
PopupUtils.close(doubleValidationDialog)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,22 +1,23 @@
|
|||||||
|
import Lomiri.Components 1.3
|
||||||
|
import Lomiri.Components.Popups 1.3
|
||||||
import QtQuick 2.4
|
import QtQuick 2.4
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import Ubuntu.Components.Popups 1.3
|
|
||||||
|
|
||||||
Dialog {
|
Dialog {
|
||||||
id: dialogSuccess
|
id: dialog
|
||||||
|
|
||||||
property string textError
|
property string textError
|
||||||
|
|
||||||
signal dialogClosed
|
signal dialogClosed()
|
||||||
|
|
||||||
title: i18n.tr("Error !")
|
title: i18n.tr("Error !")
|
||||||
text: textError
|
text: textError
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
text: i18n.tr("OK")
|
text: i18n.tr("Close")
|
||||||
color: UbuntuColors.red
|
onClicked: function() {
|
||||||
onClicked: function () {
|
dialogClosed();
|
||||||
dialogClosed()
|
PopupUtils.close(dialog);
|
||||||
PopupUtils.close(dialogSuccess)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
|
import Lomiri.Components 1.3
|
||||||
|
import Lomiri.Components.Popups 1.3
|
||||||
import QtQuick 2.4
|
import QtQuick 2.4
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import Ubuntu.Components.Popups 1.3
|
|
||||||
|
|
||||||
Dialog {
|
Dialog {
|
||||||
id: passphraseProvider
|
id: dialog
|
||||||
title: i18n.tr("Authentication required")
|
|
||||||
text: i18n.tr("Enter passphrase:")
|
|
||||||
|
|
||||||
signal validated(string passphrase)
|
signal validated(string passphrase)
|
||||||
signal canceled
|
signal canceled()
|
||||||
|
|
||||||
function activateFocus() {
|
function activateFocus() {
|
||||||
passphraseField.forceActiveFocus()
|
passphraseField.forceActiveFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
title: i18n.tr("Authentication required")
|
||||||
|
text: i18n.tr("Enter passphrase:")
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id: passphraseField
|
id: passphraseField
|
||||||
|
|
||||||
placeholderText: i18n.tr("passphrase")
|
placeholderText: i18n.tr("passphrase")
|
||||||
echoMode: TextInput.Password
|
echoMode: TextInput.Password
|
||||||
|
|
||||||
onAccepted: okButton.clicked(text)
|
onAccepted: okButton.clicked(text)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,24 +27,22 @@ Dialog {
|
|||||||
id: okButton
|
id: okButton
|
||||||
|
|
||||||
text: i18n.tr("Ok")
|
text: i18n.tr("Ok")
|
||||||
color: UbuntuColors.green
|
color: theme.palette.normal.positive
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
validated(passphraseField.text)
|
validated(passphraseField.text);
|
||||||
passphraseField.text = ""
|
passphraseField.text = "";
|
||||||
PopupUtils.close(passphraseProvider)
|
PopupUtils.close(dialog);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: cancelButton
|
id: cancelButton
|
||||||
|
|
||||||
text: i18n.tr("Cancel")
|
text: i18n.tr("Cancel")
|
||||||
|
|
||||||
color: UbuntuColors.red
|
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
canceled()
|
canceled();
|
||||||
PopupUtils.close(passphraseProvider)
|
PopupUtils.close(dialog);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,37 +1,41 @@
|
|||||||
|
import Lomiri.Components 1.3
|
||||||
|
import Lomiri.Components.Popups 1.3
|
||||||
import QtQuick 2.4
|
import QtQuick 2.4
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import Ubuntu.Components.Popups 1.3
|
|
||||||
|
|
||||||
Dialog {
|
Dialog {
|
||||||
id: doubleValidationDialog
|
id: dialog
|
||||||
|
|
||||||
property string text
|
property string text
|
||||||
|
property string continueText: i18n.tr("Ok")
|
||||||
|
property color continueColor: theme.palette.normal.positive
|
||||||
|
|
||||||
signal validated
|
signal validated()
|
||||||
signal canceled
|
signal canceled()
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: doubleValidationDialog.text
|
text: dialog.text
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
text: i18n.tr("Ok")
|
id: continueButton
|
||||||
color: UbuntuColors.green
|
|
||||||
|
|
||||||
|
text: dialog.continueText
|
||||||
|
color: dialog.continueColor
|
||||||
onClicked: {
|
onClicked: {
|
||||||
validated()
|
validated();
|
||||||
PopupUtils.close(doubleValidationDialog)
|
PopupUtils.close(dialog);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: cancelButton
|
id: cancelButton
|
||||||
|
|
||||||
text: i18n.tr("Cancel")
|
text: i18n.tr("Cancel")
|
||||||
color: UbuntuColors.red
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
canceled()
|
canceled();
|
||||||
PopupUtils.close(doubleValidationDialog)
|
PopupUtils.close(dialog);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,23 @@
|
|||||||
|
import Lomiri.Components 1.3
|
||||||
|
import Lomiri.Components.Popups 1.3
|
||||||
import QtQuick 2.4
|
import QtQuick 2.4
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import Ubuntu.Components.Popups 1.3
|
|
||||||
|
|
||||||
Dialog {
|
Dialog {
|
||||||
id: dialogSuccess
|
id: dialog
|
||||||
|
|
||||||
property string textSuccess
|
property string textSuccess
|
||||||
|
|
||||||
signal dialogClosed
|
signal dialogClosed()
|
||||||
|
|
||||||
title: i18n.tr("Success !")
|
title: i18n.tr("Success !")
|
||||||
text: textSuccess
|
text: textSuccess
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
text: i18n.tr("OK")
|
text: i18n.tr("OK")
|
||||||
color: UbuntuColors.green
|
onClicked: function() {
|
||||||
onClicked: function () {
|
dialogClosed();
|
||||||
dialogClosed()
|
PopupUtils.close(dialog);
|
||||||
PopupUtils.close(dialogSuccess)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,19 @@
|
|||||||
import QtQuick 2.4
|
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import "headers"
|
|
||||||
import "../components"
|
import "../components"
|
||||||
|
import Lomiri.Components 1.3
|
||||||
|
import QtQuick 2.4
|
||||||
|
import "headers"
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
id: infoPage
|
id: infoPage
|
||||||
|
|
||||||
header: StackHeader {
|
Component.onCompleted: {
|
||||||
id: infoHeader
|
var xhr = new XMLHttpRequest();
|
||||||
title: i18n.tr('Info')
|
xhr.open("GET", "../../manifest_.json", false);
|
||||||
|
xhr.send();
|
||||||
|
var mJson = JSON.parse(xhr.responseText);
|
||||||
|
manifestTitle.text = "<b>" + mJson.title + "</b>";
|
||||||
|
manifestVersion.text = mJson.version + "<br>" + mJson.framework + "@" + mJson.architecture;
|
||||||
|
manifestMaintener.text = mJson.maintainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
Flow {
|
Flow {
|
||||||
@ -20,27 +25,33 @@ Page {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: units.gu(1)
|
height: units.gu(1)
|
||||||
|
color: theme.palette.normal.background
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: manifestTitle
|
id: manifestTitle
|
||||||
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: units.gu(8)
|
height: units.gu(8)
|
||||||
fontSizeMode: Text.Fit
|
fontSizeMode: Text.Fit
|
||||||
font.pixelSize: 144
|
font.pixelSize: 144
|
||||||
|
color: theme.palette.normal.backgroundText
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: units.gu(12)
|
height: units.gu(12)
|
||||||
|
color: theme.palette.normal.background
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
source: "../../assets/logo.svg"
|
source: "../../assets/logo.svg"
|
||||||
width: units.gu(12)
|
width: units.gu(12)
|
||||||
height: units.gu(12)
|
height: units.gu(12)
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
@ -50,15 +61,18 @@ Page {
|
|||||||
text: i18n.tr("<b>Version</b>")
|
text: i18n.tr("<b>Version</b>")
|
||||||
fontSizeMode: Text.Fit
|
fontSizeMode: Text.Fit
|
||||||
font.pixelSize: 72
|
font.pixelSize: 72
|
||||||
|
color: theme.palette.normal.backgroundText
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: manifestVersion
|
id: manifestVersion
|
||||||
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: units.gu(4)
|
height: units.gu(4)
|
||||||
fontSizeMode: Text.Fit
|
fontSizeMode: Text.Fit
|
||||||
font.pixelSize: 72
|
font.pixelSize: 72
|
||||||
|
color: theme.palette.normal.backgroundText
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
@ -68,16 +82,20 @@ Page {
|
|||||||
text: i18n.tr("<b>Maintainer</>")
|
text: i18n.tr("<b>Maintainer</>")
|
||||||
fontSizeMode: Text.Fit
|
fontSizeMode: Text.Fit
|
||||||
font.pixelSize: 72
|
font.pixelSize: 72
|
||||||
|
color: theme.palette.normal.backgroundText
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: manifestMaintener
|
id: manifestMaintener
|
||||||
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: units.gu(2)
|
height: units.gu(2)
|
||||||
fontSizeMode: Text.Fit
|
fontSizeMode: Text.Fit
|
||||||
font.pixelSize: 72
|
font.pixelSize: 72
|
||||||
|
color: theme.palette.normal.backgroundText
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Flow {
|
Flow {
|
||||||
@ -85,32 +103,32 @@ Page {
|
|||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
||||||
ExternalLink {
|
ExternalLink {
|
||||||
url: "https://taiga.rdrive.ovh/project/utpass/issues"
|
url: "https://github.com/QRouland/UTPass/issues"
|
||||||
text: i18n.tr("Suggest improvement(s) or report a bug(s)")
|
text: i18n.tr("Suggest improvement(s) or report a bug(s)")
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalLink {
|
ExternalLink {
|
||||||
url: "https://git.rdrive.ovh/QRouland/UTPass"
|
url: "https://github.com/QRouland/UTPass"
|
||||||
text: i18n.tr("Access to the source code")
|
text: i18n.tr("Access to the source code")
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: units.gu(2)
|
height: units.gu(2)
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
text: i18n.tr("Released under the terms of the GNU GPL v3")
|
text: i18n.tr("Released under the terms of the GNU GPL v3")
|
||||||
|
color: theme.palette.normal.backgroundText
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
header: StackHeader {
|
||||||
var xhr = new XMLHttpRequest()
|
id: infoHeader
|
||||||
xhr.open("GET", "../../manifest_.json", false)
|
|
||||||
xhr.send()
|
|
||||||
|
|
||||||
var mJson = JSON.parse(xhr.responseText)
|
title: i18n.tr('Info')
|
||||||
|
|
||||||
manifestTitle.text = "<b>" + mJson.title + "</b>"
|
|
||||||
manifestVersion.text = mJson.version + "<br>" + mJson.framework + "@" + mJson.architecture
|
|
||||||
manifestMaintener.text = mJson.maintainer
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
import Lomiri.Components 1.3
|
||||||
|
import Lomiri.Components.Popups 1.3
|
||||||
import QtQuick 2.4
|
import QtQuick 2.4
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import Ubuntu.Components.Popups 1.3
|
|
||||||
import "headers"
|
import "headers"
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
@ -10,38 +10,15 @@ Page {
|
|||||||
property string plainText
|
property string plainText
|
||||||
property var objects
|
property var objects
|
||||||
|
|
||||||
header: PageHeader {
|
Component.onCompleted: {
|
||||||
id: passwordPageHeader
|
var text_split = passwordPage.plainText.split('\n');
|
||||||
width: parent.width
|
var component = Qt.createComponent("../components/CopyText.qml");
|
||||||
height: units.gu(6)
|
for (var i = 0; i < text_split.length; i++) {
|
||||||
title: passwordPage.title
|
if (text_split[i]) {
|
||||||
|
var object = component.createObject(container);
|
||||||
contents: Item {
|
object.text = text_split[i];
|
||||||
height: parent.height
|
|
||||||
width: parent.width
|
|
||||||
Label {
|
|
||||||
id: labelTitle
|
|
||||||
text: passwordPage.title
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
leadingActionBar.height: units.gu(4)
|
|
||||||
leadingActionBar.actions: [
|
|
||||||
Action {
|
|
||||||
id: backAction
|
|
||||||
iconName: "back"
|
|
||||||
text: "Back"
|
|
||||||
onTriggered: {
|
|
||||||
passwordPage.plainText = ""
|
|
||||||
for (var object in objects) {
|
|
||||||
object.text = ""
|
|
||||||
object.destroy()
|
|
||||||
}
|
|
||||||
pageStack.pop()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@ -52,18 +29,49 @@ Page {
|
|||||||
|
|
||||||
Flow {
|
Flow {
|
||||||
id: container
|
id: container
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
header: PageHeader {
|
||||||
var text_split = passwordPage.plainText.split('\n')
|
id: passwordPageHeader
|
||||||
var component = Qt.createComponent("../components/CopyText.qml")
|
|
||||||
for (var i = 0; i < text_split.length; i++) {
|
width: parent.width
|
||||||
if (text_split[i]) {
|
height: units.gu(6)
|
||||||
var object = component.createObject(container)
|
title: passwordPage.title
|
||||||
object.text = text_split[i]
|
leadingActionBar.height: units.gu(4)
|
||||||
|
leadingActionBar.actions: [
|
||||||
|
Action {
|
||||||
|
id: backAction
|
||||||
|
|
||||||
|
iconName: "back"
|
||||||
|
text: "Back"
|
||||||
|
onTriggered: {
|
||||||
|
passwordPage.plainText = "";
|
||||||
|
for (var object in objects) {
|
||||||
|
object.text = "";
|
||||||
|
object.destroy();
|
||||||
|
}
|
||||||
|
pageStack.pop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
contents: Item {
|
||||||
|
height: parent.height
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: labelTitle
|
||||||
|
|
||||||
|
text: passwordPage.title
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import QtQuick 2.4
|
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import Qt.labs.folderlistmodel 2.1
|
|
||||||
import Pass 1.0
|
|
||||||
import "../components"
|
import "../components"
|
||||||
|
import Lomiri.Components 1.3
|
||||||
|
import Pass 1.0
|
||||||
|
import Qt.labs.folderlistmodel 2.1
|
||||||
|
import QtQuick 2.4
|
||||||
import "headers"
|
import "headers"
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
@ -11,25 +11,8 @@ Page {
|
|||||||
property string passwordStorePath
|
property string passwordStorePath
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
Component.onCompleted: {
|
||||||
header: MainHeader {
|
passwordStorePath = "file:" + Pass.password_store;
|
||||||
id: passwordListHeader
|
|
||||||
|
|
||||||
leadingActionBar.height: units.gu(4)
|
|
||||||
leadingActionBar.actions: [
|
|
||||||
Action {
|
|
||||||
id: backAction
|
|
||||||
iconName: "back"
|
|
||||||
text: i18n.tr("Back")
|
|
||||||
visible: false
|
|
||||||
onTriggered: {
|
|
||||||
folderModel.folder = folderModel.parentFolder
|
|
||||||
if (folderModel.rootFolder === folderModel.folder) {
|
|
||||||
backAction.visible = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@ -38,13 +21,14 @@ Page {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
visible: folderModel.count == 0
|
visible: folderModel.count == 0
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: i18n.tr(
|
text: i18n.tr("No password found<br>You can import a password store by cloning or importing a zip in the settings")
|
||||||
"No password found<br>You can import a password store zip in the settings")
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
@ -56,17 +40,38 @@ Page {
|
|||||||
|
|
||||||
model: FolderListModel {
|
model: FolderListModel {
|
||||||
id: folderModel
|
id: folderModel
|
||||||
|
|
||||||
nameFilters: ["*.gpg"]
|
nameFilters: ["*.gpg"]
|
||||||
rootFolder: passwordStorePath
|
rootFolder: passwordStorePath
|
||||||
folder: passwordStorePath
|
folder: passwordStorePath
|
||||||
showDirs: true
|
showDirs: true
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: FileDir {
|
delegate: FileDir {
|
||||||
id: fileDelegate
|
id: fileDelegate
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
header: MainHeader {
|
||||||
passwordStorePath = "file:" + Pass.getPasswordStore()
|
id: passwordListHeader
|
||||||
|
|
||||||
|
leadingActionBar.height: units.gu(4)
|
||||||
|
leadingActionBar.actions: [
|
||||||
|
Action {
|
||||||
|
id: backAction
|
||||||
|
|
||||||
|
iconName: "back"
|
||||||
|
text: i18n.tr("Back")
|
||||||
|
visible: false
|
||||||
|
onTriggered: {
|
||||||
|
folderModel.folder = folderModel.parentFolder;
|
||||||
|
if (folderModel.rootFolder === folderModel.folder)
|
||||||
|
backAction.visible = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,40 +1,15 @@
|
|||||||
|
import Lomiri.Components 1.3
|
||||||
import QtQuick 2.4
|
import QtQuick 2.4
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
|
|
||||||
PageHeader {
|
PageHeader {
|
||||||
id: mainHeader
|
id: mainHeader
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: units.gu(6)
|
height: units.gu(6)
|
||||||
title: i18n.tr("UTPass")
|
title: i18n.tr("UTPass")
|
||||||
|
|
||||||
contents: Item {
|
|
||||||
height: parent.height
|
|
||||||
width: parent.width
|
|
||||||
Label {
|
|
||||||
id: labelTitle
|
|
||||||
text: mainHeader.title
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
visible: true
|
|
||||||
}
|
|
||||||
TextField {
|
|
||||||
id: searchBar
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.left: parent.left
|
|
||||||
placeholderText: i18n.tr("Search")
|
|
||||||
height: units.gu(4)
|
|
||||||
visible: false
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
onFocusChanged: {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
trailingActionBar.height: units.gu(4)
|
trailingActionBar.height: units.gu(4)
|
||||||
trailingActionBar.numberOfSlots: 2
|
trailingActionBar.numberOfSlots: 2
|
||||||
trailingActionBar.actions: [
|
trailingActionBar.actions: [
|
||||||
|
|
||||||
|
|
||||||
/*Action { TODO
|
/*Action { TODO
|
||||||
iconName: "search"
|
iconName: "search"
|
||||||
text: i18n.tr("Search")
|
text: i18n.tr("Search")
|
||||||
@ -50,15 +25,43 @@ PageHeader {
|
|||||||
iconName: "settings"
|
iconName: "settings"
|
||||||
text: i18n.tr("Settings")
|
text: i18n.tr("Settings")
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
pageStack.push(Qt.resolvedUrl("../settings/Settings.qml"))
|
pageStack.push(Qt.resolvedUrl("../settings/Settings.qml"));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Action {
|
Action {
|
||||||
iconName: "info"
|
iconName: "info"
|
||||||
text: i18n.tr("Info")
|
text: i18n.tr("Info")
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
pageStack.push(Qt.resolvedUrl("../Info.qml"))
|
pageStack.push(Qt.resolvedUrl("../Info.qml"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
contents: Item {
|
||||||
|
height: parent.height
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: labelTitle
|
||||||
|
|
||||||
|
text: mainHeader.title
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
visible: true
|
||||||
|
}
|
||||||
|
|
||||||
|
TextField {
|
||||||
|
id: searchBar
|
||||||
|
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.left: parent.left
|
||||||
|
placeholderText: i18n.tr("Search")
|
||||||
|
height: units.gu(4)
|
||||||
|
visible: false
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
onFocusChanged: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,31 +1,36 @@
|
|||||||
|
import Lomiri.Components 1.3
|
||||||
import QtQuick 2.4
|
import QtQuick 2.4
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
|
|
||||||
PageHeader {
|
PageHeader {
|
||||||
id: stackHeader
|
id: stackHeader
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: units.gu(6)
|
height: units.gu(6)
|
||||||
title: i18n.tr("UTPass")
|
title: i18n.tr("UTPass")
|
||||||
|
|
||||||
contents: Item {
|
|
||||||
height: parent.height
|
|
||||||
width: parent.width
|
|
||||||
Label {
|
|
||||||
id: labelTitle
|
|
||||||
text: stackHeader.title
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
leadingActionBar.height: units.gu(4)
|
leadingActionBar.height: units.gu(4)
|
||||||
leadingActionBar.actions: [
|
leadingActionBar.actions: [
|
||||||
Action {
|
Action {
|
||||||
id: backAction
|
id: backAction
|
||||||
|
|
||||||
iconName: "back"
|
iconName: "back"
|
||||||
text: "Back"
|
text: "Back"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
pageStack.pop()
|
pageStack.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
contents: Item {
|
||||||
|
height: parent.height
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: labelTitle
|
||||||
|
|
||||||
|
text: stackHeader.title
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
128
qml/pages/settings/ImportGitClone.qml
Normal file
128
qml/pages/settings/ImportGitClone.qml
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
import "../../components"
|
||||||
|
import "../../dialogs"
|
||||||
|
import "../headers"
|
||||||
|
import Git 1.0
|
||||||
|
import Lomiri.Components 1.3
|
||||||
|
import Lomiri.Components.Popups 1.3
|
||||||
|
import Pass 1.0
|
||||||
|
import QtQuick 2.4
|
||||||
|
|
||||||
|
Page {
|
||||||
|
id: importGitClonePage
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
PopupUtils.open(importGitCloneValidation, importGitClonePage);
|
||||||
|
}
|
||||||
|
|
||||||
|
Flow {
|
||||||
|
anchors.top: importGitCloneHeader.bottom
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: units.gu(2)
|
||||||
|
anchors.rightMargin: units.gu(2)
|
||||||
|
spacing: units.gu(1)
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: parent.width
|
||||||
|
height: units.gu(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: repoUrlLabel
|
||||||
|
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
width: parent.width
|
||||||
|
text: i18n.tr('Repo Url')
|
||||||
|
}
|
||||||
|
|
||||||
|
TextField {
|
||||||
|
id: repoUrlInput
|
||||||
|
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
width: parent.width
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: repoPasswordLabel
|
||||||
|
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
width: parent.width
|
||||||
|
text: i18n.tr('Password')
|
||||||
|
}
|
||||||
|
|
||||||
|
TextField {
|
||||||
|
id: repoPasswordInput
|
||||||
|
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
width: parent.width
|
||||||
|
echoMode: TextInput.Password
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
id: buttonAdd
|
||||||
|
|
||||||
|
width: parent.width
|
||||||
|
color: theme.palette.normal.positive
|
||||||
|
text: i18n.tr('Clone')
|
||||||
|
onClicked: {
|
||||||
|
var ret = false;
|
||||||
|
if (repoPasswordInput.text === "")
|
||||||
|
ret = Git.clone_http(repoUrlInput.text, Pass.password_store);
|
||||||
|
else
|
||||||
|
ret = Git.clone_http_pass(repoUrlInput.text, Pass.password_store, repoPasswordInput.text);
|
||||||
|
if (ret)
|
||||||
|
PopupUtils.open(dialogImportGitCloneSuccess);
|
||||||
|
else
|
||||||
|
PopupUtils.open(importGitCloneError, importGitClonePage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: importGitCloneValidation
|
||||||
|
|
||||||
|
SimpleValidationDialog {
|
||||||
|
text: i18n.tr("Importing a git repo will delete<br>any existing password store!<br>Continue ?")
|
||||||
|
continueText: i18n.tr("Yes")
|
||||||
|
continueColor: theme.palette.normal.negative
|
||||||
|
onCanceled: {
|
||||||
|
pageStack.pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: importGitCloneError
|
||||||
|
|
||||||
|
ErrorDialog {
|
||||||
|
textError: i18n.tr("An error occured during git clone !")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: dialogImportGitCloneSuccess
|
||||||
|
|
||||||
|
SuccessDialog {
|
||||||
|
textSuccess: i18n.tr("Password store sucessfully imported !")
|
||||||
|
onDialogClosed: {
|
||||||
|
pageStack.pop();
|
||||||
|
pageStack.pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
header: StackHeader {
|
||||||
|
id: importGitCloneHeader
|
||||||
|
|
||||||
|
title: i18n.tr('Git Clone Import')
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,82 +1,80 @@
|
|||||||
import QtQuick 2.4
|
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import Ubuntu.Content 1.3
|
|
||||||
import Ubuntu.Components.Popups 1.3
|
|
||||||
import Pass 1.0
|
|
||||||
import Utils 1.0
|
|
||||||
import "../headers"
|
|
||||||
import "../../dialogs"
|
import "../../dialogs"
|
||||||
|
import "../headers"
|
||||||
|
import Lomiri.Components 1.3
|
||||||
|
import Lomiri.Components.Popups 1.3
|
||||||
|
import Lomiri.Content 1.3
|
||||||
|
import Pass 1.0
|
||||||
|
import QtQuick 2.4
|
||||||
|
import Utils 1.0
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
id: importKeyFilePage
|
id: importKeyFilePage
|
||||||
|
|
||||||
property var activeTransfer
|
property var activeTransfer
|
||||||
|
|
||||||
header: StackHeader {
|
|
||||||
id: importKeyHeader
|
|
||||||
title: i18n.tr("GPG Key Import")
|
|
||||||
}
|
|
||||||
|
|
||||||
ContentPeerPicker {
|
ContentPeerPicker {
|
||||||
anchors.top: importKeyHeader.bottom
|
anchors.top: importKeyHeader.bottom
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.topMargin: importKeyFilePage.header.height
|
anchors.topMargin: importKeyFilePage.header.height
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
visible: parent.visible
|
visible: parent.visible
|
||||||
showTitle: false
|
showTitle: false
|
||||||
contentType: ContentType.Text
|
contentType: ContentType.Text
|
||||||
handler: ContentHandler.Source
|
handler: ContentHandler.Source
|
||||||
|
|
||||||
onPeerSelected: {
|
onPeerSelected: {
|
||||||
peer.selectionType = ContentTransfer.Single
|
peer.selectionType = ContentTransfer.Single;
|
||||||
importKeyFilePage.activeTransfer = peer.request()
|
importKeyFilePage.activeTransfer = peer.request();
|
||||||
|
importKeyFilePage.activeTransfer.stateChanged.connect(function() {
|
||||||
importKeyFilePage.activeTransfer.stateChanged.connect(function () {
|
|
||||||
if (importKeyFilePage.activeTransfer.state === ContentTransfer.Charged) {
|
if (importKeyFilePage.activeTransfer.state === ContentTransfer.Charged) {
|
||||||
console.log("Charged")
|
console.log("Charged");
|
||||||
console.log(importKeyFilePage.activeTransfer.items[0].url)
|
console.log(importKeyFilePage.activeTransfer.items[0].url);
|
||||||
|
var status = Pass.gpgImportKeyFromFile(importKeyFilePage.activeTransfer.items[0].url);
|
||||||
var status = Pass.gpgImportKeyFromFile(
|
Utils.rmFile(importKeyFilePage.activeTransfer.items[0].url);
|
||||||
importKeyFilePage.activeTransfer.items[0].url)
|
if (status)
|
||||||
|
PopupUtils.open(dialogImportKeyPageSucess);
|
||||||
Utils.rmFile(importKeyFilePage.activeTransfer.items[0].url)
|
else
|
||||||
if (status) {
|
PopupUtils.open(dialogImportKeyPageError);
|
||||||
PopupUtils.open(dialogImportKeyPageSucess)
|
importKeyFilePage.activeTransfer = null;
|
||||||
} else {
|
|
||||||
PopupUtils.open(dialogImportKeyPageError)
|
|
||||||
}
|
|
||||||
importKeyFilePage.activeTransfer = null
|
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onCancelPressed: {
|
onCancelPressed: {
|
||||||
pageStack.pop()
|
pageStack.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ContentTransferHint {
|
ContentTransferHint {
|
||||||
id: transferHint
|
id: transferHint
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
activeTransfer: importKeyFilePage.activeTransfer
|
activeTransfer: importKeyFilePage.activeTransfer
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: dialogImportKeyPageError
|
id: dialogImportKeyPageError
|
||||||
|
|
||||||
ErrorDialog {
|
ErrorDialog {
|
||||||
textError: i18n.tr("Key import failed !")
|
textError: i18n.tr("Key import failed !")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: dialogImportKeyPageSucess
|
id: dialogImportKeyPageSucess
|
||||||
|
|
||||||
SuccessDialog {
|
SuccessDialog {
|
||||||
textSuccess: i18n.tr("Key successfully imported !")
|
textSuccess: i18n.tr("Key successfully imported !")
|
||||||
onDialogClosed: {
|
onDialogClosed: {
|
||||||
pageStack.pop()
|
pageStack.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header: StackHeader {
|
||||||
|
id: importKeyHeader
|
||||||
|
|
||||||
|
title: i18n.tr("GPG Key Import")
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,99 +1,99 @@
|
|||||||
import QtQuick 2.4
|
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import Ubuntu.Content 1.3
|
|
||||||
import Ubuntu.Components.Popups 1.3
|
|
||||||
import Pass 1.0
|
|
||||||
import Utils 1.0
|
|
||||||
import "../headers"
|
|
||||||
import "../../dialogs"
|
import "../../dialogs"
|
||||||
|
import "../headers"
|
||||||
|
import Lomiri.Components 1.3
|
||||||
|
import Lomiri.Components.Popups 1.3
|
||||||
|
import Lomiri.Content 1.3
|
||||||
|
import Pass 1.0
|
||||||
|
import QtQuick 2.4
|
||||||
|
import Utils 1.0
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
id: importZipPage
|
id: importZipPage
|
||||||
|
|
||||||
property var activeTransfer
|
property var activeTransfer
|
||||||
|
|
||||||
header: StackHeader {
|
Component.onCompleted: {
|
||||||
id: importZipHeader
|
PopupUtils.open(importZipPageImportValidation, importZipPage);
|
||||||
title: i18n.tr("Zip Password Store Import")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ContentPeerPicker {
|
ContentPeerPicker {
|
||||||
anchors.top: importZipHeader.bottom
|
anchors.top: importZipHeader.bottom
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.topMargin: importZipPage.header.height
|
anchors.topMargin: importZipPage.header.height
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
visible: parent.visible
|
visible: parent.visible
|
||||||
showTitle: false
|
showTitle: false
|
||||||
contentType: ContentType.Text
|
contentType: ContentType.Text
|
||||||
handler: ContentHandler.Source
|
handler: ContentHandler.Source
|
||||||
|
|
||||||
onPeerSelected: {
|
onPeerSelected: {
|
||||||
peer.selectionType = ContentTransfer.Single
|
peer.selectionType = ContentTransfer.Single;
|
||||||
importZipPage.activeTransfer = peer.request()
|
importZipPage.activeTransfer = peer.request();
|
||||||
|
importZipPage.activeTransfer.stateChanged.connect(function() {
|
||||||
importZipPage.activeTransfer.stateChanged.connect(function () {
|
|
||||||
if (importZipPage.activeTransfer.state === ContentTransfer.Charged) {
|
if (importZipPage.activeTransfer.state === ContentTransfer.Charged) {
|
||||||
console.log("Charged")
|
console.log("Charged");
|
||||||
console.log(importZipPage.activeTransfer.items[0].url)
|
console.log(importZipPage.activeTransfer.items[0].url);
|
||||||
|
var status = Utils.unzip(importZipPage.activeTransfer.items[0].url, Pass.getPasswordStore());
|
||||||
var status = Utils.unzip(
|
Utils.rmFile(importZipPage.activeTransfer.items[0].url);
|
||||||
importZipPage.activeTransfer.items[0].url,
|
if (status)
|
||||||
Pass.getPasswordStore())
|
PopupUtils.open(dialogImportZipPageSuccess);
|
||||||
|
else
|
||||||
Utils.rmFile(importZipPage.activeTransfer.items[0].url)
|
PopupUtils.open(dialogImportZipPageError);
|
||||||
|
importZipPage.activeTransfer = null;
|
||||||
if (status) {
|
|
||||||
PopupUtils.open(dialogImportZipPageSuccess)
|
|
||||||
} else {
|
|
||||||
PopupUtils.open(dialogImportZipPageError)
|
|
||||||
}
|
|
||||||
importZipPage.activeTransfer = null
|
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onCancelPressed: {
|
onCancelPressed: {
|
||||||
pageStack.pop()
|
pageStack.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ContentTransferHint {
|
ContentTransferHint {
|
||||||
id: transferHint
|
id: transferHint
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
activeTransfer: importZipPage.activeTransfer
|
activeTransfer: importZipPage.activeTransfer
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: importZipPageImportValidation
|
id: importZipPageImportValidation
|
||||||
|
|
||||||
SimpleValidationDialog {
|
SimpleValidationDialog {
|
||||||
text: i18n.tr(
|
text: i18n.tr("Importing a new zip will delete<br>any existing password store!<br>Continue ?")
|
||||||
"Importing a new zip will delete<br>any existing password store!<br>Continue ?")
|
continueText: i18n.tr("Yes")
|
||||||
|
continueColor: theme.palette.normal.negative
|
||||||
onCanceled: {
|
onCanceled: {
|
||||||
pageStack.pop()
|
pageStack.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: dialogImportZipPageError
|
id: dialogImportZipPageError
|
||||||
|
|
||||||
ErrorDialog {
|
ErrorDialog {
|
||||||
textError: i18n.tr("Password store import failed !")
|
textError: i18n.tr("Password store import failed !")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: dialogImportZipPageSuccess
|
id: dialogImportZipPageSuccess
|
||||||
|
|
||||||
SuccessDialog {
|
SuccessDialog {
|
||||||
textSuccess: i18n.tr("Password store sucessfully imported !")
|
textSuccess: i18n.tr("Password store sucessfully imported !")
|
||||||
onDialogClosed: {
|
onDialogClosed: {
|
||||||
pageStack.pop()
|
pageStack.pop();
|
||||||
|
pageStack.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
header: StackHeader {
|
||||||
PopupUtils.open(importZipPageImportValidation, importZipPage)
|
id: importZipHeader
|
||||||
|
|
||||||
|
title: i18n.tr("Zip Password Store Import")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,28 +1,23 @@
|
|||||||
import QtQuick 2.4
|
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import Ubuntu.Components.Popups 1.3
|
|
||||||
import Pass 1.0
|
|
||||||
import "../headers"
|
|
||||||
import "../../components"
|
import "../../components"
|
||||||
import "../../dialogs"
|
import "../../dialogs"
|
||||||
|
import "../headers"
|
||||||
|
import Lomiri.Components 1.3
|
||||||
|
import Lomiri.Components.Popups 1.3
|
||||||
|
import Pass 1.0
|
||||||
|
import QtQuick 2.4
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
id: infoKeysPage
|
id: infoKeysPage
|
||||||
|
|
||||||
property string currentKey
|
property string currentKey
|
||||||
|
|
||||||
header: StackHeader {
|
|
||||||
id: infoKeysHeader
|
|
||||||
title: i18n.tr('Info Keys')
|
|
||||||
}
|
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: infoKeysListView
|
id: infoKeysListView
|
||||||
|
|
||||||
anchors.top: infoKeysHeader.bottom
|
anchors.top: infoKeysHeader.bottom
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
||||||
model: Pass.gpgGetAllKeysModel()
|
model: Pass.gpgGetAllKeysModel()
|
||||||
|
|
||||||
delegate: Grid {
|
delegate: Grid {
|
||||||
@ -34,67 +29,89 @@ Page {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: units.gu(1)
|
height: units.gu(1)
|
||||||
|
color: theme.palette.normal.background
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: uidKey
|
id: uidKey
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
text: i18n.tr('Key id : %1').arg(model.modelData.uid)
|
text: i18n.tr('Key id : %1').arg(model.modelData.uid)
|
||||||
|
color: theme.palette.normal.backgroundText
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: parent.width
|
||||||
|
height: units.gu(1)
|
||||||
|
color: theme.palette.normal.background
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: buttonDeleteKey
|
id: buttonDeleteKey
|
||||||
|
|
||||||
text: i18n.tr("Delete this key")
|
text: i18n.tr("Delete this key")
|
||||||
color: UbuntuColors.red
|
color: theme.palette.normal.negative
|
||||||
onClicked: {
|
onClicked: {
|
||||||
infoKeysPage.currentKey = model.modelData.uid
|
infoKeysPage.currentKey = model.modelData.uid;
|
||||||
PopupUtils.open(infoKeysPageDeleteValidation, infoKeysPage)
|
PopupUtils.open(infoKeysPageDeleteValidation, infoKeysPage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: units.gu(1)
|
height: units.gu(1)
|
||||||
|
color: theme.palette.normal.background
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: infoKeysPageDeleteValidation
|
id: infoKeysPageDeleteValidation
|
||||||
DoubleValidationDialog {
|
|
||||||
text1: i18n.tr(
|
SimpleValidationDialog {
|
||||||
"You're are about to delete<br>%1<br>Continue ?").arg(
|
text: i18n.tr("You're are about to delete<br>%1<br>Continue ?").arg(infoKeysPage.currentKey)
|
||||||
infoKeysPage.currentKey)
|
continueText: i18n.tr("Yes")
|
||||||
text2: i18n.tr(
|
continueColor: theme.palette.normal.negative
|
||||||
"%1<br>will be definitively removed.<br>Continue ?").arg(
|
onValidated: {
|
||||||
infoKeysPage.currentKey)
|
var status = Pass.gpgDeleteKeyId(infoKeysPage.currentKey);
|
||||||
onDoubleValidated: {
|
if (status)
|
||||||
var status = Pass.gpgDeleteKeyId(infoKeysPage.currentKey)
|
PopupUtils.open(infoKeysPageDeleteSuccess);
|
||||||
if (status) {
|
else
|
||||||
PopupUtils.open(infoKeysPageDeleteSuccess)
|
PopupUtils.open(infoKeysPageDeleteError);
|
||||||
} else {
|
|
||||||
PopupUtils.open(infoKeysPageDeleteError)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: infoKeysPageDeleteError
|
id: infoKeysPageDeleteError
|
||||||
|
|
||||||
ErrorDialog {
|
ErrorDialog {
|
||||||
textError: i18n.tr("Key removal failed !")
|
textError: i18n.tr("Key removal failed !")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: infoKeysPageDeleteSuccess
|
id: infoKeysPageDeleteSuccess
|
||||||
|
|
||||||
SuccessDialog {
|
SuccessDialog {
|
||||||
textSuccess: i18n.tr("Key successfully deleted !")
|
textSuccess: i18n.tr("Key successfully deleted !")
|
||||||
onDialogClosed: {
|
onDialogClosed: {
|
||||||
infoKeysListView.model = Pass.gpgGetAllKeysModel()
|
infoKeysListView.model = Pass.gpgGetAllKeysModel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header: StackHeader {
|
||||||
|
id: infoKeysHeader
|
||||||
|
|
||||||
|
title: i18n.tr('Info Keys')
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,14 @@
|
|||||||
import QtQuick 2.4
|
|
||||||
import Ubuntu.Components 1.3
|
|
||||||
import Pass 1.0
|
|
||||||
import "../headers"
|
|
||||||
import "../../components"
|
import "../../components"
|
||||||
|
import "../headers"
|
||||||
|
import Lomiri.Components 1.3
|
||||||
|
import Pass 1.0
|
||||||
|
import QtQuick 2.4
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
id: settingsPage
|
id: settingsPage
|
||||||
|
|
||||||
property string gpgKeyId: ""
|
property string gpgKeyId: ""
|
||||||
|
|
||||||
header: StackHeader {
|
|
||||||
id: settingsHeader
|
|
||||||
title: i18n.tr('Settings')
|
|
||||||
}
|
|
||||||
|
|
||||||
Flow {
|
Flow {
|
||||||
anchors.top: settingsHeader.bottom
|
anchors.top: settingsHeader.bottom
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
@ -26,34 +21,53 @@ Page {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
height: units.gu(4)
|
height: units.gu(4)
|
||||||
text: i18n.tr('GPG')
|
text: i18n.tr('GPG')
|
||||||
|
color: theme.palette.normal.backgroundText
|
||||||
}
|
}
|
||||||
|
|
||||||
PageStackLink {
|
PageStackLink {
|
||||||
page: Qt.resolvedUrl("ImportKeyFile.qml")
|
page: Qt.resolvedUrl("ImportKeyFile.qml")
|
||||||
text: i18n.tr('Import a GPG key file')
|
text: i18n.tr('Import a GPG key file')
|
||||||
}
|
}
|
||||||
|
|
||||||
PageStackLink {
|
PageStackLink {
|
||||||
page: Qt.resolvedUrl("InfoKeys.qml")
|
page: Qt.resolvedUrl("InfoKeys.qml")
|
||||||
text: i18n.tr('Show GPG keys')
|
text: i18n.tr('Show GPG keys')
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: units.gu(4)
|
height: units.gu(4)
|
||||||
text: i18n.tr('Password Store')
|
text: i18n.tr('Password Store')
|
||||||
|
color: theme.palette.normal.backgroundText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PageStackLink {
|
||||||
|
page: Qt.resolvedUrl("ImportGitClone.qml")
|
||||||
|
text: i18n.tr('Import a Password Store using Git')
|
||||||
|
}
|
||||||
|
|
||||||
PageStackLink {
|
PageStackLink {
|
||||||
page: Qt.resolvedUrl("ImportZip.qml")
|
page: Qt.resolvedUrl("ImportZip.qml")
|
||||||
text: i18n.tr('Import a Password Store Zip')
|
text: i18n.tr('Import a Password Store Zip')
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: units.gu(4)
|
height: units.gu(4)
|
||||||
color: UbuntuColors.red
|
color: LomiriColors.red
|
||||||
text: i18n.tr(
|
text: i18n.tr('Warning: importing delete any exiting Password Store')
|
||||||
'Warning: importing delete any exiting Password Store')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header: StackHeader {
|
||||||
|
id: settingsHeader
|
||||||
|
|
||||||
|
title: i18n.tr('Settings')
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,18 +4,14 @@ import QtQuick 2.4
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
property bool commonBorder: true
|
property bool commonBorder: true
|
||||||
|
|
||||||
property int lBorderwidth: 1
|
property int lBorderwidth: 1
|
||||||
property int rBorderwidth: 1
|
property int rBorderwidth: 1
|
||||||
property int tBorderwidth: 1
|
property int tBorderwidth: 1
|
||||||
property int bBorderwidth: 1
|
property int bBorderwidth: 1
|
||||||
|
|
||||||
property int commonBorderWidth: 1
|
property int commonBorderWidth: 1
|
||||||
|
|
||||||
z: -1
|
|
||||||
|
|
||||||
property string borderColor: "white"
|
property string borderColor: "white"
|
||||||
|
|
||||||
|
z: -1
|
||||||
color: borderColor
|
color: borderColor
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
@ -23,10 +19,10 @@ Rectangle {
|
|||||||
right: parent.right
|
right: parent.right
|
||||||
top: parent.top
|
top: parent.top
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
|
|
||||||
topMargin: commonBorder ? -commonBorderWidth : -tBorderwidth
|
topMargin: commonBorder ? -commonBorderWidth : -tBorderwidth
|
||||||
bottomMargin: commonBorder ? -commonBorderWidth : -bBorderwidth
|
bottomMargin: commonBorder ? -commonBorderWidth : -bBorderwidth
|
||||||
leftMargin: commonBorder ? -commonBorderWidth : -lBorderwidth
|
leftMargin: commonBorder ? -commonBorderWidth : -lBorderwidth
|
||||||
rightMargin: commonBorder ? -commonBorderWidth : -rBorderwidth
|
rightMargin: commonBorder ? -commonBorderWidth : -rBorderwidth
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
BIN
tests/assets/archive.zip
Normal file
BIN
tests/assets/archive.zip
Normal file
Binary file not shown.
1
tests/assets/gpg/passphrase.txt
Normal file
1
tests/assets/gpg/passphrase.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
utpasspassphrase
|
BIN
tests/assets/gpg/test_key.gpg
Normal file
BIN
tests/assets/gpg/test_key.gpg
Normal file
Binary file not shown.
1
tests/assets/password-store/.gitattributes
vendored
Normal file
1
tests/assets/password-store/.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.gpg diff=gpg
|
1
tests/assets/password-store/.gpg-id
Normal file
1
tests/assets/password-store/.gpg-id
Normal file
@ -0,0 +1 @@
|
|||||||
|
UTPass Test
|
0
tests/assets/password-store/Test
Normal file
0
tests/assets/password-store/Test
Normal file
1
tests/assets/password-store/test.gpg
Normal file
1
tests/assets/password-store/test.gpg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<EFBFBD>^<03><><EFBFBD><EFBFBD><16>8m@%f#<23><><EFBFBD>¹<EFBFBD><C2B9><1F>nW<6E>[q<><71><EFBFBD>X<12>&<26>>&MO`0<><30>@
|
1
tests/plugins/CMakeLists.txt
Normal file
1
tests/plugins/CMakeLists.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
add_subdirectory(TestsUtils)
|
29
tests/plugins/TestsUtils/CMakeLists.txt
Normal file
29
tests/plugins/TestsUtils/CMakeLists.txt
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
|
set(PLUGIN "TestsUtils")
|
||||||
|
|
||||||
|
set(
|
||||||
|
SRC
|
||||||
|
plugin.cpp
|
||||||
|
utils.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
|
||||||
|
OUTPUT_VARIABLE ARCH_TRIPLET
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
if(ARCH_TRIPLET STREQUAL "")
|
||||||
|
set(ARCH_TRIPLET x86_64-linux-gnu)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(${PLUGIN} MODULE ${SRC})
|
||||||
|
set_target_properties(${PLUGIN} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PLUGIN})
|
||||||
|
qt5_use_modules(${PLUGIN} Qml Quick DBus)
|
||||||
|
|
||||||
|
set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")
|
||||||
|
|
||||||
|
install(TARGETS ${PLUGIN} DESTINATION ${QT_IMPORTS_DIR}/${PLUGIN}/)
|
||||||
|
install(FILES qmldir DESTINATION ${QT_IMPORTS_DIR}/${PLUGIN}/)
|
10
tests/plugins/TestsUtils/plugin.cpp
Normal file
10
tests/plugins/TestsUtils/plugin.cpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#include <QtQml>
|
||||||
|
|
||||||
|
#include "plugin.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
void TestsUtilsPlugin::registerTypes(const char *uri)
|
||||||
|
{
|
||||||
|
//@uri TestUtils
|
||||||
|
qmlRegisterSingletonType<TestsUtilsPlugin>(uri, 1, 0, "TestUtils", [](QQmlEngine *, QJSEngine *) -> QObject * { return new TestsUtils; });
|
||||||
|
}
|
16
tests/plugins/TestsUtils/plugin.h
Normal file
16
tests/plugins/TestsUtils/plugin.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef TESTSUTILSPLUGIN_H
|
||||||
|
#define TESTSUTILSPLUGIN_H
|
||||||
|
|
||||||
|
#include <QQmlExtensionPlugin>
|
||||||
|
|
||||||
|
class TestsUtilsPlugin : public QQmlExtensionPlugin
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PLUGIN_METADATA(IID
|
||||||
|
"org.qt-project.Qt.QQmlExtensionInterface")
|
||||||
|
|
||||||
|
public:
|
||||||
|
void registerTypes(const char *uri) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
2
tests/plugins/TestsUtils/qmldir
Normal file
2
tests/plugins/TestsUtils/qmldir
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
module TestUtils
|
||||||
|
plugin TestUtils
|
38
tests/plugins/TestsUtils/utils.cpp
Normal file
38
tests/plugins/TestsUtils/utils.cpp
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#include <QFile>
|
||||||
|
#include <QDir>
|
||||||
|
#include <QUrl>
|
||||||
|
#include <QUuid>
|
||||||
|
#include <QtCore/QStandardPaths>
|
||||||
|
#include <quazip5/JlCompress.h>
|
||||||
|
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
|
QString TestsUtils::getTempPath()
|
||||||
|
{
|
||||||
|
qFatal("yp");
|
||||||
|
// Get the system's temporary directory
|
||||||
|
QString tempDir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
|
||||||
|
qDebug() << "TempDir : " << tempDir;
|
||||||
|
|
||||||
|
// Generate a unique UUID
|
||||||
|
QString uuid = QUuid::createUuid().toString(QUuid::WithoutBraces);
|
||||||
|
|
||||||
|
// Create a new directory using the generated UUID
|
||||||
|
QString newTempDir = tempDir + "/" + uuid;
|
||||||
|
|
||||||
|
QDir dir;
|
||||||
|
if (!dir.exists(newTempDir)) {
|
||||||
|
// Create the directory
|
||||||
|
if (dir.mkpath(newTempDir)) {
|
||||||
|
return newTempDir; // Return the path if successful
|
||||||
|
} else {
|
||||||
|
return "Failed to create directory"; // Return an error message
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return newTempDir; // If the directory already exists, return its path
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
19
tests/plugins/TestsUtils/utils.h
Normal file
19
tests/plugins/TestsUtils/utils.h
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#ifndef TESTSUTILS_H
|
||||||
|
#define TESTSUTILS_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QUrl>
|
||||||
|
#include <QQuickWindow>
|
||||||
|
|
||||||
|
class TestsUtils : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
TestsUtils() = default;
|
||||||
|
~TestsUtils() override = default;
|
||||||
|
|
||||||
|
Q_INVOKABLE QString getTempPath();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
11
tests/unit/tst_git.qml
Normal file
11
tests/unit/tst_git.qml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import Git 1.0
|
||||||
|
import QtQuick 2.9
|
||||||
|
import QtTest 1.2
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
function test_git_clone() {
|
||||||
|
verify(Git.clone("", ""));
|
||||||
|
}
|
||||||
|
|
||||||
|
name: "git"
|
||||||
|
}
|
11
tests/unit/tst_pass.qml
Normal file
11
tests/unit/tst_pass.qml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import Git 1.0
|
||||||
|
import QtQuick 2.9
|
||||||
|
import QtTest 1.2
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
function test_git_clone() {
|
||||||
|
verify(Git.clone("", ""));
|
||||||
|
}
|
||||||
|
|
||||||
|
name: "git"
|
||||||
|
}
|
15
tests/unit/tst_utils.qml
Normal file
15
tests/unit/tst_utils.qml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import QtQuick 2.9
|
||||||
|
import QtTest 1.2
|
||||||
|
import TestUtils 1.0
|
||||||
|
import Utils 1.0
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
function test_unzip() {
|
||||||
|
var tempPath = TestUtils.getTempPath() + "/password-store";
|
||||||
|
var zipUrl = Qt.resolvedUrl("../assets/archive.zip");
|
||||||
|
var r = Utils.unzip(zipUrl, tempPath);
|
||||||
|
verify(r, "Unzip return an error %1".arg(zipUrl));
|
||||||
|
}
|
||||||
|
|
||||||
|
name: "utils"
|
||||||
|
}
|
Reference in New Issue
Block a user