From f0e9dfcc1dbffa4a8e4e691922b5a71d59b3ae5d Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Thu, 8 Apr 2021 08:41:10 +0200 Subject: [PATCH 01/47] bumps: core-js, video-js --- DotnetPlayground.Web/Pages/WebCamGallery.cshtml | 4 ++-- DotnetPlayground.Web/package.json | 4 ++-- DotnetPlayground.Web/wwwroot/sw.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DotnetPlayground.Web/Pages/WebCamGallery.cshtml b/DotnetPlayground.Web/Pages/WebCamGallery.cshtml index c93dbf39..1d42ed60 100644 --- a/DotnetPlayground.Web/Pages/WebCamGallery.cshtml +++ b/DotnetPlayground.Web/Pages/WebCamGallery.cshtml @@ -17,7 +17,7 @@ - @@ -137,7 +137,7 @@ - diff --git a/DotnetPlayground.Web/package.json b/DotnetPlayground.Web/package.json index 3a7e6fde..c5dce0ac 100644 --- a/DotnetPlayground.Web/package.json +++ b/DotnetPlayground.Web/package.json @@ -49,7 +49,7 @@ }, "devDependencies": { "@babel/core": "7.13.14", - "core-js": "3.10.0", + "core-js": "3.10.1", "@babel/plugin-transform-runtime": "7.13.10", "@babel/preset-env": "7.13.12", "@babel/polyfill": "7.12.1", @@ -79,7 +79,7 @@ "jquery-validation": "1.19.3", "jquery-validation-unobtrusive": "3.2.12", "blueimp-gallery": "3.3.0", - "video.js": "7.11.4", + "video.js": "7.12.0", "qrcodejs": "1.0.0", "@microsoft/signalr": "5.0.5", "@microsoft/signalr-protocol-msgpack": "5.0.5", diff --git a/DotnetPlayground.Web/wwwroot/sw.js b/DotnetPlayground.Web/wwwroot/sw.js index 2b673be7..581cf924 100644 --- a/DotnetPlayground.Web/wwwroot/sw.js +++ b/DotnetPlayground.Web/wwwroot/sw.js @@ -72,11 +72,11 @@ self.addEventListener('install', function (event) { //cdn resources RESOURCES = RESOURCES.concat([ 'https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/3.3.0/css/blueimp-gallery.min.css', - 'https://cdn.jsdelivr.net/npm/video.js@7.11.4/dist/video-js.min.css', + 'https://cdn.jsdelivr.net/npm/video.js@7.12.0/dist/video-js.min.css', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.18.2/bootstrap-table.min.css', 'https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css', 'https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/3.3.0/js/blueimp-gallery.min.js', - 'https://cdn.jsdelivr.net/npm/video.js@7.11.4/dist/alt/video.core.novtt.min.js', + 'https://cdn.jsdelivr.net/npm/video.js@7.12.0/dist/alt/video.core.novtt.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.18.2/bootstrap-table.min.js', //'https://cdn.jsdelivr.net/npm/faker@5.5.2/dist/faker.min.js',//questionable, big script ? 'https://cdn.jsdelivr.net/npm/node-forge@0.10.0/dist/forge.min.js', From d8cf3e547068d3cb9c6c64f702d4c84a5312987b Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Sat, 10 Apr 2021 10:30:52 +0200 Subject: [PATCH 02/47] bumps: Google.Apis.YouTube, babel-*, faker --- DotnetPlayground.Web/DotnetPlayground.Web.csproj | 2 +- DotnetPlayground.Web/Views/Home/Contact.cshtml | 2 +- DotnetPlayground.Web/package.json | 10 +++++----- DotnetPlayground.Web/wwwroot/sw.js | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/DotnetPlayground.Web/DotnetPlayground.Web.csproj b/DotnetPlayground.Web/DotnetPlayground.Web.csproj index be581ec8..84655df6 100644 --- a/DotnetPlayground.Web/DotnetPlayground.Web.csproj +++ b/DotnetPlayground.Web/DotnetPlayground.Web.csproj @@ -48,7 +48,7 @@ - + diff --git a/DotnetPlayground.Web/Views/Home/Contact.cshtml b/DotnetPlayground.Web/Views/Home/Contact.cshtml index 823691c0..1af55e8d 100644 --- a/DotnetPlayground.Web/Views/Home/Contact.cshtml +++ b/DotnetPlayground.Web/Views/Home/Contact.cshtml @@ -24,7 +24,7 @@ - diff --git a/DotnetPlayground.Web/package.json b/DotnetPlayground.Web/package.json index c5dce0ac..21d331a0 100644 --- a/DotnetPlayground.Web/package.json +++ b/DotnetPlayground.Web/package.json @@ -48,13 +48,13 @@ } }, "devDependencies": { - "@babel/core": "7.13.14", + "@babel/core": "7.13.15", "core-js": "3.10.1", - "@babel/plugin-transform-runtime": "7.13.10", - "@babel/preset-env": "7.13.12", + "@babel/plugin-transform-runtime": "7.13.15", + "@babel/preset-env": "7.13.15", "@babel/polyfill": "7.12.1", "babel-loader": "8.2.2", - "eslint": "7.23.0", + "eslint": "7.24.0", "fs-extra": "9.1.0", "gulp": "4.0.2", "gulp-babel": "8.0.0", @@ -85,7 +85,7 @@ "@microsoft/signalr-protocol-msgpack": "5.0.5", "msgpack5": "5.3.2", "ace-builds": "1.4.12", - "faker": "5.5.2" + "faker": "5.5.3" }, "scripts": { "postinstall": "node -e \"var nm = 'node_modules/', dst = 'wwwroot/lib/', fs = require('fs-extra'); fs.copy(nm+'bootstrap/dist', dst+'bootstrap'); fs.copy(nm+'bootstrap-table/dist', dst+'bootstrap-table'); fs.copy(nm+'node-forge/dist', dst+'forge'); fs.copy(nm+'jquery/dist', dst+'jquery'); fs.copy(nm+'jquery-validation/dist', dst+'jquery-validation'); fs.copy(nm+'jquery-validation-unobtrusive/dist', dst+'jquery-validation-unobtrusive'); fs.copy(nm+'blueimp-gallery', dst+'blueimp-gallery'); fs.copy(nm+'video.js/dist', dst+'video.js'); fs.copy(nm+'qrcodejs', dst+'qrcodejs'); fs.copy(nm+'@microsoft/signalr/dist', dst+'signalr'); fs.copy(nm+'@microsoft/signalr-protocol-msgpack/dist', dst+'signalr-protocol-msgpack'); fs.copy(nm+'msgpack5/dist', dst+'msgpack5'); fs.copy(nm+'ace-builds/src-min-noconflict/ace.js', dst+'ace-builds/ace.js'); fs.copy(nm+'ace-builds/src-min-noconflict/mode-csharp.js', dst+'ace-builds/mode-csharp.js'); fs.copy(nm+'faker/dist/faker.min.js', dst+'faker/faker.min.js');\"", diff --git a/DotnetPlayground.Web/wwwroot/sw.js b/DotnetPlayground.Web/wwwroot/sw.js index 581cf924..8461387d 100644 --- a/DotnetPlayground.Web/wwwroot/sw.js +++ b/DotnetPlayground.Web/wwwroot/sw.js @@ -78,7 +78,7 @@ self.addEventListener('install', function (event) { 'https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/3.3.0/js/blueimp-gallery.min.js', 'https://cdn.jsdelivr.net/npm/video.js@7.12.0/dist/alt/video.core.novtt.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.18.2/bootstrap-table.min.js', - //'https://cdn.jsdelivr.net/npm/faker@5.5.2/dist/faker.min.js',//questionable, big script ? + //'https://cdn.jsdelivr.net/npm/faker@5.5.3/dist/faker.min.js',//questionable, big script ? 'https://cdn.jsdelivr.net/npm/node-forge@0.10.0/dist/forge.min.js', 'https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js', 'https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js', From a55b20d725e302356f7c64e701a9957e030ec387 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 13 Apr 2021 08:13:57 +0200 Subject: [PATCH 03/47] build(deps): bump Google.Apis.YouTube.v3 from 1.51.0.2287 to 1.51.0.2288 (#46) Bumps [Google.Apis.YouTube.v3](https://github.com/google/google-api-dotnet-client) from 1.51.0.2287 to 1.51.0.2288. - [Release notes](https://github.com/google/google-api-dotnet-client/releases) - [Commits](https://github.com/google/google-api-dotnet-client/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- DotnetPlayground.Web/DotnetPlayground.Web.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DotnetPlayground.Web/DotnetPlayground.Web.csproj b/DotnetPlayground.Web/DotnetPlayground.Web.csproj index 84655df6..8a551dd2 100644 --- a/DotnetPlayground.Web/DotnetPlayground.Web.csproj +++ b/DotnetPlayground.Web/DotnetPlayground.Web.csproj @@ -48,7 +48,7 @@ - + From bc70975d1eb8a4bc3b59cd7368ea6ab2b9879828 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Thu, 15 Apr 2021 20:30:53 +0200 Subject: [PATCH 04/47] video poster -> data-poster attribute to stop always loading poster.jpeg --- DotnetPlayground.Web/Pages/WebCamGallery.cshtml | 2 +- DotnetPlayground.Web/wwwroot/js/WebCamGallery.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/DotnetPlayground.Web/Pages/WebCamGallery.cshtml b/DotnetPlayground.Web/Pages/WebCamGallery.cshtml index 1d42ed60..9c647353 100644 --- a/DotnetPlayground.Web/Pages/WebCamGallery.cshtml +++ b/DotnetPlayground.Web/Pages/WebCamGallery.cshtml @@ -79,7 +79,7 @@
+ diff --git a/DotnetPlayground.Web/wwwroot/images/puzzles/Jigsaw-Puzzle-Pieces.svg b/DotnetPlayground.Web/wwwroot/images/puzzles/Jigsaw-Puzzle-Pieces.svg new file mode 100644 index 00000000..2e4d54e2 --- /dev/null +++ b/DotnetPlayground.Web/wwwroot/images/puzzles/Jigsaw-Puzzle-Pieces.svg @@ -0,0 +1,3653 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DotnetPlayground.Web/wwwroot/images/puzzles/fond-puzzle.svg b/DotnetPlayground.Web/wwwroot/images/puzzles/fond-puzzle.svg new file mode 100644 index 00000000..57a338fe --- /dev/null +++ b/DotnetPlayground.Web/wwwroot/images/puzzles/fond-puzzle.svg @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Openclipart + + + puzzle + 2011-01-03T19:20:55 + + https://openclipart.org/detail/103423/puzzle-by-yves_guillou + + + yves_guillou + + + + + game + jigsaw + puzzle + shape + + + + + + + + + + + diff --git a/DotnetPlayground.Web/wwwroot/images/puzzles/jigsaw10x14.svg b/DotnetPlayground.Web/wwwroot/images/puzzles/jigsaw10x14.svg new file mode 100644 index 00000000..70b8ae7a --- /dev/null +++ b/DotnetPlayground.Web/wwwroot/images/puzzles/jigsaw10x14.svg @@ -0,0 +1,267 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Openclipart + + + + + + + + + + + diff --git a/DotnetPlayground.Web/wwwroot/images/puzzles/puzzle.svg b/DotnetPlayground.Web/wwwroot/images/puzzles/puzzle.svg new file mode 100644 index 00000000..650e9095 --- /dev/null +++ b/DotnetPlayground.Web/wwwroot/images/puzzles/puzzle.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/DotnetPlayground.Web/wwwroot/js/Puzzles.js b/DotnetPlayground.Web/wwwroot/js/Puzzles.js new file mode 100644 index 00000000..58859595 --- /dev/null +++ b/DotnetPlayground.Web/wwwroot/js/Puzzles.js @@ -0,0 +1,7 @@ +/*eslint no-unused-vars: ["error", { "varsIgnorePattern": "PuzzlesOnLoad" }]*/ +"use strict"; + +///TODO: Add this file to sw.js +function PuzzlesOnLoad() { + +} From 72b47eb05d1bce7126eb92c81cecd487f8c51e91 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Sat, 27 Feb 2021 16:59:47 +0100 Subject: [PATCH 17/47] Create build config: Oracle --- Dockerfile.alpine.oracle | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Dockerfile.alpine.oracle diff --git a/Dockerfile.alpine.oracle b/Dockerfile.alpine.oracle new file mode 100644 index 00000000..4aafbebb --- /dev/null +++ b/Dockerfile.alpine.oracle @@ -0,0 +1,61 @@ +# syntax = docker/dockerfile:experimental +FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine3.12 AS build +RUN --mount=type=cache,target=/root/.nuget --mount=type=cache,target=/root/.local/share/NuGet --mount=type=cache,target=/root/.npm/ --mount=type=cache,target=./DotnetPlayground.Web/node_modules +RUN apk add --update nodejs-current nodejs-npm +WORKDIR /build + +ENV DBKind="sqlite" ConnectionStrings__Sqlite="Filename=./bin/Debug/net5.0/Blogging.db" +ARG SOURCE_COMMIT +ARG SOURCE_BRANCH + +COPY ./InkBall/src/InkBall.Module/InkBall.Module.csproj ./InkBall/src/InkBall.Module/InkBall.Module.csproj +COPY ./InkBall/test/InkBall.Tests/InkBall.Tests.csproj ./InkBall/test/InkBall.Tests/InkBall.Tests.csproj +COPY ./DotnetPlayground.Tests/DotnetPlayground.Tests.csproj ./DotnetPlayground.Tests/DotnetPlayground.Tests.csproj +COPY ./Caching-MySQL/src/Pomelo.Extensions.Caching.MySqlConfig.Tools/Pomelo.Extensions.Caching.MySqlConfig.Tools.csproj ./Caching-MySQL/src/Pomelo.Extensions.Caching.MySqlConfig.Tools/Pomelo.Extensions.Caching.MySqlConfig.Tools.csproj +COPY ./Caching-MySQL/src/Pomelo.Extensions.Caching.MySql/Pomelo.Extensions.Caching.MySql.csproj ./Caching-MySQL/src/Pomelo.Extensions.Caching.MySql/Pomelo.Extensions.Caching.MySql.csproj +COPY ./Caching-MySQL/test/Pomelo.Extensions.Caching.MySql.Tests/Pomelo.Extensions.Caching.MySql.Tests.csproj ./Caching-MySQL/test/Pomelo.Extensions.Caching.MySql.Tests/Pomelo.Extensions.Caching.MySql.Tests.csproj +COPY ./IdentityManager2/src/IdentityManager2/IdentityManager2.csproj ./IdentityManager2/src/IdentityManager2/IdentityManager2.csproj +COPY ./IdentityManager2/src/IdentityManager2/Assets/ ./IdentityManager2/src/IdentityManager2/Assets/ +COPY ./DevReload/DevReload.csproj ./DevReload/DevReload.csproj +COPY ./DotnetPlayground.Web/DotnetPlayground.Web.csproj ./DotnetPlayground.Web/DotnetPlayground.Web.csproj +COPY ./*.sln ./NuGet.config ./ +RUN dotnet restore -r alpine-x64 + +COPY . . +RUN sed -i -e "s/GIT_HASH/$SOURCE_COMMIT/g" -e "s/GIT_BRANCH/$SOURCE_BRANCH/g" DotnetPlayground.Web/Views/Home/About.cshtml +RUN dotnet test -v m +RUN dotnet publish -c Oracle -r alpine-x64 \ + #-p:PublishWithAspNetCoreTargetManifest=false #remove this after prerelease patch publish \ + /p:ShowLinkerSizeComparison=true /p:CrossGenDuringPublish=false \ + DotnetPlayground.Web + + + + + +FROM mcr.microsoft.com/dotnet/runtime-deps:5.0-alpine3.12 +RUN apk add tzdata +WORKDIR /app +ENV USER=nobody TZ=Europe/Warsaw ASPNETCORE_URLS=http://+:5000 +COPY --from=build --chown="$USER":"$USER" /build/DotnetPlayground.Web/bin/Oracle/net5.0/alpine-x64/publish/ /build/startApp.sh ./ + +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +#fix https://github.com/oracle/dotnet-db-samples/issues/148 +sed -i '1s/^/openssl_conf = default_conf\n/' /etc/ssl/openssl.cnf +cat <> /etc/ssl/openssl.cnf +[default_conf] +ssl_conf = ssl_sect +[ssl_sect] +system_default = system_default_sect +[system_default_sect] +MinProtocol = TLSv1.2 +CipherString = DEFAULT:@SECLEVEL=2 +EOT + +USER "$USER" + +VOLUME /shared +EXPOSE 5000 + +ENTRYPOINT ["./DotnetPlayground.Web"] From 6500c136060b2c5c8cf38af824ad21d00b9777d2 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Sat, 27 Feb 2021 19:06:48 +0100 Subject: [PATCH 18/47] if INCLUDE_ORACLE missing confition, different run for different build naming --- Dockerfile.alpine.oracle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.alpine.oracle b/Dockerfile.alpine.oracle index 4aafbebb..6785152c 100644 --- a/Dockerfile.alpine.oracle +++ b/Dockerfile.alpine.oracle @@ -42,8 +42,8 @@ COPY --from=build --chown="$USER":"$USER" /build/DotnetPlayground.Web/bin/Oracle RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone #fix https://github.com/oracle/dotnet-db-samples/issues/148 -sed -i '1s/^/openssl_conf = default_conf\n/' /etc/ssl/openssl.cnf -cat <> /etc/ssl/openssl.cnf +RUN sed -i '1s/^/openssl_conf = default_conf\n/' /etc/ssl/openssl.cnf +RUN cat <> /etc/ssl/openssl.cnf [default_conf] ssl_conf = ssl_sect [ssl_sect] From 27c61fb6ef61f478f17fc7180a4f11757826ab0c Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Sat, 27 Feb 2021 20:30:39 +0100 Subject: [PATCH 19/47] Oracle dockerfile /etc/ssl/openssl.cnf pseudo-heredoc fixes --- Dockerfile.alpine.oracle | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile.alpine.oracle b/Dockerfile.alpine.oracle index 6785152c..5839f2d4 100644 --- a/Dockerfile.alpine.oracle +++ b/Dockerfile.alpine.oracle @@ -43,15 +43,15 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone #fix https://github.com/oracle/dotnet-db-samples/issues/148 RUN sed -i '1s/^/openssl_conf = default_conf\n/' /etc/ssl/openssl.cnf -RUN cat <> /etc/ssl/openssl.cnf -[default_conf] -ssl_conf = ssl_sect -[ssl_sect] -system_default = system_default_sect -[system_default_sect] -MinProtocol = TLSv1.2 -CipherString = DEFAULT:@SECLEVEL=2 -EOT +RUN echo -e " \n\ +[default_conf] \n\ +ssl_conf = ssl_sect \n\ +[ssl_sect] \n\ +system_default = system_default_sect \n\ +[system_default_sect] \n\ +MinProtocol = TLSv1.2 \n\ +CipherString = DEFAULT:@SECLEVEL=2 \n\ +" >> /etc/ssl/openssl.cnf USER "$USER" From 6c609cf411717bd179775e6f3500693285f568aa Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Sun, 28 Feb 2021 11:27:31 +0100 Subject: [PATCH 20/47] only one Dockerfile per image with conditional build for Release and oracle configurations inside added build shell script --- Dockerfile.alpine.oracle | 61 ---------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 Dockerfile.alpine.oracle diff --git a/Dockerfile.alpine.oracle b/Dockerfile.alpine.oracle deleted file mode 100644 index 5839f2d4..00000000 --- a/Dockerfile.alpine.oracle +++ /dev/null @@ -1,61 +0,0 @@ -# syntax = docker/dockerfile:experimental -FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine3.12 AS build -RUN --mount=type=cache,target=/root/.nuget --mount=type=cache,target=/root/.local/share/NuGet --mount=type=cache,target=/root/.npm/ --mount=type=cache,target=./DotnetPlayground.Web/node_modules -RUN apk add --update nodejs-current nodejs-npm -WORKDIR /build - -ENV DBKind="sqlite" ConnectionStrings__Sqlite="Filename=./bin/Debug/net5.0/Blogging.db" -ARG SOURCE_COMMIT -ARG SOURCE_BRANCH - -COPY ./InkBall/src/InkBall.Module/InkBall.Module.csproj ./InkBall/src/InkBall.Module/InkBall.Module.csproj -COPY ./InkBall/test/InkBall.Tests/InkBall.Tests.csproj ./InkBall/test/InkBall.Tests/InkBall.Tests.csproj -COPY ./DotnetPlayground.Tests/DotnetPlayground.Tests.csproj ./DotnetPlayground.Tests/DotnetPlayground.Tests.csproj -COPY ./Caching-MySQL/src/Pomelo.Extensions.Caching.MySqlConfig.Tools/Pomelo.Extensions.Caching.MySqlConfig.Tools.csproj ./Caching-MySQL/src/Pomelo.Extensions.Caching.MySqlConfig.Tools/Pomelo.Extensions.Caching.MySqlConfig.Tools.csproj -COPY ./Caching-MySQL/src/Pomelo.Extensions.Caching.MySql/Pomelo.Extensions.Caching.MySql.csproj ./Caching-MySQL/src/Pomelo.Extensions.Caching.MySql/Pomelo.Extensions.Caching.MySql.csproj -COPY ./Caching-MySQL/test/Pomelo.Extensions.Caching.MySql.Tests/Pomelo.Extensions.Caching.MySql.Tests.csproj ./Caching-MySQL/test/Pomelo.Extensions.Caching.MySql.Tests/Pomelo.Extensions.Caching.MySql.Tests.csproj -COPY ./IdentityManager2/src/IdentityManager2/IdentityManager2.csproj ./IdentityManager2/src/IdentityManager2/IdentityManager2.csproj -COPY ./IdentityManager2/src/IdentityManager2/Assets/ ./IdentityManager2/src/IdentityManager2/Assets/ -COPY ./DevReload/DevReload.csproj ./DevReload/DevReload.csproj -COPY ./DotnetPlayground.Web/DotnetPlayground.Web.csproj ./DotnetPlayground.Web/DotnetPlayground.Web.csproj -COPY ./*.sln ./NuGet.config ./ -RUN dotnet restore -r alpine-x64 - -COPY . . -RUN sed -i -e "s/GIT_HASH/$SOURCE_COMMIT/g" -e "s/GIT_BRANCH/$SOURCE_BRANCH/g" DotnetPlayground.Web/Views/Home/About.cshtml -RUN dotnet test -v m -RUN dotnet publish -c Oracle -r alpine-x64 \ - #-p:PublishWithAspNetCoreTargetManifest=false #remove this after prerelease patch publish \ - /p:ShowLinkerSizeComparison=true /p:CrossGenDuringPublish=false \ - DotnetPlayground.Web - - - - - -FROM mcr.microsoft.com/dotnet/runtime-deps:5.0-alpine3.12 -RUN apk add tzdata -WORKDIR /app -ENV USER=nobody TZ=Europe/Warsaw ASPNETCORE_URLS=http://+:5000 -COPY --from=build --chown="$USER":"$USER" /build/DotnetPlayground.Web/bin/Oracle/net5.0/alpine-x64/publish/ /build/startApp.sh ./ - -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -#fix https://github.com/oracle/dotnet-db-samples/issues/148 -RUN sed -i '1s/^/openssl_conf = default_conf\n/' /etc/ssl/openssl.cnf -RUN echo -e " \n\ -[default_conf] \n\ -ssl_conf = ssl_sect \n\ -[ssl_sect] \n\ -system_default = system_default_sect \n\ -[system_default_sect] \n\ -MinProtocol = TLSv1.2 \n\ -CipherString = DEFAULT:@SECLEVEL=2 \n\ -" >> /etc/ssl/openssl.cnf - -USER "$USER" - -VOLUME /shared -EXPOSE 5000 - -ENTRYPOINT ["./DotnetPlayground.Web"] From d0d5a63decdfe80d3c4f93842926b7d45b98d0ef Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Tue, 2 Mar 2021 22:11:36 +0100 Subject: [PATCH 21/47] form with some effects for choosing pattern image --- .../Pages/PuzzleGenerator.cshtml | 46 +++++++++++++++---- DotnetPlayground.Web/wwwroot/css/site.css | 13 ++++++ DotnetPlayground.Web/wwwroot/css/site.scss | 21 +++++++++ 3 files changed, 72 insertions(+), 8 deletions(-) diff --git a/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml b/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml index 7271712d..03720cc4 100644 --- a/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml +++ b/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml @@ -4,16 +4,46 @@ Layout = @"..\Views\Shared\_Layout.cshtml"; ViewData["Title"] = "Puzzle Generator"; } -

Puzzle Generator

-

Combine PNG/JPG/AVIF image with SVG puzzle pattern. Aply scaling, rotation, transform design to fit your needs.

+
-

- fond puzzle - Jigsaw Puzzle Pieces - 10x14 - puzzle -

+ +

Puzzle Generator

+

Combine PNG/JPG/AVIF image with SVG puzzle pattern. Apply scaling, rotation, transform design to fit your needs.

+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + +
@section scripts { diff --git a/DotnetPlayground.Web/wwwroot/css/site.css b/DotnetPlayground.Web/wwwroot/css/site.css index 8ca14f23..5670edfb 100644 --- a/DotnetPlayground.Web/wwwroot/css/site.css +++ b/DotnetPlayground.Web/wwwroot/css/site.css @@ -113,3 +113,16 @@ footer.container > noscript { background-color: rgba(80, 0, 0, 0.5); color: rgba(255, 255, 255, 0.9); transition: background 0.3s ease-out; } + +/***************Puzzles start*************/ +.puzzles input[type=radio]:checked + label > img { + border: 1px solid #fff; + box-shadow: 0 0 3px 3px #090; } + +/* Stuff after this is only to make things more pretty */ +.puzzles input[type=radio] + label > img { + border: 1px dashed #444; + transition: 500ms all; } + +.puzzles input[type=radio]:checked + label > img { + transform: rotateZ(-10deg) rotateX(10deg); } diff --git a/DotnetPlayground.Web/wwwroot/css/site.scss b/DotnetPlayground.Web/wwwroot/css/site.scss index 6507e205..ca8209aa 100644 --- a/DotnetPlayground.Web/wwwroot/css/site.scss +++ b/DotnetPlayground.Web/wwwroot/css/site.scss @@ -149,3 +149,24 @@ footer.container > noscript { transition: background 0.3s ease-out; } } +/***************Puzzles start*************/ +// hide radios dots +// .puzzles .input-hidden { +// position: absolute; +// left: -9999px; +// } + +.puzzles input[type=radio]:checked + label>img { + border: 1px solid #fff; + box-shadow: 0 0 3px 3px #090; +} + +/* Stuff after this is only to make things more pretty */ +.puzzles input[type=radio] + label>img { + border: 1px dashed #444; + transition: 500ms all; +} + +.puzzles input[type=radio]:checked + label>img { + transform: rotateZ(-10deg) rotateX(10deg); +} From 09dbf8198c483b817844f6c0ce95411ee9732e08 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Thu, 4 Mar 2021 08:20:02 +0100 Subject: [PATCH 22/47] CSS refactoring and first POC of puzzles page functioning --- .../Pages/PuzzleGenerator.cshtml | 25 +++++++++++++------ DotnetPlayground.Web/wwwroot/css/site.css | 2 +- DotnetPlayground.Web/wwwroot/css/site.scss | 10 +++++--- DotnetPlayground.Web/wwwroot/js/Puzzles.js | 10 +++++++- DotnetPlayground.Web/wwwroot/sw.js | 9 ++++++- 5 files changed, 42 insertions(+), 14 deletions(-) diff --git a/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml b/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml index 03720cc4..42342c9c 100644 --- a/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml +++ b/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml @@ -11,38 +11,49 @@

Puzzle Generator

Combine PNG/JPG/AVIF image with SVG puzzle pattern. Apply scaling, rotation, transform design to fit your needs.

-
+
-
-
-
-
- -
+
+
+ + +
+
+
+ +
+ +
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Incidunt, quos, distinctio mollitia quasi qui voluptas vitae quisquam a perferendis eaque nobis quam doloribus consectetur, deleniti iusto debitis rem enim cupiditate harum maiores. Quisquam quaerat molestias, eos saepe molestiae praesentium totam rerum ullam vel tenetur consectetur consequuntur. Praesentium pariatur ab, voluptatum perspiciatis velit reiciendis voluptas laudantium. Ipsa laudantium laboriosam at, cumque mollitia rem? Debitis corrupti architecto neque pariatur et, tempora illum amet placeat repellat laboriosam assumenda at, quas, tempore vitae maxime. +
@section scripts diff --git a/DotnetPlayground.Web/wwwroot/css/site.css b/DotnetPlayground.Web/wwwroot/css/site.css index 5670edfb..d4185be6 100644 --- a/DotnetPlayground.Web/wwwroot/css/site.css +++ b/DotnetPlayground.Web/wwwroot/css/site.css @@ -125,4 +125,4 @@ footer.container > noscript { transition: 500ms all; } .puzzles input[type=radio]:checked + label > img { - transform: rotateZ(-10deg) rotateX(10deg); } + transform: rotateZ(-10deg); } diff --git a/DotnetPlayground.Web/wwwroot/css/site.scss b/DotnetPlayground.Web/wwwroot/css/site.scss index ca8209aa..5e023e77 100644 --- a/DotnetPlayground.Web/wwwroot/css/site.scss +++ b/DotnetPlayground.Web/wwwroot/css/site.scss @@ -150,23 +150,25 @@ footer.container > noscript { } } /***************Puzzles start*************/ +// taken from https://codepen.io/cihaneken/pen/oMQVgv + // hide radios dots // .puzzles .input-hidden { // position: absolute; // left: -9999px; // } -.puzzles input[type=radio]:checked + label>img { +.puzzles input[type=radio]:checked + label > img { border: 1px solid #fff; box-shadow: 0 0 3px 3px #090; } /* Stuff after this is only to make things more pretty */ -.puzzles input[type=radio] + label>img { +.puzzles input[type=radio] + label > img { border: 1px dashed #444; transition: 500ms all; } -.puzzles input[type=radio]:checked + label>img { - transform: rotateZ(-10deg) rotateX(10deg); +.puzzles input[type=radio]:checked + label > img { + transform: rotateZ(-10deg); } diff --git a/DotnetPlayground.Web/wwwroot/js/Puzzles.js b/DotnetPlayground.Web/wwwroot/js/Puzzles.js index 58859595..b01956f2 100644 --- a/DotnetPlayground.Web/wwwroot/js/Puzzles.js +++ b/DotnetPlayground.Web/wwwroot/js/Puzzles.js @@ -1,7 +1,15 @@ /*eslint no-unused-vars: ["error", { "varsIgnorePattern": "PuzzlesOnLoad" }]*/ +/*eslint-disable no-console*/ "use strict"; -///TODO: Add this file to sw.js function PuzzlesOnLoad() { + $('#customFile').change(function () { + const file = $(this)[0].files[0].name; + $(this).next('label').text(file); + }); + $("input[type='radio'].custom-control-input").change(function () { + const img_path = $(this).next('label').find('img').attr('src'); + $('#target').css("background-image", "url(" + img_path + ")"); + }); } diff --git a/DotnetPlayground.Web/wwwroot/sw.js b/DotnetPlayground.Web/wwwroot/sw.js index 8461387d..bd6432e9 100644 --- a/DotnetPlayground.Web/wwwroot/sw.js +++ b/DotnetPlayground.Web/wwwroot/sw.js @@ -24,6 +24,7 @@ self.addEventListener('install', function (event) { 'VirtualScroll/Load?search=&offset=0&limit=50&ExtraParam=cached', 'Hashes/', 'BruteForce/', + 'PuzzleGenerator', 'InkBall/Home', 'InkBall/Rules', @@ -33,6 +34,10 @@ self.addEventListener('install', function (event) { 'images/banner3.svg', 'images/banner4.svg', 'images/no_img.svg', + 'images/puzzles/fond-puzzle.svg', + 'images/puzzles/Jigsaw-Puzzle-Pieces.svg', + 'images/puzzles/jigsaw10x14.svg', + 'images/puzzles/puzzle.svg', 'img/homescreen.webp', 'img/homescreen.jpg', 'https://haos.hopto.org/webcamgallery/poster.jpeg', @@ -43,7 +48,8 @@ self.addEventListener('install', function (event) { `css/site${suffix}.css`, `js/site${suffix}.js`, `js/Blogs${suffix}.js`, - `js/WebCamGallery${suffix}.js` + `js/WebCamGallery${suffix}.js`, + `js/Puzzles${suffix}.js` ]; if (isDev) { @@ -150,6 +156,7 @@ self.addEventListener('fetch', event => { }); return response; }).catch(() => { + //console.error(e, ' url: ' + event.request.url); return cached_response; }); From 22f8fb9a3825be71d2634ead8ea6dfc878f3bae3 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Tue, 9 Mar 2021 08:41:44 +0100 Subject: [PATCH 23/47] CSS variables background props change --- .../Pages/PuzzleGenerator.cshtml | 19 +++++++--- DotnetPlayground.Web/wwwroot/css/site.css | 30 +++++++++++++++ DotnetPlayground.Web/wwwroot/css/site.scss | 38 +++++++++++++++++++ DotnetPlayground.Web/wwwroot/js/Puzzles.js | 28 +++++++++++++- 4 files changed, 107 insertions(+), 8 deletions(-) diff --git a/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml b/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml index 42342c9c..2873d588 100644 --- a/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml +++ b/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml @@ -14,25 +14,25 @@
- +
- +
- +
- + @@ -46,13 +46,20 @@
+
+ + + + +
+
-
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Incidunt, quos, distinctio mollitia quasi qui voluptas vitae quisquam a perferendis eaque nobis quam doloribus consectetur, deleniti iusto debitis rem enim cupiditate harum maiores. Quisquam quaerat molestias, eos saepe molestiae praesentium totam rerum ullam vel tenetur consectetur consequuntur. Praesentium pariatur ab, voluptatum perspiciatis velit reiciendis voluptas laudantium. Ipsa laudantium laboriosam at, cumque mollitia rem? Debitis corrupti architecto neque pariatur et, tempora illum amet placeat repellat laboriosam assumenda at, quas, tempore vitae maxime. +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ipsum nunc aliquet bibendum enim. Ultrices gravida dictum fusce ut placerat orci nulla pellentesque. Tincidunt nunc pulvinar sapien et ligula ullamcorper malesuada. Mollis nunc sed id semper risus in hendrerit gravida rutrum. Adipiscing vitae proin sagittis nisl. Viverra nam libero justo laoreet sit amet cursus sit. Sodales ut eu sem integer.
diff --git a/DotnetPlayground.Web/wwwroot/css/site.css b/DotnetPlayground.Web/wwwroot/css/site.css index d4185be6..aebe6536 100644 --- a/DotnetPlayground.Web/wwwroot/css/site.css +++ b/DotnetPlayground.Web/wwwroot/css/site.css @@ -126,3 +126,33 @@ footer.container > noscript { .puzzles input[type=radio]:checked + label > img { transform: rotateZ(-10deg); } + +:root { + --bimg: url('/dotnet/images/puzzles/fond-puzzle.svg'); + --rot: rotate(0deg); + --size: 200%; } + +.puzzles .target { + position: relative; + overflow: hidden; + /* + height: 20em; + width: 100%; + text-align: center; + line-height: 5em; + margin: 3em auto; + */ + font-size: 2em; + border: 4px solid cornflowerblue; + border-radius: 7px; } + +.puzzles .target:before { + content: ""; + position: absolute; + width: var(--size); + height: var(--size); + top: -50%; + left: -50%; + z-index: -1; + background: var(--bimg) 0 0 repeat; + transform: var(--rot); } diff --git a/DotnetPlayground.Web/wwwroot/css/site.scss b/DotnetPlayground.Web/wwwroot/css/site.scss index 5e023e77..b85e293c 100644 --- a/DotnetPlayground.Web/wwwroot/css/site.scss +++ b/DotnetPlayground.Web/wwwroot/css/site.scss @@ -172,3 +172,41 @@ footer.container > noscript { .puzzles input[type=radio]:checked + label > img { transform: rotateZ(-10deg); } + + + +//https://www.sitepoint.com/css3-transform-background-image/ +//https://christianheilmann.com/2021/02/08/sharing-data-between-css-and-javascript-using-custom-properties/ +:root { + --bimg: url('/dotnet/images/puzzles/fond-puzzle.svg'); + --rot: rotate(0deg); + --size: 200%; +} +.puzzles .target +{ + position: relative; + overflow: hidden; + /* + height: 20em; + width: 100%; + text-align: center; + line-height: 5em; + margin: 3em auto; + */ + font-size: 2em; + border: 4px solid rgb(55, 230, 192); + border-radius: 7px; +} +.puzzles .target:before +{ + content: ""; + position: absolute; + width: var(--size); + height: var(--size); + top: -50%; + left: -50%; + z-index: -1; + + background: var(--bimg) 0 0 repeat; + transform: var(--rot); +} diff --git a/DotnetPlayground.Web/wwwroot/js/Puzzles.js b/DotnetPlayground.Web/wwwroot/js/Puzzles.js index b01956f2..d54a8a8a 100644 --- a/DotnetPlayground.Web/wwwroot/js/Puzzles.js +++ b/DotnetPlayground.Web/wwwroot/js/Puzzles.js @@ -9,7 +9,31 @@ function PuzzlesOnLoad() { }); $("input[type='radio'].custom-control-input").change(function () { - const img_path = $(this).next('label').find('img').attr('src'); - $('#target').css("background-image", "url(" + img_path + ")"); + const img = $(this).next('label').find('img'); + const size = $('#rangeSize')[0].value; + // const one = Math.min(width, height); + // console.log('width ' + width + ' ' + height); + const img_path = img.attr('src'); + //$('.target').css("background-image", "url(" + img_path + ")"); + document.documentElement.style.setProperty("--bimg", "url(" + img_path + ")"); + //$('.target').css("background-size", size + "px " + size + "px"); + document.documentElement.style.setProperty("--size", size + "%"); + //$('.target').css("background-repeat", "repeat"); + })[0].focus(); + + $("#rangeSize, #rotation").change(function () { + const range = $("#rangeSize")[0]; + const size = range.value; + let lbl = $("#rangeSize").prev('label'); + lbl.text('Size ' + size); + + const rotation = $("#rotation")[0]; + lbl = $("#rotation").prev('label'); + lbl.text('Rotation ' + rotation.value); + + //$('.target').css("background-size", size + "px " + size + "px"); + document.documentElement.style.setProperty("--size", size + "%"); + //$('.target').css("transform", "rotate(" + rotation.value + "deg)"); + document.documentElement.style.setProperty("--rot", "rotate(" + rotation.value + "deg)"); }); } From 409168d747f020b2315227ca49966a5b53758113 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Fri, 12 Mar 2021 21:43:39 +0100 Subject: [PATCH 24/47] spaces to tabs --- .../Pages/PuzzleGenerator.cshtml | 122 +++++++++--------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml b/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml index 2873d588..efb68865 100644 --- a/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml +++ b/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml @@ -1,79 +1,79 @@ @page @model DotnetPlayground.Pages.PuzzleGeneratorModel @{ - Layout = @"..\Views\Shared\_Layout.cshtml"; - ViewData["Title"] = "Puzzle Generator"; + Layout = @"..\Views\Shared\_Layout.cshtml"; + ViewData["Title"] = "Puzzle Generator"; }
-

Puzzle Generator

-

Combine PNG/JPG/AVIF image with SVG puzzle pattern. Apply scaling, rotation, transform design to fit your needs.

+

Puzzle Generator

+

Combine PNG/JPG/AVIF image with SVG puzzle pattern. Apply scaling, rotation, transform design to fit your needs.

-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
-
-
- - -
-
+
+
+ + +
+
-
- - - - -
+
+ + + + +
-
- -
-
+
+ +
+ -
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ipsum nunc aliquet bibendum enim. Ultrices gravida dictum fusce ut placerat orci nulla pellentesque. Tincidunt nunc pulvinar sapien et ligula ullamcorper malesuada. Mollis nunc sed id semper risus in hendrerit gravida rutrum. Adipiscing vitae proin sagittis nisl. Viverra nam libero justo laoreet sit amet cursus sit. Sodales ut eu sem integer. -
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ipsum nunc aliquet bibendum enim. Ultrices gravida dictum fusce ut placerat orci nulla pellentesque. Tincidunt nunc pulvinar sapien et ligula ullamcorper malesuada. Mollis nunc sed id semper risus in hendrerit gravida rutrum. Adipiscing vitae proin sagittis nisl. Viverra nam libero justo laoreet sit amet cursus sit. Sodales ut eu sem integer. +
@section scripts { - - - - - - - + + + + + + + } From 11d4157ff07101af1689db48915d12450a746b03 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Sat, 13 Mar 2021 00:16:19 +0100 Subject: [PATCH 25/47] puzzles: centering and scaling --- .../Pages/PuzzleGenerator.cshtml | 2 +- DotnetPlayground.Web/wwwroot/css/site.css | 24 ++++++------------- DotnetPlayground.Web/wwwroot/css/site.scss | 23 ++++++------------ DotnetPlayground.Web/wwwroot/js/Puzzles.js | 22 ++++++++--------- 4 files changed, 26 insertions(+), 45 deletions(-) diff --git a/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml b/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml index efb68865..1201dc42 100644 --- a/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml +++ b/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml @@ -48,7 +48,7 @@
- +
diff --git a/DotnetPlayground.Web/wwwroot/css/site.css b/DotnetPlayground.Web/wwwroot/css/site.css index aebe6536..c2d0deab 100644 --- a/DotnetPlayground.Web/wwwroot/css/site.css +++ b/DotnetPlayground.Web/wwwroot/css/site.css @@ -127,32 +127,22 @@ footer.container > noscript { .puzzles input[type=radio]:checked + label > img { transform: rotateZ(-10deg); } -:root { - --bimg: url('/dotnet/images/puzzles/fond-puzzle.svg'); - --rot: rotate(0deg); - --size: 200%; } - .puzzles .target { + --bimg: url('../images/puzzles/fond-puzzle.svg'); + --trans: scale(2) rotateZ(180deg); position: relative; overflow: hidden; - /* - height: 20em; - width: 100%; - text-align: center; - line-height: 5em; - margin: 3em auto; - */ font-size: 2em; - border: 4px solid cornflowerblue; + border: 4px solid #37e6c0; border-radius: 7px; } .puzzles .target:before { content: ""; position: absolute; - width: var(--size); - height: var(--size); + width: 200%; + height: 200%; top: -50%; left: -50%; z-index: -1; - background: var(--bimg) 0 0 repeat; - transform: var(--rot); } + background: var(--bimg) repeat; + transform: var(--trans); } diff --git a/DotnetPlayground.Web/wwwroot/css/site.scss b/DotnetPlayground.Web/wwwroot/css/site.scss index b85e293c..7c976f40 100644 --- a/DotnetPlayground.Web/wwwroot/css/site.scss +++ b/DotnetPlayground.Web/wwwroot/css/site.scss @@ -177,22 +177,13 @@ footer.container > noscript { //https://www.sitepoint.com/css3-transform-background-image/ //https://christianheilmann.com/2021/02/08/sharing-data-between-css-and-javascript-using-custom-properties/ -:root { - --bimg: url('/dotnet/images/puzzles/fond-puzzle.svg'); - --rot: rotate(0deg); - --size: 200%; -} .puzzles .target { + --bimg: url('../images/puzzles/fond-puzzle.svg'); + --trans: scale(2) rotateZ(180deg); + position: relative; overflow: hidden; - /* - height: 20em; - width: 100%; - text-align: center; - line-height: 5em; - margin: 3em auto; - */ font-size: 2em; border: 4px solid rgb(55, 230, 192); border-radius: 7px; @@ -201,12 +192,12 @@ footer.container > noscript { { content: ""; position: absolute; - width: var(--size); - height: var(--size); + width: 200%; + height: 200%; top: -50%; left: -50%; z-index: -1; - background: var(--bimg) 0 0 repeat; - transform: var(--rot); + background: var(--bimg) repeat; + transform: var(--trans); } diff --git a/DotnetPlayground.Web/wwwroot/js/Puzzles.js b/DotnetPlayground.Web/wwwroot/js/Puzzles.js index d54a8a8a..b0f41cbf 100644 --- a/DotnetPlayground.Web/wwwroot/js/Puzzles.js +++ b/DotnetPlayground.Web/wwwroot/js/Puzzles.js @@ -11,14 +11,12 @@ function PuzzlesOnLoad() { $("input[type='radio'].custom-control-input").change(function () { const img = $(this).next('label').find('img'); const size = $('#rangeSize')[0].value; - // const one = Math.min(width, height); - // console.log('width ' + width + ' ' + height); + const img_path = img.attr('src'); - //$('.target').css("background-image", "url(" + img_path + ")"); - document.documentElement.style.setProperty("--bimg", "url(" + img_path + ")"); - //$('.target').css("background-size", size + "px " + size + "px"); - document.documentElement.style.setProperty("--size", size + "%"); - //$('.target').css("background-repeat", "repeat"); + $(".target").css("--bimg", "url(" + img_path + ")"); + + const rotation = $("#rotation")[0]; + $(".target").css("--trans", "scale(" + size * 0.01 + ") rotateZ(" + rotation.value + "deg)"); })[0].focus(); $("#rangeSize, #rotation").change(function () { @@ -31,9 +29,11 @@ function PuzzlesOnLoad() { lbl = $("#rotation").prev('label'); lbl.text('Rotation ' + rotation.value); - //$('.target').css("background-size", size + "px " + size + "px"); - document.documentElement.style.setProperty("--size", size + "%"); - //$('.target').css("transform", "rotate(" + rotation.value + "deg)"); - document.documentElement.style.setProperty("--rot", "rotate(" + rotation.value + "deg)"); + $(".target").css("--trans", "scale(" + size * 0.01 + ") rotateZ(" + rotation.value + "deg)"); + }); + + $(".puzzles form").on("submit", function (event) { + event.preventDefault(); + console.log('submitados!'); }); } From c81af2a36b2fb091e5f59ce9e2f4f94263fbd95a Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Sun, 9 May 2021 18:43:33 +0200 Subject: [PATCH 26/47] bump: core-js, eslint --- DotnetPlayground.Web/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DotnetPlayground.Web/package.json b/DotnetPlayground.Web/package.json index 5db724f4..461820b7 100644 --- a/DotnetPlayground.Web/package.json +++ b/DotnetPlayground.Web/package.json @@ -49,12 +49,12 @@ }, "devDependencies": { "@babel/core": "7.14.0", - "core-js": "3.12.0", + "core-js": "3.12.1", "@babel/plugin-transform-runtime": "7.13.15", "@babel/preset-env": "7.14.1", "@babel/polyfill": "7.12.1", "babel-loader": "8.2.2", - "eslint": "7.25.0", + "eslint": "7.26.0", "fs-extra": "10.0.0", "gulp": "4.0.2", "gulp-babel": "8.0.0", From 4004c9de2c06c6489ded22e8563885dfc31ad353 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Sun, 9 May 2021 18:46:19 +0200 Subject: [PATCH 27/47] puzzles: showing uploaded bacgrkound image --- .../Pages/PuzzleGenerator.cshtml | 3 +-- DotnetPlayground.Web/wwwroot/css/site.css | 15 +++++++++++++-- DotnetPlayground.Web/wwwroot/css/site.scss | 13 ++++++++++++- DotnetPlayground.Web/wwwroot/js/Puzzles.js | 19 +++++++++++++++++++ 4 files changed, 45 insertions(+), 5 deletions(-) diff --git a/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml b/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml index 1201dc42..92860416 100644 --- a/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml +++ b/DotnetPlayground.Web/Pages/PuzzleGenerator.cshtml @@ -58,8 +58,7 @@ -
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ipsum nunc aliquet bibendum enim. Ultrices gravida dictum fusce ut placerat orci nulla pellentesque. Tincidunt nunc pulvinar sapien et ligula ullamcorper malesuada. Mollis nunc sed id semper risus in hendrerit gravida rutrum. Adipiscing vitae proin sagittis nisl. Viverra nam libero justo laoreet sit amet cursus sit. Sodales ut eu sem integer. +
diff --git a/DotnetPlayground.Web/wwwroot/css/site.css b/DotnetPlayground.Web/wwwroot/css/site.css index c2d0deab..fce1c838 100644 --- a/DotnetPlayground.Web/wwwroot/css/site.css +++ b/DotnetPlayground.Web/wwwroot/css/site.css @@ -134,9 +134,10 @@ footer.container > noscript { overflow: hidden; font-size: 2em; border: 4px solid #37e6c0; - border-radius: 7px; } + border-radius: 7px; + min-height: 32rem; } -.puzzles .target:before { +.puzzles .target::before { content: ""; position: absolute; width: 200%; @@ -146,3 +147,13 @@ footer.container > noscript { z-index: -1; background: var(--bimg) repeat; transform: var(--trans); } + +.puzzles .target::after { + content: ""; + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + z-index: -2; + background-image: var(--uploadedImg); } diff --git a/DotnetPlayground.Web/wwwroot/css/site.scss b/DotnetPlayground.Web/wwwroot/css/site.scss index 7c976f40..962b1924 100644 --- a/DotnetPlayground.Web/wwwroot/css/site.scss +++ b/DotnetPlayground.Web/wwwroot/css/site.scss @@ -187,8 +187,9 @@ footer.container > noscript { font-size: 2em; border: 4px solid rgb(55, 230, 192); border-radius: 7px; + min-height: 32rem; } -.puzzles .target:before +.puzzles .target::before { content: ""; position: absolute; @@ -201,3 +202,13 @@ footer.container > noscript { background: var(--bimg) repeat; transform: var(--trans); } +.puzzles .target::after { + content: ""; + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + z-index: -2; + background-image: var(--uploadedImg); + } diff --git a/DotnetPlayground.Web/wwwroot/js/Puzzles.js b/DotnetPlayground.Web/wwwroot/js/Puzzles.js index b0f41cbf..0cfdd19d 100644 --- a/DotnetPlayground.Web/wwwroot/js/Puzzles.js +++ b/DotnetPlayground.Web/wwwroot/js/Puzzles.js @@ -36,4 +36,23 @@ function PuzzlesOnLoad() { event.preventDefault(); console.log('submitados!'); }); + + $('input[type="file"]').on('change', function () { + if (this.files && this.files[0]) { + const img = document.createElement('img'); + const blob = URL.createObjectURL(this.files[0]); + img.src = blob; + + img.onload = function () { + const w = img.width; + const h = img.height; + + const target = $(".target"); + target.css("--uploadedImg", "url(" + blob + ")"); + target.css("width", w); + target.css("height", h); + //URL.revokeObjectURL(this.src); + }; + } + }); } From ea164e046a57ea35bfe277f525a5caf857c9596e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 08:17:35 +0200 Subject: [PATCH 28/47] build(deps): bump Microsoft.Azure.DocumentDB.Core from 2.14.0 to 2.14.1 (#55) Bumps Microsoft.Azure.DocumentDB.Core from 2.14.0 to 2.14.1. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- DotnetPlayground.Web/DotnetPlayground.Web.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DotnetPlayground.Web/DotnetPlayground.Web.csproj b/DotnetPlayground.Web/DotnetPlayground.Web.csproj index f6898428..835643c5 100644 --- a/DotnetPlayground.Web/DotnetPlayground.Web.csproj +++ b/DotnetPlayground.Web/DotnetPlayground.Web.csproj @@ -47,7 +47,7 @@ - + From 6ea21c6920e7e64a9ef5e7a71827b3bb642c8bfe Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Wed, 12 May 2021 13:49:54 +0200 Subject: [PATCH 29/47] bump: dotnet core framework/sdk security butmp to 5.0.6 --- .../DotnetPlayground.Tests.csproj | 10 ++++---- .../DotnetPlayground.Web.csproj | 24 +++++++++---------- DotnetPlayground.Web/package.json | 4 ++-- DotnetPlayground.Web/wwwroot/sw.js | 4 ++-- InkBall | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/DotnetPlayground.Tests/DotnetPlayground.Tests.csproj b/DotnetPlayground.Tests/DotnetPlayground.Tests.csproj index 1ef59984..29c8c03e 100644 --- a/DotnetPlayground.Tests/DotnetPlayground.Tests.csproj +++ b/DotnetPlayground.Tests/DotnetPlayground.Tests.csproj @@ -10,7 +10,7 @@ - + @@ -18,10 +18,10 @@ runtime; build; native; contentfiles; analyzers - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/DotnetPlayground.Web/DotnetPlayground.Web.csproj b/DotnetPlayground.Web/DotnetPlayground.Web.csproj index 835643c5..adb8e09a 100644 --- a/DotnetPlayground.Web/DotnetPlayground.Web.csproj +++ b/DotnetPlayground.Web/DotnetPlayground.Web.csproj @@ -37,22 +37,22 @@ - - - + + + - - + + - - - - + + + + @@ -75,9 +75,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/DotnetPlayground.Web/package.json b/DotnetPlayground.Web/package.json index 461820b7..a411743d 100644 --- a/DotnetPlayground.Web/package.json +++ b/DotnetPlayground.Web/package.json @@ -81,8 +81,8 @@ "blueimp-gallery": "3.3.0", "video.js": "7.12.0", "qrcodejs": "1.0.0", - "@microsoft/signalr": "5.0.5", - "@microsoft/signalr-protocol-msgpack": "5.0.5", + "@microsoft/signalr": "5.0.6", + "@microsoft/signalr-protocol-msgpack": "5.0.6", "msgpack5": "5.3.2", "ace-builds": "1.4.12", "faker": "5.5.3" diff --git a/DotnetPlayground.Web/wwwroot/sw.js b/DotnetPlayground.Web/wwwroot/sw.js index bd6432e9..c5102dbb 100644 --- a/DotnetPlayground.Web/wwwroot/sw.js +++ b/DotnetPlayground.Web/wwwroot/sw.js @@ -92,9 +92,9 @@ self.addEventListener('install', function (event) { 'https://cdn.jsdelivr.net/npm/jquery-validation-unobtrusive@3.2.12/dist/jquery.validate.unobtrusive.min.js' //'https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.12/ace.js',//questionable, only dev ? //'https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.12/mode-csharp.min.js',//questionable, only dev ? - //'https://cdn.jsdelivr.net/npm/@microsoft/signalr@5.0.4/dist/browser/signalr.min.js',//questionable, inkball ? + //'https://cdn.jsdelivr.net/npm/@microsoft/signalr@5.0.6/dist/browser/signalr.min.js',//questionable, inkball ? //'https://cdn.jsdelivr.net/npm/msgpack5@5.3.2/dist/msgpack5.min.js',//questionable, inkball ? - //'https://cdn.jsdelivr.net/npm/@microsoft/signalr-protocol-msgpack@5.0.4/dist/browser/signalr-protocol-msgpack.min.js'//questionable, inkball ? + //'https://cdn.jsdelivr.net/npm/@microsoft/signalr-protocol-msgpack@5.0.6/dist/browser/signalr-protocol-msgpack.min.js'//questionable, inkball ? ]); } diff --git a/InkBall b/InkBall index a4f37514..1eff15cd 160000 --- a/InkBall +++ b/InkBall @@ -1 +1 @@ -Subproject commit a4f3751460bb42b9ffae310a11aa9c7cf864d1ee +Subproject commit 1eff15cdefd33867069e2f1b1662f94c361f080c From b75c0045b8fdbe9159c2eda582a0dad76df582c6 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Wed, 26 May 2021 12:56:42 +0200 Subject: [PATCH 30/47] bump: Microsoft.NET.Test.Sdk, core-js, eslint, babel --- Caching-MySQL | 2 +- DotnetPlayground.Tests/DotnetPlayground.Tests.csproj | 2 +- DotnetPlayground.Web/package.json | 10 +++++----- InkBall | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Caching-MySQL b/Caching-MySQL index e473623b..afbba04d 160000 --- a/Caching-MySQL +++ b/Caching-MySQL @@ -1 +1 @@ -Subproject commit e473623b99bc4c2135cdb843d7d8b3ee12f19cd9 +Subproject commit afbba04d3f2eb4746e8e56a56cc3ab78b6d53165 diff --git a/DotnetPlayground.Tests/DotnetPlayground.Tests.csproj b/DotnetPlayground.Tests/DotnetPlayground.Tests.csproj index 29c8c03e..47eaa08d 100644 --- a/DotnetPlayground.Tests/DotnetPlayground.Tests.csproj +++ b/DotnetPlayground.Tests/DotnetPlayground.Tests.csproj @@ -11,7 +11,7 @@ - + all diff --git a/DotnetPlayground.Web/package.json b/DotnetPlayground.Web/package.json index a411743d..3185c1ba 100644 --- a/DotnetPlayground.Web/package.json +++ b/DotnetPlayground.Web/package.json @@ -48,13 +48,13 @@ } }, "devDependencies": { - "@babel/core": "7.14.0", - "core-js": "3.12.1", - "@babel/plugin-transform-runtime": "7.13.15", - "@babel/preset-env": "7.14.1", + "@babel/core": "7.14.3", + "core-js": "3.13.0", + "@babel/plugin-transform-runtime": "7.14.3", + "@babel/preset-env": "7.14.2", "@babel/polyfill": "7.12.1", "babel-loader": "8.2.2", - "eslint": "7.26.0", + "eslint": "7.27.0", "fs-extra": "10.0.0", "gulp": "4.0.2", "gulp-babel": "8.0.0", diff --git a/InkBall b/InkBall index 1eff15cd..50a813d5 160000 --- a/InkBall +++ b/InkBall @@ -1 +1 @@ -Subproject commit 1eff15cdefd33867069e2f1b1662f94c361f080c +Subproject commit 50a813d5db3a686b82383361a6c9645f3b19160f From 0f87849ab165fbacac415585e5e4602bf0d59e70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 May 2021 17:19:14 +0200 Subject: [PATCH 31/47] build(deps): bump Lib.AspNetCore.ServerTiming from 4.0.0 to 4.1.0 (#67) Bumps [Lib.AspNetCore.ServerTiming](https://github.com/tpeczek/Lib.AspNetCore.ServerTiming) from 4.0.0 to 4.1.0. - [Release notes](https://github.com/tpeczek/Lib.AspNetCore.ServerTiming/releases) - [Changelog](https://github.com/tpeczek/Lib.AspNetCore.ServerTiming/blob/main/CHANGELOG.md) - [Commits](https://github.com/tpeczek/Lib.AspNetCore.ServerTiming/compare/v4.0.0...v4.1.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- DotnetPlayground.Web/DotnetPlayground.Web.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DotnetPlayground.Web/DotnetPlayground.Web.csproj b/DotnetPlayground.Web/DotnetPlayground.Web.csproj index adb8e09a..9887070a 100644 --- a/DotnetPlayground.Web/DotnetPlayground.Web.csproj +++ b/DotnetPlayground.Web/DotnetPlayground.Web.csproj @@ -46,7 +46,7 @@ - + From 89570203c95fcd5d1bf250b35d581b436d65a56b Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Tue, 8 Jun 2021 20:29:47 +0200 Subject: [PATCH 32/47] bumps: Google.Apis.YouTube.v3, core-js, babel-*, eslint, worker-plugin, video.js --- DotnetPlayground.Web/DotnetPlayground.Web.csproj | 2 +- DotnetPlayground.Web/package.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DotnetPlayground.Web/DotnetPlayground.Web.csproj b/DotnetPlayground.Web/DotnetPlayground.Web.csproj index 9887070a..25b0cb1b 100644 --- a/DotnetPlayground.Web/DotnetPlayground.Web.csproj +++ b/DotnetPlayground.Web/DotnetPlayground.Web.csproj @@ -48,7 +48,7 @@ - + diff --git a/DotnetPlayground.Web/package.json b/DotnetPlayground.Web/package.json index 3185c1ba..5d959f68 100644 --- a/DotnetPlayground.Web/package.json +++ b/DotnetPlayground.Web/package.json @@ -49,12 +49,12 @@ }, "devDependencies": { "@babel/core": "7.14.3", - "core-js": "3.13.0", + "core-js": "3.14.0", "@babel/plugin-transform-runtime": "7.14.3", - "@babel/preset-env": "7.14.2", + "@babel/preset-env": "7.14.4", "@babel/polyfill": "7.12.1", "babel-loader": "8.2.2", - "eslint": "7.27.0", + "eslint": "7.28.0", "fs-extra": "10.0.0", "gulp": "4.0.2", "gulp-babel": "8.0.0", @@ -69,7 +69,7 @@ "webpack-stream": "6.1.2", "@purtuga/esm-webpack-plugin": "1.5.0", "poly-decomp": "0.3.0", - "worker-plugin": "5.0.0" + "worker-plugin": "5.0.1" }, "dependencies": { "bootstrap": "4.6.0", @@ -79,7 +79,7 @@ "jquery-validation": "1.19.3", "jquery-validation-unobtrusive": "3.2.12", "blueimp-gallery": "3.3.0", - "video.js": "7.12.0", + "video.js": "7.12.3", "qrcodejs": "1.0.0", "@microsoft/signalr": "5.0.6", "@microsoft/signalr-protocol-msgpack": "5.0.6", From eb2af8832bd5f68171748405e451f2acfb63398e Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Tue, 8 Jun 2021 20:32:53 +0200 Subject: [PATCH 33/47] security vuln: NET 5.0.7 and .NET SDK 5.0.204 Microsoft Security Advisory CVE-2021-31957 | ASP.NET Denial of Service Vulnerability --- .../DotnetPlayground.Tests.csproj | 10 ++++----- .../DotnetPlayground.Web.csproj | 22 +++++++++---------- InkBall | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/DotnetPlayground.Tests/DotnetPlayground.Tests.csproj b/DotnetPlayground.Tests/DotnetPlayground.Tests.csproj index 47eaa08d..f1f676af 100644 --- a/DotnetPlayground.Tests/DotnetPlayground.Tests.csproj +++ b/DotnetPlayground.Tests/DotnetPlayground.Tests.csproj @@ -10,7 +10,7 @@ - + @@ -18,10 +18,10 @@ runtime; build; native; contentfiles; analyzers - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/DotnetPlayground.Web/DotnetPlayground.Web.csproj b/DotnetPlayground.Web/DotnetPlayground.Web.csproj index 25b0cb1b..ddc13c79 100644 --- a/DotnetPlayground.Web/DotnetPlayground.Web.csproj +++ b/DotnetPlayground.Web/DotnetPlayground.Web.csproj @@ -37,11 +37,11 @@ - - - + + + - + @@ -49,10 +49,10 @@ - - - - + + + + @@ -75,9 +75,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/InkBall b/InkBall index 50a813d5..7b24cd2e 160000 --- a/InkBall +++ b/InkBall @@ -1 +1 @@ -Subproject commit 50a813d5db3a686b82383361a6c9645f3b19160f +Subproject commit 7b24cd2ea933748a22024e8063e97b375769662d From 4dbecb861bc982dfa1a5f16696c956abb034f3bf Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Tue, 15 Jun 2021 17:08:21 +0200 Subject: [PATCH 34/47] bumps: Npgsql, babel-*, signalr --- DotnetPlayground.Web/DotnetPlayground.Web.csproj | 2 +- DotnetPlayground.Web/package.json | 10 +++++----- DotnetPlayground.Web/wwwroot/sw.js | 4 ++-- InkBall | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/DotnetPlayground.Web/DotnetPlayground.Web.csproj b/DotnetPlayground.Web/DotnetPlayground.Web.csproj index ddc13c79..c3e25a48 100644 --- a/DotnetPlayground.Web/DotnetPlayground.Web.csproj +++ b/DotnetPlayground.Web/DotnetPlayground.Web.csproj @@ -42,7 +42,7 @@ - + diff --git a/DotnetPlayground.Web/package.json b/DotnetPlayground.Web/package.json index 5d959f68..6fe32bff 100644 --- a/DotnetPlayground.Web/package.json +++ b/DotnetPlayground.Web/package.json @@ -48,10 +48,10 @@ } }, "devDependencies": { - "@babel/core": "7.14.3", + "@babel/core": "7.14.6", "core-js": "3.14.0", - "@babel/plugin-transform-runtime": "7.14.3", - "@babel/preset-env": "7.14.4", + "@babel/plugin-transform-runtime": "7.14.5", + "@babel/preset-env": "7.14.5", "@babel/polyfill": "7.12.1", "babel-loader": "8.2.2", "eslint": "7.28.0", @@ -81,8 +81,8 @@ "blueimp-gallery": "3.3.0", "video.js": "7.12.3", "qrcodejs": "1.0.0", - "@microsoft/signalr": "5.0.6", - "@microsoft/signalr-protocol-msgpack": "5.0.6", + "@microsoft/signalr": "5.0.7", + "@microsoft/signalr-protocol-msgpack": "5.0.7", "msgpack5": "5.3.2", "ace-builds": "1.4.12", "faker": "5.5.3" diff --git a/DotnetPlayground.Web/wwwroot/sw.js b/DotnetPlayground.Web/wwwroot/sw.js index c5102dbb..76aedcf0 100644 --- a/DotnetPlayground.Web/wwwroot/sw.js +++ b/DotnetPlayground.Web/wwwroot/sw.js @@ -92,9 +92,9 @@ self.addEventListener('install', function (event) { 'https://cdn.jsdelivr.net/npm/jquery-validation-unobtrusive@3.2.12/dist/jquery.validate.unobtrusive.min.js' //'https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.12/ace.js',//questionable, only dev ? //'https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.12/mode-csharp.min.js',//questionable, only dev ? - //'https://cdn.jsdelivr.net/npm/@microsoft/signalr@5.0.6/dist/browser/signalr.min.js',//questionable, inkball ? + //'https://cdn.jsdelivr.net/npm/@microsoft/signalr@5.0.7/dist/browser/signalr.min.js',//questionable, inkball ? //'https://cdn.jsdelivr.net/npm/msgpack5@5.3.2/dist/msgpack5.min.js',//questionable, inkball ? - //'https://cdn.jsdelivr.net/npm/@microsoft/signalr-protocol-msgpack@5.0.6/dist/browser/signalr-protocol-msgpack.min.js'//questionable, inkball ? + //'https://cdn.jsdelivr.net/npm/@microsoft/signalr-protocol-msgpack@5.0.7/dist/browser/signalr-protocol-msgpack.min.js'//questionable, inkball ? ]); } diff --git a/InkBall b/InkBall index 7b24cd2e..ee45715f 160000 --- a/InkBall +++ b/InkBall @@ -1 +1 @@ -Subproject commit 7b24cd2ea933748a22024e8063e97b375769662d +Subproject commit ee45715fa0f0077b21dfc07148b8a460f6e9af70 From 57e15b6b9b7c3f2b12e0b75fb0c8aa2cc5fe0c19 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Jun 2021 11:20:11 +0200 Subject: [PATCH 35/47] build(deps): bump Google.Apis.YouTube.v3 from 1.51.0.2343 to 1.52.0.2364 (#75) Bumps [Google.Apis.YouTube.v3](https://github.com/google/google-api-dotnet-client) from 1.51.0.2343 to 1.52.0.2364. - [Release notes](https://github.com/google/google-api-dotnet-client/releases) - [Commits](https://github.com/google/google-api-dotnet-client/commits) --- updated-dependencies: - dependency-name: Google.Apis.YouTube.v3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- DotnetPlayground.Web/DotnetPlayground.Web.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DotnetPlayground.Web/DotnetPlayground.Web.csproj b/DotnetPlayground.Web/DotnetPlayground.Web.csproj index c3e25a48..fb2e5957 100644 --- a/DotnetPlayground.Web/DotnetPlayground.Web.csproj +++ b/DotnetPlayground.Web/DotnetPlayground.Web.csproj @@ -48,7 +48,7 @@ - + From 835281250e26e88765cea28a39fee6c0007660b7 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Tue, 29 Jun 2021 17:50:56 +0200 Subject: [PATCH 36/47] bump: Pomelo.EntityFrameworkCore.MySql, babel-*, eslint, gulp, Google.Apis.YouTube.v3 --- Caching-MySQL | 2 +- DotnetPlayground.Web/DotnetPlayground.Web.csproj | 4 ++-- DotnetPlayground.Web/package.json | 6 +++--- InkBall | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Caching-MySQL b/Caching-MySQL index afbba04d..07d2e634 160000 --- a/Caching-MySQL +++ b/Caching-MySQL @@ -1 +1 @@ -Subproject commit afbba04d3f2eb4746e8e56a56cc3ab78b6d53165 +Subproject commit 07d2e6346d7edb78ed3a9023f7bed2845084d26f diff --git a/DotnetPlayground.Web/DotnetPlayground.Web.csproj b/DotnetPlayground.Web/DotnetPlayground.Web.csproj index fb2e5957..b90e2204 100644 --- a/DotnetPlayground.Web/DotnetPlayground.Web.csproj +++ b/DotnetPlayground.Web/DotnetPlayground.Web.csproj @@ -43,12 +43,12 @@ - + - + diff --git a/DotnetPlayground.Web/package.json b/DotnetPlayground.Web/package.json index 6fe32bff..e6b7be38 100644 --- a/DotnetPlayground.Web/package.json +++ b/DotnetPlayground.Web/package.json @@ -49,12 +49,12 @@ }, "devDependencies": { "@babel/core": "7.14.6", - "core-js": "3.14.0", + "core-js": "3.15.2", "@babel/plugin-transform-runtime": "7.14.5", - "@babel/preset-env": "7.14.5", + "@babel/preset-env": "7.14.7", "@babel/polyfill": "7.12.1", "babel-loader": "8.2.2", - "eslint": "7.28.0", + "eslint": "7.29.0", "fs-extra": "10.0.0", "gulp": "4.0.2", "gulp-babel": "8.0.0", diff --git a/InkBall b/InkBall index ee45715f..de685e1c 160000 --- a/InkBall +++ b/InkBall @@ -1 +1 @@ -Subproject commit ee45715fa0f0077b21dfc07148b8a460f6e9af70 +Subproject commit de685e1c4c134aef18ba40aaac13ace5f6a7e9e6 From 4e2ad40e5261134847d9e44ecedb56aa32a25b76 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Tue, 29 Jun 2021 17:52:03 +0200 Subject: [PATCH 37/47] gulp-sass-5 changes --- DotnetPlayground.Web/gulpfile.js | 2 +- DotnetPlayground.Web/package.json | 3 +- DotnetPlayground.Web/wwwroot/css/site.css | 128 ++++++++++++++-------- 3 files changed, 83 insertions(+), 50 deletions(-) diff --git a/DotnetPlayground.Web/gulpfile.js b/DotnetPlayground.Web/gulpfile.js index e81c5d65..868e1d8d 100644 --- a/DotnetPlayground.Web/gulpfile.js +++ b/DotnetPlayground.Web/gulpfile.js @@ -2,7 +2,7 @@ "use strict"; const gulp = require("gulp"), - sass = require("gulp-sass"), + sass = require('gulp-sass')(require('sass')), header = require('gulp-header'), rimraf = require("rimraf"), concat = require("gulp-concat"), diff --git a/DotnetPlayground.Web/package.json b/DotnetPlayground.Web/package.json index e6b7be38..266b5b44 100644 --- a/DotnetPlayground.Web/package.json +++ b/DotnetPlayground.Web/package.json @@ -62,7 +62,8 @@ "gulp-concat": "2.6.1", "gulp-clean-css": "4.3.0", "gulp-rename": "2.0.0", - "gulp-sass": "4.1.0", + "gulp-sass": "5.0.0", + "sass": "1.35.1", "gulp-header": "2.0.9", "rimraf": "3.0.2", "concaveman": "1.2.0", diff --git a/DotnetPlayground.Web/wwwroot/css/site.css b/DotnetPlayground.Web/wwwroot/css/site.css index fce1c838..0bb962e2 100644 --- a/DotnetPlayground.Web/wwwroot/css/site.css +++ b/DotnetPlayground.Web/wwwroot/css/site.css @@ -1,35 +1,42 @@ @charset "UTF-8"; html, body { - height: 100vh; } + height: 100vh; +} body { - position: relative; } + position: relative; +} /* Wrapping element */ /* Set some basic padding to keep content from hitting the edges */ .body-content { - padding-top: 4.5rem; } + padding-top: 4.5rem; +} /* Carousel */ .carousel-caption p { font-size: 20px; - line-height: 1.4; } + line-height: 1.4; +} /* Make .svg files in the carousel display properly in older browsers */ .carousel-inner .item img[src$=".svg"] { - width: 100%; } + width: 100%; +} /* QR code generator */ #qrCode { - margin: 15px; } + margin: 15px; +} /* Hide/rearrange for smaller screens */ @media screen and (max-width: 767px) { /* Hide captions */ .carousel-caption { - display: none; } } - + display: none; + } +} /*My custom styling*/ /*.bg-dark-development { background-color: darkslateblue; @@ -39,10 +46,12 @@ body { }*/ .bg-my-theme { background-color: darkslateblue; - /*$themeColor is an injectted variable on gulp build pipeline by gulp-sass, gulp-header */ } + /*$themeColor is an injectted variable on gulp build pipeline by gulp-sass, gulp-header */ +} .navbar-dark .navbar-nav .nav-link { - color: #fff; } + color: #fff; +} #offlineIndicator { position: absolute; @@ -53,89 +62,110 @@ body { z-index: -1; overflow: hidden; color: white; - display: none; } + display: none; +} footer.container > noscript { - color: red; } + color: red; +} #spVersion::after { - content: ""; } + content: ""; +} /***************VirtualScroll start***************/ .bootstrap-table button.btn .fa-sync:after { - content: '↻'; + content: "↻"; display: block; font-style: normal; - font-weight: bold; } - + font-weight: bold; +} .bootstrap-table table tr.highlight { border-top: groove; - border-bottom: groove; } + border-bottom: groove; +} /***************WebCamGallery start*************/ #gallery-tab #links a { - text-decoration: none; } - #gallery-tab #links a img { - width: 133px; - height: 100px; } - #gallery-tab #links a img:hover { - transform: scale(1.2, 1.2); - box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.8); } + text-decoration: none; +} +#gallery-tab #links a img { + width: 133px; + height: 100px; +} +#gallery-tab #links a img:hover { + transform: scale(1.2, 1.2); + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.8); +} #video-tab .vjs-default-skin .vjs-big-play-button { top: 50%; left: 50%; margin: -1em auto auto -2em; width: 80px; - height: 50px; } + height: 50px; +} /* Extra large devices (large desktops, 1200px and up) */ @media (min-width: 1200px) { .video-js-box { width: 1280px !important; - height: 960px !important; } - #live.img-fluid { - max-width: 1280px !important; } } + height: 960px !important; + } + #live.img-fluid { + max-width: 1280px !important; + } +} /***************BruteForce start*************/ .workers .worker { opacity: 1; - transition: opacity 0.3s ease-out; } - .workers .worker.found .title { - background-color: rgba(0, 114, 0, 0.5); } - .workers .worker.failed .title { - background-color: lightgray; } - .workers .worker .done:not(.found) { - opacity: 0.4; } - .workers .worker .done:not(.found) .title { - background-color: rgba(110, 6, 6, 0.5); } - .workers .worker .title { - background-color: rgba(80, 0, 0, 0.5); - color: rgba(255, 255, 255, 0.9); - transition: background 0.3s ease-out; } + transition: opacity 0.3s ease-out; +} +.workers .worker.found .title { + background-color: rgba(0, 114, 0, 0.5); +} +.workers .worker.failed .title { + background-color: lightgray; +} +.workers .worker .done:not(.found) { + opacity: 0.4; +} +.workers .worker .done:not(.found) .title { + background-color: rgba(110, 6, 6, 0.5); +} +.workers .worker .title { + background-color: rgba(80, 0, 0, 0.5); + color: rgba(255, 255, 255, 0.9); + transition: background 0.3s ease-out; +} /***************Puzzles start*************/ .puzzles input[type=radio]:checked + label > img { border: 1px solid #fff; - box-shadow: 0 0 3px 3px #090; } + box-shadow: 0 0 3px 3px #090; +} /* Stuff after this is only to make things more pretty */ .puzzles input[type=radio] + label > img { border: 1px dashed #444; - transition: 500ms all; } + transition: 500ms all; +} .puzzles input[type=radio]:checked + label > img { - transform: rotateZ(-10deg); } + transform: rotateZ(-10deg); +} .puzzles .target { - --bimg: url('../images/puzzles/fond-puzzle.svg'); + --bimg: url("../images/puzzles/fond-puzzle.svg"); --trans: scale(2) rotateZ(180deg); position: relative; overflow: hidden; font-size: 2em; border: 4px solid #37e6c0; border-radius: 7px; - min-height: 32rem; } + min-height: 32rem; +} .puzzles .target::before { content: ""; @@ -146,7 +176,8 @@ footer.container > noscript { left: -50%; z-index: -1; background: var(--bimg) repeat; - transform: var(--trans); } + transform: var(--trans); +} .puzzles .target::after { content: ""; @@ -156,4 +187,5 @@ footer.container > noscript { top: 0; left: 0; z-index: -2; - background-image: var(--uploadedImg); } + background-image: var(--uploadedImg); +} \ No newline at end of file From 2c6e11488312f425e5160a615efedde578a27e4f Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Wed, 30 Jun 2021 00:26:38 +0200 Subject: [PATCH 38/47] gulp-sass breaking change: Slash as Division --- InkBall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InkBall b/InkBall index de685e1c..21bbdf0c 160000 --- a/InkBall +++ b/InkBall @@ -1 +1 @@ -Subproject commit de685e1c4c134aef18ba40aaac13ace5f6a7e9e6 +Subproject commit 21bbdf0c1099fb84528f681bc7eecf0cecd395a0 From ef58ceef7020d9c8d6d174690e2e60bf62b85d55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Jun 2021 08:07:21 +0200 Subject: [PATCH 39/47] build(deps): bump Microsoft.Azure.DocumentDB.Core from 2.14.1 to 2.15.0 (#80) Bumps Microsoft.Azure.DocumentDB.Core from 2.14.1 to 2.15.0. --- updated-dependencies: - dependency-name: Microsoft.Azure.DocumentDB.Core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- DotnetPlayground.Web/DotnetPlayground.Web.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DotnetPlayground.Web/DotnetPlayground.Web.csproj b/DotnetPlayground.Web/DotnetPlayground.Web.csproj index b90e2204..3d6da3ab 100644 --- a/DotnetPlayground.Web/DotnetPlayground.Web.csproj +++ b/DotnetPlayground.Web/DotnetPlayground.Web.csproj @@ -47,7 +47,7 @@ - + From 8bdfa7922fd34c4aa0a7fb435e284694a19b55aa Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Thu, 1 Jul 2021 19:23:55 +0200 Subject: [PATCH 40/47] bump: video.js --- DotnetPlayground.Web/Pages/WebCamGallery.cshtml | 4 ++-- DotnetPlayground.Web/package.json | 2 +- DotnetPlayground.Web/wwwroot/sw.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DotnetPlayground.Web/Pages/WebCamGallery.cshtml b/DotnetPlayground.Web/Pages/WebCamGallery.cshtml index 9c647353..640ba36d 100644 --- a/DotnetPlayground.Web/Pages/WebCamGallery.cshtml +++ b/DotnetPlayground.Web/Pages/WebCamGallery.cshtml @@ -17,7 +17,7 @@ - @@ -137,7 +137,7 @@ - diff --git a/DotnetPlayground.Web/package.json b/DotnetPlayground.Web/package.json index 266b5b44..8f2e73ac 100644 --- a/DotnetPlayground.Web/package.json +++ b/DotnetPlayground.Web/package.json @@ -80,7 +80,7 @@ "jquery-validation": "1.19.3", "jquery-validation-unobtrusive": "3.2.12", "blueimp-gallery": "3.3.0", - "video.js": "7.12.3", + "video.js": "7.13.3", "qrcodejs": "1.0.0", "@microsoft/signalr": "5.0.7", "@microsoft/signalr-protocol-msgpack": "5.0.7", diff --git a/DotnetPlayground.Web/wwwroot/sw.js b/DotnetPlayground.Web/wwwroot/sw.js index 76aedcf0..d85945f3 100644 --- a/DotnetPlayground.Web/wwwroot/sw.js +++ b/DotnetPlayground.Web/wwwroot/sw.js @@ -78,11 +78,11 @@ self.addEventListener('install', function (event) { //cdn resources RESOURCES = RESOURCES.concat([ 'https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/3.3.0/css/blueimp-gallery.min.css', - 'https://cdn.jsdelivr.net/npm/video.js@7.12.0/dist/video-js.min.css', + 'https://cdn.jsdelivr.net/npm/video.js@7.13.3/dist/video-js.min.css', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.18.2/bootstrap-table.min.css', 'https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css', 'https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/3.3.0/js/blueimp-gallery.min.js', - 'https://cdn.jsdelivr.net/npm/video.js@7.12.0/dist/alt/video.core.novtt.min.js', + 'https://cdn.jsdelivr.net/npm/video.js@7.13.3/dist/alt/video.core.novtt.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.18.2/bootstrap-table.min.js', //'https://cdn.jsdelivr.net/npm/faker@5.5.3/dist/faker.min.js',//questionable, big script ? 'https://cdn.jsdelivr.net/npm/node-forge@0.10.0/dist/forge.min.js', From 40620923544b0d92a8b5cd92797d4892d7f55a72 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Wed, 14 Jul 2021 19:09:03 +0200 Subject: [PATCH 41/47] bumps: dotnet runtime to 5.0.8, eslint, sass, signalr --- Caching-MySQL | 2 +- .../DotnetPlayground.Tests.csproj | 10 ++++---- .../DotnetPlayground.Web.csproj | 24 +++++++++---------- DotnetPlayground.Web/package.json | 8 +++---- DotnetPlayground.Web/wwwroot/sw.js | 4 ++-- InkBall | 2 +- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Caching-MySQL b/Caching-MySQL index 07d2e634..5561877f 160000 --- a/Caching-MySQL +++ b/Caching-MySQL @@ -1 +1 @@ -Subproject commit 07d2e6346d7edb78ed3a9023f7bed2845084d26f +Subproject commit 5561877f2c4b4cd58ca18ec0eea98a9c84c2420f diff --git a/DotnetPlayground.Tests/DotnetPlayground.Tests.csproj b/DotnetPlayground.Tests/DotnetPlayground.Tests.csproj index f1f676af..3f004a70 100644 --- a/DotnetPlayground.Tests/DotnetPlayground.Tests.csproj +++ b/DotnetPlayground.Tests/DotnetPlayground.Tests.csproj @@ -10,7 +10,7 @@ - + @@ -18,10 +18,10 @@ runtime; build; native; contentfiles; analyzers - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/DotnetPlayground.Web/DotnetPlayground.Web.csproj b/DotnetPlayground.Web/DotnetPlayground.Web.csproj index 3d6da3ab..fbe628bb 100644 --- a/DotnetPlayground.Web/DotnetPlayground.Web.csproj +++ b/DotnetPlayground.Web/DotnetPlayground.Web.csproj @@ -37,22 +37,22 @@ - - - + + + - + - - - - - + + + + + @@ -75,9 +75,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/DotnetPlayground.Web/package.json b/DotnetPlayground.Web/package.json index 8f2e73ac..79045ca9 100644 --- a/DotnetPlayground.Web/package.json +++ b/DotnetPlayground.Web/package.json @@ -54,7 +54,7 @@ "@babel/preset-env": "7.14.7", "@babel/polyfill": "7.12.1", "babel-loader": "8.2.2", - "eslint": "7.29.0", + "eslint": "7.30.0", "fs-extra": "10.0.0", "gulp": "4.0.2", "gulp-babel": "8.0.0", @@ -63,7 +63,7 @@ "gulp-clean-css": "4.3.0", "gulp-rename": "2.0.0", "gulp-sass": "5.0.0", - "sass": "1.35.1", + "sass": "1.35.2", "gulp-header": "2.0.9", "rimraf": "3.0.2", "concaveman": "1.2.0", @@ -82,8 +82,8 @@ "blueimp-gallery": "3.3.0", "video.js": "7.13.3", "qrcodejs": "1.0.0", - "@microsoft/signalr": "5.0.7", - "@microsoft/signalr-protocol-msgpack": "5.0.7", + "@microsoft/signalr": "5.0.8", + "@microsoft/signalr-protocol-msgpack": "5.0.8", "msgpack5": "5.3.2", "ace-builds": "1.4.12", "faker": "5.5.3" diff --git a/DotnetPlayground.Web/wwwroot/sw.js b/DotnetPlayground.Web/wwwroot/sw.js index d85945f3..54a32bd6 100644 --- a/DotnetPlayground.Web/wwwroot/sw.js +++ b/DotnetPlayground.Web/wwwroot/sw.js @@ -92,9 +92,9 @@ self.addEventListener('install', function (event) { 'https://cdn.jsdelivr.net/npm/jquery-validation-unobtrusive@3.2.12/dist/jquery.validate.unobtrusive.min.js' //'https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.12/ace.js',//questionable, only dev ? //'https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.12/mode-csharp.min.js',//questionable, only dev ? - //'https://cdn.jsdelivr.net/npm/@microsoft/signalr@5.0.7/dist/browser/signalr.min.js',//questionable, inkball ? + //'https://cdn.jsdelivr.net/npm/@microsoft/signalr@5.0.8/dist/browser/signalr.min.js',//questionable, inkball ? //'https://cdn.jsdelivr.net/npm/msgpack5@5.3.2/dist/msgpack5.min.js',//questionable, inkball ? - //'https://cdn.jsdelivr.net/npm/@microsoft/signalr-protocol-msgpack@5.0.7/dist/browser/signalr-protocol-msgpack.min.js'//questionable, inkball ? + //'https://cdn.jsdelivr.net/npm/@microsoft/signalr-protocol-msgpack@5.0.8/dist/browser/signalr-protocol-msgpack.min.js'//questionable, inkball ? ]); } diff --git a/InkBall b/InkBall index 21bbdf0c..049a1e3e 160000 --- a/InkBall +++ b/InkBall @@ -1 +1 @@ -Subproject commit 21bbdf0c1099fb84528f681bc7eecf0cecd395a0 +Subproject commit 049a1e3e24c485a22667e5bf38b16db741eb8164 From d4ff635f164e94cb30c53ca4618bdf2fbf34862e Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Mon, 19 Jul 2021 09:20:33 +0200 Subject: [PATCH 42/47] bumps: MessagePack, eslint --- DotnetPlayground.Web/DotnetPlayground.Web.csproj | 2 +- DotnetPlayground.Web/package.json | 2 +- InkBall | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DotnetPlayground.Web/DotnetPlayground.Web.csproj b/DotnetPlayground.Web/DotnetPlayground.Web.csproj index fbe628bb..2121804f 100644 --- a/DotnetPlayground.Web/DotnetPlayground.Web.csproj +++ b/DotnetPlayground.Web/DotnetPlayground.Web.csproj @@ -53,7 +53,7 @@ - + diff --git a/DotnetPlayground.Web/package.json b/DotnetPlayground.Web/package.json index 79045ca9..663e7190 100644 --- a/DotnetPlayground.Web/package.json +++ b/DotnetPlayground.Web/package.json @@ -54,7 +54,7 @@ "@babel/preset-env": "7.14.7", "@babel/polyfill": "7.12.1", "babel-loader": "8.2.2", - "eslint": "7.30.0", + "eslint": "7.31.0", "fs-extra": "10.0.0", "gulp": "4.0.2", "gulp-babel": "8.0.0", diff --git a/InkBall b/InkBall index 049a1e3e..248088f2 160000 --- a/InkBall +++ b/InkBall @@ -1 +1 @@ -Subproject commit 049a1e3e24c485a22667e5bf38b16db741eb8164 +Subproject commit 248088f2e85242dff19d7ac65511f9510091cc3f From c1dabde9c5d872fe0a0b4968347310901057d8f1 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Wed, 21 Jul 2021 10:38:10 +0200 Subject: [PATCH 43/47] VirtualScroll: bring back Load method (JSON API) keys names for properties --- .../HashesControllerTests.cs | 40 +++++++------- .../HashesRepositoryTests.cs | 10 ++-- DotnetPlayground.Tests/IntegrationTest.cs | 10 ++-- .../Controllers/HashesDataTableController.cs | 2 +- .../Repositories/CosmosDBRepository.cs | 4 +- .../Repositories/HashesRepository.cs | 54 +++++++++---------- .../Views/Hashes/VirtualScroll.cshtml | 2 +- 7 files changed, 61 insertions(+), 61 deletions(-) diff --git a/DotnetPlayground.Tests/HashesControllerTests.cs b/DotnetPlayground.Tests/HashesControllerTests.cs index a9154781..0e6ded34 100644 --- a/DotnetPlayground.Tests/HashesControllerTests.cs +++ b/DotnetPlayground.Tests/HashesControllerTests.cs @@ -125,8 +125,8 @@ internal static Moq.Mock MockHashesRepository() (IEnumerable Itemz, int Count) orgtuple = WebControllers.BaseController.ItemsToJson(items, sort, order, limit, offset); - (IEnumerable Itemz, int Count) tuple = - (orgtuple.Itemz.Select(tab => new string[] { tab.Key, tab.HashMD5, tab.HashSHA256 }), orgtuple.Count); + (IEnumerable Itemz, int Count) tuple = + (orgtuple.Itemz, orgtuple.Count); return Task.FromResult(tuple); }); @@ -653,9 +653,9 @@ await repository.AddRangeAsync(new[] //fetching anonymous object from JsonResult is weird; use reflection Assert.IsType(((JsonResult)result).Value.GetType().GetProperty("total").GetValue(((JsonResult)result).Value)); Assert.Equal(1, (int)((JsonResult)result).Value.GetType().GetProperty("total").GetValue(((JsonResult)result).Value)); - Assert.IsAssignableFrom>(((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); - Assert.Single((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); - Assert.Equal("ilfad", ((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)).ElementAt(0)[0]); + Assert.IsAssignableFrom>(((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); + Assert.Single((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); + Assert.Equal("ilfad", ((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)).ElementAt(0).Key); // Act - search by Hash256 dont mind ordering result = await controller.Load(new HashesDataTableLoadInput(null, null, "b3a7dc", 0, 0, "blah")); @@ -664,9 +664,9 @@ await repository.AddRangeAsync(new[] Assert.IsType(result); Assert.IsType(((JsonResult)result).Value.GetType().GetProperty("total").GetValue(((JsonResult)result).Value)); Assert.Equal(1, (int)((JsonResult)result).Value.GetType().GetProperty("total").GetValue(((JsonResult)result).Value)); - Assert.IsAssignableFrom>(((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); - Assert.Single((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); - Assert.Equal("aaaac", ((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)).ElementAt(0)[0]); + Assert.IsAssignableFrom>(((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); + Assert.Single((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); + Assert.Equal("aaaac", ((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)).ElementAt(0).Key); // Act - search by Hash256 but not from start - should not find anything result = await controller.Load(new HashesDataTableLoadInput(null, null, "e7fc0c5", 0, 0, "blah")); @@ -675,8 +675,8 @@ await repository.AddRangeAsync(new[] Assert.IsType(result); Assert.IsType(((JsonResult)result).Value.GetType().GetProperty("total").GetValue(((JsonResult)result).Value)); Assert.Equal(0, (int)((JsonResult)result).Value.GetType().GetProperty("total").GetValue(((JsonResult)result).Value)); - Assert.IsAssignableFrom>(((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); - Assert.Empty((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); + Assert.IsAssignableFrom>(((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); + Assert.Empty((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); // Act - ensure order by Key desc @@ -684,9 +684,9 @@ await repository.AddRangeAsync(new[] Assert.IsType(((JsonResult)result).Value.GetType().GetProperty("total").GetValue(((JsonResult)result).Value)); Assert.True((int)((JsonResult)result).Value.GetType().GetProperty("total").GetValue(((JsonResult)result).Value) > 0); - Assert.IsAssignableFrom>(((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); - Assert.NotEmpty((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); - Assert.Equal("aaaaa", ((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)).Last()[0]); + Assert.IsAssignableFrom>(((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); + Assert.NotEmpty((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); + Assert.Equal("aaaaa", ((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)).Last().Key); // Act - ensure order by HashSHA256 asc @@ -694,9 +694,9 @@ await repository.AddRangeAsync(new[] Assert.IsType(((JsonResult)result).Value.GetType().GetProperty("total").GetValue(((JsonResult)result).Value)); Assert.True((int)((JsonResult)result).Value.GetType().GetProperty("total").GetValue(((JsonResult)result).Value) > 0); - Assert.IsAssignableFrom>(((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); - Assert.Equal(3, ((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)).Count()); - Assert.Equal("aaaab", ((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)).First()[0]); + Assert.IsAssignableFrom>(((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); + Assert.Equal(3, ((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)).Count()); + Assert.Equal("aaaab", ((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)).First().Key); // Act - search unexisting, empty result @@ -704,8 +704,8 @@ await repository.AddRangeAsync(new[] Assert.IsType(((JsonResult)result).Value.GetType().GetProperty("total").GetValue(((JsonResult)result).Value)); Assert.Equal(0, (int)((JsonResult)result).Value.GetType().GetProperty("total").GetValue(((JsonResult)result).Value)); - Assert.IsAssignableFrom>(((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); - Assert.Empty(((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value))); + Assert.IsAssignableFrom>(((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); + Assert.Empty(((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value))); // Act - order by bad column - should raise an exception var exception = Assert.ThrowsAnyAsync(async () => @@ -721,8 +721,8 @@ await repository.AddRangeAsync(new[] Assert.IsType(result); Assert.IsType(((JsonResult)result).Value.GetType().GetProperty("total").GetValue(((JsonResult)result).Value)); Assert.Equal(12, (int)((JsonResult)result).Value.GetType().GetProperty("total").GetValue(((JsonResult)result).Value)); - Assert.IsAssignableFrom>(((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); - Assert.True(12 == ((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)).Count()); + Assert.IsAssignableFrom>(((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)); + Assert.True(12 == ((IEnumerable)((JsonResult)result).Value.GetType().GetProperty("rows").GetValue(((JsonResult)result).Value)).Count()); } } diff --git a/DotnetPlayground.Tests/HashesRepositoryTests.cs b/DotnetPlayground.Tests/HashesRepositoryTests.cs index 12261744..12c69ae8 100644 --- a/DotnetPlayground.Tests/HashesRepositoryTests.cs +++ b/DotnetPlayground.Tests/HashesRepositoryTests.cs @@ -204,7 +204,7 @@ await repository.AddRangeAsync(new[]{ Assert.True(found.Count > 0); Assert.NotEmpty(found.Itemz); Assert.True(1 == found.Itemz.Count()); - Assert.Equal("fakefakef", found.Itemz.First()[0]); + Assert.Equal("fakefakef", found.Itemz.First().Key); } } catch (Exception) @@ -253,8 +253,8 @@ public async Task Paging_lots_of_elements(int itemsCount) Assert.NotEmpty(found.Itemz); Assert.Equal(found.Count, itemsCount); Assert.Equal(10, found.Itemz.Count()); - Assert.Equal("fakefakef_10", found.Itemz.First()[0]); - Assert.Equal("fakefakefakefakefakefakefakefakefakefakefakefakefakefakefakefake_10", found.Itemz.First()[2]); + Assert.Equal("fakefakef_10", found.Itemz.First().Key); + Assert.Equal("fakefakefakefakefakefakefakefakefakefakefakefakefakefakefakefake_10", found.Itemz.First().HashSHA256); } } catch (Exception) @@ -306,8 +306,8 @@ public async Task Paging_lots_of_elements(int itemsCount) Assert.NotEmpty(found.Itemz); Assert.Equal(found.Count, itemsCount); Assert.Equal(10, found.Itemz.Count()); - Assert.Equal("alamakota_10", found.Itemz.First()[0]); - Assert.Equal("63b347973bb99fed9277b33cb4646b205e9a31331acfa574add3d2351f445e43_10", found.Itemz.First()[2]); + Assert.Equal("alamakota_10", found.Itemz.First().Key); + Assert.Equal("63b347973bb99fed9277b33cb4646b205e9a31331acfa574add3d2351f445e43_10", found.Itemz.First().HashSHA256); } } catch (Exception) diff --git a/DotnetPlayground.Tests/IntegrationTest.cs b/DotnetPlayground.Tests/IntegrationTest.cs index fa0aef08..6afe50bf 100644 --- a/DotnetPlayground.Tests/IntegrationTest.cs +++ b/DotnetPlayground.Tests/IntegrationTest.cs @@ -326,7 +326,7 @@ public class HashesDataTablePage class TypedResult { public int total { get; set; } - public string[][] rows { get; set; } + public ThinHashes[] rows { get; set; } }; private readonly TestServerFixture _fixture; @@ -393,20 +393,20 @@ public async Task Load_Valid(string sort, string order, string search, int var typed_result = new TypedResult { total = 1, - rows = new string[][] { } + rows = new ThinHashes[] { } }; // Deserialize JSON String into concrete class - var data = JsonSerializer.Deserialize(jsonString); + var data = JsonSerializer.Deserialize(jsonString, new JsonSerializerOptions{ PropertyNameCaseInsensitive = true }); Assert.IsType(typed_result.GetType(), data); - Assert.IsAssignableFrom>(data.rows); + Assert.IsAssignableFrom>(data.rows); Assert.True(data.rows.Length == 5 || data.rows.Length == 0); Assert.True(data.total >= 0); if (data.rows.Length > 0) { - Assert.StartsWith(search, data.rows[0][0]); + Assert.StartsWith(search, data.rows[0].Key); if (query_input.TryGetValue("ExtraParam", out string value) && value == "cached") { diff --git a/DotnetPlayground.Web/Controllers/HashesDataTableController.cs b/DotnetPlayground.Web/Controllers/HashesDataTableController.cs index d1ca3e00..9d76efed 100644 --- a/DotnetPlayground.Web/Controllers/HashesDataTableController.cs +++ b/DotnetPlayground.Web/Controllers/HashesDataTableController.cs @@ -97,7 +97,7 @@ public async Task Stream(HashesDataTableLoadInput input) //string separator = string.Empty; foreach (var item in found.Itemz) { - sb.AppendFormat("{{ \"arr\": [\"{0}\",\"{1}\",\"{2}\"] }}", item[0], item[1], item[2]/*, separator*/); + sb.AppendFormat("{{ \"arr\": [Key:\"{0}\",HashMD5:\"{1}\",HashSHA256:\"{2}\"] }}", item.Key, item.HashMD5, item.HashSHA256/*, separator*/); //separator = ";"; } string result = sb.ToString(); diff --git a/DotnetPlayground.Web/Repositories/CosmosDBRepository.cs b/DotnetPlayground.Web/Repositories/CosmosDBRepository.cs index dbdd692c..4fa74671 100644 --- a/DotnetPlayground.Web/Repositories/CosmosDBRepository.cs +++ b/DotnetPlayground.Web/Repositories/CosmosDBRepository.cs @@ -235,7 +235,7 @@ public async Task> AutoComplete(string text) /// /// /// - public async Task<(IEnumerable Itemz, int Count)> PagedSearchAsync(string sortColumn, string sortOrderDirection, string searchText, + public async Task<(IEnumerable Itemz, int Count)> PagedSearchAsync(string sortColumn, string sortOrderDirection, string searchText, int offset, int limit, CancellationToken token) { limit = limit > 0 ? limit : -1; @@ -287,7 +287,7 @@ public async Task> AutoComplete(string text) results.AddRange(await asDocument.ExecuteNextAsync()); } - return (results.Select(x => new string[] { x.Key, x.HashMD5, x.HashSHA256 }), count); + return (results, count); #region Old code /*//inner method diff --git a/DotnetPlayground.Web/Repositories/HashesRepository.cs b/DotnetPlayground.Web/Repositories/HashesRepository.cs index 0a49d1fd..112ed5b7 100644 --- a/DotnetPlayground.Web/Repositories/HashesRepository.cs +++ b/DotnetPlayground.Web/Repositories/HashesRepository.cs @@ -35,7 +35,7 @@ public interface IHashesRepositoryPure Task> AutoComplete(string text); - Task<(IEnumerable Itemz, int Count)> PagedSearchAsync(string sortColumn, string sortOrderDirection, string searchText, + Task<(IEnumerable Itemz, int Count)> PagedSearchAsync(string sortColumn, string sortOrderDirection, string searchText, int offset, int limit, CancellationToken token); Task CalculateHashesInfo(ILogger logger, DbContextOptions dbContextOptions, @@ -232,7 +232,7 @@ private string WhereColumnCondition(char colNamePrefix, char colNameSuffix, IEnu /// The limit. /// The token. /// - private async Task<(IEnumerable Itemz, int Count)> PagedSearchSqlServerAsync(string sortColumn, string sortOrderDirection, + private async Task<(IEnumerable Itemz, int Count)> PagedSearchSqlServerAsync(string sortColumn, string sortOrderDirection, string searchText, int offset, int limit, CancellationToken token) { string col_names = string.Join("],[", AllColumnNames); @@ -260,7 +260,7 @@ FETCH NEXT @limit ROWS ONLY var conn = _entities.Database.GetDbConnection(); try { - var found = new List(limit); + var found = new List(limit); int count = -1; await conn.OpenAsync(token); @@ -320,12 +320,12 @@ FETCH NEXT @limit ROWS ONLY { string[] strings = new string[3]; rdr.GetValues(strings); - found.Add(/*new ThinHashes + found.Add(new ThinHashes { Key = strings[0], HashMD5 = strings[1], HashSHA256 = strings[2] - }*/strings); + }/*strings*/); } } else @@ -354,7 +354,7 @@ FETCH NEXT @limit ROWS ONLY /// The limit. /// The token. /// - private async Task<(List Itemz, int Count)> PagedSearchMySqlAsync(string sortColumn, string sortOrderDirection, string searchText, + private async Task<(List Itemz, int Count)> PagedSearchMySqlAsync(string sortColumn, string sortOrderDirection, string searchText, int offset, int limit, CancellationToken token) { string col_names = string.Join("`,`", AllColumnNames); @@ -381,7 +381,7 @@ LIMIT @limit OFFSET @offset using (var conn = new MySqlConnection(_configuration.GetConnectionString("MySQL"))) { - var found = new List(limit); + var found = new List(limit); int count = -1; await conn.OpenAsync(token); @@ -441,12 +441,12 @@ LIMIT @limit OFFSET @offset { string[] strings = new string[3]; rdr.GetValues(strings); - found.Add(/*new ThinHashes + found.Add(new ThinHashes { Key = strings[0], HashMD5 = strings[1], HashSHA256 = strings[2] - }*/strings); + }/*strings*/); } } else @@ -470,7 +470,7 @@ LIMIT @limit OFFSET @offset /// The limit. /// The token. /// - private async Task<(IEnumerable Itemz, int Count)> PagedSearchSqliteAsync(string sortColumn, string sortOrderDirection, + private async Task<(IEnumerable Itemz, int Count)> PagedSearchSqliteAsync(string sortColumn, string sortOrderDirection, string searchText, int offset, int limit, CancellationToken token) { string col_names = string.Join("],[", AllColumnNames); @@ -497,7 +497,7 @@ LIMIT @limit OFFSET @offset var conn = _entities.Database.GetDbConnection(); try { - var found = new List(limit); + var found = new List(limit); int count = -1; await conn.OpenAsync(token); @@ -557,12 +557,12 @@ LIMIT @limit OFFSET @offset { string[] strings = new string[3]; rdr.GetValues(strings); - found.Add(/*new ThinHashes + found.Add(new ThinHashes { Key = strings[0], HashMD5 = strings[1], HashSHA256 = strings[2] - }*/strings); + }/*strings*/); } } else @@ -591,7 +591,7 @@ LIMIT @limit OFFSET @offset /// The limit. /// The token. /// - private async Task<(IEnumerable Itemz, int Count)> PagedSearchPostgresAsync(string sortColumn, string sortOrderDirection, string searchText, int offset, int limit, CancellationToken token) + private async Task<(IEnumerable Itemz, int Count)> PagedSearchPostgresAsync(string sortColumn, string sortOrderDirection, string searchText, int offset, int limit, CancellationToken token) { string col_names = string.Join("\",\"", PostgresAllColumnNames); string sql =// "SET SESSION SQL_BIG_SELECTS=1;" + @@ -619,7 +619,7 @@ LIMIT @limit OFFSET @offset { conn.ProvideClientCertificatesCallback = ContextFactory.MyProvideClientCertificatesCallback; - var found = new List(limit); + var found = new List(limit); int count = -1; await conn.OpenAsync(token); @@ -679,12 +679,12 @@ LIMIT @limit OFFSET @offset { string[] strings = new string[3]; rdr.GetValues(strings); - found.Add(/*new ThinHashes + found.Add(new ThinHashes { Key = strings[0], HashMD5 = strings[1], HashSHA256 = strings[2] - }*/strings); + }/*strings*/); } } else @@ -710,7 +710,7 @@ LIMIT @limit OFFSET @offset /// The limit. /// The token. /// - private async Task<(IEnumerable Itemz, int Count)> PagedSearchOracleAsync( + private async Task<(IEnumerable Itemz, int Count)> PagedSearchOracleAsync( string sortColumn, string sortOrderDirection, string searchText, int offset, int limit, CancellationToken token) { string col_names = string.Join("\",\"", PostgresAllColumnNames); @@ -743,7 +743,7 @@ FROM RowAndWhere B "); using (var conn = new OracleConnection(_configuration.GetConnectionString("Oracle"))) { - var found = new List(limit); + var found = new List(limit); int count = 0; await conn.OpenAsync(token); @@ -798,14 +798,14 @@ FROM RowAndWhere B { rdr.GetValues(strings); found.Add( - /*new ThinHashes + new ThinHashes { - Key = strings[0].ToString(), - HashMD5 = strings[1].ToString(), - HashSHA256 = strings[2].ToString() - }*/ + Key = (string)strings[0], + HashMD5 = (string)strings[1], + HashSHA256 = (string)strings[2], + } /*strings.Take(3).Cast().ToArray()*/ - new string[] { (string)strings[0], (string)strings[1], (string)strings[2] } + //new string[] { (string)strings[0], (string)strings[1], (string)strings[2] } ); } if (strings[3] != null) @@ -828,7 +828,7 @@ FROM RowAndWhere B /// The limit. /// The token. /// - public async Task<(IEnumerable Itemz, int Count)> PagedSearchAsync(string sortColumn, string sortOrderDirection, string searchText, + public async Task<(IEnumerable Itemz, int Count)> PagedSearchAsync(string sortColumn, string sortOrderDirection, string searchText, int offset, int limit, CancellationToken token) { _serverTiming.Metrics.Add(new Lib.AspNetCore.ServerTiming.Http.Headers.ServerTimingMetric("ctor", Watch.ElapsedMilliseconds, @@ -916,7 +916,7 @@ FROM RowAndWhere B _serverTiming.Metrics.Add(new Lib.AspNetCore.ServerTiming.Http.Headers.ServerTimingMetric("READY", Watch.ElapsedMilliseconds, "PagedSearchAsync ready")); - return (found.Select(tab => new string[] { tab.Key, tab.HashMD5, tab.HashSHA256 }), found.FoundCount); + return (found, found.FoundCount); } finally { diff --git a/DotnetPlayground.Web/Views/Hashes/VirtualScroll.cshtml b/DotnetPlayground.Web/Views/Hashes/VirtualScroll.cshtml index 20ddcde7..d2c0a57c 100644 --- a/DotnetPlayground.Web/Views/Hashes/VirtualScroll.cshtml +++ b/DotnetPlayground.Web/Views/Hashes/VirtualScroll.cshtml @@ -102,7 +102,7 @@ function responseHandler(response) { //debugger; const mapped = response.rows.map(function(tab) { - return { Key: tab[0], HashMD5: tab[1], HashSHA256: tab[2] }; + return { Key: tab.key, HashMD5: tab.hashMD5, HashSHA256: tab.hashSHA256 }; }); response.rows = mapped; return response; From 2815a02859513a3d631c4e82936a4e0ba4e77aa4 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Sun, 25 Jul 2021 23:21:20 +0200 Subject: [PATCH 44/47] GoogleClientSecrets.Load deprecation --- DotnetPlayground.Web/Services/YouTubePlaylistDumpOperation.cs | 3 ++- DotnetPlayground.Web/Services/YouTubeUploadOperation.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DotnetPlayground.Web/Services/YouTubePlaylistDumpOperation.cs b/DotnetPlayground.Web/Services/YouTubePlaylistDumpOperation.cs index 28d596b5..cc2dd523 100644 --- a/DotnetPlayground.Web/Services/YouTubePlaylistDumpOperation.cs +++ b/DotnetPlayground.Web/Services/YouTubePlaylistDumpOperation.cs @@ -93,9 +93,10 @@ private async Task> ExecuteYouTubeDataApiV3(IConfigura using (var stream = new FileStream(youTubeConf["ClientSecretsFileName"], FileMode.Open, FileAccess.Read)) { var store = new GoogleKeyContextStore(context, environment, token); + var googl_secrets = await GoogleClientSecrets.FromStreamAsync(stream, token); credential = await GoogleWebAuthorizationBroker.AuthorizeAsync( - GoogleClientSecrets.Load(stream).Secrets, + googl_secrets.Secrets, // This OAuth 2.0 access scope allows for read-only access to the authenticated // user's account, but not other types of account access. new[] { YouTubeService.Scope.YoutubeReadonly }, diff --git a/DotnetPlayground.Web/Services/YouTubeUploadOperation.cs b/DotnetPlayground.Web/Services/YouTubeUploadOperation.cs index 0380471a..a2f45464 100644 --- a/DotnetPlayground.Web/Services/YouTubeUploadOperation.cs +++ b/DotnetPlayground.Web/Services/YouTubeUploadOperation.cs @@ -86,9 +86,10 @@ private async Task ExecuteYouTubeDataApiV3(IConfiguration youTubeConf, using (var stream = new FileStream(youTubeConf["ClientSecretsFileName"], FileMode.Open, FileAccess.Read)) { var store = new GoogleKeyContextStore(context, environment, token); + var googl_secrets = await GoogleClientSecrets.FromStreamAsync(stream, token); credential = await GoogleWebAuthorizationBroker.AuthorizeAsync( - GoogleClientSecrets.Load(stream).Secrets, + googl_secrets.Secrets, // This OAuth 2.0 access scope allows for read-write access to the authenticated // user's account, but not other types of account access. new[] { YouTubeService.Scope.Youtube, YouTubeService.Scope.YoutubeUpload }, From d6043ef82b45034e61a1c23ed79669a8d76effb3 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Sun, 25 Jul 2021 23:22:17 +0200 Subject: [PATCH 45/47] bumps: babel-*, sass --- DotnetPlayground.Web/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DotnetPlayground.Web/package.json b/DotnetPlayground.Web/package.json index 663e7190..2f307298 100644 --- a/DotnetPlayground.Web/package.json +++ b/DotnetPlayground.Web/package.json @@ -48,10 +48,10 @@ } }, "devDependencies": { - "@babel/core": "7.14.6", + "@babel/core": "7.14.8", "core-js": "3.15.2", "@babel/plugin-transform-runtime": "7.14.5", - "@babel/preset-env": "7.14.7", + "@babel/preset-env": "7.14.8", "@babel/polyfill": "7.12.1", "babel-loader": "8.2.2", "eslint": "7.31.0", @@ -63,7 +63,7 @@ "gulp-clean-css": "4.3.0", "gulp-rename": "2.0.0", "gulp-sass": "5.0.0", - "sass": "1.35.2", + "sass": "1.36.0", "gulp-header": "2.0.9", "rimraf": "3.0.2", "concaveman": "1.2.0", From 990be26f40fc3503c0965c7cc21ade3fb9388b18 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Wed, 28 Jul 2021 00:05:53 +0200 Subject: [PATCH 46/47] bump: video.js --- DotnetPlayground.Web/Pages/WebCamGallery.cshtml | 4 ++-- DotnetPlayground.Web/package.json | 2 +- DotnetPlayground.Web/wwwroot/sw.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DotnetPlayground.Web/Pages/WebCamGallery.cshtml b/DotnetPlayground.Web/Pages/WebCamGallery.cshtml index 640ba36d..d053bafa 100644 --- a/DotnetPlayground.Web/Pages/WebCamGallery.cshtml +++ b/DotnetPlayground.Web/Pages/WebCamGallery.cshtml @@ -17,7 +17,7 @@ - @@ -137,7 +137,7 @@ - diff --git a/DotnetPlayground.Web/package.json b/DotnetPlayground.Web/package.json index 2f307298..4d06f3d2 100644 --- a/DotnetPlayground.Web/package.json +++ b/DotnetPlayground.Web/package.json @@ -80,7 +80,7 @@ "jquery-validation": "1.19.3", "jquery-validation-unobtrusive": "3.2.12", "blueimp-gallery": "3.3.0", - "video.js": "7.13.3", + "video.js": "7.14.3", "qrcodejs": "1.0.0", "@microsoft/signalr": "5.0.8", "@microsoft/signalr-protocol-msgpack": "5.0.8", diff --git a/DotnetPlayground.Web/wwwroot/sw.js b/DotnetPlayground.Web/wwwroot/sw.js index 54a32bd6..cd8c4faa 100644 --- a/DotnetPlayground.Web/wwwroot/sw.js +++ b/DotnetPlayground.Web/wwwroot/sw.js @@ -78,11 +78,11 @@ self.addEventListener('install', function (event) { //cdn resources RESOURCES = RESOURCES.concat([ 'https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/3.3.0/css/blueimp-gallery.min.css', - 'https://cdn.jsdelivr.net/npm/video.js@7.13.3/dist/video-js.min.css', + 'https://cdnjs.cloudflare.com/ajax/libs/video.js/7.14.3/video-js.min.css', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.18.2/bootstrap-table.min.css', 'https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css', 'https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/3.3.0/js/blueimp-gallery.min.js', - 'https://cdn.jsdelivr.net/npm/video.js@7.13.3/dist/alt/video.core.novtt.min.js', + 'https://cdnjs.cloudflare.com/ajax/libs/video.js/7.14.3/alt/video.core.novtt.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.18.2/bootstrap-table.min.js', //'https://cdn.jsdelivr.net/npm/faker@5.5.3/dist/faker.min.js',//questionable, big script ? 'https://cdn.jsdelivr.net/npm/node-forge@0.10.0/dist/forge.min.js', From a5a85b6233ecbd4ffe09b1fa3cc1a4705b361e54 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Thu, 29 Jul 2021 18:39:46 +0200 Subject: [PATCH 47/47] bump: MessagePack, Google.Apis.YouTube.v3 --- DotnetPlayground.Web/DotnetPlayground.Web.csproj | 4 ++-- InkBall | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DotnetPlayground.Web/DotnetPlayground.Web.csproj b/DotnetPlayground.Web/DotnetPlayground.Web.csproj index 2121804f..85475661 100644 --- a/DotnetPlayground.Web/DotnetPlayground.Web.csproj +++ b/DotnetPlayground.Web/DotnetPlayground.Web.csproj @@ -48,12 +48,12 @@ - + - + diff --git a/InkBall b/InkBall index 248088f2..ed5a1f4f 160000 --- a/InkBall +++ b/InkBall @@ -1 +1 @@ -Subproject commit 248088f2e85242dff19d7ac65511f9510091cc3f +Subproject commit ed5a1f4f1d04aeec062048e3e7cc7636fd567207