diff options
author | DeeJayBro <maricrafterminecraft@gmail.com> | 2018-07-12 12:43:42 -0500 |
---|---|---|
committer | Rigel Kent <par@rigelk.eu> | 2018-07-12 19:43:42 +0200 |
commit | 4503cb2a894d9fb2b838cab0a9af8b3923e18a56 (patch) | |
tree | 008bedae409ec657ed439e47d3243c15d49e53ac | |
parent | b63e428e8bf1ed1457ab1888350809bd78ce4d2f (diff) | |
download | PeerTube-4503cb2a894d9fb2b838cab0a9af8b3923e18a56.tar.gz PeerTube-4503cb2a894d9fb2b838cab0a9af8b3923e18a56.tar.zst PeerTube-4503cb2a894d9fb2b838cab0a9af8b3923e18a56.zip |
QR Code (#802)
Adding QR-Code to the Share modal.
fixes #683
-rw-r--r-- | client/package.json | 3 | ||||
-rw-r--r-- | client/src/app/videos/+video-watch/modal/video-share.component.html | 5 | ||||
-rw-r--r-- | client/src/app/videos/+video-watch/modal/video-share.component.scss | 4 | ||||
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.module.ts | 4 | ||||
-rw-r--r-- | client/yarn.lock | 48 |
5 files changed, 57 insertions, 7 deletions
diff --git a/client/package.json b/client/package.json index 7b044dbdd..816ce53c9 100644 --- a/client/package.json +++ b/client/package.json | |||
@@ -117,6 +117,7 @@ | |||
117 | "webpack-cli": "^2.0.14", | 117 | "webpack-cli": "^2.0.14", |
118 | "webtorrent": "^0.100.0", | 118 | "webtorrent": "^0.100.0", |
119 | "whatwg-fetch": "^2.0.4", | 119 | "whatwg-fetch": "^2.0.4", |
120 | "zone.js": "~0.8.5" | 120 | "zone.js": "~0.8.5", |
121 | "ngx-qrcode2": "^0.0.9" | ||
121 | } | 122 | } |
122 | } | 123 | } |
diff --git a/client/src/app/videos/+video-watch/modal/video-share.component.html b/client/src/app/videos/+video-watch/modal/video-share.component.html index 26ab5144a..74a3a57d4 100644 --- a/client/src/app/videos/+video-watch/modal/video-share.component.html +++ b/client/src/app/videos/+video-watch/modal/video-share.component.html | |||
@@ -36,6 +36,11 @@ | |||
36 | The url is not secured (no HTTPS), so the embed video won't work on HTTPS websites (web browsers block non secured HTTP requests on HTTPS websites). | 36 | The url is not secured (no HTTPS), so the embed video won't work on HTTPS websites (web browsers block non secured HTTP requests on HTTPS websites). |
37 | </div> | 37 | </div> |
38 | 38 | ||
39 | <div class="form-group qr-code-group"> | ||
40 | <label i18n>QR-Code</label> | ||
41 | <ngx-qrcode qrc-element-type="url" [qrc-value]="getVideoUrl()" qrc-errorCorrectionLevel="Q"></ngx-qrcode> | ||
42 | </div> | ||
43 | |||
39 | <div class="form-group inputs"> | 44 | <div class="form-group inputs"> |
40 | <span i18n class="action-button action-button-cancel" (click)="hide()"> | 45 | <span i18n class="action-button action-button-cancel" (click)="hide()"> |
41 | Cancel | 46 | Cancel |
diff --git a/client/src/app/videos/+video-watch/modal/video-share.component.scss b/client/src/app/videos/+video-watch/modal/video-share.component.scss index 184e09027..c7f30bec5 100644 --- a/client/src/app/videos/+video-watch/modal/video-share.component.scss +++ b/client/src/app/videos/+video-watch/modal/video-share.component.scss | |||
@@ -1,3 +1,7 @@ | |||
1 | .action-button-cancel { | 1 | .action-button-cancel { |
2 | margin-right: 0 !important; | 2 | margin-right: 0 !important; |
3 | } | 3 | } |
4 | |||
5 | .qr-code-group { | ||
6 | text-align: center; | ||
7 | } | ||
diff --git a/client/src/app/videos/+video-watch/video-watch.module.ts b/client/src/app/videos/+video-watch/video-watch.module.ts index 63128926e..4af993043 100644 --- a/client/src/app/videos/+video-watch/video-watch.module.ts +++ b/client/src/app/videos/+video-watch/video-watch.module.ts | |||
@@ -16,13 +16,15 @@ import { VideoShareComponent } from './modal/video-share.component' | |||
16 | import { VideoWatchRoutingModule } from './video-watch-routing.module' | 16 | import { VideoWatchRoutingModule } from './video-watch-routing.module' |
17 | 17 | ||
18 | import { VideoWatchComponent } from './video-watch.component' | 18 | import { VideoWatchComponent } from './video-watch.component' |
19 | import { NgxQRCodeModule } from 'ngx-qrcode2' | ||
19 | 20 | ||
20 | @NgModule({ | 21 | @NgModule({ |
21 | imports: [ | 22 | imports: [ |
22 | VideoWatchRoutingModule, | 23 | VideoWatchRoutingModule, |
23 | SharedModule, | 24 | SharedModule, |
24 | ClipboardModule, | 25 | ClipboardModule, |
25 | TooltipModule.forRoot() | 26 | TooltipModule.forRoot(), |
27 | NgxQRCodeModule | ||
26 | ], | 28 | ], |
27 | 29 | ||
28 | declarations: [ | 30 | declarations: [ |
diff --git a/client/yarn.lock b/client/yarn.lock index ca018fad3..218070650 100644 --- a/client/yarn.lock +++ b/client/yarn.lock | |||
@@ -2064,6 +2064,13 @@ buffer@^4.3.0: | |||
2064 | ieee754 "^1.1.4" | 2064 | ieee754 "^1.1.4" |
2065 | isarray "^1.0.0" | 2065 | isarray "^1.0.0" |
2066 | 2066 | ||
2067 | buffer@^5.1.0: | ||
2068 | version "5.1.0" | ||
2069 | resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.1.0.tgz#c913e43678c7cb7c8bd16afbcddb6c5505e8f9fe" | ||
2070 | dependencies: | ||
2071 | base64-js "^1.0.2" | ||
2072 | ieee754 "^1.1.4" | ||
2073 | |||
2067 | bufferutil@^3.0.0: | 2074 | bufferutil@^3.0.0: |
2068 | version "3.0.5" | 2075 | version "3.0.5" |
2069 | resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-3.0.5.tgz#8abfc3b6da7aca6a13268b3f2482f0c7aa05fffb" | 2076 | resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-3.0.5.tgz#8abfc3b6da7aca6a13268b3f2482f0c7aa05fffb" |
@@ -2535,6 +2542,10 @@ colormin@^1.0.5: | |||
2535 | css-color-names "0.0.4" | 2542 | css-color-names "0.0.4" |
2536 | has "^1.0.1" | 2543 | has "^1.0.1" |
2537 | 2544 | ||
2545 | colors@*, colors@^1.1.0, colors@^1.1.2: | ||
2546 | version "1.3.0" | ||
2547 | resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.0.tgz#5f20c9fef6945cb1134260aab33bfbdc8295e04e" | ||
2548 | |||
2538 | colors@1.0.3: | 2549 | colors@1.0.3: |
2539 | version "1.0.3" | 2550 | version "1.0.3" |
2540 | resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" | 2551 | resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" |
@@ -2543,10 +2554,6 @@ colors@1.1.2, colors@~1.1.2: | |||
2543 | version "1.1.2" | 2554 | version "1.1.2" |
2544 | resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" | 2555 | resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" |
2545 | 2556 | ||
2546 | colors@^1.1.0, colors@^1.1.2: | ||
2547 | version "1.3.0" | ||
2548 | resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.0.tgz#5f20c9fef6945cb1134260aab33bfbdc8295e04e" | ||
2549 | |||
2550 | combine-lists@^1.0.0: | 2557 | combine-lists@^1.0.0: |
2551 | version "1.0.1" | 2558 | version "1.0.1" |
2552 | resolved "https://registry.yarnpkg.com/combine-lists/-/combine-lists-1.0.1.tgz#458c07e09e0d900fc28b70a3fec2dacd1d2cb7f6" | 2559 | resolved "https://registry.yarnpkg.com/combine-lists/-/combine-lists-1.0.1.tgz#458c07e09e0d900fc28b70a3fec2dacd1d2cb7f6" |
@@ -3164,6 +3171,10 @@ diffie-hellman@^5.0.0: | |||
3164 | miller-rabin "^4.0.0" | 3171 | miller-rabin "^4.0.0" |
3165 | randombytes "^2.0.0" | 3172 | randombytes "^2.0.0" |
3166 | 3173 | ||
3174 | dijkstrajs@^1.0.1: | ||
3175 | version "1.0.1" | ||
3176 | resolved "https://registry.yarnpkg.com/dijkstrajs/-/dijkstrajs-1.0.1.tgz#d3cd81221e3ea40742cfcde556d4e99e98ddc71b" | ||
3177 | |||
3167 | dir-glob@^2.0.0: | 3178 | dir-glob@^2.0.0: |
3168 | version "2.0.0" | 3179 | version "2.0.0" |
3169 | resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" | 3180 | resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" |
@@ -5208,6 +5219,10 @@ isarray@2.0.1: | |||
5208 | version "2.0.1" | 5219 | version "2.0.1" |
5209 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.1.tgz#a37d94ed9cda2d59865c9f76fe596ee1f338741e" | 5220 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.1.tgz#a37d94ed9cda2d59865c9f76fe596ee1f338741e" |
5210 | 5221 | ||
5222 | isarray@^2.0.1: | ||
5223 | version "2.0.4" | ||
5224 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.4.tgz#38e7bcbb0f3ba1b7933c86ba1894ddfc3781bbb7" | ||
5225 | |||
5211 | isbinaryfile@^3.0.0, isbinaryfile@^3.0.2: | 5226 | isbinaryfile@^3.0.0, isbinaryfile@^3.0.2: |
5212 | version "3.0.2" | 5227 | version "3.0.2" |
5213 | resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621" | 5228 | resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621" |
@@ -6549,6 +6564,12 @@ ngx-pipes@^2.1.7: | |||
6549 | version "2.2.0" | 6564 | version "2.2.0" |
6550 | resolved "https://registry.yarnpkg.com/ngx-pipes/-/ngx-pipes-2.2.0.tgz#5d4a3133de02f14c324e389160c9eb0f0a3806d9" | 6565 | resolved "https://registry.yarnpkg.com/ngx-pipes/-/ngx-pipes-2.2.0.tgz#5d4a3133de02f14c324e389160c9eb0f0a3806d9" |
6551 | 6566 | ||
6567 | ngx-qrcode2@^0.0.9: | ||
6568 | version "0.0.9" | ||
6569 | resolved "https://registry.yarnpkg.com/ngx-qrcode2/-/ngx-qrcode2-0.0.9.tgz#8229783623b60f79cce155e763ac170d8ad1eae8" | ||
6570 | dependencies: | ||
6571 | qrcode "^0.8.2" | ||
6572 | |||
6552 | ngx-window-token@^1.0.0: | 6573 | ngx-window-token@^1.0.0: |
6553 | version "1.0.0" | 6574 | version "1.0.0" |
6554 | resolved "https://registry.yarnpkg.com/ngx-window-token/-/ngx-window-token-1.0.0.tgz#12acb174fbbcffa5c60b3fea5a6ea78cc3304793" | 6575 | resolved "https://registry.yarnpkg.com/ngx-window-token/-/ngx-window-token-1.0.0.tgz#12acb174fbbcffa5c60b3fea5a6ea78cc3304793" |
@@ -7227,6 +7248,10 @@ path-browserify@0.0.0: | |||
7227 | version "0.0.0" | 7248 | version "0.0.0" |
7228 | resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" | 7249 | resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" |
7229 | 7250 | ||
7251 | path-browserify@^1.0.0: | ||
7252 | version "1.0.0" | ||
7253 | resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.0.tgz#40702a97af46ae00b0ea6fa8998c0b03c0af160d" | ||
7254 | |||
7230 | path-dirname@^1.0.0: | 7255 | path-dirname@^1.0.0: |
7231 | version "1.0.2" | 7256 | version "1.0.2" |
7232 | resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" | 7257 | resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" |
@@ -7339,6 +7364,10 @@ pkg-dir@^2.0.0: | |||
7339 | dependencies: | 7364 | dependencies: |
7340 | find-up "^2.1.0" | 7365 | find-up "^2.1.0" |
7341 | 7366 | ||
7367 | pngjs@^2.3.1: | ||
7368 | version "2.3.1" | ||
7369 | resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-2.3.1.tgz#11d1e12b9cb64d63e30c143a330f4c1f567da85f" | ||
7370 | |||
7342 | portfinder@^1.0.13, portfinder@^1.0.9: | 7371 | portfinder@^1.0.13, portfinder@^1.0.9: |
7343 | version "1.0.13" | 7372 | version "1.0.13" |
7344 | resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9" | 7373 | resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9" |
@@ -7878,6 +7907,15 @@ qjobs@^1.1.4: | |||
7878 | version "1.2.0" | 7907 | version "1.2.0" |
7879 | resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" | 7908 | resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" |
7880 | 7909 | ||
7910 | qrcode@^0.8.2: | ||
7911 | version "0.8.2" | ||
7912 | resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-0.8.2.tgz#4a4b4dd74ae43b7b05d4cc598badc1c03837189c" | ||
7913 | dependencies: | ||
7914 | colors "*" | ||
7915 | dijkstrajs "^1.0.1" | ||
7916 | isarray "^2.0.1" | ||
7917 | pngjs "^2.3.1" | ||
7918 | |||
7881 | qs@6.5.1: | 7919 | qs@6.5.1: |
7882 | version "6.5.1" | 7920 | version "6.5.1" |
7883 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" | 7921 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" |
@@ -9273,7 +9311,7 @@ stream-each@^1.1.0: | |||
9273 | end-of-stream "^1.1.0" | 9311 | end-of-stream "^1.1.0" |
9274 | stream-shift "^1.0.0" | 9312 | stream-shift "^1.0.0" |
9275 | 9313 | ||
9276 | stream-http@^2.7.2: | 9314 | stream-http@^2.7.2, stream-http@^2.8.3: |
9277 | version "2.8.3" | 9315 | version "2.8.3" |
9278 | resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" | 9316 | resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" |
9279 | dependencies: | 9317 | dependencies: |