Merge pull request #638 from photoview/update-deps
Update go and node dependencies.
This commit is contained in:
commit
8868b4a584
20
api/go.mod
20
api/go.mod
|
@ -3,7 +3,7 @@ module github.com/photoview/photoview/api
|
||||||
go 1.16
|
go 1.16
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/99designs/gqlgen v0.14.0
|
github.com/99designs/gqlgen v0.16.0
|
||||||
github.com/Kagami/go-face v0.0.0-20210630145111-0c14797b4d0e
|
github.com/Kagami/go-face v0.0.0-20210630145111-0c14797b4d0e
|
||||||
github.com/agnivade/levenshtein v1.1.1 // indirect
|
github.com/agnivade/levenshtein v1.1.1 // indirect
|
||||||
github.com/barasher/go-exiftool v1.7.0
|
github.com/barasher/go-exiftool v1.7.0
|
||||||
|
@ -13,24 +13,26 @@ require (
|
||||||
github.com/gorilla/handlers v1.5.1
|
github.com/gorilla/handlers v1.5.1
|
||||||
github.com/gorilla/mux v1.8.0
|
github.com/gorilla/mux v1.8.0
|
||||||
github.com/gorilla/websocket v1.4.2
|
github.com/gorilla/websocket v1.4.2
|
||||||
github.com/h2non/filetype v1.1.1
|
github.com/h2non/filetype v1.1.3
|
||||||
github.com/hashicorp/golang-lru v0.5.4 // indirect
|
github.com/hashicorp/golang-lru v0.5.4 // indirect
|
||||||
|
github.com/jackc/pgx/v4 v4.14.1 // indirect
|
||||||
github.com/joho/godotenv v1.4.0
|
github.com/joho/godotenv v1.4.0
|
||||||
github.com/mitchellh/mapstructure v1.4.2 // indirect
|
github.com/mattn/go-sqlite3 v1.14.11 // indirect
|
||||||
|
github.com/mitchellh/mapstructure v1.4.3 // indirect
|
||||||
github.com/otiai10/copy v1.7.0
|
github.com/otiai10/copy v1.7.0
|
||||||
github.com/pkg/errors v0.9.1
|
github.com/pkg/errors v0.9.1
|
||||||
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
|
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
|
||||||
github.com/stretchr/testify v1.7.0
|
github.com/stretchr/testify v1.7.0
|
||||||
github.com/strukturag/libheif v1.12.0
|
github.com/strukturag/libheif v1.12.0
|
||||||
github.com/vektah/gqlparser/v2 v2.2.0
|
github.com/vektah/gqlparser/v2 v2.3.1
|
||||||
github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0
|
github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0
|
||||||
github.com/xor-gate/goexif2 v1.1.0
|
github.com/xor-gate/goexif2 v1.1.0
|
||||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa
|
golang.org/x/crypto v0.0.0-20220128200615-198e4374d7ed
|
||||||
golang.org/x/image v0.0.0-20211028202545-6944b10bf410
|
golang.org/x/image v0.0.0-20211028202545-6944b10bf410
|
||||||
gopkg.in/vansante/go-ffprobe.v2 v2.0.3
|
gopkg.in/vansante/go-ffprobe.v2 v2.0.3
|
||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
|
||||||
gorm.io/driver/mysql v1.1.3
|
gorm.io/driver/mysql v1.2.3
|
||||||
gorm.io/driver/postgres v1.2.1
|
gorm.io/driver/postgres v1.2.3
|
||||||
gorm.io/driver/sqlite v1.2.3
|
gorm.io/driver/sqlite v1.2.6
|
||||||
gorm.io/gorm v1.22.2
|
gorm.io/gorm v1.22.5
|
||||||
)
|
)
|
||||||
|
|
114
api/go.sum
114
api/go.sum
|
@ -1,5 +1,5 @@
|
||||||
github.com/99designs/gqlgen v0.14.0 h1:Wg8aNYQUjMR/4v+W3xD+7SizOy6lSvVeQ06AobNQAXI=
|
github.com/99designs/gqlgen v0.16.0 h1:7Qc4Ll3mfN3doAyUWOgtGLcBGu+KDgK48HdkBGLZVFs=
|
||||||
github.com/99designs/gqlgen v0.14.0/go.mod h1:S7z4boV+Nx4VvzMUpVrY/YuHjFX4n7rDyuTqvAkuoRE=
|
github.com/99designs/gqlgen v0.16.0/go.mod h1:nbeSjFkqphIqpZsYe1ULVz0yfH8hjpJdJIQoX/e0G2I=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/Kagami/go-face v0.0.0-20210630145111-0c14797b4d0e h1:lqIUFzxaqyYqUn4MhzAvSAh4wIte/iLNcIEWxpT/qbc=
|
github.com/Kagami/go-face v0.0.0-20210630145111-0c14797b4d0e h1:lqIUFzxaqyYqUn4MhzAvSAh4wIte/iLNcIEWxpT/qbc=
|
||||||
github.com/Kagami/go-face v0.0.0-20210630145111-0c14797b4d0e/go.mod h1:9wdDJkRgo3SGTcFwbQ7elVIQhIr2bbBjecuY7VoqmPU=
|
github.com/Kagami/go-face v0.0.0-20210630145111-0c14797b4d0e/go.mod h1:9wdDJkRgo3SGTcFwbQ7elVIQhIr2bbBjecuY7VoqmPU=
|
||||||
|
@ -20,6 +20,7 @@ github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMe
|
||||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||||
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||||
|
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
|
@ -38,18 +39,15 @@ github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB
|
||||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||||
github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
|
github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
|
||||||
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
|
||||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||||
github.com/gorilla/context v0.0.0-20160226214623-1ea25387ff6f/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
|
|
||||||
github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=
|
github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=
|
||||||
github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q=
|
github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q=
|
||||||
github.com/gorilla/mux v1.6.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
|
||||||
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
|
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
|
||||||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
|
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
|
||||||
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
|
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
|
||||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
github.com/h2non/filetype v1.1.1 h1:xvOwnXKAckvtLWsN398qS9QhlxlnVXBjXBydK2/UFB4=
|
github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg=
|
||||||
github.com/h2non/filetype v1.1.1/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY=
|
github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY=
|
||||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||||
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
|
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
|
||||||
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||||
|
@ -64,8 +62,8 @@ github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsU
|
||||||
github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o=
|
github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o=
|
||||||
github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY=
|
github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY=
|
||||||
github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
|
github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
|
||||||
github.com/jackc/pgconn v1.10.0 h1:4EYhlDVEMsJ30nNj0mmgwIUXoq7e9sMJrVC2ED6QlCU=
|
github.com/jackc/pgconn v1.10.1 h1:DzdIHIjG1AxGwoEEqS+mGsURyjt4enSmqzACXvVzOT8=
|
||||||
github.com/jackc/pgconn v1.10.0/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
|
github.com/jackc/pgconn v1.10.1/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
|
||||||
github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=
|
github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=
|
||||||
github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
|
github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
|
||||||
github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=
|
github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=
|
||||||
|
@ -81,32 +79,38 @@ github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod
|
||||||
github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
|
github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
|
||||||
github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
|
github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
|
||||||
github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
|
github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
|
||||||
github.com/jackc/pgproto3/v2 v2.1.1 h1:7PQ/4gLoqnl87ZxL7xjO0DR5gYuviDCZxQJsUlFW1eI=
|
|
||||||
github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
|
github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
|
||||||
|
github.com/jackc/pgproto3/v2 v2.2.0 h1:r7JypeP2D3onoQTCxWdTpCtJ4D+qpKr0TxvoyMhZ5ns=
|
||||||
|
github.com/jackc/pgproto3/v2 v2.2.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
|
||||||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg=
|
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg=
|
||||||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
|
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
|
||||||
github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg=
|
github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg=
|
||||||
github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=
|
github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=
|
||||||
github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=
|
github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=
|
||||||
github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM=
|
github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM=
|
||||||
github.com/jackc/pgtype v1.8.1 h1:9k0IXtdJXHJbyAWQgbWr1lU+MEhPXZz6RIXxfR5oxXs=
|
github.com/jackc/pgtype v1.9.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
|
||||||
github.com/jackc/pgtype v1.8.1/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
|
github.com/jackc/pgtype v1.9.1 h1:MJc2s0MFS8C3ok1wQTdQxWuXQcB6+HwAm5x1CzW7mf0=
|
||||||
|
github.com/jackc/pgtype v1.9.1/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
|
||||||
github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=
|
github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=
|
||||||
github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
|
github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
|
||||||
github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
|
github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
|
||||||
github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=
|
github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=
|
||||||
github.com/jackc/pgx/v4 v4.13.0 h1:JCjhT5vmhMAf/YwBHLvrBn4OGdIQBiFG6ym8Zmdx570=
|
github.com/jackc/pgx/v4 v4.14.0/go.mod h1:jT3ibf/A0ZVCp89rtCIN0zCJxcE74ypROmHEZYsG/j8=
|
||||||
github.com/jackc/pgx/v4 v4.13.0/go.mod h1:9P4X524sErlaxj0XSGZk7s+LD0eOyu1ZDUrrpznYDF0=
|
github.com/jackc/pgx/v4 v4.14.1 h1:71oo1KAGI6mXhLiTMn6iDFcp3e7+zon/capWjl2OEFU=
|
||||||
|
github.com/jackc/pgx/v4 v4.14.1/go.mod h1:RgDuE4Z34o7XE92RpLsvFiOEfrAUT0Xt2KxvX73W06M=
|
||||||
github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||||
github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||||
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||||
|
github.com/jackc/puddle v1.2.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||||
github.com/jinzhu/now v1.1.2 h1:eVKgfIdy9b6zbWBMgFpfDPoAMifwSZagU9HmEU6zgiI=
|
|
||||||
github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||||
|
github.com/jinzhu/now v1.1.3/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||||
|
github.com/jinzhu/now v1.1.4 h1:tHnRBy1i5F2Dh8BAFxqFzxKqqvezXrL2OW1TnX+Mlas=
|
||||||
|
github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||||
github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg=
|
github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg=
|
||||||
github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM=
|
||||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||||
|
@ -121,8 +125,8 @@ github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||||
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||||
github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8=
|
github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8=
|
||||||
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||||
github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
|
github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc=
|
||||||
github.com/matryer/moq v0.0.0-20200106131100-75d0ddfc0007/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ=
|
github.com/matryer/moq v0.2.3/go.mod h1:9RtPYjTnH1bSBIkpvtHkFN7nbWAnO7oRpdJkEIn6UtE=
|
||||||
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
|
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
|
||||||
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||||
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||||
|
@ -130,13 +134,12 @@ github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd
|
||||||
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||||
github.com/mattn/go-sqlite3 v1.14.9 h1:10HX2Td0ocZpYEjhilsuo6WWtUqttj2Kb0KtD86/KYA=
|
|
||||||
github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||||
github.com/mitchellh/mapstructure v0.0.0-20180203102830-a4e142e9c047/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
github.com/mattn/go-sqlite3 v1.14.11 h1:gt+cp9c0XGqe9S/wAHTL3n/7MqY+siPWgWJgqdsFrzQ=
|
||||||
github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo=
|
github.com/mattn/go-sqlite3 v1.14.11/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||||
github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
github.com/mitchellh/mapstructure v1.2.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||||
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
|
github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs=
|
||||||
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||||
github.com/otiai10/copy v1.7.0 h1:hVoPiN+t+7d2nzzwMiDHPSOogsWAStewq3TwU05+clE=
|
github.com/otiai10/copy v1.7.0 h1:hVoPiN+t+7d2nzzwMiDHPSOogsWAStewq3TwU05+clE=
|
||||||
github.com/otiai10/copy v1.7.0/go.mod h1:rmRl6QPdJj6EiUqXQ/4Nn2lLXoNQjFCQbbNrxgc/t3U=
|
github.com/otiai10/copy v1.7.0/go.mod h1:rmRl6QPdJj6EiUqXQ/4Nn2lLXoNQjFCQbbNrxgc/t3U=
|
||||||
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
|
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
|
||||||
|
@ -150,11 +153,11 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||||
github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
|
||||||
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
|
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
|
||||||
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
|
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
|
||||||
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
|
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
|
||||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
|
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
|
||||||
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
|
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
|
||||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||||
|
@ -163,15 +166,12 @@ github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNX
|
||||||
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
|
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
|
||||||
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
|
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
|
||||||
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||||
github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
|
|
||||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||||
github.com/shurcooL/vfsgen v0.0.0-20180121065927-ffb13db8def0/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
|
|
||||||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
||||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||||
github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
|
||||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||||
|
@ -181,16 +181,16 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc
|
||||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/strukturag/libheif v1.12.0 h1:Z5V5lCC5xbI59V77b4kGXcHsOohA6tQIvzLGIjhLsfY=
|
github.com/strukturag/libheif v1.12.0 h1:Z5V5lCC5xbI59V77b4kGXcHsOohA6tQIvzLGIjhLsfY=
|
||||||
github.com/strukturag/libheif v1.12.0/go.mod h1:E/PNRlmVtrtj9j2AvBZlrO4dsBDu6KfwDZn7X1Ce8Ks=
|
github.com/strukturag/libheif v1.12.0/go.mod h1:E/PNRlmVtrtj9j2AvBZlrO4dsBDu6KfwDZn7X1Ce8Ks=
|
||||||
github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
|
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
|
||||||
github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U=
|
|
||||||
github.com/vektah/gqlparser/v2 v2.2.0 h1:bAc3slekAAJW6sZTi07aGq0OrfaCjj4jxARAaC7g2EM=
|
|
||||||
github.com/vektah/gqlparser/v2 v2.2.0/go.mod h1:i3mQIGIrbK2PD1RrCeMTlVbkF2FJ6WkU1KJlJlC+3F4=
|
github.com/vektah/gqlparser/v2 v2.2.0/go.mod h1:i3mQIGIrbK2PD1RrCeMTlVbkF2FJ6WkU1KJlJlC+3F4=
|
||||||
|
github.com/vektah/gqlparser/v2 v2.3.1 h1:blIC0fCxGIr9pVjsc+BVI8XjYUtc2nCFRfnmP7FuFMk=
|
||||||
|
github.com/vektah/gqlparser/v2 v2.3.1/go.mod h1:i3mQIGIrbK2PD1RrCeMTlVbkF2FJ6WkU1KJlJlC+3F4=
|
||||||
github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0 h1:3UeQBvD0TFrlVjOeLOBz+CPAI8dnbqNSVwUwRrkp7vQ=
|
github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0 h1:3UeQBvD0TFrlVjOeLOBz+CPAI8dnbqNSVwUwRrkp7vQ=
|
||||||
github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0/go.mod h1:IXCdmsXIht47RaVFLEdVnh1t+pgYtTAhQGj73kz+2DM=
|
github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0/go.mod h1:IXCdmsXIht47RaVFLEdVnh1t+pgYtTAhQGj73kz+2DM=
|
||||||
github.com/xor-gate/goexif2 v1.1.0 h1:OvTZ5iEvsDhRWFjV5xY3wT7uHFna28nSSP7ucau+cXQ=
|
github.com/xor-gate/goexif2 v1.1.0 h1:OvTZ5iEvsDhRWFjV5xY3wT7uHFna28nSSP7ucau+cXQ=
|
||||||
github.com/xor-gate/goexif2 v1.1.0/go.mod h1:eRjn3VSkAwpNpxEx/CGmd0zg0JFGL3akrSMxnJ581AY=
|
github.com/xor-gate/goexif2 v1.1.0/go.mod h1:eRjn3VSkAwpNpxEx/CGmd0zg0JFGL3akrSMxnJ581AY=
|
||||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||||
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
|
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
|
||||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||||
|
@ -213,26 +213,27 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP
|
||||||
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa h1:idItI2DDfCokpg0N51B2VtiLdJ4vAuXC9fnCb2gACo4=
|
golang.org/x/crypto v0.0.0-20220128200615-198e4374d7ed h1:YoWVYYAfvQ4ddHv3OKmIvX7NCAhFGTj62VP2l2kfBbA=
|
||||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20220128200615-198e4374d7ed/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||||
golang.org/x/image v0.0.0-20211028202545-6944b10bf410 h1:hTftEOvwiOq2+O8k2D5/Q7COC7k5Qcrgc2TFURJYnvQ=
|
golang.org/x/image v0.0.0-20211028202545-6944b10bf410 h1:hTftEOvwiOq2+O8k2D5/Q7COC7k5Qcrgc2TFURJYnvQ=
|
||||||
golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
|
golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
|
||||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|
||||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
|
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
|
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||||
|
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
@ -243,8 +244,11 @@ golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
|
@ -259,15 +263,14 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm
|
||||||
golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||||
golang.org/x/tools v0.0.0-20190515012406-7d7faa4812bd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
|
||||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||||
golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
golang.org/x/tools v0.0.0-20200815165600-90abf76919f3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||||
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
@ -283,21 +286,20 @@ gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:a
|
||||||
gopkg.in/vansante/go-ffprobe.v2 v2.0.3 h1:nmR7yLalb5p5UmXhXUYnrsIkbb8j7h2OYMDoLETCQ5U=
|
gopkg.in/vansante/go-ffprobe.v2 v2.0.3 h1:nmR7yLalb5p5UmXhXUYnrsIkbb8j7h2OYMDoLETCQ5U=
|
||||||
gopkg.in/vansante/go-ffprobe.v2 v2.0.3/go.mod h1:qF0AlAjk7Nqzqf3y333Ly+KxN3cKF2JqA3JT5ZheUGE=
|
gopkg.in/vansante/go-ffprobe.v2 v2.0.3/go.mod h1:qF0AlAjk7Nqzqf3y333Ly+KxN3cKF2JqA3JT5ZheUGE=
|
||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
|
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
|
||||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gorm.io/driver/mysql v1.1.3 h1:+5g1UElqN0sr2gZqmg9djlu1zT3cErHiscc6+IbLHgw=
|
gorm.io/driver/mysql v1.2.3 h1:cZqzlOfg5Kf1VIdLC1D9hT6Cy9BgxhExLj/2tIgUe7Y=
|
||||||
gorm.io/driver/mysql v1.1.3/go.mod h1:4P/X9vSc3WTrhTLZ259cpFd6xKNYiSSdSZngkSBGIMM=
|
gorm.io/driver/mysql v1.2.3/go.mod h1:qsiz+XcAyMrS6QY+X3M9R6b/lKM1imKmcuK9kac5LTo=
|
||||||
gorm.io/driver/postgres v1.2.1 h1:JDQKnF7MC51dgL09Vbydc5kl83KkVDlcXfSPJ+xhh68=
|
gorm.io/driver/postgres v1.2.3 h1:f4t0TmNMy9gh3TU2PX+EppoA6YsgFnyq8Ojtddb42To=
|
||||||
gorm.io/driver/postgres v1.2.1/go.mod h1:SHRZhu+D0tLOHV5qbxZRUM6kBcf3jp/kxPz2mYMTsNY=
|
gorm.io/driver/postgres v1.2.3/go.mod h1:pJV6RgYQPG47aM1f0QeOzFH9HxQc8JcmAgjRCgS0wjs=
|
||||||
gorm.io/driver/sqlite v1.2.3 h1:OwKm0xRAnsZMWAl5BtXJ9BsXAZHIt802DOTVMQuzWN8=
|
gorm.io/driver/sqlite v1.2.6 h1:SStaH/b+280M7C8vXeZLz/zo9cLQmIGwwj3cSj7p6l4=
|
||||||
gorm.io/driver/sqlite v1.2.3/go.mod h1:wkiGvZF3le/8vjCRYg0bT8TSw6APZ5rtgKW8uQYE3sc=
|
gorm.io/driver/sqlite v1.2.6/go.mod h1:gyoX0vHiiwi0g49tv+x2E7l8ksauLK0U/gShcdUsjWY=
|
||||||
gorm.io/gorm v1.21.12/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0=
|
gorm.io/gorm v1.22.3/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0=
|
||||||
gorm.io/gorm v1.22.0/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0=
|
gorm.io/gorm v1.22.4/go.mod h1:1aeVC+pe9ZmvKZban/gW4QPra7PRoTEssyc922qCAkk=
|
||||||
gorm.io/gorm v1.22.2 h1:1iKcvyJnR5bHydBhDqTwasOkoo6+o4Ms5cknSt6qP7I=
|
gorm.io/gorm v1.22.5 h1:lYREBgc02Be/5lSCTuysZZDb6ffL2qrat6fg9CFbvXU=
|
||||||
gorm.io/gorm v1.22.2/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0=
|
gorm.io/gorm v1.22.5/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
|
||||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||||
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
|
|
||||||
sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67/go.mod h1:L5q+DGLGOQFpo1snNEkLOJT2d1YTW66rWNzatr3He1k=
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -9,20 +9,20 @@
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"description": "UI app for Photoview",
|
"description": "UI app for Photoview",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apollo/client": "^3.3.21",
|
"@apollo/client": "^3.5.8",
|
||||||
"@babel/preset-typescript": "^7.14.5",
|
"@babel/preset-typescript": "^7.16.7",
|
||||||
"@craco/craco": "^6.2.0",
|
"@craco/craco": "^6.4.3",
|
||||||
"@headlessui/react": "^1.4.1",
|
"@headlessui/react": "^1.4.3",
|
||||||
"@react-aria/focus": "^3.4.0",
|
"@react-aria/focus": "^3.5.0",
|
||||||
"@rollup/plugin-babel": "^5.3.0",
|
"@rollup/plugin-babel": "^5.3.0",
|
||||||
"@types/geojson": "^7946.0.8",
|
"@types/geojson": "^7946.0.8",
|
||||||
"@types/jest": "^26.0.24",
|
"@types/jest": "^27.4.0",
|
||||||
"@types/mapbox-gl": "^2.3.3",
|
"@types/mapbox-gl": "^2.6.0",
|
||||||
"@types/react": "^17.0.14",
|
"@types/react": "^17.0.38",
|
||||||
"@types/react-dom": "^17.0.9",
|
"@types/react-dom": "^17.0.11",
|
||||||
"@types/react-helmet": "^6.1.2",
|
"@types/react-helmet": "^6.1.5",
|
||||||
"@types/react-router-dom": "^5.1.8",
|
"@types/react-router-dom": "^5.3.3",
|
||||||
"@types/styled-components": "^5.1.11",
|
"@types/styled-components": "^5.1.21",
|
||||||
"@types/url-join": "^4.0.1",
|
"@types/url-join": "^4.0.1",
|
||||||
"autoprefixer": "^9.8.6",
|
"autoprefixer": "^9.8.6",
|
||||||
"babel-plugin-graphql-tag": "^3.3.0",
|
"babel-plugin-graphql-tag": "^3.3.0",
|
||||||
|
@ -30,28 +30,28 @@
|
||||||
"connect-history-api-fallback": "^1.6.0",
|
"connect-history-api-fallback": "^1.6.0",
|
||||||
"copy-to-clipboard": "^3.3.1",
|
"copy-to-clipboard": "^3.3.1",
|
||||||
"eslint-config-prettier": "^8.3.0",
|
"eslint-config-prettier": "^8.3.0",
|
||||||
"eslint-plugin-jest-dom": "^3.9.0",
|
"eslint-plugin-jest-dom": "^4.0.1",
|
||||||
"fs-extra": "^10.0.0",
|
"fs-extra": "^10.0.0",
|
||||||
"i18next": "^20.3.2",
|
"i18next": "^21.6.10",
|
||||||
"mapbox-gl": "^2.3.1",
|
"mapbox-gl": "^2.6.1",
|
||||||
"postcss": "^7.0.36",
|
"postcss": "^7.0.36",
|
||||||
"prettier": "^2.3.2",
|
"prettier": "^2.5.1",
|
||||||
"prop-types": "^15.7.2",
|
"prop-types": "^15.8.1",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"react-helmet": "^6.1.0",
|
"react-helmet": "^6.1.0",
|
||||||
"react-hook-form": "^7.11.0",
|
"react-hook-form": "^7.25.3",
|
||||||
"react-i18next": "^11.11.1",
|
"react-i18next": "^11.15.3",
|
||||||
"react-router-dom": "^5.2.0",
|
"react-router-dom": "^6.2.1",
|
||||||
"react-router-prop-types": "^1.0.5",
|
"react-router-prop-types": "^1.0.5",
|
||||||
"react-scripts": "^4.0.3",
|
"react-scripts": "^4.0.3",
|
||||||
"react-spring": "^8.0.27",
|
"react-spring": "^8.0.27",
|
||||||
"react-test-renderer": "^17.0.2",
|
"react-test-renderer": "^17.0.2",
|
||||||
"styled-components": "^5.3.0",
|
"styled-components": "^5.3.3",
|
||||||
"subscriptions-transport-ws": "^0.9.19",
|
"subscriptions-transport-ws": "^0.11.0",
|
||||||
"tailwind-override": "^0.2.3",
|
"tailwind-override": "^0.6.1",
|
||||||
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.4",
|
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.17",
|
||||||
"typescript": "^4.3.5",
|
"typescript": "^4.5.5",
|
||||||
"url-join": "^4.0.1"
|
"url-join": "^4.0.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -69,15 +69,15 @@
|
||||||
"prepare": "(cd .. && npx husky install)"
|
"prepare": "(cd .. && npx husky install)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@testing-library/jest-dom": "^5.14.1",
|
"@testing-library/jest-dom": "^5.16.1",
|
||||||
"@testing-library/react": "^12.0.0",
|
"@testing-library/react": "^12.1.2",
|
||||||
"@testing-library/user-event": "^13.1.9",
|
"@testing-library/user-event": "^13.5.0",
|
||||||
"apollo": "2.33.4",
|
"apollo": "2.33.9",
|
||||||
"apollo-language-server": "1.26.3",
|
"apollo-language-server": "1.26.7",
|
||||||
"husky": "^6.0.0",
|
"husky": "^7.0.4",
|
||||||
"i18next-parser": "^4.2.0",
|
"i18next-parser": "^5.4.0",
|
||||||
"lint-staged": "^11.0.1",
|
"lint-staged": "^12.3.2",
|
||||||
"tsc-files": "^1.1.2"
|
"tsc-files": "1.1.2"
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"trailingComma": "es5",
|
"trailingComma": "es5",
|
||||||
|
|
|
@ -8,6 +8,8 @@ import PaginateLoader from '../../components/PaginateLoader'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { albumQuery, albumQueryVariables } from './__generated__/albumQuery'
|
import { albumQuery, albumQueryVariables } from './__generated__/albumQuery'
|
||||||
import useOrderingParams from '../../hooks/useOrderingParams'
|
import useOrderingParams from '../../hooks/useOrderingParams'
|
||||||
|
import { useParams } from 'react-router-dom'
|
||||||
|
import { isNil } from '../../helpers/utils'
|
||||||
|
|
||||||
const ALBUM_QUERY = gql`
|
const ALBUM_QUERY = gql`
|
||||||
query albumQuery(
|
query albumQuery(
|
||||||
|
@ -61,17 +63,10 @@ const ALBUM_QUERY = gql`
|
||||||
let refetchNeededAll = false
|
let refetchNeededAll = false
|
||||||
let refetchNeededFavorites = false
|
let refetchNeededFavorites = false
|
||||||
|
|
||||||
type AlbumPageProps = {
|
function AlbumPage() {
|
||||||
match: {
|
const { id: albumId } = useParams()
|
||||||
params: {
|
if (isNil(albumId))
|
||||||
id: string
|
throw new Error('Expected parameter `id` to be defined for AlbumPage')
|
||||||
subPage: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function AlbumPage({ match }: AlbumPageProps) {
|
|
||||||
const albumId = match.params.id
|
|
||||||
|
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { gql, useQuery, useMutation } from '@apollo/client'
|
import { gql, useQuery, useMutation } from '@apollo/client'
|
||||||
import { Redirect } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
import { Container } from './loginUtilities'
|
import { Container } from './loginUtilities'
|
||||||
|
|
||||||
import { checkInitialSetupQuery, login } from './loginUtilities'
|
import { checkInitialSetupQuery, login } from './loginUtilities'
|
||||||
|
@ -37,6 +37,7 @@ type InitialSetupFormData = {
|
||||||
|
|
||||||
const InitialSetupPage = () => {
|
const InitialSetupPage = () => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
const navigate = useNavigate()
|
||||||
|
|
||||||
const {
|
const {
|
||||||
register,
|
register,
|
||||||
|
@ -45,16 +46,18 @@ const InitialSetupPage = () => {
|
||||||
} = useForm<InitialSetupFormData>()
|
} = useForm<InitialSetupFormData>()
|
||||||
|
|
||||||
if (authToken()) {
|
if (authToken()) {
|
||||||
return <Redirect to="/" />
|
navigate('/')
|
||||||
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
const { data: initialSetupData } = useQuery<CheckInitialSetup>(
|
const { data: initialSetupData } = useQuery<CheckInitialSetup>(
|
||||||
checkInitialSetupQuery
|
checkInitialSetupQuery
|
||||||
)
|
)
|
||||||
const initialSetupRedirect = initialSetupData?.siteInfo
|
|
||||||
?.initialSetup ? null : (
|
if (initialSetupData?.siteInfo?.initialSetup) {
|
||||||
<Redirect to="/" />
|
navigate('/')
|
||||||
)
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
const [authorize, { loading: authorizeLoading, data: authorizationData }] =
|
const [authorize, { loading: authorizeLoading, data: authorizationData }] =
|
||||||
useMutation(initialSetupMutation, {
|
useMutation(initialSetupMutation, {
|
||||||
|
@ -84,7 +87,6 @@ const InitialSetupPage = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{initialSetupRedirect}
|
|
||||||
<Container>
|
<Container>
|
||||||
<h1 className="text-center text-xl">
|
<h1 className="text-center text-xl">
|
||||||
{t('login_page.initial_setup.title', 'Initial Setup')}
|
{t('login_page.initial_setup.title', 'Initial Setup')}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { useQuery, gql, useMutation } from '@apollo/client'
|
import { useQuery, gql, useMutation } from '@apollo/client'
|
||||||
import { useForm, SubmitHandler } from 'react-hook-form'
|
import { useForm } from 'react-hook-form'
|
||||||
import { checkInitialSetupQuery, login } from './loginUtilities'
|
import { checkInitialSetupQuery, login } from './loginUtilities'
|
||||||
import { authToken } from '../../helpers/authentication'
|
import { authToken } from '../../helpers/authentication'
|
||||||
|
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { Helmet } from 'react-helmet'
|
import { Helmet } from 'react-helmet'
|
||||||
import { Redirect } from 'react-router'
|
import { useNavigate } from 'react-router'
|
||||||
import { TextField } from '../../primitives/form/Input'
|
import { TextField } from '../../primitives/form/Input'
|
||||||
import MessageBox from '../../primitives/form/MessageBox'
|
import MessageBox from '../../primitives/form/MessageBox'
|
||||||
import { CheckInitialSetup } from './__generated__/CheckInitialSetup'
|
import { CheckInitialSetup } from './__generated__/CheckInitialSetup'
|
||||||
|
@ -45,7 +45,7 @@ const LoginForm = () => {
|
||||||
register,
|
register,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
formState: { errors: formErrors },
|
formState: { errors: formErrors },
|
||||||
} = useForm()
|
} = useForm<LoginInputs>()
|
||||||
|
|
||||||
const [authorize, { loading, data }] = useMutation<
|
const [authorize, { loading, data }] = useMutation<
|
||||||
Authorize,
|
Authorize,
|
||||||
|
@ -60,7 +60,7 @@ const LoginForm = () => {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const onSubmit: SubmitHandler<LoginInputs> = data => {
|
const onSubmit = (data: LoginInputs) => {
|
||||||
authorize({
|
authorize({
|
||||||
variables: {
|
variables: {
|
||||||
username: data.username,
|
username: data.username,
|
||||||
|
@ -127,13 +127,20 @@ type LoginInputs = {
|
||||||
|
|
||||||
const LoginPage = () => {
|
const LoginPage = () => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
const navigate = useNavigate()
|
||||||
|
|
||||||
const { data: initialSetupData } = useQuery<CheckInitialSetup>(
|
const { data: initialSetupData } = useQuery<CheckInitialSetup>(
|
||||||
checkInitialSetupQuery
|
checkInitialSetupQuery
|
||||||
)
|
)
|
||||||
|
|
||||||
if (authToken()) {
|
if (authToken()) {
|
||||||
return <Redirect to="/" />
|
navigate('/')
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
if (initialSetupData?.siteInfo?.initialSetup) {
|
||||||
|
navigate('initialSetup')
|
||||||
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -141,9 +148,6 @@ const LoginPage = () => {
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t('title.login', 'Login')} - Photoview</title>
|
<title>{t('title.login', 'Login')} - Photoview</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
{initialSetupData?.siteInfo?.initialSetup && (
|
|
||||||
<Redirect to="/initialSetup" />
|
|
||||||
)}
|
|
||||||
<div>
|
<div>
|
||||||
<LogoHeader />
|
<LogoHeader />
|
||||||
<LoginForm />
|
<LoginForm />
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { fireEvent, render, screen, waitFor } from '@testing-library/react'
|
import { fireEvent, render, screen, waitFor } from '@testing-library/react'
|
||||||
import PeoplePage, {
|
import {
|
||||||
|
PeoplePage,
|
||||||
FaceDetails,
|
FaceDetails,
|
||||||
FaceGroup,
|
FaceGroup,
|
||||||
MY_FACES_QUERY,
|
MY_FACES_QUERY,
|
||||||
|
@ -69,16 +70,10 @@ describe('PeoplePage component', () => {
|
||||||
]
|
]
|
||||||
|
|
||||||
test('people page', async () => {
|
test('people page', async () => {
|
||||||
const matchMock = {
|
|
||||||
params: {
|
|
||||||
person: undefined,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
render(
|
render(
|
||||||
<MemoryRouter initialEntries={['/people']}>
|
<MemoryRouter initialEntries={['/people']}>
|
||||||
<MockedProvider mocks={graphqlMocks} addTypename={false}>
|
<MockedProvider mocks={graphqlMocks} addTypename={false}>
|
||||||
<PeoplePage match={matchMock} />
|
<PeoplePage />
|
||||||
</MockedProvider>
|
</MockedProvider>
|
||||||
</MemoryRouter>
|
</MemoryRouter>
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,7 +2,7 @@ import React, { createRef, useEffect, useState } from 'react'
|
||||||
import { gql, useMutation, useQuery } from '@apollo/client'
|
import { gql, useMutation, useQuery } from '@apollo/client'
|
||||||
import Layout from '../../components/layout/Layout'
|
import Layout from '../../components/layout/Layout'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { Link } from 'react-router-dom'
|
import { Link, useParams } from 'react-router-dom'
|
||||||
import SingleFaceGroup from './SingleFaceGroup/SingleFaceGroup'
|
import SingleFaceGroup from './SingleFaceGroup/SingleFaceGroup'
|
||||||
import { Button, TextField } from '../../primitives/form/Input'
|
import { Button, TextField } from '../../primitives/form/Input'
|
||||||
import FaceCircleImage from './FaceCircleImage'
|
import FaceCircleImage from './FaceCircleImage'
|
||||||
|
@ -19,7 +19,7 @@ import {
|
||||||
myFaces_myFaceGroups,
|
myFaces_myFaceGroups,
|
||||||
} from './__generated__/myFaces'
|
} from './__generated__/myFaces'
|
||||||
import { recognizeUnlabeledFaces } from './__generated__/recognizeUnlabeledFaces'
|
import { recognizeUnlabeledFaces } from './__generated__/recognizeUnlabeledFaces'
|
||||||
import { tailwindClassNames } from '../../helpers/utils'
|
import { isNil, tailwindClassNames } from '../../helpers/utils'
|
||||||
|
|
||||||
export const MY_FACES_QUERY = gql`
|
export const MY_FACES_QUERY = gql`
|
||||||
query myFaces($limit: Int, $offset: Int) {
|
query myFaces($limit: Int, $offset: Int) {
|
||||||
|
@ -219,7 +219,10 @@ const FaceGroupsWrapper = styled.div`
|
||||||
margin-top: 24px;
|
margin-top: 24px;
|
||||||
`
|
`
|
||||||
|
|
||||||
const PeopleGallery = () => {
|
/**
|
||||||
|
* Renders a page that shows a gallery of all people
|
||||||
|
*/
|
||||||
|
export const PeoplePage = () => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const { data, error, loading, fetchMore } = useQuery<
|
const { data, error, loading, fetchMore } = useQuery<
|
||||||
myFaces,
|
myFaces,
|
||||||
|
@ -275,26 +278,18 @@ const PeopleGallery = () => {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
type PeoplePageProps = {
|
/**
|
||||||
match: {
|
* Renders a page for an individual person
|
||||||
params: {
|
*/
|
||||||
person?: string
|
export const PersonPage = () => {
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const PeoplePage = ({ match }: PeoplePageProps) => {
|
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const faceGroup = match.params.person
|
const { person } = useParams()
|
||||||
if (faceGroup) {
|
if (isNil(person))
|
||||||
return (
|
throw new Error('Expected `person` parameter to be defined')
|
||||||
<Layout title={t('title.people', 'People')}>
|
|
||||||
<SingleFaceGroup faceGroupID={faceGroup} />
|
|
||||||
</Layout>
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
return <PeopleGallery />
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default PeoplePage
|
return (
|
||||||
|
<Layout title={t('title.people', 'People')}>
|
||||||
|
<SingleFaceGroup faceGroupID={person} />
|
||||||
|
</Layout>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { BaseMutationOptions, gql, useMutation } from '@apollo/client'
|
import { BaseMutationOptions, gql, useMutation } from '@apollo/client'
|
||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { useHistory } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
import { isNil } from '../../../helpers/utils'
|
import { isNil } from '../../../helpers/utils'
|
||||||
import Modal from '../../../primitives/Modal'
|
import Modal from '../../../primitives/Modal'
|
||||||
import { MY_FACES_QUERY } from '../PeoplePage'
|
import { MY_FACES_QUERY } from '../PeoplePage'
|
||||||
|
@ -78,7 +78,7 @@ const DetachImageFacesModal = ({
|
||||||
const [selectedImageFaces, setSelectedImageFaces] = useState<
|
const [selectedImageFaces, setSelectedImageFaces] = useState<
|
||||||
(myFaces_myFaceGroups_imageFaces | singleFaceGroup_faceGroup_imageFaces)[]
|
(myFaces_myFaceGroups_imageFaces | singleFaceGroup_faceGroup_imageFaces)[]
|
||||||
>([])
|
>([])
|
||||||
const history = useHistory()
|
const navigate = useNavigate()
|
||||||
|
|
||||||
const detachImageFacesMutation = useDetachImageFaces({
|
const detachImageFacesMutation = useDetachImageFaces({
|
||||||
refetchQueries: [
|
refetchQueries: [
|
||||||
|
@ -92,7 +92,7 @@ const DetachImageFacesModal = ({
|
||||||
detachImageFacesMutation(selectedImageFaces).then(({ data }) => {
|
detachImageFacesMutation(selectedImageFaces).then(({ data }) => {
|
||||||
if (isNil(data)) throw new Error('Expected data not to be null')
|
if (isNil(data)) throw new Error('Expected data not to be null')
|
||||||
setOpen(false)
|
setOpen(false)
|
||||||
history.push(`/people/${data.detachImageFaces.id}`)
|
navigate(`/people/${data.detachImageFaces.id}`)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { gql, PureQueryOptions, useMutation, useQuery } from '@apollo/client'
|
import { gql, PureQueryOptions, useMutation, useQuery } from '@apollo/client'
|
||||||
import React, { useState } from 'react'
|
import React, { useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { useHistory } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
import { isNil } from '../../../helpers/utils'
|
import { isNil } from '../../../helpers/utils'
|
||||||
import Modal from '../../../primitives/Modal'
|
import Modal from '../../../primitives/Modal'
|
||||||
import { MY_FACES_QUERY } from '../PeoplePage'
|
import { MY_FACES_QUERY } from '../PeoplePage'
|
||||||
|
@ -50,7 +50,7 @@ const MergeFaceGroupsModal = ({
|
||||||
myFaces_myFaceGroups | singleFaceGroup_faceGroup | null
|
myFaces_myFaceGroups | singleFaceGroup_faceGroup | null
|
||||||
>(null)
|
>(null)
|
||||||
|
|
||||||
const history = useHistory()
|
const navigate = useNavigate()
|
||||||
const { data } = useQuery<myFaces, myFacesVariables>(MY_FACES_QUERY)
|
const { data } = useQuery<myFaces, myFacesVariables>(MY_FACES_QUERY)
|
||||||
const [combineFacesMutation] = useMutation<
|
const [combineFacesMutation] = useMutation<
|
||||||
combineFaces,
|
combineFaces,
|
||||||
|
@ -74,7 +74,7 @@ const MergeFaceGroupsModal = ({
|
||||||
},
|
},
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
setOpen(false)
|
setOpen(false)
|
||||||
history.push(`/people/${selectedFaceGroup.id}`)
|
navigate(`/people/${selectedFaceGroup.id}`)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { gql, useLazyQuery, useMutation } from '@apollo/client'
|
import { gql, useLazyQuery, useMutation } from '@apollo/client'
|
||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
import { useHistory } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
import SelectFaceGroupTable from './SelectFaceGroupTable'
|
import SelectFaceGroupTable from './SelectFaceGroupTable'
|
||||||
import SelectImageFacesTable from './SelectImageFacesTable'
|
import SelectImageFacesTable from './SelectImageFacesTable'
|
||||||
import { MY_FACES_QUERY } from '../PeoplePage'
|
import { MY_FACES_QUERY } from '../PeoplePage'
|
||||||
|
@ -61,7 +61,7 @@ const MoveImageFacesModal = ({
|
||||||
myFaces_myFaceGroups | singleFaceGroup_faceGroup | null
|
myFaces_myFaceGroups | singleFaceGroup_faceGroup | null
|
||||||
>(null)
|
>(null)
|
||||||
const [imagesSelected, setImagesSelected] = useState(false)
|
const [imagesSelected, setImagesSelected] = useState(false)
|
||||||
const history = useHistory()
|
const navigate = useNavigate()
|
||||||
|
|
||||||
const [moveImageFacesMutation] = useMutation<
|
const [moveImageFacesMutation] = useMutation<
|
||||||
moveImageFaces,
|
moveImageFaces,
|
||||||
|
@ -115,7 +115,7 @@ const MoveImageFacesModal = ({
|
||||||
},
|
},
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
setOpen(false)
|
setOpen(false)
|
||||||
history.push(`/people/${selectedFaceGroup.id}`)
|
navigate(`/people/${selectedFaceGroup.id}`)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ import React from 'react'
|
||||||
import { render, screen, waitFor } from '@testing-library/react'
|
import { render, screen, waitFor } from '@testing-library/react'
|
||||||
import { MockedProvider } from '@apollo/client/testing'
|
import { MockedProvider } from '@apollo/client/testing'
|
||||||
import SingleFaceGroup, { SINGLE_FACE_GROUP } from './SingleFaceGroup'
|
import SingleFaceGroup, { SINGLE_FACE_GROUP } from './SingleFaceGroup'
|
||||||
|
import { MemoryRouter } from 'react-router-dom'
|
||||||
|
|
||||||
jest.mock('../../../hooks/useScrollPagination')
|
jest.mock('../../../hooks/useScrollPagination')
|
||||||
|
|
||||||
|
@ -83,9 +84,11 @@ test('single face group', async () => {
|
||||||
]
|
]
|
||||||
|
|
||||||
render(
|
render(
|
||||||
<MockedProvider mocks={graphqlMocks}>
|
<MemoryRouter initialEntries={['/person/123']}>
|
||||||
<SingleFaceGroup faceGroupID="123" />
|
<MockedProvider mocks={graphqlMocks}>
|
||||||
</MockedProvider>
|
<SingleFaceGroup faceGroupID="123" />
|
||||||
|
</MockedProvider>
|
||||||
|
</MemoryRouter>
|
||||||
)
|
)
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { MemoryRouter } from 'react-router-dom'
|
import { MemoryRouter, Routes, Route } from 'react-router-dom'
|
||||||
import { MockedProvider } from '@apollo/client/testing'
|
import { MockedProvider } from '@apollo/client/testing'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -8,8 +8,9 @@ import {
|
||||||
waitForElementToBeRemoved,
|
waitForElementToBeRemoved,
|
||||||
} from '@testing-library/react'
|
} from '@testing-library/react'
|
||||||
|
|
||||||
import SharePage, {
|
import {
|
||||||
SHARE_TOKEN_QUERY,
|
SHARE_TOKEN_QUERY,
|
||||||
|
TokenRoute,
|
||||||
VALIDATE_TOKEN_PASSWORD_QUERY,
|
VALIDATE_TOKEN_PASSWORD_QUERY,
|
||||||
} from './SharePage'
|
} from './SharePage'
|
||||||
|
|
||||||
|
@ -21,13 +22,6 @@ jest.mock('../../hooks/useScrollPagination')
|
||||||
describe('load correct share page, based on graphql query', () => {
|
describe('load correct share page, based on graphql query', () => {
|
||||||
const token = 'TOKEN123'
|
const token = 'TOKEN123'
|
||||||
|
|
||||||
const matchMock = {
|
|
||||||
url: `/share`,
|
|
||||||
params: {},
|
|
||||||
path: `/share`,
|
|
||||||
isExact: false,
|
|
||||||
}
|
|
||||||
|
|
||||||
const historyMock = [{ pathname: `/share/${token}` }]
|
const historyMock = [{ pathname: `/share/${token}` }]
|
||||||
|
|
||||||
const graphqlMocks = [
|
const graphqlMocks = [
|
||||||
|
@ -101,7 +95,9 @@ describe('load correct share page, based on graphql query', () => {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MemoryRouter initialEntries={historyMock}>
|
<MemoryRouter initialEntries={historyMock}>
|
||||||
<SharePage match={matchMock} />
|
<Routes>
|
||||||
|
<Route path="/share/:token" element={<TokenRoute />} />
|
||||||
|
</Routes>
|
||||||
</MemoryRouter>
|
</MemoryRouter>
|
||||||
</MockedProvider>
|
</MockedProvider>
|
||||||
)
|
)
|
||||||
|
@ -176,13 +172,93 @@ describe('load correct share page, based on graphql query', () => {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MemoryRouter initialEntries={historyMock}>
|
<MemoryRouter initialEntries={historyMock}>
|
||||||
<SharePage match={matchMock} />
|
<Routes>
|
||||||
|
<Route path="/share/:token" element={<TokenRoute />} />
|
||||||
|
</Routes>
|
||||||
</MemoryRouter>
|
</MemoryRouter>
|
||||||
</MockedProvider>
|
</MockedProvider>
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(screen.getByText('Loading...')).toBeInTheDocument()
|
expect(screen.getByText('Loading...')).toBeInTheDocument()
|
||||||
|
await waitForElementToBeRemoved(() => screen.getByText('Loading...'))
|
||||||
|
|
||||||
|
expect(screen.getByTestId('Layout')).toBeInTheDocument()
|
||||||
|
expect(screen.getByTestId('AlbumSharePage')).toBeInTheDocument()
|
||||||
|
})
|
||||||
|
|
||||||
|
test('load subalbum of a shared album', async () => {
|
||||||
|
const subalbumID = '456'
|
||||||
|
const subalbumHistoryMock = [{ pathname: `/share/${token}/${subalbumID}` }]
|
||||||
|
|
||||||
|
const subalbumPageMocks = [
|
||||||
|
{
|
||||||
|
request: {
|
||||||
|
query: SHARE_TOKEN_QUERY,
|
||||||
|
variables: {
|
||||||
|
token,
|
||||||
|
password: null,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
result: {
|
||||||
|
data: {
|
||||||
|
shareToken: {
|
||||||
|
token: token,
|
||||||
|
album: {
|
||||||
|
id: subalbumID,
|
||||||
|
},
|
||||||
|
media: null,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
request: {
|
||||||
|
query: SHARE_ALBUM_QUERY,
|
||||||
|
variables: {
|
||||||
|
id: subalbumID,
|
||||||
|
token: token,
|
||||||
|
password: null,
|
||||||
|
limit: 200,
|
||||||
|
offset: 0,
|
||||||
|
mediaOrderBy: 'date_shot',
|
||||||
|
mediaOrderDirection: 'ASC',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
result: {
|
||||||
|
data: {
|
||||||
|
album: {
|
||||||
|
id: '1',
|
||||||
|
title: 'album_title',
|
||||||
|
subAlbums: [],
|
||||||
|
thumbnail: {
|
||||||
|
url: 'https://photoview.example.com/album_thumbnail.jpg',
|
||||||
|
},
|
||||||
|
media: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
render(
|
||||||
|
<MockedProvider
|
||||||
|
mocks={[...graphqlMocks, ...subalbumPageMocks]}
|
||||||
|
addTypename={false}
|
||||||
|
defaultOptions={{
|
||||||
|
// disable cache, required to make fragments work
|
||||||
|
watchQuery: { fetchPolicy: 'no-cache' },
|
||||||
|
query: { fetchPolicy: 'no-cache' },
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<MemoryRouter initialEntries={subalbumHistoryMock}>
|
||||||
|
<Routes>
|
||||||
|
<Route path="/share/:token/*" element={<TokenRoute />} />
|
||||||
|
</Routes>
|
||||||
|
</MemoryRouter>
|
||||||
|
</MockedProvider>
|
||||||
|
)
|
||||||
|
|
||||||
|
expect(screen.getByText('Loading...')).toBeInTheDocument()
|
||||||
await waitForElementToBeRemoved(() => screen.getByText('Loading...'))
|
await waitForElementToBeRemoved(() => screen.getByText('Loading...'))
|
||||||
|
|
||||||
expect(screen.getByTestId('Layout')).toBeInTheDocument()
|
expect(screen.getByTestId('Layout')).toBeInTheDocument()
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import PropTypes from 'prop-types'
|
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { useQuery, gql } from '@apollo/client'
|
import { useQuery, gql } from '@apollo/client'
|
||||||
import { match as MatchType, Route, Switch } from 'react-router-dom'
|
import { Route, Routes, useParams } from 'react-router-dom'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import {
|
import {
|
||||||
getSharePassword,
|
getSharePassword,
|
||||||
|
@ -11,6 +10,7 @@ import AlbumSharePage from './AlbumSharePage'
|
||||||
import MediaSharePage from './MediaSharePage'
|
import MediaSharePage from './MediaSharePage'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import PasswordProtectedShare from './PasswordProtectedShare'
|
import PasswordProtectedShare from './PasswordProtectedShare'
|
||||||
|
import { isNil } from '../../helpers/utils'
|
||||||
|
|
||||||
export const SHARE_TOKEN_QUERY = gql`
|
export const SHARE_TOKEN_QUERY = gql`
|
||||||
query SharePageToken($token: String!, $password: String) {
|
query SharePageToken($token: String!, $password: String) {
|
||||||
|
@ -77,10 +77,16 @@ export const VALIDATE_TOKEN_PASSWORD_QUERY = gql`
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
const AuthorizedTokenRoute = ({ match }: MatchProps<TokenRouteMatch>) => {
|
const tokenFromParams = () => {
|
||||||
|
const { token } = useParams()
|
||||||
|
if (isNil(token)) throw new Error('Expected `token` param to be defined')
|
||||||
|
return token
|
||||||
|
}
|
||||||
|
|
||||||
|
const AuthorizedTokenRoute = () => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
|
||||||
const token = match.params.token
|
const token = tokenFromParams()
|
||||||
const password = getSharePassword(token)
|
const password = getSharePassword(token)
|
||||||
|
|
||||||
const { loading, error, data } = useQuery(SHARE_TOKEN_QUERY, {
|
const { loading, error, data } = useQuery(SHARE_TOKEN_QUERY, {
|
||||||
|
@ -94,35 +100,30 @@ const AuthorizedTokenRoute = ({ match }: MatchProps<TokenRouteMatch>) => {
|
||||||
if (loading) return <div>{t('general.loading.default', 'Loading...')}</div>
|
if (loading) return <div>{t('general.loading.default', 'Loading...')}</div>
|
||||||
|
|
||||||
if (data.shareToken.album) {
|
if (data.shareToken.album) {
|
||||||
const SharedSubAlbumPage = ({ match }: MatchProps<SubalbumRouteMatch>) => {
|
const SharedSubAlbumPage = () => {
|
||||||
|
const { subAlbum } = useParams()
|
||||||
|
if (isNil(subAlbum))
|
||||||
|
throw new Error('Expected `subAlbum` param to be defined')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AlbumSharePage
|
<AlbumSharePage albumID={subAlbum} token={token} password={password} />
|
||||||
albumID={match.params.subAlbum}
|
|
||||||
token={token}
|
|
||||||
password={password}
|
|
||||||
/>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
SharedSubAlbumPage.propTypes = {
|
|
||||||
match: PropTypes.any,
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Switch>
|
<Routes>
|
||||||
|
<Route path=":subAlbum" element={<SharedSubAlbumPage />} />
|
||||||
<Route
|
<Route
|
||||||
exact
|
index
|
||||||
path={`${match.path}/:subAlbum`}
|
element={
|
||||||
component={SharedSubAlbumPage}
|
<AlbumSharePage
|
||||||
|
albumID={data.shareToken.album.id}
|
||||||
|
token={token}
|
||||||
|
password={password}
|
||||||
|
/>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<Route exact path={match.path}>
|
</Routes>
|
||||||
<AlbumSharePage
|
|
||||||
albumID={data.shareToken.album.id}
|
|
||||||
token={token}
|
|
||||||
password={password}
|
|
||||||
/>
|
|
||||||
</Route>
|
|
||||||
</Switch>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,39 +134,22 @@ const AuthorizedTokenRoute = ({ match }: MatchProps<TokenRouteMatch>) => {
|
||||||
return <h1>{t('share_page.share_not_found', 'Share not found')}</h1>
|
return <h1>{t('share_page.share_not_found', 'Share not found')}</h1>
|
||||||
}
|
}
|
||||||
|
|
||||||
AuthorizedTokenRoute.propTypes = {
|
|
||||||
match: PropTypes.object.isRequired,
|
|
||||||
}
|
|
||||||
|
|
||||||
export const MessageContainer = styled.div`
|
export const MessageContainer = styled.div`
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
margin: 100px auto 0;
|
margin: 100px auto 0;
|
||||||
`
|
`
|
||||||
|
|
||||||
interface TokenRouteMatch {
|
export const TokenRoute = () => {
|
||||||
token: string
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SubalbumRouteMatch extends TokenRouteMatch {
|
|
||||||
subAlbum: string
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MatchProps<Route> {
|
|
||||||
match: MatchType<Route>
|
|
||||||
}
|
|
||||||
|
|
||||||
const TokenRoute = ({ match }: MatchProps<TokenRouteMatch>) => {
|
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
const token = tokenFromParams()
|
||||||
const token = match.params.token
|
|
||||||
|
|
||||||
const { loading, error, data, refetch } = useQuery(
|
const { loading, error, data, refetch } = useQuery(
|
||||||
VALIDATE_TOKEN_PASSWORD_QUERY,
|
VALIDATE_TOKEN_PASSWORD_QUERY,
|
||||||
{
|
{
|
||||||
notifyOnNetworkStatusChange: true,
|
notifyOnNetworkStatusChange: true,
|
||||||
variables: {
|
variables: {
|
||||||
token: match.params.token,
|
token: token,
|
||||||
password: getSharePassword(match.params.token),
|
password: getSharePassword(token),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -202,22 +186,5 @@ const TokenRoute = ({ match }: MatchProps<TokenRouteMatch>) => {
|
||||||
|
|
||||||
if (loading) return <div>{t('general.loading.default', 'Loading...')}</div>
|
if (loading) return <div>{t('general.loading.default', 'Loading...')}</div>
|
||||||
|
|
||||||
return <AuthorizedTokenRoute match={match} />
|
return <AuthorizedTokenRoute />
|
||||||
}
|
}
|
||||||
|
|
||||||
const SharePage = ({ match }: { match: MatchType }) => {
|
|
||||||
const { t } = useTranslation()
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Switch>
|
|
||||||
<Route path={`${match.url}/:token`}>
|
|
||||||
{({ match }: { match: MatchType<TokenRouteMatch> }) => {
|
|
||||||
return <TokenRoute match={match} />
|
|
||||||
}}
|
|
||||||
</Route>
|
|
||||||
<Route path="/">{t('routes.page_not_found', 'Page not found')}</Route>
|
|
||||||
</Switch>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default SharePage
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import styled from 'styled-components'
|
||||||
import { useLazyQuery, gql } from '@apollo/client'
|
import { useLazyQuery, gql } from '@apollo/client'
|
||||||
import { debounce, DebouncedFn } from '../../helpers/utils'
|
import { debounce, DebouncedFn } from '../../helpers/utils'
|
||||||
import { ProtectedImage } from '../photoGallery/ProtectedMedia'
|
import { ProtectedImage } from '../photoGallery/ProtectedMedia'
|
||||||
import { NavLink, useHistory, useRouteMatch } from 'react-router-dom'
|
import { NavLink, useNavigate, useLocation } from 'react-router-dom'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import {
|
import {
|
||||||
searchQuery,
|
searchQuery,
|
||||||
|
@ -77,11 +77,11 @@ const SearchBar = () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const routerMatch = useRouteMatch()
|
const location = useLocation()
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setExpanded(false)
|
setExpanded(false)
|
||||||
setQuery('')
|
setQuery('')
|
||||||
}, [routerMatch])
|
}, [location])
|
||||||
|
|
||||||
const [selectedItem, setSelectedItem] = useState<number | null>(null)
|
const [selectedItem, setSelectedItem] = useState<number | null>(null)
|
||||||
|
|
||||||
|
@ -291,13 +291,11 @@ const SearchRow = ({
|
||||||
setSelected,
|
setSelected,
|
||||||
}: SearchRowProps) => {
|
}: SearchRowProps) => {
|
||||||
const rowEl = useRef<HTMLLIElement>(null)
|
const rowEl = useRef<HTMLLIElement>(null)
|
||||||
const history = useHistory()
|
const navigate = useNavigate()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const keydownEvent = (event: KeyboardEvent) => {
|
const keydownEvent = (event: KeyboardEvent) => {
|
||||||
if (event.key == 'Enter') {
|
if (event.key == 'Enter') navigate(link)
|
||||||
history.push(link)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('keydown', keydownEvent)
|
document.addEventListener('keydown', keydownEvent)
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { useQuery, gql } from '@apollo/client'
|
||||||
import { authToken } from '../../helpers/authentication'
|
import { authToken } from '../../helpers/authentication'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { mapboxEnabledQuery } from '../../__generated__/mapboxEnabledQuery'
|
import { mapboxEnabledQuery } from '../../__generated__/mapboxEnabledQuery'
|
||||||
|
import classNames from 'classnames'
|
||||||
|
|
||||||
export const MAPBOX_QUERY = gql`
|
export const MAPBOX_QUERY = gql`
|
||||||
query mapboxEnabledQuery {
|
query mapboxEnabledQuery {
|
||||||
|
@ -41,9 +42,12 @@ const MenuButton = ({
|
||||||
return (
|
return (
|
||||||
<NavLink
|
<NavLink
|
||||||
to={to}
|
to={to}
|
||||||
exact={exact}
|
end={exact}
|
||||||
className={`rounded-lg my-2 ${className}`}
|
className={({ isActive }) =>
|
||||||
activeClassName={`ring-4 lg:ring-4 ${activeClasses}`}
|
classNames(`rounded-lg my-2`, className, {
|
||||||
|
[`ring-4 lg:ring-4 ${activeClasses}`]: isActive,
|
||||||
|
})
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<li className="flex items-center">
|
<li className="flex items-center">
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import AuthorizedRoute from './AuthorizedRoute'
|
import AuthorizedRoute, { useIsAdmin } from './AuthorizedRoute'
|
||||||
import { render, screen } from '@testing-library/react'
|
import { render, screen, waitFor } from '@testing-library/react'
|
||||||
import { MemoryRouter, Route } from 'react-router-dom'
|
import { MemoryRouter, Route, Routes } from 'react-router-dom'
|
||||||
|
|
||||||
import * as authentication from '../../helpers/authentication'
|
import * as authentication from '../../helpers/authentication'
|
||||||
|
import { MockedProvider } from '@apollo/client/testing'
|
||||||
|
import { ADMIN_QUERY } from '../layout/Layout'
|
||||||
|
|
||||||
jest.mock('../../helpers/authentication.ts')
|
jest.mock('../../helpers/authentication.ts')
|
||||||
|
|
||||||
|
@ -18,26 +20,117 @@ describe('AuthorizedRoute component', () => {
|
||||||
authToken.mockImplementation(() => null)
|
authToken.mockImplementation(() => null)
|
||||||
|
|
||||||
render(
|
render(
|
||||||
<MemoryRouter initialEntries={['/']}>
|
<MemoryRouter initialEntries={['/authorized']}>
|
||||||
<Route path="/login">login redirect</Route>
|
<Routes>
|
||||||
<AuthorizedRoute path="/" component={AuthorizedComponent} />
|
<Route index element={<div>redirect</div>} />
|
||||||
|
<Route
|
||||||
|
path="/authorized"
|
||||||
|
element={
|
||||||
|
<AuthorizedRoute>
|
||||||
|
<AuthorizedComponent />
|
||||||
|
</AuthorizedRoute>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Routes>
|
||||||
</MemoryRouter>
|
</MemoryRouter>
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(screen.getByText('login redirect')).toBeInTheDocument()
|
expect(screen.getByText('redirect')).toBeInTheDocument()
|
||||||
|
expect(screen.queryByText('authorized content')).toBeNull()
|
||||||
})
|
})
|
||||||
|
|
||||||
test('logged in', async () => {
|
test('logged in', async () => {
|
||||||
authToken.mockImplementation(() => 'token-here')
|
authToken.mockImplementation(() => 'token-here')
|
||||||
|
|
||||||
render(
|
render(
|
||||||
<MemoryRouter initialEntries={['/']}>
|
<MemoryRouter initialEntries={['/authorized']}>
|
||||||
<Route path="/login">login redirect</Route>
|
<Routes>
|
||||||
<AuthorizedRoute path="/" component={AuthorizedComponent} />
|
<Route index element={<div>redirect</div>} />
|
||||||
|
<Route
|
||||||
|
path="/authorized"
|
||||||
|
element={
|
||||||
|
<AuthorizedRoute>
|
||||||
|
<AuthorizedComponent />
|
||||||
|
</AuthorizedRoute>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Routes>
|
||||||
</MemoryRouter>
|
</MemoryRouter>
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(screen.getByText('authorized content')).toBeInTheDocument()
|
expect(screen.getByText('authorized content')).toBeInTheDocument()
|
||||||
expect(screen.queryByText('login redirect')).toBeNull()
|
expect(screen.queryByText('redirect')).toBeNull()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('useIsAdmin hook', () => {
|
||||||
|
const graphqlMock = (admin: boolean) => ({
|
||||||
|
request: {
|
||||||
|
query: ADMIN_QUERY,
|
||||||
|
},
|
||||||
|
result: {
|
||||||
|
data: {
|
||||||
|
myUser: {
|
||||||
|
admin,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
test('not logged in', async () => {
|
||||||
|
authToken.mockImplementation(() => null)
|
||||||
|
|
||||||
|
const TestComponent = () => {
|
||||||
|
const isAdmin = useIsAdmin()
|
||||||
|
return isAdmin ? <div>is admin</div> : <div>not admin</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
render(
|
||||||
|
<MockedProvider mocks={[graphqlMock(true)]}>
|
||||||
|
<TestComponent />
|
||||||
|
</MockedProvider>
|
||||||
|
)
|
||||||
|
|
||||||
|
await waitFor(() => {
|
||||||
|
expect(screen.getByText('not admin')).toBeInTheDocument()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
test('not admin', async () => {
|
||||||
|
authToken.mockImplementation(() => 'token-here')
|
||||||
|
|
||||||
|
const TestComponent = () => {
|
||||||
|
const isAdmin = useIsAdmin()
|
||||||
|
return isAdmin ? <div>is admin</div> : <div>not admin</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
render(
|
||||||
|
<MockedProvider mocks={[graphqlMock(false)]}>
|
||||||
|
<TestComponent />
|
||||||
|
</MockedProvider>
|
||||||
|
)
|
||||||
|
|
||||||
|
await waitFor(() => {
|
||||||
|
expect(screen.getByText('not admin')).toBeInTheDocument()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
test('is admin', async () => {
|
||||||
|
authToken.mockImplementation(() => 'token-here')
|
||||||
|
|
||||||
|
const TestComponent = () => {
|
||||||
|
const isAdmin = useIsAdmin()
|
||||||
|
return isAdmin ? <div>is admin</div> : <div>not admin</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
render(
|
||||||
|
<MockedProvider mocks={[graphqlMock(true)]}>
|
||||||
|
<TestComponent />
|
||||||
|
</MockedProvider>
|
||||||
|
)
|
||||||
|
|
||||||
|
await waitFor(() => {
|
||||||
|
expect(screen.getByText('is admin')).toBeInTheDocument()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
import React, { ReactChild, useEffect } from 'react'
|
|
||||||
import PropTypes, { ReactComponentLike } from 'prop-types'
|
|
||||||
import { Route, Redirect, RouteProps } from 'react-router-dom'
|
|
||||||
import { useLazyQuery } from '@apollo/client'
|
import { useLazyQuery } from '@apollo/client'
|
||||||
|
import React, { useEffect } from 'react'
|
||||||
|
import { Navigate } from 'react-router-dom'
|
||||||
import { authToken } from '../../helpers/authentication'
|
import { authToken } from '../../helpers/authentication'
|
||||||
import { ADMIN_QUERY } from '../layout/Layout'
|
import { ADMIN_QUERY } from '../layout/Layout'
|
||||||
|
|
||||||
export const useIsAdmin = (enabled = true) => {
|
export const useIsAdmin = () => {
|
||||||
const [fetchAdminQuery, { data, called }] = useLazyQuery(ADMIN_QUERY)
|
const [fetchAdminQuery, { data, called }] = useLazyQuery(ADMIN_QUERY)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (authToken() && !called && enabled) {
|
if (authToken() && !called) {
|
||||||
fetchAdminQuery()
|
fetchAdminQuery()
|
||||||
}
|
}
|
||||||
}, [authToken(), enabled])
|
}, [authToken()])
|
||||||
|
|
||||||
if (!authToken()) {
|
if (!authToken()) {
|
||||||
return false
|
return false
|
||||||
|
@ -27,48 +26,18 @@ export const Authorized = ({ children }: { children: JSX.Element }) => {
|
||||||
return token ? children : null
|
return token ? children : null
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AuthorizedRouteProps extends Omit<RouteProps, 'component'> {
|
interface AuthorizedRouteProps {
|
||||||
component: ReactComponentLike
|
children: React.ReactNode
|
||||||
admin?: boolean
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const AuthorizedRoute = ({
|
const AuthorizedRoute = ({ children }: AuthorizedRouteProps) => {
|
||||||
component: Component,
|
|
||||||
admin = false,
|
|
||||||
...props
|
|
||||||
}: AuthorizedRouteProps) => {
|
|
||||||
const token = authToken()
|
const token = authToken()
|
||||||
const isAdmin = useIsAdmin(admin)
|
|
||||||
|
|
||||||
let unauthorizedRedirect: null | ReactChild = null
|
|
||||||
if (!token) {
|
if (!token) {
|
||||||
unauthorizedRedirect = <Redirect to="/login" />
|
return <Navigate to="/" />
|
||||||
}
|
}
|
||||||
|
|
||||||
let adminRedirect: null | ReactChild = null
|
return <>{children}</>
|
||||||
if (token && admin) {
|
|
||||||
if (isAdmin === false) {
|
|
||||||
adminRedirect = <Redirect to="/" />
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Route
|
|
||||||
{...props}
|
|
||||||
render={routeProps => (
|
|
||||||
<>
|
|
||||||
{unauthorizedRedirect}
|
|
||||||
{adminRedirect}
|
|
||||||
<Component {...routeProps} />
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
AuthorizedRoute.propTypes = {
|
|
||||||
component: PropTypes.elementType.isRequired,
|
|
||||||
admin: PropTypes.bool,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default AuthorizedRoute
|
export default AuthorizedRoute
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { Route, Switch, Redirect } from 'react-router-dom'
|
import {
|
||||||
|
Navigate,
|
||||||
|
useNavigate,
|
||||||
|
NavigateFunction,
|
||||||
|
Outlet,
|
||||||
|
useRoutes,
|
||||||
|
} from 'react-router-dom'
|
||||||
|
|
||||||
import Layout from '../layout/Layout'
|
import Layout from '../layout/Layout'
|
||||||
import { clearTokenCookie } from '../../helpers/authentication'
|
import { authToken, clearTokenCookie } from '../../helpers/authentication'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { TFunction, useTranslation } from 'react-i18next'
|
||||||
import Loader from '../../primitives/Loader'
|
import Loader from '../../primitives/Loader'
|
||||||
|
import AuthorizedRoute from './AuthorizedRoute'
|
||||||
const AuthorizedRoute = React.lazy(() => import('./AuthorizedRoute'))
|
|
||||||
|
|
||||||
const AlbumsPage = React.lazy(
|
const AlbumsPage = React.lazy(
|
||||||
() => import('../../Pages/AllAlbumsPage/AlbumsPage')
|
() => import('../../Pages/AllAlbumsPage/AlbumsPage')
|
||||||
|
@ -16,20 +21,107 @@ const TimelinePage = React.lazy(
|
||||||
() => import('../../Pages/TimelinePage/TimelinePage')
|
() => import('../../Pages/TimelinePage/TimelinePage')
|
||||||
)
|
)
|
||||||
const PlacesPage = React.lazy(() => import('../../Pages/PlacesPage/PlacesPage'))
|
const PlacesPage = React.lazy(() => import('../../Pages/PlacesPage/PlacesPage'))
|
||||||
const SharePage = React.lazy(() => import('../../Pages/SharePage/SharePage'))
|
|
||||||
const PeoplePage = React.lazy(() => import('../../Pages/PeoplePage/PeoplePage'))
|
|
||||||
|
|
||||||
const LoginPage = React.lazy(() => import('../../Pages/LoginPage/LoginPage'))
|
const LoginPage = React.lazy(() => import('../../Pages/LoginPage/LoginPage'))
|
||||||
const InitialSetupPage = React.lazy(
|
const InitialSetupPage = React.lazy(
|
||||||
() => import('../../Pages/LoginPage/InitialSetupPage')
|
() => import('../../Pages/LoginPage/InitialSetupPage')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const SharePageTokenRoute = React.lazy(() =>
|
||||||
|
import('../../Pages/SharePage/SharePage').then(x => ({
|
||||||
|
default: x.TokenRoute,
|
||||||
|
}))
|
||||||
|
)
|
||||||
|
|
||||||
const SettingsPage = React.lazy(
|
const SettingsPage = React.lazy(
|
||||||
() => import('../../Pages/SettingsPage/SettingsPage')
|
() => import('../../Pages/SettingsPage/SettingsPage')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const PeoplePage = React.lazy(() =>
|
||||||
|
import('../../Pages/PeoplePage/PeoplePage').then(x => ({
|
||||||
|
default: x.PeoplePage,
|
||||||
|
}))
|
||||||
|
)
|
||||||
|
|
||||||
|
const PersonPage = React.lazy(() =>
|
||||||
|
import('../../Pages/PeoplePage/PeoplePage').then(x => ({
|
||||||
|
default: x.PersonPage,
|
||||||
|
}))
|
||||||
|
)
|
||||||
|
|
||||||
const Routes = () => {
|
const Routes = () => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
const navigate = useNavigate()
|
||||||
|
|
||||||
|
const authorized = (element: React.ReactNode) => (
|
||||||
|
<AuthorizedRoute>{element}</AuthorizedRoute>
|
||||||
|
)
|
||||||
|
|
||||||
|
const routes = useRoutes([
|
||||||
|
{
|
||||||
|
index: true,
|
||||||
|
element: <IndexPage />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/login',
|
||||||
|
element: <LoginPage />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/logout',
|
||||||
|
element: <LogoutPage navigate={navigate} />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/initialSetup',
|
||||||
|
element: <InitialSetupPage />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/share/:token/*',
|
||||||
|
element: <SharePageTokenRoute />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/albums',
|
||||||
|
element: authorized(<AlbumsPage />),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/album/:id',
|
||||||
|
element: authorized(<AlbumPage />),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/timeline',
|
||||||
|
element: authorized(<TimelinePage />),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/places',
|
||||||
|
element: authorized(<PlacesPage />),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/settings',
|
||||||
|
element: authorized(<SettingsPage />),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/people',
|
||||||
|
element: authorized(<Outlet />),
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: ':person',
|
||||||
|
element: <PersonPage />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: true,
|
||||||
|
element: <PeoplePage />,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// for backwards-compatibility
|
||||||
|
path: '/photos',
|
||||||
|
element: <Navigate to="/timeline" />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '*',
|
||||||
|
element: <NotFoundPage t={t} />,
|
||||||
|
},
|
||||||
|
])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Suspense
|
<React.Suspense
|
||||||
|
@ -39,37 +131,27 @@ const Routes = () => {
|
||||||
</Layout>
|
</Layout>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Switch>
|
{routes}
|
||||||
<Route path="/login" component={LoginPage} />
|
|
||||||
<Route path="/logout">
|
|
||||||
{() => {
|
|
||||||
clearTokenCookie()
|
|
||||||
location.href = '/'
|
|
||||||
}}
|
|
||||||
</Route>
|
|
||||||
<Route path="/initialSetup" component={InitialSetupPage} />
|
|
||||||
<Route path="/share" component={SharePage} />
|
|
||||||
<AuthorizedRoute exact path="/albums" component={AlbumsPage} />
|
|
||||||
<AuthorizedRoute path="/album/:id" component={AlbumPage} />
|
|
||||||
<AuthorizedRoute path="/timeline" component={TimelinePage} />
|
|
||||||
<AuthorizedRoute path="/places" component={PlacesPage} />
|
|
||||||
<AuthorizedRoute path="/people/:person?" component={PeoplePage} />
|
|
||||||
<AuthorizedRoute path="/settings" component={SettingsPage} />
|
|
||||||
<Route path="/" exact render={() => <Redirect to="/timeline" />} />
|
|
||||||
{/* For backwards compatibility */}
|
|
||||||
<Route
|
|
||||||
path="/photos"
|
|
||||||
exact
|
|
||||||
render={() => <Redirect to="/timeline" />}
|
|
||||||
/>
|
|
||||||
<Route
|
|
||||||
render={() => (
|
|
||||||
<div>{t('routes.page_not_found', 'Page not found')}</div>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</Switch>
|
|
||||||
</React.Suspense>
|
</React.Suspense>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const IndexPage = () => {
|
||||||
|
const token = authToken()
|
||||||
|
|
||||||
|
const dest = token ? '/timeline' : '/login'
|
||||||
|
|
||||||
|
return <Navigate to={dest} />
|
||||||
|
}
|
||||||
|
|
||||||
|
export const NotFoundPage = ({ t }: { t: TFunction }) => {
|
||||||
|
return <div>{t('routes.page_not_found', 'Page not found')}</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
const LogoutPage = ({ navigate }: { navigate: NavigateFunction }) => {
|
||||||
|
clearTokenCookie()
|
||||||
|
navigate('/')
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
export default Routes
|
export default Routes
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { useState } from 'react'
|
import React, { useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { Link, useHistory } from 'react-router-dom'
|
import { Link, useNavigate } from 'react-router-dom'
|
||||||
import FaceCircleImage from '../../../Pages/PeoplePage/FaceCircleImage'
|
import FaceCircleImage from '../../../Pages/PeoplePage/FaceCircleImage'
|
||||||
import { SidebarSection, SidebarSectionTitle } from '../SidebarComponents'
|
import { SidebarSection, SidebarSectionTitle } from '../SidebarComponents'
|
||||||
import { MediaSidebarMedia, SIDEBAR_MEDIA_QUERY } from './MediaSidebar'
|
import { MediaSidebarMedia, SIDEBAR_MEDIA_QUERY } from './MediaSidebar'
|
||||||
|
@ -73,7 +73,7 @@ const PersonMoreMenu = ({
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
const history = useHistory()
|
const navigate = useNavigate()
|
||||||
const detachImageFaceMutation = useDetachImageFaces({
|
const detachImageFaceMutation = useDetachImageFaces({
|
||||||
refetchQueries,
|
refetchQueries,
|
||||||
})
|
})
|
||||||
|
@ -107,7 +107,7 @@ const PersonMoreMenu = ({
|
||||||
return
|
return
|
||||||
detachImageFaceMutation([face]).then(({ data }) => {
|
detachImageFaceMutation([face]).then(({ data }) => {
|
||||||
if (isNil(data)) throw new Error('Expected data not to be null')
|
if (isNil(data)) throw new Error('Expected data not to be null')
|
||||||
history.push(`/people/${data.detachImageFaces.id}`)
|
navigate(`/people/${data.detachImageFaces.id}`)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,7 @@ const CheckboxLabelWrapper = styled.label`
|
||||||
|
|
||||||
type CheckboxProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
type CheckboxProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
||||||
label: string
|
label: string
|
||||||
|
className?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const Checkbox = ({ label, className, ...props }: CheckboxProps) => {
|
const Checkbox = ({ label, className, ...props }: CheckboxProps) => {
|
||||||
|
|
|
@ -19,6 +19,7 @@ type DropdownProps = React.SelectHTMLAttributes<HTMLSelectElement> & {
|
||||||
items: DropdownItem[]
|
items: DropdownItem[]
|
||||||
selected?: string
|
selected?: string
|
||||||
setSelected(value: string): void
|
setSelected(value: string): void
|
||||||
|
className?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const Dropdown = ({
|
const Dropdown = ({
|
||||||
|
|
|
@ -141,6 +141,7 @@ export const TextField = forwardRef(
|
||||||
type ButtonProps = {
|
type ButtonProps = {
|
||||||
variant?: 'negative' | 'positive' | 'default'
|
variant?: 'negative' | 'positive' | 'default'
|
||||||
background?: 'default' | 'white'
|
background?: 'default' | 'white'
|
||||||
|
className?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const buttonStyles = ({ variant, background }: ButtonProps) =>
|
const buttonStyles = ({ variant, background }: ButtonProps) =>
|
||||||
|
@ -155,6 +156,7 @@ const buttonStyles = ({ variant, background }: ButtonProps) =>
|
||||||
|
|
||||||
type SubmitProps = ButtonProps & {
|
type SubmitProps = ButtonProps & {
|
||||||
children: string
|
children: string
|
||||||
|
className?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Submit = ({
|
export const Submit = ({
|
||||||
|
|
Loading…
Reference in New Issue