This commit is contained in:
Eugenio Chiodo 2022-02-15 00:08:41 +01:00
parent 5cba76554a
commit e64bce3171
22 changed files with 1152 additions and 93 deletions

View File

@ -12,6 +12,14 @@
<div class="flex flex-col space-y-3 flex-1 py-3 pr-3 md:py-4 md:pr-4 min-w-0">
<div class="flex flex-col space-y-1 flex-1 min-w-0">
@if (Message.BoostingUser != null)
{
<p class="inline-flex flex-1 space-x-2 min-w-0 text-xs text-xs">
<a class="font-bold" href="@Message.BoostingUser.ProfileUrl" title="@Message.BoostingUser.UserName">@Message.BoostingUser.DisplayName</a>
<i class="ion-md-repeat has-text-info" aria-hidden="true"></i>
<span>@CascadingState.Localizer["boosted"]</span>
</p>
}
<p class="inline-flex flex-1 space-x-2 min-w-0 justify-between text-xs md:text-sm">
<span class="inline-flex space-x-2 min-w-0">
<b class="shrink truncate max-w-[80%]" title="@Message.User.DisplayName">
@ -105,11 +113,15 @@
}
@if (OnMessageBoost.HasDelegate)
{
<button class="button is-small is-rounded @(Message.IsBoosted ? "neoBtnSmallInsetPlain" : "neoBtnSmall")" @onclick="() => OnMessageBoost.InvokeAsync(Message)"
<button class="button is-small is-rounded @SUtility.IfTrueThen(Message.IsBoostedByCurrentUser,"neoBtnSmallInsetPlain","neoBtnSmall") @SUtility.IfTrueThen(Message.BoostsCounter != 0, "has-icons-left")" @onclick="() => OnMessageBoost.InvokeAsync(Message)"
title="@CascadingState.Localizer["Boost"]">
<span class="icon">
<i aria-hidden="true" class="ion-md-repeat text-lg has-text-info"></i>
<span class="icon is-left">
<i aria-hidden="true" class="ion-md-repeat @SUtility.IfTrueThen(Message.BoostsCounter != 0,null,"text-lg") has-text-info"></i>
</span>
@if (Message.BoostsCounter != 0)
{
<span>@Message.BoostsCounter</span>
}
</button>
}
@if (OnMessageFavourite.HasDelegate)

View File

@ -307,7 +307,8 @@
MediaType.Images => 5,
MediaType.Audio => 1,
MediaType.Video => 1,
MediaType.Documents => 3
MediaType.Documents => 3,
_ => 0
};
if (eventArgs.FileCount > maximumFileCount)
{
@ -324,7 +325,8 @@
MediaType.Images => 3_145_728,
MediaType.Audio => 5_242_880,
MediaType.Video => 20_971_520,
MediaType.Documents => 3_145_728
MediaType.Documents => 3_145_728,
_ => 0
};
var uploadMedia = default(UploadMedia);
using (var memStream = new MemoryStream())

File diff suppressed because one or more lines are too long

704
Docs/Insomnia_APIs.json Normal file
View File

@ -0,0 +1,704 @@
{
"_type": "export",
"__export_format": 4,
"__export_date": "2022-02-14T20:02:43.810Z",
"__export_source": "insomnia.desktop.app:v2021.7.2",
"resources": [
{
"_id": "req_db7df93225be442e89a167ae594c5551",
"parentId": "fld_2fca219979e448c997a6788d2b539ee7",
"modified": 1644868863001,
"created": 1643816994345,
"url": "https://localhost:5000/api/v1/message/add",
"name": "Add message",
"description": "rootMessageId => un susseguirsi di risposte ad un messaggio si portera' dietro sempre l'id del messaggio di partenza\n\ntitle => titolo opzionale\n\ncontent => testo del messaggio, con supporto di markdown\n\nResponse JSON:\n\n>\t\t{\n>\t\t\t\"user\": {\n\t\t\t\t\"userId\": \"guid/uuid/whatever\",\n\t\t\t\t\"userName\": \"@loosy@letsrulethe.world\",\n\t\t\t\t\"displayName\": \"loosy\",\n\t\t\t\t\"pictureUrl\": \"https://...\",\n\t\t\t\t\"backgroundUrl\": \"https://...\",\n\t\t\t\t\"profileUrl\": \"https://...\"\n\t\t\t},\n\t\t\t\"messageType\": \"1||2||3||4\",//Direct,FollowersOnly,Unlisted,Public\n\t\t\t\"rootMessageId\": null,\n\t\t\t\"messageId\": \"guid/uuid/whatever\",\n\t\t\t\"title\": \"...\",\n\t\t\t\"content\": \"...\",\n\t\t\t\"isFavourite\": false,\n\t\t\t\"isBoosted\": false,\n\t\t\t\"media\": [{\n\t\t\t\t\t\"fileName\": \"ciao.png\",\n\t\t\t\t\t\"altText\": \"descrizione immagine\",\n\t\t\t\t\t\"contentType\": \"image/png\",\n\t\t\t\t\t\"url\": \"https://bbs.keinpfusch.net/files/webpublic-ee9faea1-6786-4bf4-9a42-7a1f07de2dc5\"\n\t\t\t}],\n\t\t\t\"createdAt\": \"UTC or ticks\"\n>\t\t}\n",
"method": "POST",
"body": {
"mimeType": "application/json",
"text": " {\n\t\"contentType\": \"1||2||3\",//PlainText,HTML,Markdown\n\t\"messageType\": \"1||2||3||4\",//Direct,FollowersOnly,Unlisted,Public,\n\t\"mediaType\": \"1||2||3||4\",//Images,Video,Audio,Documents\n\t\"rootMessageId\": null,\n\t\"title\": \"...\",\n\t\"content\": \"...\",\n\t\"media\": [{\n\t\t\"fileName\": \"ciao.png\",\n \"altText\": \"descrizione opzionale immagine\",\n\t\t\"contentType\": \"image/png\",//mime\n\t\t\"blob\": [23,33,11,...]//byteArray || base64?\n\t}],\n\t\"createdAt\": \"UTC or ticks\"\n}\n\n"
},
"parameters": [],
"headers": [
{
"name": "Content-Type",
"value": "application/json",
"id": "pair_b95faf0515f9453595110e7895330c5f"
}
],
"authentication": {},
"metaSortKey": -1643816957190,
"isPrivate": false,
"settingStoreCookies": true,
"settingSendCookies": true,
"settingDisableRenderRequestBody": false,
"settingEncodeUrl": true,
"settingRebuildPath": true,
"settingFollowRedirects": "global",
"_type": "request"
},
{
"_id": "fld_2fca219979e448c997a6788d2b539ee7",
"parentId": "wrk_da47ff9b3d7f40f3bef9e90b46d6610b",
"modified": 1643829443147,
"created": 1643816769446,
"name": "APIs",
"description": "",
"environment": {},
"environmentPropertyOrder": {},
"metaSortKey": -1643816769446,
"_type": "request_group"
},
{
"_id": "wrk_da47ff9b3d7f40f3bef9e90b46d6610b",
"parentId": null,
"modified": 1608987862911,
"created": 1608987862911,
"name": "Insomnia",
"description": "",
"scope": "collection",
"_type": "workspace"
},
{
"_id": "req_b33056a8e8a64c838662a60a4909537c",
"parentId": "fld_2fca219979e448c997a6788d2b539ee7",
"modified": 1643829255295,
"created": 1643817054991,
"url": "https://localhost:5000/api/v1/message/messageId/delete",
"name": "Remove message",
"description": "[queryParam] messageId => id del messaggio da eliminare\n\nResponse 200\n",
"method": "DELETE",
"body": {},
"parameters": [],
"headers": [],
"authentication": {
"type": "oauth2",
"grantType": "authorization_code"
},
"metaSortKey": -1643816957177.5,
"isPrivate": false,
"settingStoreCookies": true,
"settingSendCookies": true,
"settingDisableRenderRequestBody": false,
"settingEncodeUrl": true,
"settingRebuildPath": true,
"settingFollowRedirects": "global",
"_type": "request"
},
{
"_id": "req_95c442071ee247f1a97d823c6e503db2",
"parentId": "fld_2fca219979e448c997a6788d2b539ee7",
"modified": 1644868763642,
"created": 1643816956965,
"url": "https://localhost:5000/api/v1/messages",
"name": "Get messages list",
"description": "Response JSON:\n>\t\t[\n>\t\t\t{\n>\t\t\t\t\"user\": {\n>\t\t\t\t\t\"userId\": \"guid/uuid/whatever\",\n>\t\t\t\t\t\"userName\": \"@loosy@letsrulethe.world\",\n>\t\t\t\t\t\"displayName\": \"loosy\",\n>\t\t\t\t\t\"pictureUrl\": \"https://...\",\n>\t\t\t\t\t\"backgroundUrl\": \"https://...\",\n>\t\t\t\t\t\"profileUrl\": \"https://...\"\n>\t\t\t\t},\n>\t\t\t\t\"messageType\": \"1||2||3||4\",//Direct,FollowersOnly,Unlisted,Public\n>\t\t\t\t\"rootMessageId\": null,\n>\t\t\t\t\"messageId\": \"guid/uuid/whatever\",\n>\t\t\t\t\"title\": \"...\",\n>\t\t\t\t\"content\": \"...\",\n>\t\t\t\t\"isFavourite\": false,\n>\t\t\t\t\"isBoosted\": false,\n>\t\t\t\t\"media\": [{\n>\t\t\t\t\t\"fileName\": \"ciao.png\",\n>\t\t\t\t\t\"altText\": \"descrizione immagine\",\n>\t\t\t\t\t\"contentType\": \"image/png\",\n>\t\t\t\t\t\"url\": \"https://bbs.keinpfusch.net/files/webpublic-ee9faea1-6786-4bf4-9a42-7a1f07de2dc5\"\n>\t\t\t\t}],\n>\t\t\t\t\"createdAt\": \"UTC or ticks\"\n>\t\t\t}, {...}\n>\t\t]",
"method": "GET",
"body": {},
"parameters": [
{
"id": "pair_6e5222c6a78341bbb24f9b18d236df6c",
"name": "since",
"value": "UTC/ticks/messageId?",
"description": ""
}
],
"headers": [],
"authentication": {},
"metaSortKey": -1643816956965,
"isPrivate": false,
"settingStoreCookies": true,
"settingSendCookies": true,
"settingDisableRenderRequestBody": false,
"settingEncodeUrl": true,
"settingRebuildPath": true,
"settingFollowRedirects": "global",
"_type": "request"
},
{
"_id": "env_b33db616c4a51618900a0a3da66d2d7b6ebaec2b",
"parentId": "wrk_da47ff9b3d7f40f3bef9e90b46d6610b",
"modified": 1642377560788,
"created": 1608987862952,
"name": "Base Environment",
"data": {},
"dataPropertyOrder": {},
"color": null,
"isPrivate": false,
"metaSortKey": 1608987862952,
"_type": "environment"
},
{
"_id": "jar_b33db616c4a51618900a0a3da66d2d7b6ebaec2b",
"parentId": "wrk_da47ff9b3d7f40f3bef9e90b46d6610b",
"modified": 1642378408249,
"created": 1608987862953,
"name": "Default Jar",
"cookies": [
{
"key": "oc_sessionPassphrase",
"value": "nMmK2Vb0FhKNaSQiPteel3EhA5swjs9%2FYJwU79BzPrq1cgNmCdL2w88ktlfpy8BXU1Yuj7MKSmCLNYMB0NIDFZ%2B7AnbhqpW0am5cFolB4eRzT2uSUSg16nKnAPVXAkGa",
"domain": "nuvola.xyz",
"path": "/",
"secure": true,
"httpOnly": true,
"extensions": [ "SameSite=Lax" ],
"hostOnly": true,
"creation": "2021-05-04T10:48:03.279Z",
"lastAccessed": "2021-05-04T10:48:03.279Z",
"id": "06476282363234076"
},
{
"key": "occ7de4yt74j",
"value": "dsleqfmojuisnmgcq63p0nrk77",
"domain": "nuvola.xyz",
"path": "/",
"secure": true,
"httpOnly": true,
"extensions": [ "SameSite=Lax" ],
"hostOnly": true,
"creation": "2021-05-04T10:48:03.279Z",
"lastAccessed": "2021-05-04T11:01:42.224Z",
"id": "9557040429295196"
},
{
"key": "__Host-nc_sameSiteCookielax",
"value": "true",
"expires": "2100-12-31T23:59:59.000Z",
"domain": "nuvola.xyz",
"path": "/",
"secure": true,
"httpOnly": true,
"extensions": [ "SameSite=lax" ],
"hostOnly": true,
"creation": "2021-05-04T10:48:03.280Z",
"lastAccessed": "2021-05-04T10:48:03.280Z",
"id": "4410522677170672"
},
{
"key": "__Host-nc_sameSiteCookiestrict",
"value": "true",
"expires": "2100-12-31T23:59:59.000Z",
"domain": "nuvola.xyz",
"path": "/",
"secure": true,
"httpOnly": true,
"extensions": [ "SameSite=strict" ],
"hostOnly": true,
"creation": "2021-05-04T10:48:03.280Z",
"lastAccessed": "2021-05-04T10:48:03.280Z",
"id": "7173600438498109"
},
{
"key": "cookie_test",
"value": "test",
"expires": "2021-05-04T11:49:33.000Z",
"maxAge": 3600,
"domain": "nuvola.xyz",
"path": "/apps/dashboard",
"hostOnly": true,
"pathIsDefault": true,
"creation": "2021-05-04T10:49:20.818Z",
"lastAccessed": "2021-05-04T10:49:33.582Z",
"id": "3533626334860853"
},
{
"key": "nc_username",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "nuvola.xyz",
"path": "/apps/dashboard",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2021-05-04T10:49:20.818Z",
"lastAccessed": "2021-05-04T10:49:33.582Z",
"id": "06043516223469947"
},
{
"key": "nc_token",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "nuvola.xyz",
"path": "/apps/dashboard",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2021-05-04T10:49:20.819Z",
"lastAccessed": "2021-05-04T10:49:33.582Z",
"id": "1905708786875855"
},
{
"key": "nc_session_id",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "nuvola.xyz",
"path": "/apps/dashboard",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2021-05-04T10:49:20.819Z",
"lastAccessed": "2021-05-04T10:49:33.582Z",
"id": "4672408440036"
},
{
"key": "nc_username",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "nuvola.xyz",
"path": "/",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"creation": "2021-05-04T10:49:20.819Z",
"lastAccessed": "2021-05-04T11:01:42.224Z",
"id": "7693972008479257"
},
{
"key": "nc_token",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "nuvola.xyz",
"path": "/",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"creation": "2021-05-04T10:49:20.819Z",
"lastAccessed": "2021-05-04T11:01:42.224Z",
"id": "9731704342625882"
},
{
"key": "nc_session_id",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "nuvola.xyz",
"path": "/",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"creation": "2021-05-04T10:49:20.819Z",
"lastAccessed": "2021-05-04T11:01:42.224Z",
"id": "3557084085645068"
},
{
"key": "cookie_test",
"value": "test",
"expires": "2021-05-04T11:51:28.000Z",
"maxAge": 3600,
"domain": "nuvola.xyz",
"path": "/remote.php/dav/files",
"hostOnly": true,
"pathIsDefault": true,
"creation": "2021-05-04T10:51:28.651Z",
"lastAccessed": "2021-05-04T10:51:28.651Z",
"id": "8645799753636227"
},
{
"key": "nc_username",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "nuvola.xyz",
"path": "/remote.php/dav/files",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2021-05-04T10:51:44.619Z",
"lastAccessed": "2021-05-04T10:51:44.619Z",
"id": "9029869294914612"
},
{
"key": "nc_token",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "nuvola.xyz",
"path": "/remote.php/dav/files",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2021-05-04T10:51:44.619Z",
"lastAccessed": "2021-05-04T10:51:44.619Z",
"id": "6422488233461934"
},
{
"key": "nc_session_id",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "nuvola.xyz",
"path": "/remote.php/dav/files",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2021-05-04T10:51:44.619Z",
"lastAccessed": "2021-05-04T10:51:44.619Z",
"id": "7557066093242031"
},
{
"key": "cookie_test",
"value": "test",
"expires": "2021-05-04T12:01:26.000Z",
"maxAge": 3600,
"domain": "nuvola.xyz",
"path": "/index.php/login",
"hostOnly": true,
"pathIsDefault": true,
"creation": "2021-05-04T11:01:26.192Z",
"lastAccessed": "2021-05-04T11:01:26.192Z",
"id": "7093910949861533"
},
{
"key": "nc_username",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "nuvola.xyz",
"path": "/index.php/login",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2021-05-04T11:01:42.223Z",
"lastAccessed": "2021-05-04T11:01:42.223Z",
"id": "677709203943275"
},
{
"key": "nc_token",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "nuvola.xyz",
"path": "/index.php/login",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2021-05-04T11:01:42.224Z",
"lastAccessed": "2021-05-04T11:01:42.224Z",
"id": "9477816718956802"
},
{
"key": "nc_session_id",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "nuvola.xyz",
"path": "/index.php/login",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2021-05-04T11:01:42.224Z",
"lastAccessed": "2021-05-04T11:01:42.224Z",
"id": "41804757195232756"
},
{
"key": "oc_sessionPassphrase",
"value": "pUIH26mXSdmGTfubB4dUzw8F8MQsUHdwnHCeo7ElPWIGDxXte2XC1M0EMyN5eriarJcMmkfh4kSGFI9%2BRcs%2BHt2gdDygddkz5I7Tl8KtjkwC%2BawIYuL8z3lobWTL%2BCy%2B",
"domain": "cloud.zigzag.academy",
"path": "/",
"secure": true,
"httpOnly": true,
"extensions": [ "SameSite=Lax" ],
"hostOnly": true,
"creation": "2022-01-17T00:03:10.727Z",
"lastAccessed": "2022-01-17T00:03:10.727Z",
"id": "06313521114695941"
},
{
"key": "__Host-nc_sameSiteCookielax",
"value": "true",
"expires": "2100-12-31T23:59:59.000Z",
"domain": "cloud.zigzag.academy",
"path": "/",
"secure": true,
"httpOnly": true,
"extensions": [ "SameSite=lax" ],
"hostOnly": true,
"creation": "2022-01-17T00:03:10.728Z",
"lastAccessed": "2022-01-17T00:03:10.728Z",
"id": "860532957782806"
},
{
"key": "__Host-nc_sameSiteCookiestrict",
"value": "true",
"expires": "2100-12-31T23:59:59.000Z",
"domain": "cloud.zigzag.academy",
"path": "/",
"secure": true,
"httpOnly": true,
"extensions": [ "SameSite=strict" ],
"hostOnly": true,
"creation": "2022-01-17T00:03:10.728Z",
"lastAccessed": "2022-01-17T00:03:10.728Z",
"id": "31117326197847706"
},
{
"key": "ocl7d3yrw74j",
"value": "uecghev7rleu4uptmruhptuvto",
"domain": "cloud.zigzag.academy",
"path": "/",
"secure": true,
"httpOnly": true,
"extensions": [ "SameSite=Lax" ],
"hostOnly": true,
"creation": "2022-01-17T00:03:10.728Z",
"lastAccessed": "2022-01-17T00:13:28.249Z",
"id": "5917940161261273"
},
{
"key": "cookie_test",
"value": "test",
"expires": "2022-01-17T01:03:09.000Z",
"maxAge": 3600,
"domain": "cloud.zigzag.academy",
"path": "/index.php/login",
"hostOnly": true,
"pathIsDefault": true,
"creation": "2022-01-17T00:03:10.728Z",
"lastAccessed": "2022-01-17T00:03:10.728Z",
"id": "009292942805962934"
},
{
"key": "nc_username",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "cloud.zigzag.academy",
"path": "/index.php/login/v2",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2022-01-17T00:04:18.252Z",
"lastAccessed": "2022-01-17T00:04:18.252Z",
"id": "5470762369580981"
},
{
"key": "nc_token",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "cloud.zigzag.academy",
"path": "/index.php/login/v2",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2022-01-17T00:04:18.252Z",
"lastAccessed": "2022-01-17T00:04:18.252Z",
"id": "4385020724400406"
},
{
"key": "nc_session_id",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "cloud.zigzag.academy",
"path": "/index.php/login/v2",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2022-01-17T00:04:18.253Z",
"lastAccessed": "2022-01-17T00:04:18.253Z",
"id": "05297254853120181"
},
{
"key": "nc_username",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "cloud.zigzag.academy",
"path": "/",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"creation": "2022-01-17T00:04:18.253Z",
"lastAccessed": "2022-01-17T00:12:52.404Z",
"id": "46009278671166176"
},
{
"key": "nc_token",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "cloud.zigzag.academy",
"path": "/",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"creation": "2022-01-17T00:04:18.253Z",
"lastAccessed": "2022-01-17T00:12:52.404Z",
"id": "05812364381235913"
},
{
"key": "nc_session_id",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "cloud.zigzag.academy",
"path": "/",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"creation": "2022-01-17T00:04:18.253Z",
"lastAccessed": "2022-01-17T00:12:52.404Z",
"id": "3772361407666647"
},
{
"key": "cookie_test",
"value": "test",
"expires": "2022-01-17T01:05:17.000Z",
"maxAge": 3600,
"domain": "cloud.zigzag.academy",
"path": "/apps/files",
"hostOnly": true,
"pathIsDefault": true,
"creation": "2022-01-17T00:05:18.388Z",
"lastAccessed": "2022-01-17T00:05:18.388Z",
"id": "08277815359810625"
},
{
"key": "nc_username",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "cloud.zigzag.academy",
"path": "/apps/files",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2022-01-17T00:05:18.388Z",
"lastAccessed": "2022-01-17T00:05:18.388Z",
"id": "7962572269421415"
},
{
"key": "nc_token",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "cloud.zigzag.academy",
"path": "/apps/files",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2022-01-17T00:05:18.388Z",
"lastAccessed": "2022-01-17T00:05:18.388Z",
"id": "8604909194077435"
},
{
"key": "nc_session_id",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "cloud.zigzag.academy",
"path": "/apps/files",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2022-01-17T00:05:18.388Z",
"lastAccessed": "2022-01-17T00:05:18.388Z",
"id": "6043027104701622"
},
{
"key": "cookie_test",
"value": "test",
"expires": "2022-01-17T01:11:28.000Z",
"maxAge": 3600,
"domain": "cloud.zigzag.academy",
"path": "/ocs/v1.php/cloud",
"hostOnly": true,
"pathIsDefault": true,
"creation": "2022-01-17T00:11:28.872Z",
"lastAccessed": "2022-01-17T00:11:28.872Z",
"id": "014769824799037545"
},
{
"key": "nc_username",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "cloud.zigzag.academy",
"path": "/ocs/v1.php/cloud",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2022-01-17T00:12:52.404Z",
"lastAccessed": "2022-01-17T00:12:52.404Z",
"id": "7141536696124962"
},
{
"key": "nc_token",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "cloud.zigzag.academy",
"path": "/ocs/v1.php/cloud",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2022-01-17T00:12:52.404Z",
"lastAccessed": "2022-01-17T00:12:52.404Z",
"id": "08455474112707173"
},
{
"key": "nc_session_id",
"value": "deleted",
"expires": "1970-01-01T00:00:01.000Z",
"maxAge": 0,
"domain": "cloud.zigzag.academy",
"path": "/ocs/v1.php/cloud",
"secure": true,
"httpOnly": true,
"hostOnly": true,
"pathIsDefault": true,
"creation": "2022-01-17T00:12:52.404Z",
"lastAccessed": "2022-01-17T00:12:52.404Z",
"id": "141765916939931"
}
],
"_type": "cookie_jar"
},
{
"_id": "spc_f832b28de5204b4a88374d08ba93a8e2",
"parentId": "wrk_da47ff9b3d7f40f3bef9e90b46d6610b",
"modified": 1608987862912,
"created": 1608987862912,
"fileName": "Insomnia",
"contents": "",
"contentType": "yaml",
"_type": "api_spec"
},
{
"_id": "env_77dfa781871a430f8e5014b07c9f9061",
"parentId": "env_b33db616c4a51618900a0a3da66d2d7b6ebaec2b",
"modified": 1642377578797,
"created": 1642377566379,
"name": "Nextcloud API",
"data": {},
"dataPropertyOrder": {},
"color": null,
"isPrivate": false,
"metaSortKey": 1642377566379,
"_type": "environment"
}
]
}

View File

@ -101,8 +101,6 @@ public static class GenericExtensions
return string.Format(localizer["{0:N0}MB"], size / 1_048_576);
case < 1_048_576:
return string.Format(localizer["{0}KB"], size / 1_024);
default:
return default;
}
}

View File

@ -31,4 +31,17 @@ public static class Faker
{
return Users[Random.Shared.Next(0, Users.Count)];
}
public static BoostingUser GetRandomBoostingUser()
{
var user = Users[Random.Shared.Next(0, Users.Count)];
return new()
{
UserId = user.UserId,
DisplayName = user.DisplayName,
UserName = user.UserName,
PictureUrl = user.PictureUrl,
ProfileUrl = user.ProfileUrl
};
}
}

11
Models/BoostingUser.cs Normal file
View File

@ -0,0 +1,11 @@
namespace decePubClient.Models
{
public class BoostingUser
{
public string UserId { get; set; } = "45f14fa8-c40f-4121-997c-ef2542196a50";
public string UserName { get; set; } = "@loosy@letsrulethe.world";
public string DisplayName { get; set; } = "loosy";
public string PictureUrl { get; set; } = "https://letsrulethe.world/media/c22d7a6dfcce11e4d2d8d4f6298842a36751b0a179dc5333d24663e4b93793b4.jpg";
public string ProfileUrl { get; set; } = "https://letsrulethe.world/users/loosy";
}
}

View File

@ -13,7 +13,9 @@ namespace decePubClient.Models
public string Title { get; set; }
public string Content { get; set; }
public bool IsFavourite { get; set; } = false;
public bool IsBoosted { get; set; } = false;
public int BoostsCounter { get; set; } = 0;
public bool IsBoostedByCurrentUser { get; set; } = false;
public BoostingUser BoostingUser { get; set; }
public List<Media> Medias { get; set; } = new();
public DateTime CreatedAt { get; set; }

View File

@ -2,7 +2,7 @@
public enum ContentType
{
PlainText,
PlainText = 1,
HTML,
Markdown
}

View File

@ -2,7 +2,7 @@
{
public enum MediaType
{
Images,
Images = 1,
Video,
Audio,
Documents

View File

@ -2,7 +2,7 @@
{
public enum MessageType
{
Direct,
Direct = 1,
FollowersOnly,
Unlisted,
Public

View File

@ -9,8 +9,9 @@ public class UploadMedia
public string FileName { get; set; }
public string AltText { get; set; }
public byte[] Blob { get; set; }
public string Base64Preview { get; set; }
[JsonIgnore, Bindable(false)]
public string Base64Preview { get; set; }
[JsonIgnore, Bindable(false)]
public long Size { get; set; }
}

View File

@ -1,13 +1,181 @@
@page "/administration"
@inherits PagesBase
<Title>@CascadingState.Localizer["Settings"]</Title>
<section class="block relative w-full h-full neomorphInset is-nxsmall rounded-xl">
<div class="flex flex-col space-y-4 p-4 md:p-5 w-full h-full absolute overflow-y-auto">
<OpenDownContainer>
<TitleChildren>
<p class="inline-flex items-center space-x-2">
<i class="ion-md-albums text-xl"></i> <span>@CascadingState.Localizer["Users"]</span>
</p>
</TitleChildren>
<InnerContent>
<div class="block w-full p-3 md:p-4">
<p class="w-full text-center text-lg">
<i class="ion-ios-remove-circle-outline"></i> @CascadingState.Localizer["Empty"]
</p>
</div>
</InnerContent>
</OpenDownContainer>
<OpenDownContainer>
<TitleChildren>
<p class="inline-flex items-center space-x-2">
<i class="ion-md-albums text-xl"></i> <span>@CascadingState.Localizer["Reports"]</span>
</p>
</TitleChildren>
<InnerContent>
<div class="block w-full p-3 md:p-4">
<p class="w-full text-center text-lg">
<i class="ion-ios-remove-circle-outline"></i> @CascadingState.Localizer["Empty"]
</p>
</div>
</InnerContent>
</OpenDownContainer>
<OpenDownContainer>
<TitleChildren>
<p class="inline-flex items-center space-x-2">
<i class="ion-md-albums text-xl"></i> <span>@CascadingState.Localizer["ActivityPub?"]</span>
</p>
</TitleChildren>
<InnerContent>
<div class="block w-full p-3 md:p-4">
<p class="w-full text-center text-lg">
<i class="ion-ios-remove-circle-outline"></i> @CascadingState.Localizer["Empty"]
</p>
</div>
</InnerContent>
</OpenDownContainer>
<OpenDownContainer>
<TitleChildren>
<p class="inline-flex items-center space-x-2">
<i class="ion-md-albums text-xl"></i> <span>@CascadingState.Localizer["Authentication"]</span>
</p>
</TitleChildren>
<InnerContent>
<div class="block w-full p-3 md:p-4">
<p class="w-full text-center text-lg">
<i class="ion-ios-remove-circle-outline"></i> @CascadingState.Localizer["Empty"]
</p>
</div>
</InnerContent>
</OpenDownContainer>
<OpenDownContainer>
<TitleChildren>
<p class="inline-flex items-center space-x-2">
<i class="ion-md-albums text-xl"></i> <span>@CascadingState.Localizer["Emoji?"]</span>
</p>
</TitleChildren>
<InnerContent>
<div class="block w-full p-3 md:p-4">
<p class="w-full text-center text-lg">
<i class="ion-ios-remove-circle-outline"></i> @CascadingState.Localizer["Empty"]
</p>
</div>
</InnerContent>
</OpenDownContainer>
<OpenDownContainer>
<TitleChildren>
<p class="inline-flex items-center space-x-2">
<i class="ion-md-albums text-xl"></i> <span>@CascadingState.Localizer["Frontend"]</span>
</p>
</TitleChildren>
<InnerContent>
<div class="block w-full p-3 md:p-4">
<p class="w-full text-center text-lg">
<i class="ion-ios-remove-circle-outline"></i> @CascadingState.Localizer["Empty"]
</p>
</div>
</InnerContent>
</OpenDownContainer>
<OpenDownContainer>
<TitleChildren>
<p class="inline-flex items-center space-x-2">
<i class="ion-md-albums text-xl"></i> <span>@CascadingState.Localizer["Instance"]</span>
</p>
</TitleChildren>
<InnerContent>
<div class="block w-full p-3 md:p-4">
<p class="w-full text-center text-lg">
<i class="ion-ios-remove-circle-outline"></i> @CascadingState.Localizer["Empty"]
</p>
</div>
</InnerContent>
</OpenDownContainer>
<OpenDownContainer>
<TitleChildren>
<p class="inline-flex items-center space-x-2">
<i class="ion-md-albums text-xl"></i> <span>@CascadingState.Localizer["Link formatter"]</span>
</p>
</TitleChildren>
<InnerContent>
<div class="block w-full p-3 md:p-4">
<p class="w-full text-center text-lg">
<i class="ion-ios-remove-circle-outline"></i> @CascadingState.Localizer["Empty"]
</p>
</div>
</InnerContent>
</OpenDownContainer>
<OpenDownContainer>
<TitleChildren>
<p class="inline-flex items-center space-x-2">
<i class="ion-md-albums text-xl"></i> <span>@CascadingState.Localizer["Metadata"]</span>
</p>
</TitleChildren>
<InnerContent>
<div class="block w-full p-3 md:p-4">
<p class="w-full text-center text-lg">
<i class="ion-ios-remove-circle-outline"></i> @CascadingState.Localizer["Empty"]
</p>
</div>
</InnerContent>
</OpenDownContainer>
<OpenDownContainer>
<TitleChildren>
<p class="inline-flex items-center space-x-2">
<i class="ion-md-albums text-xl"></i> <span>@CascadingState.Localizer["Policies"]</span>
</p>
</TitleChildren>
<InnerContent>
<div class="block w-full p-3 md:p-4">
<p class="w-full text-center text-lg">
<i class="ion-ios-remove-circle-outline"></i> @CascadingState.Localizer["Empty"]
</p>
</div>
</InnerContent>
</OpenDownContainer>
<OpenDownContainer>
<TitleChildren>
<p class="inline-flex items-center space-x-2">
<i class="ion-md-albums text-xl"></i> <span>@CascadingState.Localizer["Upload"]</span>
</p>
</TitleChildren>
<InnerContent>
<div class="block w-full p-3 md:p-4">
<p class="w-full text-center text-lg">
<i class="ion-ios-remove-circle-outline"></i> @CascadingState.Localizer["Empty"]
</p>
</div>
</InnerContent>
</OpenDownContainer>
</div>
</section>
@code {
[CascadingParameter] CascadingState CascadingState { get; set; }
}

View File

@ -10,7 +10,7 @@
@if (IsLoading)
{
<LoadingData/>
<LoadingData />
}
@foreach (var message in Ancestors)
@ -86,7 +86,8 @@
Medias = new(),
CreatedAt = DateTime.UtcNow.AddMinutes(Random.Shared.Next(-5000, 0)),
IsFavourite = Random.Shared.Next() % 2 == 0,
IsBoosted = Random.Shared.Next() % 2 == 0,
BoostsCounter = Random.Shared.Next(0,100),
IsBoostedByCurrentUser = Random.Shared.Next() % 2 == 0,
}
};
@ -103,7 +104,8 @@
Medias = new(),
CreatedAt = DateTime.UtcNow.AddMinutes(Random.Shared.Next(-5000, 0)),
IsFavourite = Random.Shared.Next() % 2 == 0,
IsBoosted = Random.Shared.Next() % 2 == 0,
BoostsCounter = Random.Shared.Next(0,100),
IsBoostedByCurrentUser = Random.Shared.Next() % 2 == 0,
}
};
IsLoading = false;
@ -116,9 +118,6 @@
async Task OnMessageReply(MessageForm messageForm)
{
await Task.Run(() =>
{
});
var replyMessage = await MessagesService.SubmitMessage(messageForm);
Descendants.Add(new()
{
@ -149,59 +148,41 @@
async ValueTask OnMessageBoost(Message message)
{
await Task.Run(() =>
{
});
message.IsBoosted = !message.IsBoosted;
if (message.IsBoostedByCurrentUser) return;
var boostedMessage = await MessagesService.BoostUnboostMessage(message);
message.BoostsCounter += 1;
//Add to the home page in the background
}
async ValueTask OnMessageFavourite(Message message)
{
await Task.Run(() =>
{
});
message.IsFavourite = !message.IsFavourite;
var favouriteMessage = await MessagesService.FavouriteUnfavouriteMessage(message);
message.IsFavourite = !message.IsFavourite;
}
async ValueTask OnMessageDelete(Message message)
{
await Task.Run(() =>
{
});
var deleteResult = await MessagesService.DeleteMessage(message);
}
async ValueTask OnMessageMediaDownload(Media media)
{
await Task.Run(() =>
{
});
await BlazorDownloadFileService.DownloadFileAsync(media.FileName, media.Blob, media.ContentType);
}
async ValueTask OnUserBlock(MessageUser messageUser)
{
await Task.Run(() =>
{
});
var blockResult = await MessagesService.BlockUserFromMessage(messageUser);
}
async ValueTask OnUserDirectMessage(Message message)
{
await Task.Run(() =>
{
});
var directMessage = await MessagesService.ReplyMessage(message, MessageType.Direct);
}
async ValueTask OnUserSilence(MessageUser messageUser)
{
await Task.Run(() =>
{
});
var silenceResult = await MessagesService.SilenceUserFromMessage(messageUser);
}
}

View File

@ -11,7 +11,7 @@
@if (IsLoading)
{
<LoadingData/>
<LoadingData />
}
else if (Messages.Count == 0)
{
@ -183,8 +183,39 @@
async ValueTask OnMessageBoost(Message message)
{
message.IsBoosted = !message.IsBoosted;
var boostedMessage = await MessagesService.BoostUnboostMessage(message);
var boostedMessageTemp = await MessagesService.BoostUnboostMessage(message);
message.BoostsCounter = message.IsBoostedByCurrentUser ? message.BoostsCounter - 1 : message.BoostsCounter + 1;
message.IsBoostedByCurrentUser = !message.IsBoostedByCurrentUser;
if (message.IsBoostedByCurrentUser)
{
var boostedMessage = new Message
{
BoostingUser = new()
{
UserId = CascadingState.User.Id,
DisplayName = CascadingState.User.DisplayName,
PictureUrl = CascadingState.User.PictureUrl,
ProfileUrl = CascadingState.User.ProfileUrl,
UserName = CascadingState.User.UserName
},
BoostsCounter = message.BoostsCounter,
Content = message.Content,
CreatedAt = message.CreatedAt,
IsBoostedByCurrentUser = true,
IsFavourite = message.IsFavourite,
Medias = message.Medias,
MessageId = message.MessageId,
MessageType = message.MessageType,
RootMessageId = message.RootMessageId,
Title = message.Title,
User = message.User
};
Messages.Insert(0, boostedMessage);
}
else
{
Messages.RemoveAll(m => m.MessageId == message.MessageId && m.BoostingUser != null && m.BoostingUser.UserId == CascadingState.User.Id);
}
}
async ValueTask OnMessageFavourite(Message message)

View File

@ -9,7 +9,7 @@
<OpenDownContainer>
<TitleChildren>
<p class="inline-flex items-center space-x-2">
<i class="ion-md-cog text-lg"></i> @CascadingState.Localizer["General"]
<i class="ion-md-cog text-xl"></i> <span>@CascadingState.Localizer["General"]</span>
</p>
</TitleChildren>
<InnerContent>
@ -24,7 +24,7 @@
<OpenDownContainer>
<TitleChildren>
<p class="inline-flex items-center space-x-2">
<i class="ion-md-person text-lg"></i> @CascadingState.Localizer["Profile"]
<i class="ion-md-person text-xl"></i> <span>@CascadingState.Localizer["Profile"]</span>
</p>
</TitleChildren>
<InnerContent>
@ -39,7 +39,7 @@
<OpenDownContainer>
<TitleChildren>
<p class="inline-flex items-center space-x-2">
<i class="ion-md-archive text-lg"></i> @CascadingState.Localizer["Data import/export"]
<i class="ion-md-archive text-xl"></i> <span>@CascadingState.Localizer["Data import/export"]</span>
</p>
</TitleChildren>
<InnerContent>
@ -54,7 +54,7 @@
<OpenDownContainer>
<TitleChildren>
<p class="inline-flex items-center space-x-2">
<i class="ion-md-eye-off text-lg"></i> @CascadingState.Localizer["Mutes/Blocks"]
<i class="ion-md-eye-off text-xl"></i> <span>@CascadingState.Localizer["Mutes/Blocks"]</span>
</p>
</TitleChildren>
<InnerContent>

View File

@ -66,7 +66,8 @@ namespace decePubClient.Services
Medias = new(),
CreatedAt = DateTime.UtcNow.AddMinutes(Random.Shared.Next(-5000, 0)),
IsFavourite = Random.Shared.Next() % 2 == 0,
IsBoosted = Random.Shared.Next() % 2 == 0,
BoostsCounter = Random.Shared.Next(0, 100),
IsBoostedByCurrentUser = Random.Shared.Next() % 2 == 0,
});
messages.Add(new()
{
@ -79,7 +80,8 @@ namespace decePubClient.Services
Medias = new(),
CreatedAt = DateTime.UtcNow.AddMinutes(Random.Shared.Next(-5000, 0)),
IsFavourite = Random.Shared.Next() % 2 == 0,
IsBoosted = Random.Shared.Next() % 2 == 0,
BoostsCounter = Random.Shared.Next(0, 100),
IsBoostedByCurrentUser = Random.Shared.Next() % 2 == 0,
});
messages.Add(new()
{
@ -92,7 +94,8 @@ namespace decePubClient.Services
Medias = new(),
CreatedAt = DateTime.UtcNow.AddMinutes(Random.Shared.Next(-5000, 0)),
IsFavourite = Random.Shared.Next() % 2 == 0,
IsBoosted = Random.Shared.Next() % 2 == 0,
BoostsCounter = Random.Shared.Next(0, 100),
IsBoostedByCurrentUser = Random.Shared.Next() % 2 == 0,
});
messages.Add(new()
{
@ -114,7 +117,8 @@ namespace decePubClient.Services
},
CreatedAt = DateTime.UtcNow.AddMinutes(Random.Shared.Next(-5000, 0)),
IsFavourite = Random.Shared.Next() % 2 == 0,
IsBoosted = Random.Shared.Next() % 2 == 0,
BoostsCounter = Random.Shared.Next(0, 100),
IsBoostedByCurrentUser = Random.Shared.Next() % 2 == 0,
});
messages.Add(new()
{
@ -136,12 +140,37 @@ namespace decePubClient.Services
},
CreatedAt = DateTime.UtcNow.AddMinutes(Random.Shared.Next(-5000, 0)),
IsFavourite = Random.Shared.Next() % 2 == 0,
IsBoosted = Random.Shared.Next() % 2 == 0,
BoostsCounter = Random.Shared.Next(0, 100),
IsBoostedByCurrentUser = Random.Shared.Next() % 2 == 0,
});
messages.Add(new()
{
RootMessageId = default,
MessageId = "96025b43-5235-44e9-a3fa-98df31edfbfb",
MessageId = "277ca76b-aaad-4aa6-95fb-25f59e2fddf9",
User = Faker.GetRandomUser(),
MessageType = (MessageType)Random.Shared.Next(0, 4),
Title = default,
Content = "test audio",
Medias = new()
{
new()
{
FileName = "09bfb06d0096975f.mp3",
Url = "https://cdn.masto.host/mastodonuno/media_attachments/files/107/798/288/501/917/857/original/09bfb06d0096975f.mp3",
AltText = "09bfb06d0096975f.mp3",
ContentType = "audio/mp3"
}
},
CreatedAt = DateTime.UtcNow.AddMinutes(Random.Shared.Next(-5000, 0)),
IsFavourite = Random.Shared.Next() % 2 == 0,
BoostsCounter = Random.Shared.Next(0, 100),
IsBoostedByCurrentUser = Random.Shared.Next() % 2 == 0,
});
messages.Add(new()
{
BoostingUser = Faker.GetRandomBoostingUser(),
RootMessageId = default,
MessageId = "de64e520-a7d3-4f31-b5a9-ba236f3b146c",
User = Faker.GetRandomUser(),
MessageType = (MessageType)Random.Shared.Next(0, 4),
Title = default,
@ -172,7 +201,45 @@ namespace decePubClient.Services
},
CreatedAt = DateTime.UtcNow.AddMinutes(Random.Shared.Next(-5000, 0)),
IsFavourite = Random.Shared.Next() % 2 == 0,
IsBoosted = Random.Shared.Next() % 2 == 0,
BoostsCounter = Random.Shared.Next(0,100),
IsBoostedByCurrentUser = Random.Shared.Next() % 2 == 0,
});
messages.Add(new()
{
RootMessageId = default,
MessageId = "de64e520-a7d3-4f31-b5a9-ba236f3b146c",
User = Faker.GetRandomUser(),
MessageType = (MessageType)Random.Shared.Next(0, 4),
Title = default,
Content = "test immagini",
Medias = new()
{
new()
{
FileName = "51a7cf620f1dd096ac5867d5b78f8c71d57a23972b31c64ec124a8c41e77a618.jpg",
Url = "https://ihatebeinga.live/media/51a7cf620f1dd096ac5867d5b78f8c71d57a23972b31c64ec124a8c41e77a618.jpg",
AltText = "51a7cf620f1dd096ac5867d5b78f8c71d57a23972b31c64ec124a8c41e77a618.jpg",
ContentType = "image/jpg"
},
new()
{
FileName = "51a7cf620f1dd096ac5867d5b78f8c71d57a23972b31c64ec124a8c41e77a618.jpg",
Url = "https://ihatebeinga.live/media/51a7cf620f1dd096ac5867d5b78f8c71d57a23972b31c64ec124a8c41e77a618.jpg",
AltText = "51a7cf620f1dd096ac5867d5b78f8c71d57a23972b31c64ec124a8c41e77a618.jpg",
ContentType = "image/jpg"
},
new()
{
FileName = "51a7cf620f1dd096ac5867d5b78f8c71d57a23972b31c64ec124a8c41e77a618.jpg",
Url = "https://ihatebeinga.live/media/51a7cf620f1dd096ac5867d5b78f8c71d57a23972b31c64ec124a8c41e77a618.jpg",
AltText = "51a7cf620f1dd096ac5867d5b78f8c71d57a23972b31c64ec124a8c41e77a618.jpg",
ContentType = "image/jpg"
}
},
CreatedAt = DateTime.UtcNow.AddMinutes(Random.Shared.Next(-5000, 0)),
IsFavourite = Random.Shared.Next() % 2 == 0,
BoostsCounter = Random.Shared.Next(0,100),
IsBoostedByCurrentUser = Random.Shared.Next() % 2 == 0,
});
}

127
package-lock.json generated
View File

@ -86,6 +86,7 @@
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
"integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
"dev": true,
"requires": {
"@nodelib/fs.stat": "2.0.5",
"run-parallel": "^1.1.9"
@ -94,12 +95,14 @@
"@nodelib/fs.stat": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
"integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A=="
"integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
"dev": true
},
"@nodelib/fs.walk": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
"integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
"dev": true,
"requires": {
"@nodelib/fs.scandir": "2.1.5",
"fastq": "^1.6.0"
@ -169,12 +172,14 @@
"ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true
},
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"requires": {
"color-convert": "^2.0.1"
}
@ -183,6 +188,7 @@
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
"integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
"dev": true,
"requires": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
@ -197,7 +203,8 @@
"array-union": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/array-union/-/array-union-3.0.1.tgz",
"integrity": "sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw=="
"integrity": "sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw==",
"dev": true
},
"autoprefixer": {
"version": "10.4.2",
@ -216,12 +223,14 @@
"binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA=="
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"dev": true
},
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true,
"requires": {
"fill-range": "^7.0.1"
}
@ -271,6 +280,7 @@
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
"dev": true,
"requires": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
@ -286,6 +296,7 @@
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
"integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
"dev": true,
"requires": {
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0",
@ -296,6 +307,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
@ -303,7 +315,8 @@
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"cosmiconfig": {
"version": "7.0.1",