Compare commits
10 Commits
917cf3fd51
...
br-2.2.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 6bb7162263 | |||
| 0a48323043 | |||
| b347a926c2 | |||
| d2a179f58b | |||
| 3330cdc69b | |||
| dd1e2b2100 | |||
| 2566bdcedf | |||
| 1ff3fe194e | |||
| 6e2476df02 | |||
| e3fe33245e |
2
.gitignore
vendored
@ -5,6 +5,7 @@
|
||||
# Editor files
|
||||
.*.sw?
|
||||
*~
|
||||
.idea
|
||||
|
||||
# Test files
|
||||
godog.test
|
||||
@ -29,3 +30,4 @@ vendor-cache
|
||||
/hasher
|
||||
cmd/Desktop-Bridge/deploy
|
||||
cmd/Import-Export/deploy
|
||||
proton-bridge
|
||||
|
||||
@ -180,6 +180,7 @@ build-linux-qa:
|
||||
- export PATH=$GOPATH/bin:$PATH
|
||||
- export CGO_CPPFLAGS='-Wno-error -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-builtin-requires-header'
|
||||
script:
|
||||
- go version
|
||||
- make build
|
||||
- git diff && git diff-index --quiet HEAD
|
||||
cache: {}
|
||||
|
||||
@ -23,9 +23,9 @@ Proton Mail Bridge includes the following 3rd party software:
|
||||
<!-- START AUTOGEN -->
|
||||
* [docker-credential-helpers](https://github.com/docker/docker-credential-helpers) available under [license](https://github.com/docker/docker-credential-helpers/blob/master/LICENSE)
|
||||
* [go-imap](https://github.com/emersion/go-imap) available under [license](https://github.com/emersion/go-imap/blob/master/LICENSE)
|
||||
* [bcrypt](https://github.com/jameskeane/bcrypt) available under [license](https://github.com/jameskeane/bcrypt/blob/master/LICENSE)
|
||||
* [notificator](https://github.com/0xAX/notificator) available under [license](https://github.com/0xAX/notificator/blob/master/LICENSE)
|
||||
* [semver](https://github.com/Masterminds/semver/v3) available under [license](https://github.com/Masterminds/semver/v3/blob/master/LICENSE)
|
||||
* [bcrypt](https://github.com/ProtonMail/bcrypt) available under [license](https://github.com/ProtonMail/bcrypt/blob/master/LICENSE)
|
||||
* [go-autostart](https://github.com/ProtonMail/go-autostart) available under [license](https://github.com/ProtonMail/go-autostart/blob/master/LICENSE)
|
||||
* [go-crypto](https://github.com/ProtonMail/go-crypto) available under [license](https://github.com/ProtonMail/go-crypto/blob/master/LICENSE)
|
||||
* [go-imap-id](https://github.com/ProtonMail/go-imap-id) available under [license](https://github.com/ProtonMail/go-imap-id/blob/master/LICENSE)
|
||||
@ -61,6 +61,7 @@ Proton Mail Bridge includes the following 3rd party software:
|
||||
* [go-cmp](https://github.com/google/go-cmp) available under [license](https://github.com/google/go-cmp/blob/master/LICENSE)
|
||||
* [uuid](https://github.com/google/uuid) available under [license](https://github.com/google/uuid/blob/master/LICENSE)
|
||||
* [go-multierror](https://github.com/hashicorp/go-multierror) available under [license](https://github.com/hashicorp/go-multierror/blob/master/LICENSE)
|
||||
* [bcrypt](https://github.com/jameskeane/bcrypt) available under [license](https://github.com/jameskeane/bcrypt/blob/master/LICENSE)
|
||||
* [html2text](https://github.com/jaytaylor/html2text) available under [license](https://github.com/jaytaylor/html2text/blob/master/LICENSE)
|
||||
* [go-keychain](https://github.com/keybase/go-keychain) available under [license](https://github.com/keybase/go-keychain/blob/master/LICENSE)
|
||||
* [text](https://github.com/kr/text) available under [license](https://github.com/kr/text/blob/master/LICENSE)
|
||||
@ -88,6 +89,5 @@ Proton Mail Bridge includes the following 3rd party software:
|
||||
* [docker-credential-helpers](https://github.com/ProtonMail/docker-credential-helpers) available under [license](https://github.com/ProtonMail/docker-credential-helpers/blob/master/LICENSE)
|
||||
* [go-imap](https://github.com/ProtonMail/go-imap) available under [license](https://github.com/ProtonMail/go-imap/blob/master/LICENSE)
|
||||
* [go-message](https://github.com/ProtonMail/go-message) available under [license](https://github.com/ProtonMail/go-message/blob/master/LICENSE)
|
||||
* [bcrypt](https://github.com/ProtonMail/bcrypt) available under [license](https://github.com/ProtonMail/bcrypt/blob/master/LICENSE)
|
||||
* [go-keychain](https://github.com/cuthix/go-keychain) available under [license](https://github.com/cuthix/go-keychain/blob/master/LICENSE)
|
||||
<!-- END AUTOGEN -->
|
||||
|
||||
22
Changelog.md
@ -2,6 +2,28 @@
|
||||
|
||||
Changelog [format](http://keepachangelog.com/en/1.0.0/)
|
||||
|
||||
## [Bridge 2.2.1] Millau
|
||||
|
||||
### Added
|
||||
* GODT-1550: Add gobinsec check after CI build.
|
||||
* GODT-1686: Add Label/Folder filtering to pmapi.
|
||||
|
||||
### Changed
|
||||
* Rebranding:
|
||||
* GODT-1475: Change systray icons.
|
||||
* GODT-1565: Update Bridge application icons.
|
||||
* GODT-1564: Update welcome illustration.
|
||||
* GODT-1626: Update gopenpgp v2.4.7.
|
||||
* GODT-1627: Update go-srvp to v0.0.5.
|
||||
* GODT-1523: Reduce unnecessary shell executions. Inspired by @kortschak.
|
||||
* Other: Add v2 to module name.
|
||||
* GODT-1562: Update test fingerpring.
|
||||
|
||||
### Fixed
|
||||
* GODT-1659: Convert charset only for `text/*` MIME types.
|
||||
* GODT-1640: Renew test keys.
|
||||
|
||||
|
||||
## [Bridge 2.2.0] Millau
|
||||
|
||||
### Added
|
||||
|
||||
14
Makefile
@ -10,11 +10,11 @@ TARGET_OS?=${GOOS}
|
||||
.PHONY: build build-nogui build-launcher versioner hasher
|
||||
|
||||
# Keep version hardcoded so app build works also without Git repository.
|
||||
BRIDGE_APP_VERSION?=2.2.0+git
|
||||
BRIDGE_APP_VERSION?=2.2.1+git
|
||||
APP_VERSION:=${BRIDGE_APP_VERSION}
|
||||
SRC_ICO:=logo.ico
|
||||
SRC_ICO:=bridge.ico
|
||||
SRC_ICNS:=Bridge.icns
|
||||
SRC_SVG:=logo.svg
|
||||
SRC_SVG:=bridge.svg
|
||||
EXE_NAME:=proton-bridge
|
||||
CONFIGNAME:=bridge
|
||||
REVISION:=$(shell git rev-parse --short=10 HEAD)
|
||||
@ -88,7 +88,7 @@ ${TGZ_TARGET}: ${DEPLOY_DIR}/${TARGET_OS}
|
||||
cd ${DEPLOY_DIR}/${TARGET_OS} && tar -czvf ../../../../$@ .
|
||||
|
||||
${DEPLOY_DIR}/linux: ${EXE_TARGET}
|
||||
cp -pf ./internal/frontend/share/${SRC_SVG} ${DEPLOY_DIR}/linux/logo.svg
|
||||
cp -pf ./dist/${SRC_SVG} ${DEPLOY_DIR}/linux/logo.svg
|
||||
cp -pf ./LICENSE ${DEPLOY_DIR}/linux/
|
||||
cp -pf ./Changelog.md ${DEPLOY_DIR}/linux/
|
||||
cp -pf ./dist/${EXE_NAME}.desktop ${DEPLOY_DIR}/linux/
|
||||
@ -98,7 +98,7 @@ ${DEPLOY_DIR}/darwin: ${EXE_TARGET}
|
||||
mv ${EXE_TARGET}/Contents/MacOS/{${DIRNAME},${EXE_NAME}}; \
|
||||
perl -i -pe"s/>${DIRNAME}/>${EXE_NAME}/g" ${EXE_TARGET}/Contents/Info.plist; \
|
||||
fi
|
||||
cp ./internal/frontend/share/${SRC_ICNS} ${DARWINAPP_CONTENTS}/Resources/${SRC_ICNS}
|
||||
cp ./dist/${SRC_ICNS} ${DARWINAPP_CONTENTS}/Resources/${SRC_ICNS}
|
||||
cp LICENSE ${DARWINAPP_CONTENTS}/Resources/
|
||||
rm -rf "${DARWINAPP_CONTENTS}/Frameworks/QtWebEngine.framework"
|
||||
rm -rf "${DARWINAPP_CONTENTS}/Frameworks/QtWebView.framework"
|
||||
@ -106,7 +106,7 @@ ${DEPLOY_DIR}/darwin: ${EXE_TARGET}
|
||||
./utils/remove_non_relative_links_darwin.sh "${EXE_TARGET}${EXE_BINARY_DARWIN}"
|
||||
|
||||
${DEPLOY_DIR}/windows: ${EXE_TARGET}
|
||||
cp ./internal/frontend/share/${SRC_ICO} ${DEPLOY_DIR}/windows/logo.ico
|
||||
cp ./dist/${SRC_ICO} ${DEPLOY_DIR}/windows/logo.ico
|
||||
cp LICENSE ${DEPLOY_DIR}/windows/
|
||||
|
||||
QT_BUILD_TARGET:=build desktop
|
||||
@ -127,7 +127,7 @@ ${EXE_TARGET}: check-has-go gofiles ${RESOURCE_FILE} ${VENDOR_TARGET}
|
||||
|
||||
WINDRES_YEAR:=$(shell date +%Y)
|
||||
APP_VERSION_COMMA:=$(shell echo "${APP_VERSION}" | sed -e 's/[^0-9,.]*//g' -e 's/\./,/g')
|
||||
resource.syso: ./internal/frontend/share/info.rc ./internal/frontend/share/${SRC_ICO} .FORCE
|
||||
resource.syso: ./dist/info.rc ./dist/${SRC_ICO} .FORCE
|
||||
rm -f ./*.syso
|
||||
windres --target=pe-x86-64 -I ./internal/frontend/share/ -D ICO_FILE=${SRC_ICO} -D EXE_NAME="${EXE_NAME}" -D FILE_VERSION="${APP_VERSION}" -D ORIGINAL_FILE_NAME="${EXE}" -D PRODUCT_VERSION="${APP_VERSION}" -D FILE_VERSION_COMMA=${APP_VERSION_COMMA} -D YEAR=${WINDRES_YEAR} -o $@ $<
|
||||
|
||||
|
||||
@ -20,7 +20,6 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
|
||||
@ -36,6 +35,7 @@ import (
|
||||
"github.com/ProtonMail/proton-bridge/v2/internal/versioner"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/sys/execabs"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -98,7 +98,7 @@ func main() { //nolint:funlen
|
||||
logrus.WithError(err).Fatal("Failed to determine path to launcher")
|
||||
}
|
||||
|
||||
cmd := exec.Command(exe, appendLauncherPath(launcher, os.Args[1:])...) //nolint:gosec
|
||||
cmd := execabs.Command(exe, appendLauncherPath(launcher, os.Args[1:])...) //nolint:gosec
|
||||
|
||||
cmd.Stdin = os.Stdin
|
||||
cmd.Stdout = os.Stdout
|
||||
|
||||
BIN
dist/Bridge.icns
vendored
Normal file
BIN
dist/bridge.ico
vendored
Normal file
|
After Width: | Height: | Size: 124 KiB |
32
dist/bridge.svg
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_9588_57903)">
|
||||
<path d="M127.416 -0.0898438C63.1423 -0.0898438 11.0449 51.9864 11.0449 116.234V233.331C11.0449 245.779 21.1405 255.871 33.5942 255.871H223.647C234.767 255.871 243.788 246.853 243.788 235.738V116.234C243.788 51.9948 191.691 -0.0898438 127.416 -0.0898438ZM194.401 115.589L143.537 158.421C134.357 166.155 120.929 166.155 111.749 158.421L60.8849 115.589C60.8849 79.2409 90.3659 49.7718 126.728 49.7718H128.558C164.92 49.7718 194.401 79.2409 194.401 115.589Z" fill="#6D4AFF"/>
|
||||
<path d="M127.416 -0.0898438C63.1423 -0.0898438 11.0449 51.9864 11.0449 116.234V233.331C11.0449 245.779 21.1405 255.871 33.5942 255.871H223.647C234.767 255.871 243.788 246.853 243.788 235.738V116.234C243.788 51.9948 191.691 -0.0898438 127.416 -0.0898438ZM194.401 115.589L143.537 158.421C134.357 166.155 120.929 166.155 111.749 158.421L60.8849 115.589C60.8849 79.2409 90.3659 49.7718 126.728 49.7718H128.558C164.92 49.7718 194.401 79.2409 194.401 115.589Z" fill="url(#paint0_linear_9588_57903)"/>
|
||||
<g filter="url(#filter0_i_9588_57903)">
|
||||
<path d="M143.572 158.939C138.271 163.23 124.489 169.238 111.766 158.939C99.0439 148.64 72.6401 125.871 61.0285 115.774H61.0868L60.8676 115.59C60.8676 79.2418 90.3367 49.7728 126.684 49.7728H128.513C164.861 49.7728 194.33 79.2418 194.33 115.59L194.111 115.774H194.31V255.872H223.564C234.679 255.872 243.697 246.854 243.697 235.739V116.235C243.697 51.9958 191.62 -0.0888672 127.372 -0.0888672C63.1241 -0.0888672 11.0479 51.9874 11.0479 116.235V123.587L82.9896 185.444C88.2906 190.492 102.224 197.56 115.553 185.444C128.881 173.327 139.786 162.726 143.572 158.939Z" fill="url(#paint1_radial_9588_57903)"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_i_9588_57903" x="7.29545" y="-0.0888672" width="236.401" height="266.43" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="-3.7524" dy="10.4692"/>
|
||||
<feGaussianBlur stdDeviation="28.143"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.462745 0 0 0 0 0.337255 0 0 0 0 1 0 0 0 0.24 0"/>
|
||||
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_9588_57903"/>
|
||||
</filter>
|
||||
<linearGradient id="paint0_linear_9588_57903" x1="19.3784" y1="285.405" x2="54.2022" y2="186.949" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#28B0E8"/>
|
||||
<stop offset="1" stop-color="#C5B7FF" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint1_radial_9588_57903" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(229.979 277.075) rotate(-138.034) scale(294.445 240.743)">
|
||||
<stop stop-color="#E2DBFF"/>
|
||||
<stop offset="1" stop-color="#6D4AFF"/>
|
||||
</radialGradient>
|
||||
<clipPath id="clip0_9588_57903">
|
||||
<rect width="256" height="256" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
2
dist/proton-bridge.desktop
vendored
@ -8,4 +8,4 @@ Icon=protonmail-bridge
|
||||
Exec=protonmail-bridge
|
||||
Terminal=false
|
||||
Categories=Office;Email;Network
|
||||
StartupWMClass=protonmail-bridge
|
||||
StartupWMClass=Proton Mail Bridge
|
||||
|
||||
BIN
dist/raw/mac_icon_128x128.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
dist/raw/mac_icon_128x128@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
dist/raw/mac_icon_16x16.png
vendored
Normal file
|
After Width: | Height: | Size: 715 B |
BIN
dist/raw/mac_icon_16x16@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
dist/raw/mac_icon_256x256.png
vendored
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
dist/raw/mac_icon_256x256@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 135 KiB |
BIN
dist/raw/mac_icon_32x32.png
vendored
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
dist/raw/mac_icon_32x32@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
dist/raw/mac_icon_512x512.png
vendored
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
dist/raw/mac_icon_512x512@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 494 KiB |
32
dist/raw/win+lin_icon_16x16.svg
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_9588_57915)">
|
||||
<path d="M7.9607 -0.00488281C3.9452 -0.00488281 0.69043 3.24988 0.69043 7.26539V14.5839C0.69043 15.3619 1.32115 15.9926 2.09919 15.9926H13.9727C14.6674 15.9926 15.231 15.429 15.231 14.7344V7.26539C15.231 3.25041 11.9762 -0.00488281 7.9607 -0.00488281ZM12.1456 7.22502L8.96786 9.90202C8.39429 10.3854 7.55543 10.3854 6.98186 9.90202L3.80416 7.22502C3.80416 4.95329 5.64598 3.11147 7.91771 3.11147H8.032C10.3037 3.11147 12.1456 4.95329 12.1456 7.22502Z" fill="#6D4AFF"/>
|
||||
<path d="M7.9607 -0.00488281C3.9452 -0.00488281 0.69043 3.24988 0.69043 7.26539V14.5839C0.69043 15.3619 1.32115 15.9926 2.09919 15.9926H13.9727C14.6674 15.9926 15.231 15.429 15.231 14.7344V7.26539C15.231 3.25041 11.9762 -0.00488281 7.9607 -0.00488281ZM12.1456 7.22502L8.96786 9.90202C8.39429 10.3854 7.55543 10.3854 6.98186 9.90202L3.80416 7.22502C3.80416 4.95329 5.64598 3.11147 7.91771 3.11147H8.032C10.3037 3.11147 12.1456 4.95329 12.1456 7.22502Z" fill="url(#paint0_linear_9588_57915)"/>
|
||||
<g filter="url(#filter0_i_9588_57915)">
|
||||
<path d="M8.97323 9.93257C8.64192 10.2008 7.78051 10.5763 6.98537 9.93257C6.19022 9.28888 4.53998 7.86583 3.81426 7.23476H3.81805L3.80416 7.22306C3.80416 4.95133 5.64598 3.10952 7.91771 3.10952H8.032C10.3037 3.10952 12.1456 4.95133 12.1456 7.22306L12.1317 7.23476H12.1443V15.9907H13.9727C14.6674 15.9907 15.231 15.4271 15.231 14.7324V7.26343C15.231 3.24845 11.9762 -0.00683594 7.9607 -0.00683594C3.9452 -0.00683594 0.69043 3.24793 0.69043 7.26343V7.72306L5.18683 11.5891C5.51814 11.9047 6.38901 12.3464 7.22202 11.5891C8.05502 10.8318 8.73658 10.1692 8.97323 9.93257Z" fill="url(#paint1_radial_9588_57915)"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_i_9588_57915" x="0.455905" y="-0.00683594" width="14.7755" height="16.6514" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="-0.234525" dy="0.654324"/>
|
||||
<feGaussianBlur stdDeviation="1.75894"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.462745 0 0 0 0 0.337255 0 0 0 0 1 0 0 0 0.24 0"/>
|
||||
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_9588_57915"/>
|
||||
</filter>
|
||||
<linearGradient id="paint0_linear_9588_57915" x1="1.21106" y1="17.8385" x2="3.38824" y2="11.6856" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#28B0E8"/>
|
||||
<stop offset="1" stop-color="#C5B7FF" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint1_radial_9588_57915" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(14.3736 17.3159) rotate(-138.034) scale(18.4028 15.0465)">
|
||||
<stop stop-color="#E2DBFF"/>
|
||||
<stop offset="1" stop-color="#6D4AFF"/>
|
||||
</radialGradient>
|
||||
<clipPath id="clip0_9588_57915">
|
||||
<rect width="16" height="16" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
32
dist/raw/win+lin_icon_24x24.svg
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_9588_57912)">
|
||||
<path d="M11.8651 -0.0078125C6.09279 -0.0078125 1.41406 4.67091 1.41406 10.4432V20.9636C1.41406 22.082 2.32072 22.9886 3.43915 22.9886H20.5073C21.5059 22.9886 22.3161 22.1785 22.3161 21.1799V10.4432C22.3161 4.67167 17.6374 -0.0078125 11.8651 -0.0078125ZM17.8808 10.3852L13.3129 14.2334C12.4884 14.9282 11.2825 14.9282 10.458 14.2334L5.89005 10.3852C5.89005 7.11956 8.53767 4.47195 11.8033 4.47195H11.9676C15.2332 4.47195 17.8808 7.11956 17.8808 10.3852Z" fill="#6D4AFF"/>
|
||||
<path d="M11.8651 -0.0078125C6.09279 -0.0078125 1.41406 4.67091 1.41406 10.4432V20.9636C1.41406 22.082 2.32072 22.9886 3.43915 22.9886H20.5073C21.5059 22.9886 22.3161 22.1785 22.3161 21.1799V10.4432C22.3161 4.67167 17.6374 -0.0078125 11.8651 -0.0078125ZM17.8808 10.3852L13.3129 14.2334C12.4884 14.9282 11.2825 14.9282 10.458 14.2334L5.89005 10.3852C5.89005 7.11956 8.53767 4.47195 11.8033 4.47195H11.9676C15.2332 4.47195 17.8808 7.11956 17.8808 10.3852Z" fill="url(#paint0_linear_9588_57912)"/>
|
||||
<g filter="url(#filter0_i_9588_57912)">
|
||||
<path d="M13.3213 14.28C12.8451 14.6656 11.6068 15.2053 10.4638 14.28C9.32078 13.3547 6.94856 11.3091 5.90533 10.4019H5.91095L5.89103 10.3852C5.89103 7.11956 8.53864 4.47195 11.8043 4.47195H11.9686C15.2342 4.47195 17.8818 7.11956 17.8818 10.3852L17.8619 10.4019H17.8798V22.9886H20.5083C21.5069 22.9886 22.3171 22.1785 22.3171 21.1799V10.4432C22.3171 4.67167 17.6383 -0.0078125 11.8661 -0.0078125C6.09377 -0.0078125 1.41504 4.67091 1.41504 10.4432V11.1041L7.8784 16.6613C8.35466 17.1149 9.60653 17.7499 10.804 16.6613C12.0014 15.5727 12.9812 14.6202 13.3213 14.28Z" fill="url(#paint1_radial_9588_57912)"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_i_9588_57912" x="1.07791" y="-0.0078125" width="21.2395" height="23.9367" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="-0.337129" dy="0.940591"/>
|
||||
<feGaussianBlur stdDeviation="2.52847"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.462745 0 0 0 0 0.337255 0 0 0 0 1 0 0 0 0.24 0"/>
|
||||
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_9588_57912"/>
|
||||
</filter>
|
||||
<linearGradient id="paint0_linear_9588_57912" x1="2.16247" y1="25.6421" x2="5.29216" y2="16.7973" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#28B0E8"/>
|
||||
<stop offset="1" stop-color="#C5B7FF" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint1_radial_9588_57912" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(21.0847 24.8937) rotate(-138.034) scale(26.454 21.6293)">
|
||||
<stop stop-color="#E2DBFF"/>
|
||||
<stop offset="1" stop-color="#6D4AFF"/>
|
||||
</radialGradient>
|
||||
<clipPath id="clip0_9588_57912">
|
||||
<rect width="24" height="24" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
BIN
dist/raw/win+lin_icon_256x256.png
vendored
Normal file
|
After Width: | Height: | Size: 27 KiB |
32
dist/raw/win+lin_icon_256x256.svg
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_9588_57903)">
|
||||
<path d="M127.416 -0.0898438C63.1423 -0.0898438 11.0449 51.9864 11.0449 116.234V233.331C11.0449 245.779 21.1405 255.871 33.5942 255.871H223.647C234.767 255.871 243.788 246.853 243.788 235.738V116.234C243.788 51.9948 191.691 -0.0898438 127.416 -0.0898438ZM194.401 115.589L143.537 158.421C134.357 166.155 120.929 166.155 111.749 158.421L60.8849 115.589C60.8849 79.2409 90.3659 49.7718 126.728 49.7718H128.558C164.92 49.7718 194.401 79.2409 194.401 115.589Z" fill="#6D4AFF"/>
|
||||
<path d="M127.416 -0.0898438C63.1423 -0.0898438 11.0449 51.9864 11.0449 116.234V233.331C11.0449 245.779 21.1405 255.871 33.5942 255.871H223.647C234.767 255.871 243.788 246.853 243.788 235.738V116.234C243.788 51.9948 191.691 -0.0898438 127.416 -0.0898438ZM194.401 115.589L143.537 158.421C134.357 166.155 120.929 166.155 111.749 158.421L60.8849 115.589C60.8849 79.2409 90.3659 49.7718 126.728 49.7718H128.558C164.92 49.7718 194.401 79.2409 194.401 115.589Z" fill="url(#paint0_linear_9588_57903)"/>
|
||||
<g filter="url(#filter0_i_9588_57903)">
|
||||
<path d="M143.572 158.939C138.271 163.23 124.489 169.238 111.766 158.939C99.0439 148.64 72.6401 125.871 61.0285 115.774H61.0868L60.8676 115.59C60.8676 79.2418 90.3367 49.7728 126.684 49.7728H128.513C164.861 49.7728 194.33 79.2418 194.33 115.59L194.111 115.774H194.31V255.872H223.564C234.679 255.872 243.697 246.854 243.697 235.739V116.235C243.697 51.9958 191.62 -0.0888672 127.372 -0.0888672C63.1241 -0.0888672 11.0479 51.9874 11.0479 116.235V123.587L82.9896 185.444C88.2906 190.492 102.224 197.56 115.553 185.444C128.881 173.327 139.786 162.726 143.572 158.939Z" fill="url(#paint1_radial_9588_57903)"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_i_9588_57903" x="7.29545" y="-0.0888672" width="236.401" height="266.43" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="-3.7524" dy="10.4692"/>
|
||||
<feGaussianBlur stdDeviation="28.143"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.462745 0 0 0 0 0.337255 0 0 0 0 1 0 0 0 0.24 0"/>
|
||||
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_9588_57903"/>
|
||||
</filter>
|
||||
<linearGradient id="paint0_linear_9588_57903" x1="19.3784" y1="285.405" x2="54.2022" y2="186.949" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#28B0E8"/>
|
||||
<stop offset="1" stop-color="#C5B7FF" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint1_radial_9588_57903" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(229.979 277.075) rotate(-138.034) scale(294.445 240.743)">
|
||||
<stop stop-color="#E2DBFF"/>
|
||||
<stop offset="1" stop-color="#6D4AFF"/>
|
||||
</radialGradient>
|
||||
<clipPath id="clip0_9588_57903">
|
||||
<rect width="256" height="256" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
32
dist/raw/win+lin_icon_32x32.svg
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_9588_57909)">
|
||||
<path d="M15.9709 -0.0107422C8.19088 -0.0107422 1.88477 6.29537 1.88477 14.0754V28.255C1.88477 29.7625 3.10678 30.9845 4.61423 30.9845H27.6191C28.9651 30.9845 30.0571 29.8925 30.0571 28.5465V14.0754C30.0571 6.29638 23.751 -0.0107422 15.9709 -0.0107422ZM24.0791 13.9972L17.9223 19.1839C16.811 20.1205 15.1857 20.1205 14.0744 19.1839L7.91762 13.9972C7.91762 9.59571 11.4861 6.02719 15.8876 6.02719H16.1091C20.5105 6.02719 24.0791 9.59571 24.0791 13.9972Z" fill="#6D4AFF"/>
|
||||
<path d="M15.9709 -0.0107422C8.19088 -0.0107422 1.88477 6.29537 1.88477 14.0754V28.255C1.88477 29.7625 3.10678 30.9845 4.61423 30.9845H27.6191C28.9651 30.9845 30.0571 29.8925 30.0571 28.5465V14.0754C30.0571 6.29638 23.751 -0.0107422 15.9709 -0.0107422ZM24.0791 13.9972L17.9223 19.1839C16.811 20.1205 15.1857 20.1205 14.0744 19.1839L7.91762 13.9972C7.91762 9.59571 11.4861 6.02719 15.8876 6.02719H16.1091C20.5105 6.02719 24.0791 9.59571 24.0791 13.9972Z" fill="url(#paint0_linear_9588_57909)"/>
|
||||
<g filter="url(#filter0_i_9588_57909)">
|
||||
<path d="M17.9322 19.2467C17.2903 19.7663 15.6213 20.4938 14.0807 19.2467C12.5401 17.9996 9.34279 15.2424 7.9367 14.0197H7.94435L7.91762 13.9972C7.91762 9.59571 11.4861 6.02719 15.8876 6.02719H16.1091C20.5105 6.02719 24.0791 9.59571 24.0791 13.9972L24.0523 14.0197H24.0762V30.9845H27.6191C28.9651 30.9845 30.0571 29.8925 30.0571 28.5465V14.0754C30.0571 6.29638 23.751 -0.0107422 15.9709 -0.0107422C8.19088 -0.0107422 1.88477 6.29537 1.88477 14.0754V14.9662L10.596 22.4563C11.238 23.0676 12.9253 23.9235 14.5392 22.4563C16.1532 20.989 17.4737 19.7052 17.9322 19.2467Z" fill="url(#paint1_radial_9588_57909)"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_i_9588_57909" x="1.43037" y="-0.0107422" width="28.6263" height="32.2629" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="-0.454392" dy="1.26775"/>
|
||||
<feGaussianBlur stdDeviation="3.40794"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.462745 0 0 0 0 0.337255 0 0 0 0 1 0 0 0 0.24 0"/>
|
||||
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_9588_57909"/>
|
||||
</filter>
|
||||
<linearGradient id="paint0_linear_9588_57909" x1="2.89348" y1="34.5608" x2="7.11177" y2="22.6396" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#28B0E8"/>
|
||||
<stop offset="1" stop-color="#C5B7FF" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint1_radial_9588_57909" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(28.396 33.5521) rotate(-138.034) scale(35.6554 29.1525)">
|
||||
<stop stop-color="#E2DBFF"/>
|
||||
<stop offset="1" stop-color="#6D4AFF"/>
|
||||
</radialGradient>
|
||||
<clipPath id="clip0_9588_57909">
|
||||
<rect width="32" height="32" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
32
dist/raw/win+lin_icon_48x48.svg
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_9588_57906)">
|
||||
<path d="M23.8921 -0.0166016C11.9792 -0.0166016 2.32324 9.63938 2.32324 21.5523V43.2642C2.32324 45.5724 4.1944 47.4436 6.50263 47.4436H41.728C43.7889 47.4436 45.461 45.7715 45.461 43.7106V21.5523C45.461 9.64093 35.805 -0.0166016 23.8921 -0.0166016ZM36.3074 21.4325L26.8801 29.3744C25.1784 30.8085 22.6898 30.8085 20.9882 29.3744L11.5608 21.4325C11.5608 14.6929 17.025 9.22875 23.7646 9.22875H24.1036C30.8432 9.22875 36.3074 14.6929 36.3074 21.4325Z" fill="#6D4AFF"/>
|
||||
<path d="M23.8921 -0.0166016C11.9792 -0.0166016 2.32324 9.63938 2.32324 21.5523V43.2642C2.32324 45.5724 4.1944 47.4436 6.50263 47.4436H41.728C43.7889 47.4436 45.461 45.7715 45.461 43.7106V21.5523C45.461 9.64093 35.805 -0.0166016 23.8921 -0.0166016ZM36.3074 21.4325L26.8801 29.3744C25.1784 30.8085 22.6898 30.8085 20.9882 29.3744L11.5608 21.4325C11.5608 14.6929 17.025 9.22875 23.7646 9.22875H24.1036C30.8432 9.22875 36.3074 14.6929 36.3074 21.4325Z" fill="url(#paint0_linear_9588_57906)"/>
|
||||
<g filter="url(#filter0_i_9588_57906)">
|
||||
<path d="M26.8954 29.4706C25.9125 30.2663 23.3569 31.3803 20.998 29.4706C18.639 27.561 13.7432 23.3392 11.5902 21.467H11.6017L11.5608 21.4325C11.5608 14.6929 17.025 9.22875 23.7646 9.22875H24.1036C30.8432 9.22875 36.3074 14.6929 36.3074 21.4325L36.2665 21.467H36.3032V47.4436H41.728C43.7889 47.4436 45.461 45.7715 45.461 43.7106V21.5523C45.461 9.64093 35.805 -0.0166016 23.8921 -0.0166016C11.9792 -0.0166016 2.32324 9.63938 2.32324 21.5523V22.9161L15.6622 34.3851C16.6451 35.3212 19.2287 36.6318 21.7 34.3851C24.1713 32.1385 26.1933 30.1727 26.8954 29.4706Z" fill="url(#paint1_radial_9588_57906)"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_i_9588_57906" x="1.62747" y="-0.0166016" width="43.8335" height="49.4012" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="-0.69577" dy="1.9412"/>
|
||||
<feGaussianBlur stdDeviation="5.21827"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.462745 0 0 0 0 0.337255 0 0 0 0 1 0 0 0 0.24 0"/>
|
||||
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_9588_57906"/>
|
||||
</filter>
|
||||
<linearGradient id="paint0_linear_9588_57906" x1="3.8678" y1="52.9198" x2="10.3269" y2="34.6659" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#28B0E8"/>
|
||||
<stop offset="1" stop-color="#C5B7FF" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint1_radial_9588_57906" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(42.9175 51.3752) rotate(-138.034) scale(54.5959 44.6386)">
|
||||
<stop stop-color="#E2DBFF"/>
|
||||
<stop offset="1" stop-color="#6D4AFF"/>
|
||||
</radialGradient>
|
||||
<clipPath id="clip0_9588_57906">
|
||||
<rect width="48" height="48" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
16
go.mod
@ -7,19 +7,19 @@ go 1.15
|
||||
require (
|
||||
github.com/docker/docker-credential-helpers v0.6.3
|
||||
github.com/emersion/go-imap v1.0.6
|
||||
github.com/jameskeane/bcrypt v0.0.0-20170924085257-7509ea014998 // indirect
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/0xAX/notificator v0.0.0-20191016112426-3962a5ea8da1
|
||||
github.com/Masterminds/semver/v3 v3.1.0
|
||||
github.com/ProtonMail/bcrypt v0.0.0-20211005172633-e235017c1baf // indirect
|
||||
github.com/ProtonMail/go-autostart v0.0.0-20181114175602-c5272053443a
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20211221144345-a4f6767435ab
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20220623141421-5afb4c282135
|
||||
github.com/ProtonMail/go-imap-id v0.0.0-20190926060100-f94a56b9ecde
|
||||
github.com/ProtonMail/go-rfc5322 v0.8.0
|
||||
github.com/ProtonMail/go-srp v0.0.1
|
||||
github.com/ProtonMail/go-srp v0.0.5
|
||||
github.com/ProtonMail/go-vcard v0.0.0-20180326232728-33aaa0a0c8a5
|
||||
github.com/ProtonMail/gopenpgp/v2 v2.4.1
|
||||
github.com/ProtonMail/gopenpgp/v2 v2.4.7
|
||||
github.com/PuerkitoBio/goquery v1.5.1
|
||||
github.com/abiosoft/ishell v2.0.0+incompatible
|
||||
github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db // indirect
|
||||
@ -48,6 +48,7 @@ require (
|
||||
github.com/google/go-cmp v0.5.5
|
||||
github.com/google/uuid v1.1.1
|
||||
github.com/hashicorp/go-multierror v1.1.0
|
||||
github.com/jameskeane/bcrypt v0.0.0-20120420032655-c3cd44c1e20f // indirect
|
||||
github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7
|
||||
github.com/keybase/go-keychain v0.0.0
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
@ -69,17 +70,16 @@ require (
|
||||
github.com/urfave/cli/v2 v2.2.0
|
||||
github.com/vmihailenco/msgpack/v5 v5.1.3
|
||||
go.etcd.io/bbolt v1.3.6
|
||||
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
|
||||
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4
|
||||
golang.org/x/sys v0.0.0-20220111092808-5a964db01320
|
||||
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b
|
||||
golang.org/x/text v0.3.7
|
||||
howett.net/plist v1.0.0 // indirect
|
||||
howett.net/plist v1.0.0
|
||||
)
|
||||
|
||||
replace (
|
||||
github.com/docker/docker-credential-helpers => github.com/ProtonMail/docker-credential-helpers v1.1.0
|
||||
github.com/emersion/go-imap => github.com/ProtonMail/go-imap v0.0.0-20201228133358-4db68cea0cac
|
||||
github.com/emersion/go-message => github.com/ProtonMail/go-message v0.0.0-20210611055058-fabeff2ec753
|
||||
github.com/jameskeane/bcrypt => github.com/ProtonMail/bcrypt v0.0.0-20210511135022-227b4adcab57
|
||||
github.com/keybase/go-keychain => github.com/cuthix/go-keychain v0.0.0-20220405075754-31e7cee908fe
|
||||
)
|
||||
|
||||
18
go.sum
@ -24,6 +24,8 @@ github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/ProtonMail/bcrypt v0.0.0-20210511135022-227b4adcab57 h1:pHA4K54ifoogVLunGGHi3xyF5Nz4x+Uh3dJuy3NwGQQ=
|
||||
github.com/ProtonMail/bcrypt v0.0.0-20210511135022-227b4adcab57/go.mod h1:HecWFHognK8GfRDGnFQbW/LiV7A3MX3gZVs45vk5h8I=
|
||||
github.com/ProtonMail/bcrypt v0.0.0-20211005172633-e235017c1baf h1:yc9daCCYUefEs69zUkSzubzjBbL+cmOXgnmt9Fyd9ug=
|
||||
github.com/ProtonMail/bcrypt v0.0.0-20211005172633-e235017c1baf/go.mod h1:o0ESU9p83twszAU8LBeJKFAAMX14tISa0yk4Oo5TOqo=
|
||||
github.com/ProtonMail/docker-credential-helpers v1.1.0 h1:+kvUIpwWcbtP3WFv5sSvkFn/XLzSqPOB5AAthuk9xPk=
|
||||
github.com/ProtonMail/docker-credential-helpers v1.1.0/go.mod h1:mK0aBveCxhnQ756AmaTfXMZDeULvheYVhF/MWMErN5g=
|
||||
github.com/ProtonMail/go-autostart v0.0.0-20181114175602-c5272053443a h1:fXK2KsfnkBV9Nh+9SKzHchYjuE9s0vI20JG1mbtEAcc=
|
||||
@ -31,6 +33,9 @@ github.com/ProtonMail/go-autostart v0.0.0-20181114175602-c5272053443a/go.mod h1:
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20211221144345-a4f6767435ab h1:5FiL/TCaiKCss/BLMIACDxxadYrx767l9kh0qYX+sLQ=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20211221144345-a4f6767435ab/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20220113124808-70ae35bab23f/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20220623141421-5afb4c282135 h1:xDc/cFH/hwyr9KyWc0sm26lpsscqtfZBvU8NpRLHwJ0=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20220623141421-5afb4c282135/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo=
|
||||
github.com/ProtonMail/go-imap v0.0.0-20201228133358-4db68cea0cac h1:2xU3QncAiS/W3UlWZTkbNKW5WkLzk6Egl1T0xX+sbjs=
|
||||
github.com/ProtonMail/go-imap v0.0.0-20201228133358-4db68cea0cac/go.mod h1:yKASt+C3ZiDAiCSssxg9caIckWF/JG7ZQTO7GAmvicU=
|
||||
github.com/ProtonMail/go-imap-id v0.0.0-20190926060100-f94a56b9ecde h1:5koQozTDELymYOyFbQ/VSubexAEXzDR8qGM5mO8GRdw=
|
||||
@ -39,14 +44,20 @@ github.com/ProtonMail/go-message v0.0.0-20210611055058-fabeff2ec753 h1:I8IsYA297
|
||||
github.com/ProtonMail/go-message v0.0.0-20210611055058-fabeff2ec753/go.mod h1:NBAn21zgCJ/52WLDyed18YvYFm5tEoeDauubFqLokM4=
|
||||
github.com/ProtonMail/go-mime v0.0.0-20190923161245-9b5a4261663a h1:W6RrgN/sTxg1msqzFFb+G80MFmpjMw61IU+slm+wln4=
|
||||
github.com/ProtonMail/go-mime v0.0.0-20190923161245-9b5a4261663a/go.mod h1:NYt+V3/4rEeDuaev/zw1zCq8uqVEuPHzDPo3OZrlGJ4=
|
||||
github.com/ProtonMail/go-mime v0.0.0-20220302105931-303f85f7fe0f h1:CGq7OieOz3wyQJ1fO8S0eO9TCW1JyvLrf8fhzz1i8ko=
|
||||
github.com/ProtonMail/go-mime v0.0.0-20220302105931-303f85f7fe0f/go.mod h1:NYt+V3/4rEeDuaev/zw1zCq8uqVEuPHzDPo3OZrlGJ4=
|
||||
github.com/ProtonMail/go-rfc5322 v0.8.0 h1:7emrf75n3CDIduQflx7aT1nJa5h/kGsiFKUYX/+IAkU=
|
||||
github.com/ProtonMail/go-rfc5322 v0.8.0/go.mod h1:BwpTbkJxkMGkc+pC84AXZnwuWOisEULBpfPIyIKS/Us=
|
||||
github.com/ProtonMail/go-srp v0.0.1 h1:J0O9Zb5XTC6iDrB7feH41cu+TUEB+l7uHctXIK6oS2o=
|
||||
github.com/ProtonMail/go-srp v0.0.1/go.mod h1:Uvv5cqSGCs8MTZ8sbKiCkBnaB6/OA3eq2mc77tl2VVA=
|
||||
github.com/ProtonMail/go-srp v0.0.5 h1:xhUioxZgDbCnpo9JehyFhwwsn9JLWkUGfB0oiKXgiGg=
|
||||
github.com/ProtonMail/go-srp v0.0.5/go.mod h1:06iYHtLXW8vjLtccWj++x3MKy65sIT8yZd7nrJF49rs=
|
||||
github.com/ProtonMail/go-vcard v0.0.0-20180326232728-33aaa0a0c8a5 h1:Uga1DHFN4GUxuDQr0F71tpi8I9HqPIlZodZAI1lR6VQ=
|
||||
github.com/ProtonMail/go-vcard v0.0.0-20180326232728-33aaa0a0c8a5/go.mod h1:oeP9CMN+ajWp5jKp1kue5daJNwMMxLF+ujPaUIoJWlA=
|
||||
github.com/ProtonMail/gopenpgp/v2 v2.4.1 h1:b3El0zabaKi73u4sRnb3hOOUczuKuYpN8wnp7wRsZSc=
|
||||
github.com/ProtonMail/gopenpgp/v2 v2.4.1/go.mod h1:RFjoVjfhV8f78tjz/fLrp/OXkugL3QmWsiJq/fsQYA4=
|
||||
github.com/ProtonMail/gopenpgp/v2 v2.4.7 h1:V3xeelvXgJiZXZuPtSSE+uYbtPw4RmbmyPqXDAESPhg=
|
||||
github.com/ProtonMail/gopenpgp/v2 v2.4.7/go.mod h1:ZW1KxHNG6q5LMgFKf9Ap/d2eVYeyGf5+fAUEAjJWtmo=
|
||||
github.com/PuerkitoBio/goquery v1.5.1 h1:PSPBGne8NIUWw+/7vFBV+kG2J/5MOjbzc7154OaKCSE=
|
||||
github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
|
||||
github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0=
|
||||
@ -95,6 +106,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/cronokirby/saferith v0.31.0 h1:TIlhldetKLeGAb19bZvWiuwQEzfzwSPthDEyJ9Ah8xs=
|
||||
github.com/cronokirby/saferith v0.31.0/go.mod h1:QKJhjoqUtBsXCAVEjw38mFqoi7DebT7kthcD7UzbnoA=
|
||||
github.com/cronokirby/saferith v0.33.0 h1:TgoQlfsD4LIwx71+ChfRcIpjkw+RPOapDEVxa+LhwLo=
|
||||
github.com/cronokirby/saferith v0.33.0/go.mod h1:QKJhjoqUtBsXCAVEjw38mFqoi7DebT7kthcD7UzbnoA=
|
||||
github.com/cucumber/gherkin-go/v19 v19.0.3 h1:mMSKu1077ffLbTJULUfM5HPokgeBcIGboyeNUof1MdE=
|
||||
github.com/cucumber/gherkin-go/v19 v19.0.3/go.mod h1:jY/NP6jUtRSArQQJ5h1FXOUgk5fZK24qtE7vKi776Vw=
|
||||
github.com/cucumber/godog v0.12.1 h1:IhWVYFKDReM5WsuA9AuRLRPWOyvFNO9UBUKrNfLPais=
|
||||
@ -249,6 +262,7 @@ github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/
|
||||
github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk=
|
||||
github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g=
|
||||
github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw=
|
||||
github.com/jameskeane/bcrypt v0.0.0-20120420032655-c3cd44c1e20f/go.mod h1:u+9Snq0w+ZdYKi8BBoaxnEwWu0fY4Kvu9ByFpM51t1s=
|
||||
github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7 h1:g0fAGBisHaEQ0TRq1iBvemFRf+8AEWEmBESSiWB3Vsc=
|
||||
github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk=
|
||||
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
@ -473,6 +487,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5U
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA=
|
||||
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
@ -575,6 +591,8 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+R
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220111092808-5a964db01320 h1:0jf+tOCoZ3LyutmCOWpVni1chK4VfFLhRsDK7MhqGRY=
|
||||
golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b h1:2n253B2r0pYSmEV+UNCQoPfU/FiaizQEK5Gu4Bq4JE8=
|
||||
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
|
||||
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 945 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 25 KiB |
@ -19,10 +19,10 @@ package base
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/sys/execabs"
|
||||
)
|
||||
|
||||
// maxAllowedRestarts controls after how many crashes the app will give up restarting.
|
||||
@ -43,7 +43,7 @@ func (b *Base) restartApp(crash bool) error {
|
||||
WithField("args", args).
|
||||
Warn("Restarting")
|
||||
|
||||
return exec.Command(b.command, args...).Start() //nolint:gosec
|
||||
return execabs.Command(b.command, args...).Start() //nolint:gosec
|
||||
}
|
||||
|
||||
// incrementRestartFlag increments the value of the restart flag.
|
||||
|
||||
@ -17,10 +17,10 @@
|
||||
|
||||
package tls
|
||||
|
||||
import "os/exec"
|
||||
import "golang.org/x/sys/execabs"
|
||||
|
||||
func addTrustedCert(certPath string) error {
|
||||
return exec.Command( //nolint:gosec
|
||||
return execabs.Command( //nolint:gosec
|
||||
"/usr/bin/security",
|
||||
"execute-with-privileges",
|
||||
"/usr/bin/security",
|
||||
@ -34,7 +34,7 @@ func addTrustedCert(certPath string) error {
|
||||
}
|
||||
|
||||
func removeTrustedCert(certPath string) error {
|
||||
return exec.Command( //nolint:gosec
|
||||
return execabs.Command( //nolint:gosec
|
||||
"/usr/bin/security",
|
||||
"execute-with-privileges",
|
||||
"/usr/bin/security",
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
package useragent
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
@ -35,20 +34,20 @@ func IsBigSurOrNewer() bool {
|
||||
return isThisDarwinNewerOrEqual(getMinBigSur())
|
||||
}
|
||||
|
||||
func getMinCatalina() *semver.Version { return semver.MustParse("10.15.0") }
|
||||
func getMinBigSur() *semver.Version { return semver.MustParse("10.16.0") }
|
||||
func getMinCatalina() *semver.Version { return semver.MustParse("19.0.0") }
|
||||
func getMinBigSur() *semver.Version { return semver.MustParse("20.0.0") }
|
||||
|
||||
func isThisDarwinNewerOrEqual(minVersion *semver.Version) bool {
|
||||
if runtime.GOOS != "darwin" {
|
||||
return false
|
||||
}
|
||||
|
||||
rawVersion, err := exec.Command("sw_vers", "-productVersion").Output()
|
||||
rawVersion, err := getDarwinVersion()
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
return isVersionEqualOrNewer(minVersion, strings.TrimSpace(string(rawVersion)))
|
||||
return isVersionEqualOrNewer(minVersion, strings.TrimSpace(rawVersion))
|
||||
}
|
||||
|
||||
// isVersionEqualOrNewer is separated to be able to run test on other than darwin.
|
||||
|
||||
29
internal/config/useragent/platform_darwin.go
Normal file
@ -0,0 +1,29 @@
|
||||
// Copyright (c) 2022 Proton AG
|
||||
//
|
||||
// This file is part of Proton Mail Bridge.
|
||||
//
|
||||
// Proton Mail Bridge 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.
|
||||
//
|
||||
// Proton Mail Bridge 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 Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//go:build darwin
|
||||
// +build darwin
|
||||
|
||||
package useragent
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func getDarwinVersion() (string, error) {
|
||||
return syscall.Sysctl("kern.osrelease")
|
||||
}
|
||||
27
internal/config/useragent/platform_default.go
Normal file
@ -0,0 +1,27 @@
|
||||
// Copyright (c) 2022 Proton AG
|
||||
//
|
||||
// This file is part of Proton Mail Bridge.
|
||||
//
|
||||
// Proton Mail Bridge 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.
|
||||
//
|
||||
// Proton Mail Bridge 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 Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//go:build !darwin
|
||||
// +build !darwin
|
||||
|
||||
package useragent
|
||||
|
||||
import "errors"
|
||||
|
||||
func getDarwinVersion() (string, error) {
|
||||
return "", errors.New("implemented only for darwin")
|
||||
}
|
||||
@ -25,16 +25,11 @@ import (
|
||||
|
||||
func TestIsVersionCatalinaOrNewer(t *testing.T) {
|
||||
testData := map[struct{ version string }]bool{
|
||||
{""}: false,
|
||||
{"9.0.0"}: false,
|
||||
{"9.15.0"}: false,
|
||||
{"10.13.0"}: false,
|
||||
{"10.14.0"}: false,
|
||||
{"10.14.99"}: false,
|
||||
{"10.15.0"}: true,
|
||||
{"10.16.0"}: true,
|
||||
{"11.0.0"}: true,
|
||||
{"11.1"}: true,
|
||||
{""}: false,
|
||||
{"18.0.0"}: false,
|
||||
{"19.0.0"}: true,
|
||||
{"20.0.0"}: true,
|
||||
{"21.0.0"}: true,
|
||||
}
|
||||
|
||||
for args, exp := range testData {
|
||||
@ -45,16 +40,11 @@ func TestIsVersionCatalinaOrNewer(t *testing.T) {
|
||||
|
||||
func TestIsVersionBigSurOrNewer(t *testing.T) {
|
||||
testData := map[struct{ version string }]bool{
|
||||
{""}: false,
|
||||
{"9.0.0"}: false,
|
||||
{"9.15.0"}: false,
|
||||
{"10.13.0"}: false,
|
||||
{"10.14.0"}: false,
|
||||
{"10.14.99"}: false,
|
||||
{"10.15.0"}: false,
|
||||
{"10.16.0"}: true,
|
||||
{"11.0.0"}: true,
|
||||
{"11.1"}: true,
|
||||
{""}: false,
|
||||
{"18.0.0"}: false,
|
||||
{"19.0.0"}: false,
|
||||
{"20.0.0"}: true,
|
||||
{"21.0.0"}: true,
|
||||
}
|
||||
|
||||
for args, exp := range testData {
|
||||
|
||||
@ -23,7 +23,6 @@ package clientconfig
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -33,6 +32,7 @@ import (
|
||||
"github.com/ProtonMail/proton-bridge/v2/internal/config/useragent"
|
||||
"github.com/ProtonMail/proton-bridge/v2/internal/frontend/types"
|
||||
"github.com/ProtonMail/proton-bridge/v2/pkg/mobileconfig"
|
||||
"golang.org/x/sys/execabs"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -56,10 +56,10 @@ func (c *appleMail) Configure(imapPort, smtpPort int, imapSSL, smtpSSL bool, use
|
||||
}
|
||||
|
||||
if useragent.IsBigSurOrNewer() {
|
||||
return exec.Command("open", bigSurPreferncesPane, confPath).Run() //nolint:gosec G204: open command is safe, mobileconfig is generated by us
|
||||
return execabs.Command("open", bigSurPreferncesPane, confPath).Run() //nolint:gosec G204: open command is safe, mobileconfig is generated by us
|
||||
}
|
||||
|
||||
return exec.Command("open", confPath).Run() //nolint:gosec G204: open command is safe, mobileconfig is generated by us
|
||||
return execabs.Command("open", confPath).Run() //nolint:gosec G204: open command is safe, mobileconfig is generated by us
|
||||
}
|
||||
|
||||
func prepareMobileConfig(imapPort, smtpPort int, imapSSL, smtpSSL bool, user types.User, address string) *mobileconfig.Config {
|
||||
|
||||
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 74 KiB |
@ -5,10 +5,10 @@
|
||||
viewBox="0 0 265 148"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg84"
|
||||
id="svg110"
|
||||
sodipodi:docname="img-welcome-dark.svg"
|
||||
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
|
||||
inkscape:export-filename="/home/dev/gopath/src/github.com/ProtonMail/proton-bridge/v2/internal/frontend/qml/icons/img-welcome.png"
|
||||
inkscape:export-filename="/home/dev/gopath/src/github.com/ProtonMail/proton-bridge/internal/frontend/qml/icons/img-welcome.png"
|
||||
inkscape:export-xdpi="400"
|
||||
inkscape:export-ydpi="400"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
@ -16,7 +16,7 @@
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview86"
|
||||
id="namedview112"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#ffffff"
|
||||
borderopacity="1"
|
||||
@ -24,95 +24,159 @@
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="1"
|
||||
showgrid="false"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:snap-page="true"
|
||||
inkscape:zoom="0.38460876"
|
||||
inkscape:cx="256.10441"
|
||||
inkscape:cy="252.20434"
|
||||
inkscape:window-width="1276"
|
||||
inkscape:window-height="1401"
|
||||
inkscape:zoom="0.69351284"
|
||||
inkscape:cx="93.004767"
|
||||
inkscape:cy="115.35475"
|
||||
inkscape:window-width="1916"
|
||||
inkscape:window-height="1041"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="18"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg84" />
|
||||
inkscape:current-layer="svg110" />
|
||||
<rect
|
||||
style="fill:#1c1b24;fill-opacity:1;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"
|
||||
id="rect925"
|
||||
style="fill:#1c1b24;fill-opacity:1;stroke:none;stroke-width:27.9987;stroke-linecap:round;stroke-linejoin:round"
|
||||
id="rect951"
|
||||
width="265"
|
||||
height="148"
|
||||
x="0"
|
||||
y="0" />
|
||||
y="0"
|
||||
ry="0"
|
||||
inkscape:export-filename="/home/dev/gopath/src/github.com/ProtonMail/proton-bridge/internal/frontend/qml/icons/img-welcome.png"
|
||||
inkscape:export-xdpi="400"
|
||||
inkscape:export-ydpi="400" />
|
||||
<path
|
||||
d="M221.171 147H44.8555C43.1441 147 41.8047 145.661 41.8047 143.949V142.238C41.8047 140.526 43.1441 139.187 44.8555 139.187H221.171C222.882 139.187 224.221 140.526 224.221 142.238V143.949C224.221 145.661 222.808 147 221.171 147Z"
|
||||
d="M221.171 147.001H44.8555C43.1441 147.001 41.8047 145.661 41.8047 143.95V142.238C41.8047 140.527 43.1441 139.188 44.8555 139.188H221.171C222.882 139.188 224.221 140.527 224.221 142.238V143.95C224.221 145.661 222.808 147.001 221.171 147.001Z"
|
||||
fill="#B0D4E5"
|
||||
id="path2" />
|
||||
<path
|
||||
d="M141.83 143.503H123.376C120.995 143.503 119.135 141.568 119.135 139.261H146.072C146.072 141.568 144.211 143.503 141.83 143.503Z"
|
||||
d="M141.83 143.503H123.376C120.995 143.503 119.135 141.568 119.135 139.262H146.071C146.071 141.568 144.211 143.503 141.83 143.503Z"
|
||||
fill="#DAF3FF"
|
||||
id="path4" />
|
||||
<path
|
||||
d="M206.034 139.187H58.5011V53.9292C58.5011 49.0182 62.5193 45 67.4303 45H197.105C202.016 45 206.034 49.0182 206.034 53.9292V139.187Z"
|
||||
fill="url(#paint0_radial_470_16889)"
|
||||
d="M206.034 139.187H58.501V53.9292C58.501 49.0182 62.5191 45 67.4302 45H197.104C202.016 45 206.034 49.0182 206.034 53.9292V139.187Z"
|
||||
fill="url(#paint0_radial_8674_44242)"
|
||||
id="path6" />
|
||||
<path
|
||||
d="M199.116 139.186H66.1674V55.3426C66.1674 54.152 67.1347 53.1847 68.3253 53.1847H196.883C198.074 53.1847 199.041 54.152 199.041 55.3426V139.186H199.116Z"
|
||||
fill="url(#paint1_linear_470_16889)"
|
||||
d="M199.115 139.187H66.167V55.3434C66.167 54.1529 67.1343 53.1855 68.3249 53.1855H196.883C198.074 53.1855 199.041 54.1529 199.041 55.3434V139.187H199.115Z"
|
||||
fill="url(#paint1_linear_8674_44242)"
|
||||
id="path8" />
|
||||
<path
|
||||
d="M190.805 131.286H76.1797V62.518C76.1797 61.5228 77.028 60.7143 78.0721 60.7143H188.847C189.891 60.7143 190.739 61.5228 190.739 62.518V131.286H190.805Z"
|
||||
fill="url(#paint2_radial_470_16889)"
|
||||
d="M190.805 131.286H76.1797V62.5185C76.1797 61.5234 77.028 60.7148 78.0721 60.7148H188.847C189.891 60.7148 190.739 61.5234 190.739 62.5185V131.286H190.805Z"
|
||||
fill="url(#paint2_radial_8674_44242)"
|
||||
id="path10" />
|
||||
<path
|
||||
d="M84.1558 70.7741C85.3064 70.7741 86.2392 69.8413 86.2392 68.6906C86.2392 67.5399 85.3064 66.6071 84.1558 66.6071C83.0051 66.6071 82.0723 67.5399 82.0723 68.6906C82.0723 69.8413 83.0051 70.7741 84.1558 70.7741Z"
|
||||
d="M84.1558 70.7744C85.3064 70.7744 86.2392 69.8416 86.2392 68.6909C86.2392 67.5402 85.3064 66.6074 84.1558 66.6074C83.0051 66.6074 82.0723 67.5402 82.0723 68.6909C82.0723 69.8416 83.0051 70.7744 84.1558 70.7744Z"
|
||||
fill="#B0D4E5"
|
||||
id="path12" />
|
||||
<path
|
||||
d="M90.6304 70.7741C91.781 70.7741 92.7139 69.8413 92.7139 68.6906C92.7139 67.5399 91.781 66.6071 90.6304 66.6071C89.4797 66.6071 88.5469 67.5399 88.5469 68.6906C88.5469 69.8413 89.4797 70.7741 90.6304 70.7741Z"
|
||||
d="M90.6304 70.7744C91.781 70.7744 92.7139 69.8416 92.7139 68.6909C92.7139 67.5402 91.781 66.6074 90.6304 66.6074C89.4797 66.6074 88.5469 67.5402 88.5469 68.6909C88.5469 69.8416 89.4797 70.7744 90.6304 70.7744Z"
|
||||
fill="#B0D4E5"
|
||||
id="path14" />
|
||||
<path
|
||||
d="M97.105 70.7741C98.2557 70.7741 99.1885 69.8413 99.1885 68.6906C99.1885 67.5399 98.2557 66.6071 97.105 66.6071C95.9543 66.6071 95.0215 67.5399 95.0215 68.6906C95.0215 69.8413 95.9543 70.7741 97.105 70.7741Z"
|
||||
d="M97.105 70.7744C98.2557 70.7744 99.1885 69.8416 99.1885 68.6909C99.1885 67.5402 98.2557 66.6074 97.105 66.6074C95.9543 66.6074 95.0215 67.5402 95.0215 68.6909C95.0215 69.8416 95.9543 70.7744 97.105 70.7744Z"
|
||||
fill="#B0D4E5"
|
||||
id="path16" />
|
||||
<path
|
||||
d="M242.633 76.3542H180.924C178.747 76.3542 177 74.562 177 72.3895V33.965C177 31.7926 178.774 30.0004 180.924 30.0004H242.606C244.783 30.0004 246.53 31.7926 246.53 33.965V72.3895C246.557 74.5891 244.783 76.3542 242.633 76.3542Z"
|
||||
fill="url(#paint3_linear_470_16889)"
|
||||
d="M242.633 76.3538H180.924C178.747 76.3538 177 74.5616 177 72.3891V33.9646C177 31.7922 178.774 30 180.924 30H242.606C244.783 30 246.53 31.7922 246.53 33.9646V72.3891C246.557 74.5887 244.783 76.3538 242.633 76.3538Z"
|
||||
fill="url(#paint3_linear_8674_44242)"
|
||||
id="path18" />
|
||||
<path
|
||||
d="M209.232 56.69C210.689 57.8922 212.822 57.8922 214.279 56.69L245.431 31.042C244.729 30.4008 243.784 30.0001 242.758 30.0001H180.78C179.754 30.0001 178.809 30.4008 178.107 31.042L209.232 56.69Z"
|
||||
fill="url(#paint4_linear_470_16889)"
|
||||
d="M209.232 56.6899C210.689 57.8921 212.822 57.8921 214.28 56.6899L245.431 31.0419C244.729 30.4007 243.784 30 242.758 30H180.78C179.754 30 178.809 30.4007 178.107 31.0419L209.232 56.6899Z"
|
||||
fill="url(#paint4_linear_8674_44242)"
|
||||
id="path20" />
|
||||
<path
|
||||
d="M160 81H104V89C109.523 89 114 93.4772 114 99V111H122V99C122 93.4772 126.477 89 132 89C137.523 89 142 93.4772 142 99V111H150V99C150 93.4772 154.477 89 160 89V81Z"
|
||||
fill="url(#paint5_linear_470_16889)"
|
||||
d="M134.4 75C123.858 75 115.312 83.5451 115.312 94.0874V113.301C115.312 115.344 116.968 117 119.011 117H150.184C152.008 117 153.487 115.52 153.487 113.696V94.0874C153.487 83.5465 144.942 75 134.4 75ZM145.387 93.9814L137.044 101.01C135.538 102.279 133.336 102.279 131.83 101.01L123.487 93.9814C123.487 88.0172 128.323 83.1817 134.287 83.1817H134.587C140.551 83.1817 145.387 88.0172 145.387 93.9814Z"
|
||||
fill="#6D4AFF"
|
||||
id="path22" />
|
||||
<path
|
||||
d="M134.4 75C123.858 75 115.312 83.5451 115.312 94.0874V113.301C115.312 115.344 116.968 117 119.011 117H150.184C152.008 117 153.487 115.52 153.487 113.696V94.0874C153.487 83.5465 144.942 75 134.4 75ZM145.387 93.9814L137.044 101.01C135.538 102.279 133.336 102.279 131.83 101.01L123.487 93.9814C123.487 88.0172 128.323 83.1817 134.287 83.1817H134.587C140.551 83.1817 145.387 88.0172 145.387 93.9814Z"
|
||||
fill="url(#paint5_linear_8674_44242)"
|
||||
id="path24" />
|
||||
<g
|
||||
filter="url(#filter0_i_8674_44242)"
|
||||
id="g28">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M137.057 101.095C136.188 101.799 133.926 102.785 131.838 101.095C129.751 99.4048 125.418 95.6687 123.513 94.0119H123.524L123.487 93.9814C123.487 88.0172 128.323 83.1817 134.287 83.1817H134.587C140.551 83.1817 145.387 88.0172 145.387 93.9814L145.351 94.0119H145.383V117H150.184C152.008 117 153.487 115.52 153.487 113.696V94.0874C153.487 83.5465 144.942 75 134.4 75C123.858 75 115.312 83.5451 115.312 94.0874V95.2946L127.117 105.444C127.986 106.272 130.273 107.432 132.46 105.444C134.647 103.456 136.436 101.716 137.057 101.095Z"
|
||||
fill="url(#paint6_radial_8674_44242)"
|
||||
id="path26" />
|
||||
</g>
|
||||
<circle
|
||||
cx="239.278"
|
||||
cy="30.2778"
|
||||
r="15.2778"
|
||||
fill="url(#paint6_linear_470_16889)"
|
||||
id="circle24" />
|
||||
fill="url(#paint7_linear_8674_44242)"
|
||||
id="circle30" />
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M245.702 26.6675C246.113 27.0761 246.116 27.7412 245.707 28.1529L238.128 35.7918C237.93 35.9905 237.662 36.1023 237.382 36.1023C237.102 36.1023 236.834 35.9905 236.636 35.7918L232.758 31.883C232.349 31.4713 232.352 30.8062 232.764 30.3976C233.175 29.989 233.84 29.9916 234.249 30.4034L237.382 33.5608L244.216 26.6733C244.625 26.2615 245.29 26.2589 245.702 26.6675Z"
|
||||
fill="white"
|
||||
id="path26" />
|
||||
<path
|
||||
d="M0.878906 69.6212C0.878906 56.0233 11.9022 45 25.5001 45C39.0981 45 50.1214 56.0233 50.1214 69.6212V94.2425H25.5002C11.9022 94.2425 0.878906 83.2192 0.878906 69.6212Z"
|
||||
fill="url(#paint7_linear_470_16889)"
|
||||
id="path28" />
|
||||
<path
|
||||
d="M26.0002 55.0009C26.0002 55.0009 18.5507 54.7352 17.0005 63.2382V69.0397C17.0005 69.0397 17.0435 69.6597 18.766 70.944C20.4884 72.2283 24.8376 75.7712 26.0002 75.7712C27.1629 75.7712 31.5551 72.184 33.2345 70.944C34.9139 69.704 35 69.0397 35 69.0397V63.2382C33.4929 54.7352 26.0002 55.0009 26.0002 55.0009ZM20.919 66.4268V63.2825C21.5219 60.8467 23.5888 59.1196 26.0433 58.9867C28.4978 59.0753 30.5647 60.8467 31.1676 63.2825V66.4268H20.919Z"
|
||||
fill="white"
|
||||
id="path30" />
|
||||
<path
|
||||
d="M25.9998 77.0555C25.2677 76.9669 24.5788 76.7012 23.9328 76.3026C23.0286 75.6383 17 71.2097 17 71.2097V79.9784C17.0431 80.5984 17.5598 81.0412 18.1196 80.9969H33.8369C34.4397 81.0412 34.9565 80.5984 34.9995 80.0226V71.2097C34.9995 71.2097 28.971 75.6383 28.0667 76.3026C27.4638 76.7012 26.7749 76.9669 25.9998 77.0555Z"
|
||||
d="M245.702 26.668C246.113 27.0766 246.116 27.7417 245.707 28.1534L238.128 35.7923C237.93 35.9911 237.662 36.1028 237.382 36.1028C237.102 36.1028 236.834 35.9911 236.636 35.7923L232.758 31.8835C232.349 31.4718 232.352 30.8067 232.764 30.3981C233.175 29.9895 233.84 29.9921 234.249 30.4039L237.382 33.5613L244.216 26.6738C244.625 26.262 245.29 26.2595 245.702 26.668Z"
|
||||
fill="white"
|
||||
id="path32" />
|
||||
<path
|
||||
d="M0.878906 69.6212C0.878906 56.0233 11.9022 45 25.5001 45V45C39.0981 45 50.1214 56.0233 50.1214 69.6212V94.2425H25.5002C11.9022 94.2425 0.878906 83.2192 0.878906 69.6212V69.6212Z"
|
||||
fill="url(#paint8_linear_8674_44242)"
|
||||
id="path34" />
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M31.4987 62.28V64.8004H33.9547C34.7948 64.8004 35.5056 65.4789 35.5056 66.3513V79.5019C35.5056 80.342 34.8271 81.0529 33.9547 81.0529H17.3791C16.539 81.0529 15.8281 80.3743 15.8281 79.5019V66.3513C15.8281 65.5112 16.5067 64.8004 17.3791 64.8004H19.802V62.28C19.802 59.0488 22.4192 56.4316 25.6504 56.4316C28.8815 56.4316 31.4987 59.0488 31.4987 62.28ZM29.0361 62.28V64.8004H22.3292V62.28C22.3292 59.9536 24.1059 58.9265 25.6827 58.9265C27.2594 58.9265 29.0361 59.9536 29.0361 62.28ZM25.9832 69.195C27.1141 69.195 28.0188 70.0997 28.0188 71.2306C28.0188 72.006 27.5988 72.6846 26.9526 73.0077L27.7927 76.6265H24.1738L25.0139 73.0077C24.3677 72.6523 23.9476 72.006 23.9476 71.2306C23.9476 70.0997 24.8523 69.195 25.9832 69.195Z"
|
||||
fill="white"
|
||||
id="path36" />
|
||||
<defs
|
||||
id="defs82">
|
||||
id="defs108">
|
||||
<filter
|
||||
id="filter0_i_8674_44242"
|
||||
x="114.72"
|
||||
y="75"
|
||||
width="38.7675"
|
||||
height="43.6537"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB">
|
||||
<feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood38" />
|
||||
<feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="BackgroundImageFix"
|
||||
result="shape"
|
||||
id="feBlend40" />
|
||||
<feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix42" />
|
||||
<feOffset
|
||||
dx="-0.592742"
|
||||
dy="1.65375"
|
||||
id="feOffset44" />
|
||||
<feGaussianBlur
|
||||
stdDeviation="4.44556"
|
||||
id="feGaussianBlur46" />
|
||||
<feComposite
|
||||
in2="hardAlpha"
|
||||
operator="arithmetic"
|
||||
k2="-1"
|
||||
k3="1"
|
||||
id="feComposite48" />
|
||||
<feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0.462745 0 0 0 0 0.337255 0 0 0 0 1 0 0 0 0.24 0"
|
||||
id="feColorMatrix50" />
|
||||
<feBlend
|
||||
mode="normal"
|
||||
in2="shape"
|
||||
result="effect1_innerShadow_8674_44242"
|
||||
id="feBlend52" />
|
||||
</filter>
|
||||
<radialGradient
|
||||
id="paint0_radial_470_16889"
|
||||
id="paint0_radial_8674_44242"
|
||||
cx="0"
|
||||
cy="0"
|
||||
r="1"
|
||||
@ -120,105 +184,121 @@
|
||||
gradientTransform="translate(202 51.5) rotate(145.641) scale(59.357 92.9759)">
|
||||
<stop
|
||||
stop-color="#292842"
|
||||
id="stop34" />
|
||||
id="stop55" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#38385F"
|
||||
id="stop36" />
|
||||
id="stop57" />
|
||||
</radialGradient>
|
||||
<linearGradient
|
||||
id="paint1_linear_470_16889"
|
||||
x1="63.7082"
|
||||
y1="144.987"
|
||||
x2="207.624"
|
||||
y2="58.7506"
|
||||
id="paint1_linear_8674_44242"
|
||||
x1="63.7079"
|
||||
y1="144.988"
|
||||
x2="207.623"
|
||||
y2="58.7515"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
stop-color="#35168C"
|
||||
id="stop39" />
|
||||
id="stop60" />
|
||||
<stop
|
||||
offset="0.317708"
|
||||
stop-color="#FF5454"
|
||||
id="stop41" />
|
||||
id="stop62" />
|
||||
<stop
|
||||
offset="0.46875"
|
||||
stop-color="#FFDD64"
|
||||
id="stop43" />
|
||||
id="stop64" />
|
||||
<stop
|
||||
offset="0.677083"
|
||||
stop-color="#BCE6FF"
|
||||
id="stop45" />
|
||||
id="stop66" />
|
||||
<stop
|
||||
offset="0.911458"
|
||||
stop-color="#6983EF"
|
||||
id="stop47" />
|
||||
id="stop68" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#2395FF"
|
||||
id="stop49" />
|
||||
id="stop70" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
id="paint2_radial_470_16889"
|
||||
id="paint2_radial_8674_44242"
|
||||
cx="0"
|
||||
cy="0"
|
||||
r="1"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(188.5 63.4994) rotate(135) scale(33.9411 55.1286)">
|
||||
gradientTransform="translate(188.5 63.5) rotate(135) scale(33.9411 55.1286)">
|
||||
<stop
|
||||
stop-color="#DDDBE3"
|
||||
id="stop52" />
|
||||
id="stop73" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="white"
|
||||
id="stop54" />
|
||||
id="stop75" />
|
||||
</radialGradient>
|
||||
<linearGradient
|
||||
id="paint3_linear_470_16889"
|
||||
id="paint3_linear_8674_44242"
|
||||
x1="211.765"
|
||||
y1="30.0004"
|
||||
y1="30"
|
||||
x2="211.765"
|
||||
y2="66.4212"
|
||||
y2="66.4208"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
stop-color="#C1DEF8"
|
||||
id="stop57" />
|
||||
id="stop78" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#ECFAFF"
|
||||
id="stop59" />
|
||||
id="stop80" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="paint4_linear_470_16889"
|
||||
id="paint4_linear_8674_44242"
|
||||
x1="211.769"
|
||||
y1="18.4116"
|
||||
x2="211.769"
|
||||
y2="50.4178"
|
||||
y2="50.4177"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
stop-color="#DEEBF7"
|
||||
id="stop62" />
|
||||
id="stop83" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="white"
|
||||
id="stop64" />
|
||||
id="stop85" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="paint5_linear_470_16889"
|
||||
x1="134.692"
|
||||
y1="70.9038"
|
||||
x2="139.324"
|
||||
y2="110.552"
|
||||
id="paint5_linear_8674_44242"
|
||||
x1="116.679"
|
||||
y1="121.846"
|
||||
x2="122.395"
|
||||
y2="105.692"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
stop-color="#ECAAFF"
|
||||
id="stop67" />
|
||||
stop-color="#28B0E8"
|
||||
id="stop88" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#6A48F6"
|
||||
id="stop69" />
|
||||
stop-color="#C5B7FF"
|
||||
stop-opacity="0"
|
||||
id="stop90" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
id="paint6_radial_8674_44242"
|
||||
cx="0"
|
||||
cy="0"
|
||||
r="1"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(151.237 120.479) rotate(-138.034) scale(48.3148 39.5031)">
|
||||
<stop
|
||||
stop-color="#E2DBFF"
|
||||
id="stop93" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#6D4AFF"
|
||||
id="stop95" />
|
||||
</radialGradient>
|
||||
<linearGradient
|
||||
id="paint6_linear_470_16889"
|
||||
id="paint7_linear_8674_44242"
|
||||
x1="240.861"
|
||||
y1="12.772"
|
||||
x2="241.004"
|
||||
@ -226,14 +306,14 @@
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
stop-color="#2AF091"
|
||||
id="stop72" />
|
||||
id="stop98" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#00C5A1"
|
||||
id="stop74" />
|
||||
id="stop100" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="paint7_linear_470_16889"
|
||||
id="paint8_linear_8674_44242"
|
||||
x1="41.1252"
|
||||
y1="56.3637"
|
||||
x2="5.14027"
|
||||
@ -241,11 +321,11 @@
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
stop-color="#FFD66C"
|
||||
id="stop77" />
|
||||
id="stop103" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#FF8E4F"
|
||||
id="stop79" />
|
||||
id="stop105" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 73 KiB |
@ -5,10 +5,10 @@
|
||||
viewBox="0 0 265 148"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg84"
|
||||
id="svg110"
|
||||
sodipodi:docname="img-welcome.svg"
|
||||
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
|
||||
inkscape:export-filename="/home/dev/gopath/src/github.com/ProtonMail/proton-bridge/v2/internal/frontend/qml/icons/img-welcome.png"
|
||||
inkscape:export-filename="/home/dev/gopath/src/github.com/ProtonMail/proton-bridge/internal/frontend/qml/icons/img-welcome.png"
|
||||
inkscape:export-xdpi="400"
|
||||
inkscape:export-ydpi="400"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
@ -16,7 +16,7 @@
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview86"
|
||||
id="namedview112"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#ffffff"
|
||||
borderopacity="1"
|
||||
@ -24,95 +24,159 @@
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="1"
|
||||
showgrid="false"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:snap-page="true"
|
||||
inkscape:zoom="0.38460876"
|
||||
inkscape:cx="256.10441"
|
||||
inkscape:cy="252.20434"
|
||||
inkscape:window-width="1276"
|
||||
inkscape:window-height="1401"
|
||||
inkscape:window-x="1280"
|
||||
inkscape:zoom="0.69351284"
|
||||
inkscape:cx="93.004767"
|
||||
inkscape:cy="115.35475"
|
||||
inkscape:window-width="1916"
|
||||
inkscape:window-height="1041"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="18"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg84" />
|
||||
inkscape:current-layer="svg110" />
|
||||
<rect
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"
|
||||
id="rect925"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:27.9987;stroke-linecap:round;stroke-linejoin:round"
|
||||
id="rect951"
|
||||
width="265"
|
||||
height="148"
|
||||
x="0"
|
||||
y="0" />
|
||||
y="0"
|
||||
ry="0"
|
||||
inkscape:export-filename="/home/dev/gopath/src/github.com/ProtonMail/proton-bridge/internal/frontend/qml/icons/img-welcome.png"
|
||||
inkscape:export-xdpi="400"
|
||||
inkscape:export-ydpi="400" />
|
||||
<path
|
||||
d="M221.171 147H44.8555C43.1441 147 41.8047 145.661 41.8047 143.949V142.238C41.8047 140.526 43.1441 139.187 44.8555 139.187H221.171C222.882 139.187 224.221 140.526 224.221 142.238V143.949C224.221 145.661 222.808 147 221.171 147Z"
|
||||
d="M221.171 147.001H44.8555C43.1441 147.001 41.8047 145.661 41.8047 143.95V142.238C41.8047 140.527 43.1441 139.188 44.8555 139.188H221.171C222.882 139.188 224.221 140.527 224.221 142.238V143.95C224.221 145.661 222.808 147.001 221.171 147.001Z"
|
||||
fill="#B0D4E5"
|
||||
id="path2" />
|
||||
<path
|
||||
d="M141.83 143.503H123.376C120.995 143.503 119.135 141.568 119.135 139.261H146.072C146.072 141.568 144.211 143.503 141.83 143.503Z"
|
||||
d="M141.83 143.503H123.376C120.995 143.503 119.135 141.568 119.135 139.262H146.071C146.071 141.568 144.211 143.503 141.83 143.503Z"
|
||||
fill="#DAF3FF"
|
||||
id="path4" />
|
||||
<path
|
||||
d="M206.034 139.187H58.5011V53.9292C58.5011 49.0182 62.5193 45 67.4303 45H197.105C202.016 45 206.034 49.0182 206.034 53.9292V139.187Z"
|
||||
fill="url(#paint0_radial_470_16889)"
|
||||
d="M206.034 139.187H58.501V53.9292C58.501 49.0182 62.5191 45 67.4302 45H197.104C202.016 45 206.034 49.0182 206.034 53.9292V139.187Z"
|
||||
fill="url(#paint0_radial_8674_44242)"
|
||||
id="path6" />
|
||||
<path
|
||||
d="M199.116 139.186H66.1674V55.3426C66.1674 54.152 67.1347 53.1847 68.3253 53.1847H196.883C198.074 53.1847 199.041 54.152 199.041 55.3426V139.186H199.116Z"
|
||||
fill="url(#paint1_linear_470_16889)"
|
||||
d="M199.115 139.187H66.167V55.3434C66.167 54.1529 67.1343 53.1855 68.3249 53.1855H196.883C198.074 53.1855 199.041 54.1529 199.041 55.3434V139.187H199.115Z"
|
||||
fill="url(#paint1_linear_8674_44242)"
|
||||
id="path8" />
|
||||
<path
|
||||
d="M190.805 131.286H76.1797V62.518C76.1797 61.5228 77.028 60.7143 78.0721 60.7143H188.847C189.891 60.7143 190.739 61.5228 190.739 62.518V131.286H190.805Z"
|
||||
fill="url(#paint2_radial_470_16889)"
|
||||
d="M190.805 131.286H76.1797V62.5185C76.1797 61.5234 77.028 60.7148 78.0721 60.7148H188.847C189.891 60.7148 190.739 61.5234 190.739 62.5185V131.286H190.805Z"
|
||||
fill="url(#paint2_radial_8674_44242)"
|
||||
id="path10" />
|
||||
<path
|
||||
d="M84.1558 70.7741C85.3064 70.7741 86.2392 69.8413 86.2392 68.6906C86.2392 67.5399 85.3064 66.6071 84.1558 66.6071C83.0051 66.6071 82.0723 67.5399 82.0723 68.6906C82.0723 69.8413 83.0051 70.7741 84.1558 70.7741Z"
|
||||
d="M84.1558 70.7744C85.3064 70.7744 86.2392 69.8416 86.2392 68.6909C86.2392 67.5402 85.3064 66.6074 84.1558 66.6074C83.0051 66.6074 82.0723 67.5402 82.0723 68.6909C82.0723 69.8416 83.0051 70.7744 84.1558 70.7744Z"
|
||||
fill="#B0D4E5"
|
||||
id="path12" />
|
||||
<path
|
||||
d="M90.6304 70.7741C91.781 70.7741 92.7139 69.8413 92.7139 68.6906C92.7139 67.5399 91.781 66.6071 90.6304 66.6071C89.4797 66.6071 88.5469 67.5399 88.5469 68.6906C88.5469 69.8413 89.4797 70.7741 90.6304 70.7741Z"
|
||||
d="M90.6304 70.7744C91.781 70.7744 92.7139 69.8416 92.7139 68.6909C92.7139 67.5402 91.781 66.6074 90.6304 66.6074C89.4797 66.6074 88.5469 67.5402 88.5469 68.6909C88.5469 69.8416 89.4797 70.7744 90.6304 70.7744Z"
|
||||
fill="#B0D4E5"
|
||||
id="path14" />
|
||||
<path
|
||||
d="M97.105 70.7741C98.2557 70.7741 99.1885 69.8413 99.1885 68.6906C99.1885 67.5399 98.2557 66.6071 97.105 66.6071C95.9543 66.6071 95.0215 67.5399 95.0215 68.6906C95.0215 69.8413 95.9543 70.7741 97.105 70.7741Z"
|
||||
d="M97.105 70.7744C98.2557 70.7744 99.1885 69.8416 99.1885 68.6909C99.1885 67.5402 98.2557 66.6074 97.105 66.6074C95.9543 66.6074 95.0215 67.5402 95.0215 68.6909C95.0215 69.8416 95.9543 70.7744 97.105 70.7744Z"
|
||||
fill="#B0D4E5"
|
||||
id="path16" />
|
||||
<path
|
||||
d="M242.633 76.3542H180.924C178.747 76.3542 177 74.562 177 72.3895V33.965C177 31.7926 178.774 30.0004 180.924 30.0004H242.606C244.783 30.0004 246.53 31.7926 246.53 33.965V72.3895C246.557 74.5891 244.783 76.3542 242.633 76.3542Z"
|
||||
fill="url(#paint3_linear_470_16889)"
|
||||
d="M242.633 76.3538H180.924C178.747 76.3538 177 74.5616 177 72.3891V33.9646C177 31.7922 178.774 30 180.924 30H242.606C244.783 30 246.53 31.7922 246.53 33.9646V72.3891C246.557 74.5887 244.783 76.3538 242.633 76.3538Z"
|
||||
fill="url(#paint3_linear_8674_44242)"
|
||||
id="path18" />
|
||||
<path
|
||||
d="M209.232 56.69C210.689 57.8922 212.822 57.8922 214.279 56.69L245.431 31.042C244.729 30.4008 243.784 30.0001 242.758 30.0001H180.78C179.754 30.0001 178.809 30.4008 178.107 31.042L209.232 56.69Z"
|
||||
fill="url(#paint4_linear_470_16889)"
|
||||
d="M209.232 56.6899C210.689 57.8921 212.822 57.8921 214.28 56.6899L245.431 31.0419C244.729 30.4007 243.784 30 242.758 30H180.78C179.754 30 178.809 30.4007 178.107 31.0419L209.232 56.6899Z"
|
||||
fill="url(#paint4_linear_8674_44242)"
|
||||
id="path20" />
|
||||
<path
|
||||
d="M160 81H104V89C109.523 89 114 93.4772 114 99V111H122V99C122 93.4772 126.477 89 132 89C137.523 89 142 93.4772 142 99V111H150V99C150 93.4772 154.477 89 160 89V81Z"
|
||||
fill="url(#paint5_linear_470_16889)"
|
||||
d="M134.4 75C123.858 75 115.312 83.5451 115.312 94.0874V113.301C115.312 115.344 116.968 117 119.011 117H150.184C152.008 117 153.487 115.52 153.487 113.696V94.0874C153.487 83.5465 144.942 75 134.4 75ZM145.387 93.9814L137.044 101.01C135.538 102.279 133.336 102.279 131.83 101.01L123.487 93.9814C123.487 88.0172 128.323 83.1817 134.287 83.1817H134.587C140.551 83.1817 145.387 88.0172 145.387 93.9814Z"
|
||||
fill="#6D4AFF"
|
||||
id="path22" />
|
||||
<path
|
||||
d="M134.4 75C123.858 75 115.312 83.5451 115.312 94.0874V113.301C115.312 115.344 116.968 117 119.011 117H150.184C152.008 117 153.487 115.52 153.487 113.696V94.0874C153.487 83.5465 144.942 75 134.4 75ZM145.387 93.9814L137.044 101.01C135.538 102.279 133.336 102.279 131.83 101.01L123.487 93.9814C123.487 88.0172 128.323 83.1817 134.287 83.1817H134.587C140.551 83.1817 145.387 88.0172 145.387 93.9814Z"
|
||||
fill="url(#paint5_linear_8674_44242)"
|
||||
id="path24" />
|
||||
<g
|
||||
filter="url(#filter0_i_8674_44242)"
|
||||
id="g28">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M137.057 101.095C136.188 101.799 133.926 102.785 131.838 101.095C129.751 99.4048 125.418 95.6687 123.513 94.0119H123.524L123.487 93.9814C123.487 88.0172 128.323 83.1817 134.287 83.1817H134.587C140.551 83.1817 145.387 88.0172 145.387 93.9814L145.351 94.0119H145.383V117H150.184C152.008 117 153.487 115.52 153.487 113.696V94.0874C153.487 83.5465 144.942 75 134.4 75C123.858 75 115.312 83.5451 115.312 94.0874V95.2946L127.117 105.444C127.986 106.272 130.273 107.432 132.46 105.444C134.647 103.456 136.436 101.716 137.057 101.095Z"
|
||||
fill="url(#paint6_radial_8674_44242)"
|
||||
id="path26" />
|
||||
</g>
|
||||
<circle
|
||||
cx="239.278"
|
||||
cy="30.2778"
|
||||
r="15.2778"
|
||||
fill="url(#paint6_linear_470_16889)"
|
||||
id="circle24" />
|
||||
fill="url(#paint7_linear_8674_44242)"
|
||||
id="circle30" />
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M245.702 26.6675C246.113 27.0761 246.116 27.7412 245.707 28.1529L238.128 35.7918C237.93 35.9905 237.662 36.1023 237.382 36.1023C237.102 36.1023 236.834 35.9905 236.636 35.7918L232.758 31.883C232.349 31.4713 232.352 30.8062 232.764 30.3976C233.175 29.989 233.84 29.9916 234.249 30.4034L237.382 33.5608L244.216 26.6733C244.625 26.2615 245.29 26.2589 245.702 26.6675Z"
|
||||
fill="white"
|
||||
id="path26" />
|
||||
<path
|
||||
d="M0.878906 69.6212C0.878906 56.0233 11.9022 45 25.5001 45C39.0981 45 50.1214 56.0233 50.1214 69.6212V94.2425H25.5002C11.9022 94.2425 0.878906 83.2192 0.878906 69.6212Z"
|
||||
fill="url(#paint7_linear_470_16889)"
|
||||
id="path28" />
|
||||
<path
|
||||
d="M26.0002 55.0009C26.0002 55.0009 18.5507 54.7352 17.0005 63.2382V69.0397C17.0005 69.0397 17.0435 69.6597 18.766 70.944C20.4884 72.2283 24.8376 75.7712 26.0002 75.7712C27.1629 75.7712 31.5551 72.184 33.2345 70.944C34.9139 69.704 35 69.0397 35 69.0397V63.2382C33.4929 54.7352 26.0002 55.0009 26.0002 55.0009ZM20.919 66.4268V63.2825C21.5219 60.8467 23.5888 59.1196 26.0433 58.9867C28.4978 59.0753 30.5647 60.8467 31.1676 63.2825V66.4268H20.919Z"
|
||||
fill="white"
|
||||
id="path30" />
|
||||
<path
|
||||
d="M25.9998 77.0555C25.2677 76.9669 24.5788 76.7012 23.9328 76.3026C23.0286 75.6383 17 71.2097 17 71.2097V79.9784C17.0431 80.5984 17.5598 81.0412 18.1196 80.9969H33.8369C34.4397 81.0412 34.9565 80.5984 34.9995 80.0226V71.2097C34.9995 71.2097 28.971 75.6383 28.0667 76.3026C27.4638 76.7012 26.7749 76.9669 25.9998 77.0555Z"
|
||||
d="M245.702 26.668C246.113 27.0766 246.116 27.7417 245.707 28.1534L238.128 35.7923C237.93 35.9911 237.662 36.1028 237.382 36.1028C237.102 36.1028 236.834 35.9911 236.636 35.7923L232.758 31.8835C232.349 31.4718 232.352 30.8067 232.764 30.3981C233.175 29.9895 233.84 29.9921 234.249 30.4039L237.382 33.5613L244.216 26.6738C244.625 26.262 245.29 26.2595 245.702 26.668Z"
|
||||
fill="white"
|
||||
id="path32" />
|
||||
<path
|
||||
d="M0.878906 69.6212C0.878906 56.0233 11.9022 45 25.5001 45V45C39.0981 45 50.1214 56.0233 50.1214 69.6212V94.2425H25.5002C11.9022 94.2425 0.878906 83.2192 0.878906 69.6212V69.6212Z"
|
||||
fill="url(#paint8_linear_8674_44242)"
|
||||
id="path34" />
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M31.4987 62.28V64.8004H33.9547C34.7948 64.8004 35.5056 65.4789 35.5056 66.3513V79.5019C35.5056 80.342 34.8271 81.0529 33.9547 81.0529H17.3791C16.539 81.0529 15.8281 80.3743 15.8281 79.5019V66.3513C15.8281 65.5112 16.5067 64.8004 17.3791 64.8004H19.802V62.28C19.802 59.0488 22.4192 56.4316 25.6504 56.4316C28.8815 56.4316 31.4987 59.0488 31.4987 62.28ZM29.0361 62.28V64.8004H22.3292V62.28C22.3292 59.9536 24.1059 58.9265 25.6827 58.9265C27.2594 58.9265 29.0361 59.9536 29.0361 62.28ZM25.9832 69.195C27.1141 69.195 28.0188 70.0997 28.0188 71.2306C28.0188 72.006 27.5988 72.6846 26.9526 73.0077L27.7927 76.6265H24.1738L25.0139 73.0077C24.3677 72.6523 23.9476 72.006 23.9476 71.2306C23.9476 70.0997 24.8523 69.195 25.9832 69.195Z"
|
||||
fill="white"
|
||||
id="path36" />
|
||||
<defs
|
||||
id="defs82">
|
||||
id="defs108">
|
||||
<filter
|
||||
id="filter0_i_8674_44242"
|
||||
x="114.72"
|
||||
y="75"
|
||||
width="38.7675"
|
||||
height="43.6537"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB">
|
||||
<feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood38" />
|
||||
<feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="BackgroundImageFix"
|
||||
result="shape"
|
||||
id="feBlend40" />
|
||||
<feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix42" />
|
||||
<feOffset
|
||||
dx="-0.592742"
|
||||
dy="1.65375"
|
||||
id="feOffset44" />
|
||||
<feGaussianBlur
|
||||
stdDeviation="4.44556"
|
||||
id="feGaussianBlur46" />
|
||||
<feComposite
|
||||
in2="hardAlpha"
|
||||
operator="arithmetic"
|
||||
k2="-1"
|
||||
k3="1"
|
||||
id="feComposite48" />
|
||||
<feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0.462745 0 0 0 0 0.337255 0 0 0 0 1 0 0 0 0.24 0"
|
||||
id="feColorMatrix50" />
|
||||
<feBlend
|
||||
mode="normal"
|
||||
in2="shape"
|
||||
result="effect1_innerShadow_8674_44242"
|
||||
id="feBlend52" />
|
||||
</filter>
|
||||
<radialGradient
|
||||
id="paint0_radial_470_16889"
|
||||
id="paint0_radial_8674_44242"
|
||||
cx="0"
|
||||
cy="0"
|
||||
r="1"
|
||||
@ -120,105 +184,121 @@
|
||||
gradientTransform="translate(202 51.5) rotate(145.641) scale(59.357 92.9759)">
|
||||
<stop
|
||||
stop-color="#292842"
|
||||
id="stop34" />
|
||||
id="stop55" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#38385F"
|
||||
id="stop36" />
|
||||
id="stop57" />
|
||||
</radialGradient>
|
||||
<linearGradient
|
||||
id="paint1_linear_470_16889"
|
||||
x1="63.7082"
|
||||
y1="144.987"
|
||||
x2="207.624"
|
||||
y2="58.7506"
|
||||
id="paint1_linear_8674_44242"
|
||||
x1="63.7079"
|
||||
y1="144.988"
|
||||
x2="207.623"
|
||||
y2="58.7515"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
stop-color="#35168C"
|
||||
id="stop39" />
|
||||
id="stop60" />
|
||||
<stop
|
||||
offset="0.317708"
|
||||
stop-color="#FF5454"
|
||||
id="stop41" />
|
||||
id="stop62" />
|
||||
<stop
|
||||
offset="0.46875"
|
||||
stop-color="#FFDD64"
|
||||
id="stop43" />
|
||||
id="stop64" />
|
||||
<stop
|
||||
offset="0.677083"
|
||||
stop-color="#BCE6FF"
|
||||
id="stop45" />
|
||||
id="stop66" />
|
||||
<stop
|
||||
offset="0.911458"
|
||||
stop-color="#6983EF"
|
||||
id="stop47" />
|
||||
id="stop68" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#2395FF"
|
||||
id="stop49" />
|
||||
id="stop70" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
id="paint2_radial_470_16889"
|
||||
id="paint2_radial_8674_44242"
|
||||
cx="0"
|
||||
cy="0"
|
||||
r="1"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(188.5 63.4994) rotate(135) scale(33.9411 55.1286)">
|
||||
gradientTransform="translate(188.5 63.5) rotate(135) scale(33.9411 55.1286)">
|
||||
<stop
|
||||
stop-color="#DDDBE3"
|
||||
id="stop52" />
|
||||
id="stop73" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="white"
|
||||
id="stop54" />
|
||||
id="stop75" />
|
||||
</radialGradient>
|
||||
<linearGradient
|
||||
id="paint3_linear_470_16889"
|
||||
id="paint3_linear_8674_44242"
|
||||
x1="211.765"
|
||||
y1="30.0004"
|
||||
y1="30"
|
||||
x2="211.765"
|
||||
y2="66.4212"
|
||||
y2="66.4208"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
stop-color="#C1DEF8"
|
||||
id="stop57" />
|
||||
id="stop78" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#ECFAFF"
|
||||
id="stop59" />
|
||||
id="stop80" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="paint4_linear_470_16889"
|
||||
id="paint4_linear_8674_44242"
|
||||
x1="211.769"
|
||||
y1="18.4116"
|
||||
x2="211.769"
|
||||
y2="50.4178"
|
||||
y2="50.4177"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
stop-color="#DEEBF7"
|
||||
id="stop62" />
|
||||
id="stop83" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="white"
|
||||
id="stop64" />
|
||||
id="stop85" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="paint5_linear_470_16889"
|
||||
x1="134.692"
|
||||
y1="70.9038"
|
||||
x2="139.324"
|
||||
y2="110.552"
|
||||
id="paint5_linear_8674_44242"
|
||||
x1="116.679"
|
||||
y1="121.846"
|
||||
x2="122.395"
|
||||
y2="105.692"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
stop-color="#ECAAFF"
|
||||
id="stop67" />
|
||||
stop-color="#28B0E8"
|
||||
id="stop88" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#6A48F6"
|
||||
id="stop69" />
|
||||
stop-color="#C5B7FF"
|
||||
stop-opacity="0"
|
||||
id="stop90" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
id="paint6_radial_8674_44242"
|
||||
cx="0"
|
||||
cy="0"
|
||||
r="1"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(151.237 120.479) rotate(-138.034) scale(48.3148 39.5031)">
|
||||
<stop
|
||||
stop-color="#E2DBFF"
|
||||
id="stop93" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#6D4AFF"
|
||||
id="stop95" />
|
||||
</radialGradient>
|
||||
<linearGradient
|
||||
id="paint6_linear_470_16889"
|
||||
id="paint7_linear_8674_44242"
|
||||
x1="240.861"
|
||||
y1="12.772"
|
||||
x2="241.004"
|
||||
@ -226,14 +306,14 @@
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
stop-color="#2AF091"
|
||||
id="stop72" />
|
||||
id="stop98" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#00C5A1"
|
||||
id="stop74" />
|
||||
id="stop100" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="paint7_linear_470_16889"
|
||||
id="paint8_linear_8674_44242"
|
||||
x1="41.1252"
|
||||
y1="56.3637"
|
||||
x2="5.14027"
|
||||
@ -241,11 +321,11 @@
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
stop-color="#FFD66C"
|
||||
id="stop77" />
|
||||
id="stop103" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#FF8E4F"
|
||||
id="stop79" />
|
||||
id="stop105" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 25 KiB |
@ -9,7 +9,7 @@
|
||||
id="svg5"
|
||||
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
|
||||
sodipodi:docname="systray.svg"
|
||||
inkscape:export-filename="/home/cuto/Downloads/systray/systray-color-update.png"
|
||||
inkscape:export-filename="/tmp/bridge/internal/frontend/qml/icons/systray-color-update.png"
|
||||
inkscape:export-xdpi="192.00002"
|
||||
inkscape:export-ydpi="192.00002"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
@ -24,19 +24,22 @@
|
||||
inkscape:pageshadow="0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:document-units="px"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.7021484"
|
||||
inkscape:cx="191.81641"
|
||||
inkscape:cy="297.85886"
|
||||
inkscape:window-width="2556"
|
||||
inkscape:zoom="0.8510742"
|
||||
inkscape:cx="300.20884"
|
||||
inkscape:cy="445.31957"
|
||||
inkscape:window-width="1372"
|
||||
inkscape:window-height="1401"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-x="1184"
|
||||
inkscape:window-y="18"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer6"
|
||||
inkscape:current-layer="layer2"
|
||||
units="px"
|
||||
width="512px" />
|
||||
width="512px"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:snap-global="false" />
|
||||
<defs
|
||||
id="defs2">
|
||||
<filter
|
||||
@ -309,15 +312,14 @@
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g
|
||||
inkscape:label="m-n"
|
||||
inkscape:label="systray-mono-norm"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
style="display:none"
|
||||
sodipodi:insensitive="true">
|
||||
style="display:none">
|
||||
<g
|
||||
style="fill:#000000"
|
||||
id="g955"
|
||||
transform="matrix(7.4083333,0,0,7.4083333,8.4666669,12.170834)">
|
||||
transform="matrix(7.0910539,0,0,7.0910539,11.123103,14.495302)">
|
||||
<path
|
||||
d="M 8,0 C 4.13377,0 1,3.05181 1,6.81693 V 13.6791 C 1,14.4086 1.60727,15 2.35639,15 H 13.7885 C 14.4573,15 15,14.4715 15,13.8202 V 6.81693 C 15,3.05231 11.8662,0 8,0 Z m 4.8462,6.24336 -3.87649,3.0458 c -0.55224,0.45324 -1.35992,0.45324 -1.91216,0 l -3.9037,-3.0458 c 0,-2.13007 2.07902,-4.1005 4.80476,-4.1005 h 0.11004 c 2.72575,0 4.77755,1.97043 4.77755,4.1005 z"
|
||||
fill="#000000"
|
||||
@ -328,13 +330,13 @@
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="m-w"
|
||||
inkscape:label="systray-mono-warn"
|
||||
style="display:none"
|
||||
sodipodi:insensitive="true">
|
||||
<g
|
||||
style="fill:none"
|
||||
id="g1073"
|
||||
transform="matrix(7.4083333,0,0,7.4083333,8.4666669,4.7659826)">
|
||||
transform="matrix(7.0910539,0,0,7.0910539,11.123103,7.4075805)">
|
||||
<g
|
||||
id="g1062">
|
||||
<path
|
||||
@ -355,13 +357,13 @@
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="m-e"
|
||||
inkscape:label="systray-mono-error"
|
||||
style="display:none"
|
||||
sodipodi:insensitive="true">
|
||||
<g
|
||||
style="fill:none"
|
||||
id="g1123"
|
||||
transform="matrix(7.4083333,0,0,7.4083333,8.4666669,12.170834)">
|
||||
transform="matrix(7.0910539,0,0,7.0910539,11.123103,14.495302)">
|
||||
<g
|
||||
id="g1112">
|
||||
<path
|
||||
@ -383,13 +385,13 @@
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer4"
|
||||
inkscape:label="m-u"
|
||||
inkscape:label="systray-mono-update"
|
||||
style="display:none"
|
||||
sodipodi:insensitive="true">
|
||||
<g
|
||||
style="fill:none"
|
||||
id="g1201"
|
||||
transform="matrix(7.4083333,0,0,7.4083333,8.4666669,12.170834)">
|
||||
transform="matrix(7.0910539,0,0,7.0910539,11.123103,14.495302)">
|
||||
<g
|
||||
id="g1190">
|
||||
<path
|
||||
@ -410,13 +412,13 @@
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer5"
|
||||
inkscape:label="c-n"
|
||||
inkscape:label="systray-color-norm"
|
||||
style="display:none;opacity:1"
|
||||
sodipodi:insensitive="true">
|
||||
<g
|
||||
style="fill:none"
|
||||
id="g1337"
|
||||
transform="matrix(7.4223337,0,0,7.4223337,8.220297,12.170834)">
|
||||
transform="matrix(7.1044547,0,0,7.1044547,10.887285,14.495302)">
|
||||
<path
|
||||
d="M 8,0 C 4.13377,0 1,3.05181 1,6.81693 V 13.6791 C 1,14.4086 1.60727,15 2.35639,15 H 13.7885 C 14.4573,15 15,14.4715 15,13.8202 V 6.81693 C 15,3.05231 11.8662,0 8,0 Z m 4.0293,6.77908 -3.05959,2.51008 c -0.55224,0.45324 -1.35992,0.45324 -1.91216,0 L 3.99798,6.77908 c 0,-2.13008 1.77335,-3.85705 3.96063,-3.85705 h 0.11004 c 2.18725,0 3.96065,1.72697 3.96065,3.85705 z"
|
||||
fill="#6d4aff"
|
||||
@ -442,13 +444,13 @@
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer6"
|
||||
inkscape:label="c-w"
|
||||
inkscape:label="systray-color-warn"
|
||||
style="display:none;opacity:1"
|
||||
sodipodi:insensitive="true">
|
||||
<g
|
||||
style="fill:none"
|
||||
id="g1752"
|
||||
transform="matrix(7.4040336,0,0,7.4040336,8.3915095,12.37535)">
|
||||
transform="matrix(7.0869383,0,0,7.0869383,11.051165,14.691059)">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
@ -484,13 +486,13 @@
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer7"
|
||||
inkscape:label="c-e"
|
||||
inkscape:label="systray-color-error"
|
||||
style="display:none"
|
||||
sodipodi:insensitive="true">
|
||||
<g
|
||||
style="fill:none"
|
||||
id="g1888"
|
||||
transform="matrix(7.4083333,0,0,7.4083333,8.3477474,12.346202)">
|
||||
transform="matrix(7.0910539,0,0,7.0910539,11.009277,14.663159)">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
@ -516,12 +518,12 @@
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer8"
|
||||
inkscape:label="c-u"
|
||||
inkscape:label="systray-color-update"
|
||||
style="display:inline;opacity:1"
|
||||
sodipodi:insensitive="true">
|
||||
<g
|
||||
id="g2144"
|
||||
transform="matrix(0.99765808,0,0,0.99765808,0.35589462,0.38736438)">
|
||||
transform="matrix(0.95493101,0,0,0.95493101,3.3596943,3.216487)">
|
||||
<g
|
||||
id="g2135">
|
||||
<g
|
||||
|
||||
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 557 KiB |
@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 1024 1024" style="enable-background:new 0 0 1024 1024;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#9397CD;}
|
||||
.st1{fill:#262A33;}
|
||||
.st2{fill:#FFFFFF;}
|
||||
</style>
|
||||
<g>
|
||||
<circle class="st0" cx="512.2" cy="512.1" r="512"/>
|
||||
</g>
|
||||
<g>
|
||||
<circle class="st1" cx="850" cy="850" r="174"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st2" d="M784.4,773.1h90.7c15.1,0,26.7,3.7,34.8,11.2s12.1,16.8,12.1,27.8c0,9.3-2.9,17.2-8.7,23.8
|
||||
c-3.8,4.4-9.5,7.9-16.9,10.5c11.3,2.7,19.5,7.4,24.9,14c5.3,6.6,8,14.9,8,24.9c0,8.1-1.9,15.4-5.7,21.9s-8.9,11.6-15.5,15.4
|
||||
c-4.1,2.4-10.2,4.1-18.4,5.1c-10.9,1.4-18.1,2.1-21.7,2.1h-83.6L784.4,773.1L784.4,773.1z M833.3,834.6h21.1
|
||||
c7.6,0,12.8-1.3,15.8-3.9c3-2.6,4.4-6.4,4.4-11.3c0-4.6-1.5-8.1-4.4-10.7c-3-2.6-8.1-3.8-15.5-3.8h-21.4L833.3,834.6L833.3,834.6z
|
||||
M833.3,896.2H858c8.3,0,14.2-1.5,17.6-4.4c3.4-3,5.1-6.9,5.1-11.9c0-4.6-1.7-8.4-5.1-11.2c-3.4-2.8-9.3-4.2-17.8-4.2h-24.6
|
||||
L833.3,896.2L833.3,896.2z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st2" d="M511,263c0,0-136.3-4.5-164.4,146.7v103c0,0,1.2,11,32.2,33.4c31,22.4,111.2,85.4,132.3,85.4
|
||||
c21,0,101.3-63,132.3-85.4c31-22.4,32.2-33.4,32.2-33.4v-103C647.3,258.5,511,263,511,263z M604.3,465.9H511h-93.3v-56.1
|
||||
c18.9-75.1,93.3-76.1,93.3-76.1s74.4,1,93.3,76.1V465.9z"/>
|
||||
<path class="st2" d="M511,654.7c0,0-21.1-2.1-37.7-13.5C456.8,629.7,346.6,551,346.6,551v155.9c0,0,0.9,18.1,20.9,18.1
|
||||
s143.5,0,143.5,0s123.5,0,143.5,0s20.9-18.1,20.9-18.1V551c0,0-110.2,78.8-126.8,90.2C532.1,652.7,511,654.7,511,654.7z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.7 KiB |
@ -21,14 +21,34 @@
|
||||
package theme
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"howett.net/plist"
|
||||
)
|
||||
|
||||
func detectSystemTheme() Theme {
|
||||
out, err := exec.Command("defaults", "read", "-g", "AppleInterfaceStyle").Output() //nolint:gosec
|
||||
if err == nil && strings.TrimSpace(string(out)) == "Dark" {
|
||||
home, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
return Light
|
||||
}
|
||||
|
||||
path := filepath.Join(home, "/Library/Preferences/.GlobalPreferences.plist")
|
||||
prefFile, err := os.Open(path)
|
||||
if err != nil {
|
||||
return Light
|
||||
}
|
||||
defer prefFile.Close()
|
||||
|
||||
var data struct {
|
||||
AppleInterfaceStyle string `plist:AppleInterfaceStyle`
|
||||
}
|
||||
|
||||
dec := plist.NewDecoder(prefFile)
|
||||
err = dec.Decode(&data)
|
||||
if err == nil && data.AppleInterfaceStyle == "Dark" {
|
||||
return Dark
|
||||
}
|
||||
|
||||
return Light
|
||||
}
|
||||
|
||||
@ -313,16 +313,16 @@ func (su *smtpUser) Send(returnPath string, to []string, messageReader io.Reader
|
||||
|
||||
startTime := time.Now()
|
||||
for isSending && time.Since(startTime) < 90*time.Second {
|
||||
log.Debug("Message is still in send queue, waiting for a bit")
|
||||
log.Warn("Message is still in send queue, waiting for a bit")
|
||||
time.Sleep(15 * time.Second)
|
||||
isSending, wasSent = su.backend.sendRecorder.isSendingOrSent(su.client(), sendRecorderMessageHash)
|
||||
}
|
||||
if isSending {
|
||||
log.Debug("Message is still in send queue, returning error to prevent client from adding it to the sent folder prematurely")
|
||||
log.Warn("Message is still in send queue, returning error to prevent client from adding it to the sent folder prematurely")
|
||||
return errors.New("original message is still being sent")
|
||||
}
|
||||
if wasSent {
|
||||
log.Debug("Message was already sent")
|
||||
log.Warn("Message was already sent")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@ -128,7 +128,7 @@ func (mc *mailboxCounts) getPMLabel() *pmapi.Label {
|
||||
Path: mc.LabelName,
|
||||
Color: mc.Color,
|
||||
Order: mc.Order,
|
||||
Type: pmapi.LabelTypeMailbox,
|
||||
Type: pmapi.LabelTypeMailBox,
|
||||
Exclusive: pmapi.Boolean(mc.IsFolder),
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,33 +15,36 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package store
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func uLimit() int {
|
||||
if runtime.GOOS != "darwin" && runtime.GOOS != "linux" {
|
||||
return 0
|
||||
}
|
||||
out, err := exec.Command("bash", "-c", "ulimit -n").Output()
|
||||
func getCurrentFDLimit() (int, error) {
|
||||
var limits syscall.Rlimit
|
||||
err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &limits)
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
return 0
|
||||
return 0, err
|
||||
}
|
||||
outStr := strings.Trim(string(out), " \n")
|
||||
num, err := strconv.Atoi(outStr)
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
return 0
|
||||
return int(limits.Cur), nil
|
||||
}
|
||||
|
||||
func countOpenedFDs(limit int) int {
|
||||
openedFDs := 0
|
||||
|
||||
for i := 0; i < limit; i++ {
|
||||
_, _, err := syscall.Syscall(syscall.SYS_FCNTL, uintptr(i), uintptr(syscall.F_GETFL), 0)
|
||||
if err == 0 {
|
||||
openedFDs++
|
||||
}
|
||||
}
|
||||
return num
|
||||
|
||||
return openedFDs
|
||||
}
|
||||
|
||||
func isFdCloseToULimit() bool {
|
||||
@ -49,16 +52,18 @@ func isFdCloseToULimit() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
pid := fmt.Sprint(os.Getpid())
|
||||
out, err := exec.Command("lsof", "-p", pid).Output() //nolint:gosec
|
||||
limit, err := getCurrentFDLimit()
|
||||
if err != nil {
|
||||
log.Warn("isFdCloseToULimit: ", err)
|
||||
log.WithError(err).Error("Cannot get current FD limit")
|
||||
return false
|
||||
}
|
||||
lines := strings.Split(string(out), "\n")
|
||||
|
||||
fd := len(lines) - 1
|
||||
ulimit := uLimit()
|
||||
log.Info("File descriptor check: num goroutines ", runtime.NumGoroutine(), " fd ", fd, " ulimit ", ulimit)
|
||||
return fd >= int(0.95*float64(ulimit))
|
||||
openedFDs := countOpenedFDs(limit)
|
||||
|
||||
log.
|
||||
WithField("noGoroutines", runtime.NumCgoCall()).
|
||||
WithField("noFDs", openedFDs).
|
||||
WithField("limitFD", limit).
|
||||
Info("File descriptor check")
|
||||
return openedFDs >= int(0.95*float64(limit))
|
||||
}
|
||||
23
internal/store/ulimit_windows.go
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright (c) 2022 Proton AG
|
||||
//
|
||||
// This file is part of Proton Mail Bridge.
|
||||
//
|
||||
// Proton Mail Bridge 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.
|
||||
//
|
||||
// Proton Mail Bridge 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 Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package store
|
||||
|
||||
func isFdCloseToULimit() bool { return false }
|
||||
@ -59,7 +59,7 @@ func (store *Store) createMailbox(name string) error {
|
||||
Name: name,
|
||||
Color: color,
|
||||
Exclusive: pmapi.Boolean(exclusive),
|
||||
Type: pmapi.LabelTypeMailbox,
|
||||
Type: pmapi.LabelTypeMailBox,
|
||||
})
|
||||
return err
|
||||
}
|
||||
@ -188,7 +188,7 @@ func (store *Store) createOrUpdateMailboxEvent(label *pmapi.Label) error {
|
||||
store.lock.Lock()
|
||||
defer store.lock.Unlock()
|
||||
|
||||
if label.Type != pmapi.LabelTypeMailbox {
|
||||
if label.Type != pmapi.LabelTypeMailBox {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@ -20,7 +20,6 @@ package updater
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
@ -39,77 +38,103 @@ const (
|
||||
func TestSyncFolder(t *testing.T) {
|
||||
for _, srcType := range []string{EmptyType, FileType, SymlinkType, DirType} {
|
||||
for _, dstType := range []string{EmptyType, FileType, SymlinkType, DirType} {
|
||||
require.NoError(t, checkCopyWorks(srcType, dstType))
|
||||
checkCopyWorks(t, srcType, dstType)
|
||||
logrus.Warn("OK: from ", srcType, " to ", dstType)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func checkCopyWorks(srcType, dstType string) error {
|
||||
func checkCopyWorks(tb testing.TB, srcType, dstType string) {
|
||||
r := require.New(tb)
|
||||
dirName := "from_" + srcType + "_to_" + dstType
|
||||
AppCacheDir := "/tmp"
|
||||
srcDir := filepath.Join(AppCacheDir, "sync_src", dirName)
|
||||
destDir := filepath.Join(AppCacheDir, "sync_dst", dirName)
|
||||
|
||||
// clear before
|
||||
logrus.Info("remove all ", srcDir)
|
||||
err := os.RemoveAll(srcDir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
logrus.Info("remove all ", destDir)
|
||||
err = os.RemoveAll(destDir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
r.NoError(os.RemoveAll(srcDir))
|
||||
r.NoError(os.RemoveAll(destDir))
|
||||
|
||||
// create
|
||||
err = createTestFolder(srcDir, srcType)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = createTestFolder(destDir, dstType)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
r.NoError(createTestFolder(srcDir, srcType))
|
||||
r.NoError(createTestFolder(destDir, dstType))
|
||||
|
||||
// copy
|
||||
logrus.Info("Sync from ", srcDir, " to ", destDir)
|
||||
err = syncFolders(destDir, srcDir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
r.NoError(syncFolders(destDir, srcDir))
|
||||
|
||||
// Check
|
||||
logrus.Info("check ", srcDir, " and ", destDir)
|
||||
err = checkThatFilesAreSame(srcDir, destDir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
checkThatFilesAreSame(r, srcDir, destDir)
|
||||
|
||||
// clear after
|
||||
logrus.Info("remove all ", srcDir)
|
||||
err = os.RemoveAll(srcDir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
logrus.Info("remove all ", destDir)
|
||||
err = os.RemoveAll(destDir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return err
|
||||
r.NoError(os.RemoveAll(srcDir))
|
||||
r.NoError(os.RemoveAll(destDir))
|
||||
}
|
||||
|
||||
func checkThatFilesAreSame(src, dst string) error {
|
||||
cmd := exec.Command("diff", "-qr", src, dst) //nolint:gosec
|
||||
cmd.Stderr = logrus.StandardLogger().WriterLevel(logrus.ErrorLevel)
|
||||
cmd.Stdout = logrus.StandardLogger().WriterLevel(logrus.InfoLevel)
|
||||
return cmd.Run()
|
||||
func checkThatFilesAreSame(r *require.Assertions, src, dst string) {
|
||||
srcFiles, srcDirs, err := walkDir(src)
|
||||
r.NoError(err)
|
||||
|
||||
dstFiles, dstDirs, err := walkDir(dst)
|
||||
r.NoError(err)
|
||||
|
||||
r.ElementsMatch(srcFiles, dstFiles)
|
||||
r.ElementsMatch(srcDirs, dstDirs)
|
||||
|
||||
for _, relPath := range srcFiles {
|
||||
srcPath := filepath.Join(src, relPath)
|
||||
r.FileExists(srcPath)
|
||||
|
||||
dstPath := filepath.Join(dst, relPath)
|
||||
r.FileExists(dstPath)
|
||||
|
||||
srcInfo, err := os.Lstat(srcPath)
|
||||
r.NoError(err)
|
||||
|
||||
dstInfo, err := os.Lstat(dstPath)
|
||||
r.NoError(err)
|
||||
|
||||
r.Equal(srcInfo.Mode(), dstInfo.Mode())
|
||||
|
||||
if srcInfo.Mode()&os.ModeSymlink == os.ModeSymlink {
|
||||
srcLnk, err := os.Readlink(srcPath)
|
||||
r.NoError(err)
|
||||
|
||||
dstLnk, err := os.Readlink(dstPath)
|
||||
r.NoError(err)
|
||||
|
||||
r.Equal(srcLnk, dstLnk)
|
||||
} else {
|
||||
srcContent, err := ioutil.ReadFile(srcPath)
|
||||
r.NoError(err)
|
||||
|
||||
dstContent, err := ioutil.ReadFile(dstPath)
|
||||
r.NoError(err)
|
||||
|
||||
r.Equal(srcContent, dstContent)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func walkDir(dir string) (files, dirs []string, err error) {
|
||||
err = filepath.Walk(dir, func(path string, info os.FileInfo, errWalk error) error {
|
||||
if errWalk != nil {
|
||||
return errWalk
|
||||
}
|
||||
|
||||
relPath, errRel := filepath.Rel(dir, path)
|
||||
if errRel != nil {
|
||||
return errRel
|
||||
}
|
||||
|
||||
if info.IsDir() {
|
||||
dirs = append(dirs, relPath)
|
||||
} else {
|
||||
files = append(files, relPath)
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func createTestFolder(dirPath, dirType string) error {
|
||||
|
||||
@ -18,13 +18,13 @@
|
||||
package keychain
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"reflect"
|
||||
|
||||
"github.com/docker/docker-credential-helpers/credentials"
|
||||
"github.com/docker/docker-credential-helpers/pass"
|
||||
"github.com/docker/docker-credential-helpers/secretservice"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/sys/execabs"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -40,11 +40,11 @@ func init() { //nolint:gochecknoinits
|
||||
Helpers[SecretServiceDBus] = newDBusHelper
|
||||
}
|
||||
|
||||
if _, err := exec.LookPath("gnome-keyring"); err == nil && isUsable(newSecretServiceHelper("")) {
|
||||
if _, err := execabs.LookPath("gnome-keyring"); err == nil && isUsable(newSecretServiceHelper("")) {
|
||||
Helpers[SecretService] = newSecretServiceHelper
|
||||
}
|
||||
|
||||
if _, err := exec.LookPath("pass"); err == nil && isUsable(newPassHelper("")) {
|
||||
if _, err := execabs.LookPath("pass"); err == nil && isUsable(newPassHelper("")) {
|
||||
Helpers[Pass] = newPassHelper
|
||||
}
|
||||
|
||||
|
||||
@ -155,14 +155,6 @@ func convertForeignEncodings(p *parser.Parser) error {
|
||||
RegisterContentTypeHandler("text/.*", func(p *parser.Part) error {
|
||||
return p.ConvertToUTF8()
|
||||
}).
|
||||
RegisterDefaultHandler(func(p *parser.Part) error {
|
||||
// multipart/alternative, for example, can contain extra charset.
|
||||
if _, params, _ := p.ContentType(); params != nil && params["charset"] != "" {
|
||||
return p.ConvertToUTF8()
|
||||
}
|
||||
|
||||
return nil
|
||||
}).
|
||||
Walk()
|
||||
}
|
||||
|
||||
|
||||
@ -64,6 +64,13 @@ type Client interface {
|
||||
DeleteLabel(ctx context.Context, labelID string) error
|
||||
EmptyFolder(ctx context.Context, labelID string, addressID string) error
|
||||
|
||||
// /core/V4/labels routes
|
||||
ListLabelsOnly(ctx context.Context) ([]*Label, error)
|
||||
ListFoldersOnly(ctx context.Context) ([]*Label, error)
|
||||
CreateLabelV4(ctx context.Context, label *Label) (*Label, error)
|
||||
UpdateLabelV4(ctx context.Context, label *Label) (*Label, error)
|
||||
DeleteLabelV4(ctx context.Context, labelID string) error
|
||||
|
||||
GetMailSettings(ctx context.Context) (MailSettings, error)
|
||||
GetContactEmailByEmail(context.Context, string, int, int) ([]ContactEmail, error)
|
||||
GetContactByID(context.Context, string) (Contact, error)
|
||||
|
||||
@ -320,7 +320,7 @@ func encryptSymmDecryptKey(
|
||||
return
|
||||
}
|
||||
|
||||
pgpSplitMessage, err := pgpMessage.SeparateKeyAndData(len(textToEncrypt), 0)
|
||||
pgpSplitMessage, err := pgpMessage.SplitMessage()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ const (
|
||||
DraftLabel = "8"
|
||||
StarredLabel = "10"
|
||||
|
||||
LabelTypeMailbox = 1
|
||||
LabelTypeMailBox = 1
|
||||
LabelTypeContactGroup = 2
|
||||
)
|
||||
|
||||
@ -89,7 +89,7 @@ type Label struct { //nolint:maligned
|
||||
}
|
||||
|
||||
func (c *client) ListLabels(ctx context.Context) (labels []*Label, err error) {
|
||||
return c.listLabelType(ctx, LabelTypeMailbox)
|
||||
return c.listLabelType(ctx, LabelTypeMailBox)
|
||||
}
|
||||
|
||||
func (c *client) ListContactGroups(ctx context.Context) (labels []*Label, err error) {
|
||||
|
||||
@ -53,8 +53,8 @@ const testLabelsBody = `{
|
||||
`
|
||||
|
||||
var testLabels = []*Label{
|
||||
{ID: "LLz8ysmVxwr4dF6mWpClePT0SpSWOEvzTdq17RydSl4ndMckvY1K63HeXDzn03BJQwKYvgf-eWT8Qfd9WVuIEQ==", Name: "CroutonMail is awesome :)", Color: "#7272a7", Order: 1, Display: 0, Type: LabelTypeMailbox},
|
||||
{ID: "BvbqbySUPo9uWW_eR8tLA13NUsQMz3P4Zhw4UnpvrKqURnrHlE6L2Au0nplHfHlVXFgGz4L4hJ9-BYllOL-L5g==", Name: "Royal sausage", Color: "#cf5858", Order: 2, Display: 1, Type: LabelTypeMailbox},
|
||||
{ID: "LLz8ysmVxwr4dF6mWpClePT0SpSWOEvzTdq17RydSl4ndMckvY1K63HeXDzn03BJQwKYvgf-eWT8Qfd9WVuIEQ==", Name: "CroutonMail is awesome :)", Color: "#7272a7", Order: 1, Display: 0, Type: LabelTypeMailBox},
|
||||
{ID: "BvbqbySUPo9uWW_eR8tLA13NUsQMz3P4Zhw4UnpvrKqURnrHlE6L2Au0nplHfHlVXFgGz4L4hJ9-BYllOL-L5g==", Name: "Royal sausage", Color: "#cf5858", Order: 2, Display: 1, Type: LabelTypeMailBox},
|
||||
}
|
||||
|
||||
var testLabelReq = LabelReq{&Label{
|
||||
@ -82,7 +82,7 @@ var testLabelCreated = &Label{
|
||||
Color: "#c26cc7",
|
||||
Order: 3,
|
||||
Display: 1,
|
||||
Type: LabelTypeMailbox,
|
||||
Type: LabelTypeMailBox,
|
||||
}
|
||||
|
||||
const testDeleteLabelBody = `{
|
||||
|
||||
110
pkg/pmapi/labels_v4.go
Normal file
@ -0,0 +1,110 @@
|
||||
// Copyright (c) 2022 Proton AG
|
||||
//
|
||||
// This file is part of Proton Mail Bridge.
|
||||
//
|
||||
// Proton Mail Bridge 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.
|
||||
//
|
||||
// Proton Mail Bridge 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 Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
package pmapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-resty/resty/v2"
|
||||
)
|
||||
|
||||
type LabelTypeV4 int
|
||||
|
||||
const (
|
||||
LabelTypeV4Label = 1
|
||||
LabelTypeV4ContactGroup = 2
|
||||
LabelTypeV4Folder = 3
|
||||
)
|
||||
|
||||
func (c *client) ListLabelsOnly(ctx context.Context) (labels []*Label, err error) {
|
||||
return c.listLabelTypeV4(ctx, LabelTypeV4Label)
|
||||
}
|
||||
|
||||
func (c *client) ListFoldersOnly(ctx context.Context) (labels []*Label, err error) {
|
||||
return c.listLabelTypeV4(ctx, LabelTypeV4Folder)
|
||||
}
|
||||
|
||||
// listLabelType lists all labels created by the user.
|
||||
func (c *client) listLabelTypeV4(ctx context.Context, labelType LabelTypeV4) (labels []*Label, err error) {
|
||||
var res struct {
|
||||
Labels []*Label
|
||||
}
|
||||
|
||||
if _, err := c.do(ctx, func(r *resty.Request) (*resty.Response, error) {
|
||||
return r.SetQueryParam("Type", strconv.Itoa(int(labelType))).SetResult(&res).Get("/core/v4/labels")
|
||||
}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.Labels, nil
|
||||
}
|
||||
|
||||
// CreateLabel creates a new label.
|
||||
func (c *client) CreateLabelV4(ctx context.Context, label *Label) (created *Label, err error) {
|
||||
if label.Name == "" {
|
||||
return nil, errors.New("name is required")
|
||||
}
|
||||
|
||||
var res struct {
|
||||
Label *Label
|
||||
}
|
||||
|
||||
if _, err := c.do(ctx, func(r *resty.Request) (*resty.Response, error) {
|
||||
return r.SetBody(&LabelReq{
|
||||
Label: label,
|
||||
}).SetResult(&res).Post("/core/v4/labels")
|
||||
}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.Label, nil
|
||||
}
|
||||
|
||||
// UpdateLabel updates a label.
|
||||
func (c *client) UpdateLabelV4(ctx context.Context, label *Label) (updated *Label, err error) {
|
||||
if label.Name == "" {
|
||||
return nil, errors.New("name is required")
|
||||
}
|
||||
|
||||
var res struct {
|
||||
Label *Label
|
||||
}
|
||||
|
||||
if _, err := c.do(ctx, func(r *resty.Request) (*resty.Response, error) {
|
||||
return r.SetBody(&LabelReq{
|
||||
Label: label,
|
||||
}).SetResult(&res).Put("/core/v4/labels/" + label.ID)
|
||||
}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.Label, nil
|
||||
}
|
||||
|
||||
// DeleteLabel deletes a label.
|
||||
func (c *client) DeleteLabelV4(ctx context.Context, labelID string) error {
|
||||
if _, err := c.do(ctx, func(r *resty.Request) (*resty.Response, error) {
|
||||
return r.Delete("/core/v4/labels/" + labelID)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
170
pkg/pmapi/labels_v4_test.go
Normal file
@ -0,0 +1,170 @@
|
||||
// Copyright (c) 2022 Proton AG
|
||||
//
|
||||
// This file is part of Proton Mail Bridge.
|
||||
//
|
||||
// Proton Mail Bridge 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.
|
||||
//
|
||||
// Proton Mail Bridge 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 Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
package pmapi
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
r "github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
const testFoldersBody = `{
|
||||
"Labels": [
|
||||
{
|
||||
"ID": "LLz8ysmVxwr4dF6mWpClePT0SpSWOEvzTdq17RydSl4ndMckvY1K63HeXDzn03BJQwKYvgf-eWT8Qfd9WVuIEQ==",
|
||||
"Name": "CroutonMail is awesome :)",
|
||||
"Color": "#7272a7",
|
||||
"Display": 0,
|
||||
"Order": 1,
|
||||
"Type": 3
|
||||
},
|
||||
{
|
||||
"ID": "BvbqbySUPo9uWW_eR8tLA13NUsQMz3P4Zhw4UnpvrKqURnrHlE6L2Au0nplHfHlVXFgGz4L4hJ9-BYllOL-L5g==",
|
||||
"Name": "Royal sausage",
|
||||
"Color": "#cf5858",
|
||||
"Display": 1,
|
||||
"Order": 2,
|
||||
"Type": 3
|
||||
}
|
||||
],
|
||||
"Code": 1000
|
||||
}
|
||||
`
|
||||
|
||||
var testFolders = []*Label{
|
||||
{ID: "LLz8ysmVxwr4dF6mWpClePT0SpSWOEvzTdq17RydSl4ndMckvY1K63HeXDzn03BJQwKYvgf-eWT8Qfd9WVuIEQ==", Name: "CroutonMail is awesome :)", Color: "#7272a7", Order: 1, Display: 0, Type: LabelTypeV4Folder},
|
||||
{ID: "BvbqbySUPo9uWW_eR8tLA13NUsQMz3P4Zhw4UnpvrKqURnrHlE6L2Au0nplHfHlVXFgGz4L4hJ9-BYllOL-L5g==", Name: "Royal sausage", Color: "#cf5858", Order: 2, Display: 1, Type: LabelTypeV4Folder},
|
||||
}
|
||||
|
||||
func TestClient_ListLabelsOnly(t *testing.T) {
|
||||
s, c := newTestClient(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||
r.NoError(t, checkMethodAndPath(req, "GET", "/core/v4/labels?Type=1"))
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
fmt.Fprint(w, testLabelsBody)
|
||||
}))
|
||||
defer s.Close()
|
||||
|
||||
labels, err := c.ListLabelsOnly(context.Background())
|
||||
r.NoError(t, err)
|
||||
r.Equal(t, testLabels, labels)
|
||||
}
|
||||
|
||||
func TestClient_ListFoldersOnly(t *testing.T) {
|
||||
s, c := newTestClient(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||
r.NoError(t, checkMethodAndPath(req, "GET", "/core/v4/labels?Type=3"))
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
fmt.Fprint(w, testFoldersBody)
|
||||
}))
|
||||
defer s.Close()
|
||||
|
||||
folders, err := c.ListFoldersOnly(context.Background())
|
||||
r.NoError(t, err)
|
||||
r.Equal(t, testFolders, folders)
|
||||
}
|
||||
func TestClient_CreateLabelV4(t *testing.T) {
|
||||
s, c := newTestClient(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||
r.NoError(t, checkMethodAndPath(req, "POST", "/core/v4/labels"))
|
||||
|
||||
body := &bytes.Buffer{}
|
||||
_, err := body.ReadFrom(req.Body)
|
||||
r.NoError(t, err)
|
||||
|
||||
if bytes.Contains(body.Bytes(), []byte("Order")) {
|
||||
t.Fatal("Body contains `Order`: ", body.String())
|
||||
}
|
||||
|
||||
var labelReq LabelReq
|
||||
err = json.NewDecoder(body).Decode(&labelReq)
|
||||
r.NoError(t, err)
|
||||
r.Equal(t, testLabelReq.Label, labelReq.Label)
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
fmt.Fprint(w, testCreateLabelBody)
|
||||
}))
|
||||
defer s.Close()
|
||||
|
||||
created, err := c.CreateLabelV4(context.Background(), testLabelReq.Label)
|
||||
r.NoError(t, err)
|
||||
|
||||
if !reflect.DeepEqual(created, testLabelCreated) {
|
||||
t.Fatalf("Invalid created label: expected %+v, got %+v", testLabelCreated, created)
|
||||
}
|
||||
}
|
||||
|
||||
func TestClient_CreateEmptyLabelV4(t *testing.T) {
|
||||
s, c := newTestClient(http.HandlerFunc(func(_ http.ResponseWriter, _ *http.Request) {
|
||||
r.Fail(t, "API should not be called")
|
||||
}))
|
||||
defer s.Close()
|
||||
|
||||
_, err := c.CreateLabelV4(context.Background(), &Label{})
|
||||
r.EqualError(t, err, "name is required")
|
||||
}
|
||||
|
||||
func TestClient_UpdateLabelV4(t *testing.T) {
|
||||
s, c := newTestClient(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||
r.NoError(t, checkMethodAndPath(req, "PUT", "/core/v4/labels/"+testLabelCreated.ID))
|
||||
|
||||
var labelReq LabelReq
|
||||
err := json.NewDecoder(req.Body).Decode(&labelReq)
|
||||
r.NoError(t, err)
|
||||
r.Equal(t, testLabelCreated, labelReq.Label)
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
fmt.Fprint(w, testCreateLabelBody)
|
||||
}))
|
||||
defer s.Close()
|
||||
|
||||
updated, err := c.UpdateLabelV4(context.Background(), testLabelCreated)
|
||||
r.NoError(t, err)
|
||||
|
||||
if !reflect.DeepEqual(updated, testLabelCreated) {
|
||||
t.Fatalf("Invalid updated label: expected %+v, got %+v", testLabelCreated, updated)
|
||||
}
|
||||
}
|
||||
|
||||
func TestClient_UpdateLabelToEmptyNameV4(t *testing.T) {
|
||||
s, c := newTestClient(http.HandlerFunc(func(_ http.ResponseWriter, _ *http.Request) {
|
||||
r.Fail(t, "API should not be called")
|
||||
}))
|
||||
defer s.Close()
|
||||
|
||||
_, err := c.UpdateLabelV4(context.Background(), &Label{ID: "label"})
|
||||
r.EqualError(t, err, "name is required")
|
||||
}
|
||||
|
||||
func TestClient_DeleteLabelV4(t *testing.T) {
|
||||
s, c := newTestClient(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||
r.NoError(t, checkMethodAndPath(req, "DELETE", "/core/v4/labels/"+testLabelCreated.ID))
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
fmt.Fprint(w, testDeleteLabelBody)
|
||||
}))
|
||||
defer s.Close()
|
||||
|
||||
err := c.DeleteLabelV4(context.Background(), testLabelCreated.ID)
|
||||
r.NoError(t, err)
|
||||
}
|
||||
@ -169,6 +169,21 @@ func (mr *MockClientMockRecorder) CreateLabel(arg0, arg1 interface{}) *gomock.Ca
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateLabel", reflect.TypeOf((*MockClient)(nil).CreateLabel), arg0, arg1)
|
||||
}
|
||||
|
||||
// CreateLabelV4 mocks base method.
|
||||
func (m *MockClient) CreateLabelV4(arg0 context.Context, arg1 *pmapi.Label) (*pmapi.Label, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "CreateLabelV4", arg0, arg1)
|
||||
ret0, _ := ret[0].(*pmapi.Label)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// CreateLabelV4 indicates an expected call of CreateLabelV4.
|
||||
func (mr *MockClientMockRecorder) CreateLabelV4(arg0, arg1 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateLabelV4", reflect.TypeOf((*MockClient)(nil).CreateLabelV4), arg0, arg1)
|
||||
}
|
||||
|
||||
// CurrentUser mocks base method.
|
||||
func (m *MockClient) CurrentUser(arg0 context.Context) (*pmapi.User, error) {
|
||||
m.ctrl.T.Helper()
|
||||
@ -213,6 +228,21 @@ func (mr *MockClientMockRecorder) DeleteLabel(arg0, arg1 interface{}) *gomock.Ca
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteLabel", reflect.TypeOf((*MockClient)(nil).DeleteLabel), arg0, arg1)
|
||||
}
|
||||
|
||||
// DeleteLabelV4 mocks base method.
|
||||
func (m *MockClient) DeleteLabelV4(arg0 context.Context, arg1 string) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DeleteLabelV4", arg0, arg1)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// DeleteLabelV4 indicates an expected call of DeleteLabelV4.
|
||||
func (mr *MockClientMockRecorder) DeleteLabelV4(arg0, arg1 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteLabelV4", reflect.TypeOf((*MockClient)(nil).DeleteLabelV4), arg0, arg1)
|
||||
}
|
||||
|
||||
|
||||
// DeleteMessages mocks base method.
|
||||
func (m *MockClient) DeleteMessages(arg0 context.Context, arg1 []string) error {
|
||||
m.ctrl.T.Helper()
|
||||
@ -465,6 +495,36 @@ func (mr *MockClientMockRecorder) ListLabels(arg0 interface{}) *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListLabels", reflect.TypeOf((*MockClient)(nil).ListLabels), arg0)
|
||||
}
|
||||
|
||||
// ListLabelsOnly mocks base method.
|
||||
func (m *MockClient) ListLabelsOnly(arg0 context.Context) ([]*pmapi.Label, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ListLabelsOnly", arg0)
|
||||
ret0, _ := ret[0].([]*pmapi.Label)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// ListLabelsOnly indicates an expected call of ListLabelsOnly.
|
||||
func (mr *MockClientMockRecorder) ListLabelsOnly(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListLabelsOnly", reflect.TypeOf((*MockClient)(nil).ListLabelsOnly), arg0)
|
||||
}
|
||||
|
||||
// ListFoldersOnly mocks base method.
|
||||
func (m *MockClient) ListFoldersOnly(arg0 context.Context) ([]*pmapi.Label, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ListFoldersOnly", arg0)
|
||||
ret0, _ := ret[0].([]*pmapi.Label)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// ListFoldersOnly indicates an expected call of ListFoldersOnly.
|
||||
func (mr *MockClientMockRecorder) ListFoldersOnly(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListFoldersOnly", reflect.TypeOf((*MockClient)(nil).ListFoldersOnly), arg0)
|
||||
}
|
||||
|
||||
// ListMessages mocks base method.
|
||||
func (m *MockClient) ListMessages(arg0 context.Context, arg1 *pmapi.MessagesFilter) ([]*pmapi.Message, int, error) {
|
||||
m.ctrl.T.Helper()
|
||||
@ -596,6 +656,21 @@ func (mr *MockClientMockRecorder) UpdateLabel(arg0, arg1 interface{}) *gomock.Ca
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateLabel", reflect.TypeOf((*MockClient)(nil).UpdateLabel), arg0, arg1)
|
||||
}
|
||||
|
||||
// UpdateLabelV4 mocks base method.
|
||||
func (m *MockClient) UpdateLabelV4(arg0 context.Context, arg1 *pmapi.Label) (*pmapi.Label, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "UpdateLabelV4", arg0, arg1)
|
||||
ret0, _ := ret[0].(*pmapi.Label)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// UpdateLabelV4 indicates an expected call of UpdateLabelV4.
|
||||
func (mr *MockClientMockRecorder) UpdateLabelV4(arg0, arg1 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateLabelUpdateLabelV4", reflect.TypeOf((*MockClient)(nil).UpdateLabelV4), arg0, arg1)
|
||||
}
|
||||
|
||||
// UpdateUser mocks base method.
|
||||
func (m *MockClient) UpdateUser(arg0 context.Context) (*pmapi.User, error) {
|
||||
m.ctrl.T.Helper()
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
.PHONY: check-go check-godog install-godog test test-bridge test-live test-live-bridge test-stage test-debug test-live-debug bench
|
||||
|
||||
export GO111MODULE=on
|
||||
export BRIDGE_VERSION:=2.2.0+integrationtests
|
||||
export BRIDGE_VERSION:=2.2.1+integrationtests
|
||||
export VERBOSITY?=fatal
|
||||
export TEST_DATA=testdata
|
||||
|
||||
|
||||
@ -175,5 +175,6 @@ func (ctx *TestContext) MessagePreparationFinished(username string) {
|
||||
}
|
||||
|
||||
func (ctx *TestContext) CredentialsFailsOnWrite(shouldFail bool) {
|
||||
ctx.credStore.(*fakeCredStore).failOnWrite = shouldFail //nolint:forcetypeassert
|
||||
ctx.credStore.(*fakeCredStore).failOnWrite = shouldFail //nolint:forcetypeassert
|
||||
ctx.addCleanup(func() { ctx.credStore.(*fakeCredStore).failOnWrite = false }, "credentials-cleanup") //nolint:forcetypeassert
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ type fakeCredStore struct {
|
||||
|
||||
// newFakeCredStore returns a fake credentials store (optionally configured with the given credentials).
|
||||
func newFakeCredStore(initCreds ...*credentials.Credentials) (c *fakeCredStore) {
|
||||
c = &fakeCredStore{credentials: map[string]*credentials.Credentials{}}
|
||||
c = &fakeCredStore{credentials: map[string]*credentials.Credentials{}, failOnWrite: false}
|
||||
for _, creds := range initCreds {
|
||||
if creds == nil {
|
||||
continue
|
||||
|
||||
@ -24,6 +24,11 @@ import (
|
||||
"github.com/ProtonMail/proton-bridge/v2/pkg/pmapi"
|
||||
)
|
||||
|
||||
const (
|
||||
route = "/labels"
|
||||
routeV4 = "/core/v4/labels"
|
||||
)
|
||||
|
||||
func (api *FakePMAPI) isLabelFolder(labelID string) bool {
|
||||
for _, label := range api.labels {
|
||||
if label.ID == labelID {
|
||||
@ -42,15 +47,51 @@ func (api *FakePMAPI) isLabelFolder(labelID string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (api *FakePMAPI) ListLabels(context.Context) ([]*pmapi.Label, error) {
|
||||
if err := api.checkAndRecordCall(GET, "/labels/1", nil); err != nil {
|
||||
func (api *FakePMAPI) ListLabels(ctx context.Context) ([]*pmapi.Label, error) {
|
||||
return api.listLabels(ctx, "1", route)
|
||||
}
|
||||
|
||||
func (api *FakePMAPI) CreateLabel(ctx context.Context, label *pmapi.Label) (*pmapi.Label, error) {
|
||||
return api.createLabel(ctx, label, route)
|
||||
}
|
||||
|
||||
func (api *FakePMAPI) UpdateLabel(ctx context.Context, label *pmapi.Label) (*pmapi.Label, error) {
|
||||
return api.updateLabel(ctx, label, route)
|
||||
}
|
||||
|
||||
func (api *FakePMAPI) DeleteLabel(ctx context.Context, labelID string) error {
|
||||
return api.deleteLabel(ctx, labelID, route)
|
||||
}
|
||||
|
||||
func (api *FakePMAPI) ListLabelsOnly(ctx context.Context) ([]*pmapi.Label, error) {
|
||||
return api.listLabels(ctx, "1", routeV4)
|
||||
}
|
||||
|
||||
func (api *FakePMAPI) ListFoldersOnly(ctx context.Context) ([]*pmapi.Label, error) {
|
||||
return api.listLabels(ctx, "3", routeV4)
|
||||
}
|
||||
|
||||
func (api *FakePMAPI) CreateLabelV4(ctx context.Context, label *pmapi.Label) (*pmapi.Label, error) {
|
||||
return api.createLabel(ctx, label, routeV4)
|
||||
}
|
||||
|
||||
func (api *FakePMAPI) UpdateLabelV4(ctx context.Context, label *pmapi.Label) (*pmapi.Label, error) {
|
||||
return api.updateLabel(ctx, label, routeV4)
|
||||
}
|
||||
|
||||
func (api *FakePMAPI) DeleteLabelV4(ctx context.Context, labelID string) error {
|
||||
return api.deleteLabel(ctx, labelID, routeV4)
|
||||
}
|
||||
|
||||
func (api *FakePMAPI) listLabels(_ context.Context, labeType string, route string) ([]*pmapi.Label, error) {
|
||||
if err := api.checkAndRecordCall(GET, route+"/"+labeType, nil); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return api.labels, nil
|
||||
}
|
||||
|
||||
func (api *FakePMAPI) CreateLabel(_ context.Context, label *pmapi.Label) (*pmapi.Label, error) {
|
||||
if err := api.checkAndRecordCall(POST, "/labels", &pmapi.LabelReq{Label: label}); err != nil {
|
||||
func (api *FakePMAPI) createLabel(_ context.Context, label *pmapi.Label, route string) (*pmapi.Label, error) {
|
||||
if err := api.checkAndRecordCall(POST, route, &pmapi.LabelReq{Label: label}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, existingLabel := range api.labels {
|
||||
@ -71,8 +112,8 @@ func (api *FakePMAPI) CreateLabel(_ context.Context, label *pmapi.Label) (*pmapi
|
||||
return label, nil
|
||||
}
|
||||
|
||||
func (api *FakePMAPI) UpdateLabel(_ context.Context, label *pmapi.Label) (*pmapi.Label, error) {
|
||||
if err := api.checkAndRecordCall(PUT, "/labels", &pmapi.LabelReq{Label: label}); err != nil {
|
||||
func (api *FakePMAPI) updateLabel(_ context.Context, label *pmapi.Label, route string) (*pmapi.Label, error) {
|
||||
if err := api.checkAndRecordCall(PUT, route, &pmapi.LabelReq{Label: label}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for idx, existingLabel := range api.labels {
|
||||
@ -91,8 +132,8 @@ func (api *FakePMAPI) UpdateLabel(_ context.Context, label *pmapi.Label) (*pmapi
|
||||
return nil, fmt.Errorf("label %s does not exist", label.ID)
|
||||
}
|
||||
|
||||
func (api *FakePMAPI) DeleteLabel(_ context.Context, labelID string) error {
|
||||
if err := api.checkAndRecordCall(DELETE, "/labels/"+labelID, nil); err != nil {
|
||||
func (api *FakePMAPI) deleteLabel(_ context.Context, labelID string, route string) error {
|
||||
if err := api.checkAndRecordCall(DELETE, route+labelID, nil); err != nil {
|
||||
return err
|
||||
}
|
||||
for idx, existingLabel := range api.labels {
|
||||
|
||||
@ -57,7 +57,7 @@ func thereIsUserWithMailbox(bddUserID, mailboxName string) error {
|
||||
}
|
||||
err := ctx.GetPMAPIController().AddUserLabel(account.Username(), &pmapi.Label{
|
||||
Name: mailboxName,
|
||||
Type: pmapi.LabelTypeMailbox,
|
||||
Type: pmapi.LabelTypeMailBox,
|
||||
})
|
||||
if err != nil {
|
||||
return internalError(err, "adding label %s for %s", mailboxName, account.Username())
|
||||
|
||||
80
utils/export_icons.sh
Executable file
@ -0,0 +1,80 @@
|
||||
# Copyright (c) 2022 Proton AG
|
||||
#
|
||||
# This file is part of Proton Mail Bridge.
|
||||
#
|
||||
# Proton Mail Bridge 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.
|
||||
#
|
||||
# Proton Mail Bridge 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 Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
RAW_PATHS=./dist/raw
|
||||
|
||||
create_bitmaps(){
|
||||
rm -f ${RAW_PATHS}/win+lin_icon_*.png
|
||||
export_png ${RAW_PATHS}/win+lin_icon_256x256.svg 192 256
|
||||
}
|
||||
|
||||
|
||||
# Inkscape (more precisely cairo) doesn't support customization of rendering
|
||||
# and direct output is too sharp. Therefore, we double DPI for inkscape export
|
||||
# and then scale down to correct dimension.
|
||||
export_png(){
|
||||
inSVG=$1
|
||||
dpi=$2
|
||||
size=$3
|
||||
|
||||
dimensions=${size}x${size}
|
||||
outPNG=$(echo "$inSVG" | sed 's/\(.*_icon\)_.*/\1/')_${dimensions}.png
|
||||
|
||||
echo "$inSVG -> $outPNG $dpi $dimensions"
|
||||
inkscape "$inSVG" --export-filename=tmp.png --export-dpi "$dpi"
|
||||
file tmp.png
|
||||
convert tmp.png -resize "$dimensions" "$outPNG"
|
||||
file "$outPNG"
|
||||
rm tmp.png
|
||||
}
|
||||
|
||||
create_mac_icon(){
|
||||
out=./dist/Bridge.icns
|
||||
rm -f ${out}
|
||||
# ${RAW_PATHS}/mac_icon_256x256@2x.png Duplicate icon element of type ic09
|
||||
# ${RAW_PATHS}/mac_icon_128x128@2x.png Duplicate icon element of type ic08
|
||||
# ${RAW_PATHS}/mac_icon_32x32@2x.png Bad dimensions: PNG file is 64x64
|
||||
# ${RAW_PATHS}/mac_icon_16x16@2x.png Duplicate icon element of type il32
|
||||
png2icns ${out} \
|
||||
${RAW_PATHS}/mac_icon_512x512@2x.png \
|
||||
${RAW_PATHS}/mac_icon_512x512.png \
|
||||
${RAW_PATHS}/mac_icon_256x256.png \
|
||||
${RAW_PATHS}/mac_icon_128x128.png \
|
||||
${RAW_PATHS}/mac_icon_32x32.png \
|
||||
${RAW_PATHS}/mac_icon_16x16.png
|
||||
}
|
||||
|
||||
create_windows_icon(){
|
||||
out=./dist/bridge.ico
|
||||
rm -f ${out}
|
||||
convert \
|
||||
${RAW_PATHS}/win+lin_icon_256x256.png \
|
||||
-define icon:auto-resize=256,128,64,48,32,16 ${out}
|
||||
}
|
||||
|
||||
create_linux_icon(){
|
||||
out=./dist/bridge.svg
|
||||
rm -f ${out}
|
||||
cp ${RAW_PATHS}/win+lin_icon_256x256.svg ${out}
|
||||
}
|
||||
|
||||
create_bitmaps
|
||||
create_mac_icon
|
||||
create_windows_icon
|
||||
create_linux_icon
|
||||