Skip to content
Merged

Dev #33

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
3c2bf2d
выф
fan4cz Apr 17, 2026
65844c1
Merge branch 'dev' of https://github.com/fan4cz/Banana into dev
fan4cz Apr 17, 2026
4b63f08
tag ids
fan4cz Apr 17, 2026
42dbba8
merge
reqied Apr 17, 2026
8ee8c9f
merged
reqied Apr 17, 2026
6d894de
aboba
reqied Apr 17, 2026
d40c340
добавил колонку в таблицу
Kitiketov Apr 19, 2026
02ca8ed
Merge remote-tracking branch 'origin/dev' into dev
Kitiketov Apr 19, 2026
2bc01d9
поправил тесты
Kitiketov Apr 19, 2026
d2b3af7
фикс
Kitiketov Apr 19, 2026
6ac38d8
фикс ретеншинал
Kitiketov Apr 20, 2026
3518a20
поправил тесты
Kitiketov Apr 20, 2026
38524ee
links fixed, катины правки mostly fixed, checkpoin before big changes
reqied Apr 20, 2026
07ddce5
поправил ошибку в метрике
Kitiketov Apr 20, 2026
1ccf27b
loki
Kitiketov Apr 20, 2026
367f2c4
закрыл порты со внешних устройств
Kitiketov Apr 20, 2026
131a2ed
стилечка раздали
reqied Apr 20, 2026
0a17749
Merge branch 'backup-branch' into dev
reqied Apr 20, 2026
98fc681
Merge remote-tracking branch 'origin/dev' into backup-branch
reqied Apr 20, 2026
e8eebcb
Merge pull request #23 from Jlychee/backup-branch
Kitiketov Apr 20, 2026
31a5215
Replace app.js script with cookie.js
Kitiketov Apr 20, 2026
d90a376
help me
reqied Apr 20, 2026
08c3170
Merge branch 'dev' into neslomaisia-branch
Kitiketov Apr 20, 2026
c4835b0
Merge pull request #24 from Jlychee/neslomaisia-branch
Kitiketov Apr 20, 2026
3b803ec
Remove hasActiveFilters function
Kitiketov Apr 20, 2026
a84114e
Remove BASE_URL and simplify URL building
Kitiketov Apr 20, 2026
1413cb9
header duo cleaned, logo fixed
reqied Apr 21, 2026
dd9f72e
css cleaned
reqied Apr 21, 2026
f36b6b7
html cleaned, media for project fixed
reqied Apr 21, 2026
215e27e
click => onclick
reqied Apr 21, 2026
67c3723
now the filter state is saved and whole file is corrected
reqied Apr 21, 2026
42f4004
project handler cleaned and corrected
reqied Apr 21, 2026
04ae122
cleaned and reformed all files
reqied Apr 21, 2026
f024cca
Merge branch 'neslomaisia-branch' of https://github.com/Jlychee/Bluep…
reqied Apr 21, 2026
3c4c104
Merge branch 'dev' into neslomaisia-branch
Kitiketov Apr 21, 2026
d63d02e
Merge pull request #25 from Jlychee/neslomaisia-branch
Kitiketov Apr 21, 2026
a1f83e8
Update logo.svg with new SVG content
Kitiketov Apr 21, 2026
ee04b4e
регистронезависимый поиск
Jlychee Apr 21, 2026
88de05d
Trim()
Jlychee Apr 21, 2026
50b43f7
a
reqied Apr 23, 2026
6574d08
Merge branch 'dev' of https://github.com/fan4cz/Banana into dev
fan4cz Apr 23, 2026
65924e3
Merge branch 'dev' of https://github.com/fan4cz/Banana into dev
fan4cz Apr 23, 2026
35bb23e
fix
fan4cz Apr 23, 2026
6240d6b
Merge pull request #26 from fan4cz/dev
fan4cz Apr 23, 2026
cda4c9f
search
reqied Apr 24, 2026
bccdc16
merge
reqied Apr 24, 2026
c388097
Merge branch 'dev' into neslomaisia-branch
reqied Apr 24, 2026
6dc4032
search прикручен кайфуем
reqied Apr 24, 2026
8a6d194
Merge pull request #28 from Jlychee/neslomaisia-branch
Kitiketov Apr 24, 2026
35f74be
Update projectApi.js
Kitiketov Apr 24, 2026
7a6f5c4
filters and search in url
reqied Apr 24, 2026
f2f7250
приборка
reqied Apr 24, 2026
04793d4
filters fixed, params to url done
reqied Apr 26, 2026
dab8bc5
link fixed
reqied Apr 26, 2026
7abf08b
projects.js разгружен жестко
reqied Apr 26, 2026
3c46e78
Merge pull request #29 from Jlychee/neslomaisia-branch
Kitiketov Apr 27, 2026
ab0f0ba
без индексации
prlzrakk Apr 30, 2026
19bcff0
описание внутри карточки теперь не короткое
reqied May 4, 2026
a2a342a
фиксы по мобильной версии
reqied May 4, 2026
f53aa7e
Merge pull request #30 from Jlychee/neslomaisia-branch
Kitiketov May 4, 2026
4a02865
добавил лайки на бекэ не тестил правда
Kitiketov May 6, 2026
77fca42
добавил лайки
Kitiketov May 6, 2026
912e741
Merge remote-tracking branch 'origin/dev' into dev
Kitiketov May 6, 2026
4a10ad3
Сортировка по лайкам, а не по имени
Jlychee May 6, 2026
e6466ed
OrderByDescending (Likes -> Likes.Count)
Jlychee May 6, 2026
8ca61de
окак, там оказывается поляшка нужная была, а я и не заметила (Likes.C…
Jlychee May 6, 2026
1aa78d1
добавил isLiked и в полной инфе тоже лайки теперь есть
Kitiketov May 6, 2026
35fe422
добавил время лайка для метрик
Kitiketov May 6, 2026
e5af4ea
визуальный лайк done без обработки?
reqied May 6, 2026
2dd377a
добавила сами ручки, но не подключила еще
reqied May 7, 2026
f285a87
какулю не трогать
reqied May 7, 2026
3dd3782
Merge branch 'dev' into neslomaisia-branch
reqied May 7, 2026
09a4e4a
like done
reqied May 7, 2026
e82f571
Merge pull request #31 from Jlychee/neslomaisia-branch
Kitiketov May 7, 2026
785c987
Remove CORS middleware for FrontendDev
Kitiketov May 7, 2026
061e672
Fix URL construction in buildUrl function
Kitiketov May 7, 2026
d7564ac
пофиксила
Jlychee May 8, 2026
d26a345
рендер графаны
Kitiketov May 8, 2026
0884107
Merge remote-tracking branch 'origin/dev' into dev
Kitiketov May 8, 2026
af12162
лайки в grafana
fan4cz May 10, 2026
fad1c71
fix
fan4cz May 10, 2026
8a21216
fix
fan4cz May 10, 2026
83ec616
Merge pull request #32 from fan4cz/dev
fan4cz May 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Api/Api.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@Api_HostAddress = http://projectblueprint.ru/
@Api_HostAddress = 'http://localhost:63342'

GET {{Api_HostAddress}}/
Accept: application/json
Expand Down
13 changes: 13 additions & 0 deletions Api/Application/Features/Project/DeleteLike/DeleteLikeHandler.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Api.Application.Features.Project.DeleteLike;
using Infrastructure.Repositories.Interfaces;
using MediatR;

public class DeleteLikeHandler(IProjectRepository projectRepository)
: IRequestHandler<DeleteLikeQuery, bool>
{
public async Task<bool> Handle(DeleteLikeQuery request, CancellationToken cancellationToken)
{
var status = await projectRepository.UnlikeProjectAsync(request.Id,request.cookie.MetricUserId, cancellationToken);
return status;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using Client.Models.Models.DTO;
using MediatR;

namespace Api.Application.Features.Project.DeleteLike;

public record DeleteLikeQuery(int Id, UserCookie cookie) : IRequest<bool>;
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class GetProjectHandle(IProjectRepository projectRepository, IMetricRepos
{
public async Task<FullProjectInfo?> Handle(GetProjectQuery request, CancellationToken cancellationToken)
{
var project = await projectRepository.GetFullProjectInfoAsync(request.Id) ??
var project = await projectRepository.GetFullProjectInfoAsync(request.Id, request.cookie.MetricUserId) ??
throw new KeyNotFoundException($"{request.Id}");
if (project is null)
return null;
Expand All @@ -27,4 +27,4 @@ await metricRepository.RegisterFilteredProjectViewAsync(
cancellationToken);
return project;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ await metricRepository.RegisterFilteredViewAsync(request.cookie.MetricUserId,
request.filter.Page,
occurredAtUtc,
cancellationToken);
return await projectRepository.SearchAsync(request.filter, cancellationToken)
return await projectRepository.SearchAsync(
request.filter,
request.cookie.MetricUserId,
cancellationToken)
?? throw new KeyNotFoundException();
}
}
26 changes: 26 additions & 0 deletions Api/Application/Features/Project/ProjectController.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using Api.Application.Features.Project.GetProject;
using Api.Application.Features.Project.GetProjects;
using Api.Application.Features.Project.GetTags;
using Api.Application.Features.Project.DeleteLike;
using Api.Application.Features.Project.PutLike;
using Client.Models.Models.DTO;
using MediatR;
using Microsoft.AspNetCore.Mvc;
Expand All @@ -24,6 +26,30 @@ public async Task<IActionResult> GetProject(int id,[FromUserCookie] UserCookie c

return Ok(result);
}
[HttpPut("project/{id:int}/like")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> PutLike(int id,[FromUserCookie] UserCookie cookie)
{
var result = await mediator.Send(new PutLikeQuery(id,cookie));

if (result is false)
return NotFound();

return Ok(result);
}
[HttpDelete("project/{id:int}/like")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> DeleteLike(int id,[FromUserCookie] UserCookie cookie)
{
var result = await mediator.Send(new DeleteLikeQuery(id,cookie));

if (result is false)
return NotFound();

return Ok(result);
}

[HttpGet("projects")]
[ProducesResponseType(StatusCodes.Status200OK)]
Expand Down
18 changes: 18 additions & 0 deletions Api/Application/Features/Project/PutLike/PutLikeHandler.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace Api.Application.Features.Project.PutLike;
using Infrastructure.Repositories.Interfaces;
using MediatR;

public class PutLikeHandler(IProjectRepository projectRepository)
: IRequestHandler<PutLikeQuery, bool>
{
public async Task<bool> Handle(PutLikeQuery request, CancellationToken cancellationToken)
{
var likedAtUtc = DateTime.UtcNow;
var status = await projectRepository.LikeProjectAsync(
request.Id,
request.cookie.MetricUserId,
likedAtUtc,
cancellationToken);
return status;
}
}
6 changes: 6 additions & 0 deletions Api/Application/Features/Project/PutLike/PutLikeQuery.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using Client.Models.Models.DTO;
using MediatR;

namespace Api.Application.Features.Project.PutLike;

public record PutLikeQuery(int Id, UserCookie cookie) : IRequest<bool>;
14 changes: 12 additions & 2 deletions Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@
options.ForwardedHeaders =
ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
});
builder.Services.AddCors(options =>
{
options.AddPolicy("FrontendDev", policy =>
{
policy
.WithOrigins("http://localhost:63342")
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
});
});
var app = builder.Build();
app.UseForwardedHeaders();

Expand All @@ -30,10 +41,9 @@
}

app.InitializeDatabase();
app.UseCors("FrontendDev");
app.UseDefaultFiles();
app.UseStaticFiles();

app.UseOpenTelemetryPrometheusScrapingEndpoint();
app.MapControllers();
app.Run();
app.Run();
8 changes: 4 additions & 4 deletions Api/wwwroot/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
--text: #ffffff;
--text-muted: #C3C3C3;
--accent: #9D6A69;
--border: #666;
--buttons: #161616;
--font-main: "Raleway", Arial, sans-serif;
}


/* BODY */
body {
padding-top: 70px;

background: var(--bg);
color: var(--text);
font-family: Raleway, sans-serif;
font-family: var(--font-main);
}


/* CONTAINER */

.container {
Expand Down
79 changes: 59 additions & 20 deletions Api/wwwroot/css/filters.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
width: 100%;
height: calc(100vh - 130px);
min-height: 0;
background: #111;
position: sticky;
top: 110px;
background: transparent;
border-radius: 20px;
color: white;
font-family: 'Raleway', sans-serif;
Expand All @@ -18,21 +20,21 @@
gap: 16px;
padding: 24px 24px 18px;
flex-shrink: 0;
border-bottom: 1px solid rgba(255,255,255,0.06);
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.filters h1 {
font-size: 24px;
font-weight: 700;
margin: 0;
color: #fff;
color: var(--text);
}

.filters h2 {
font-size: 20px;
font-weight: 700;
margin: 0;
color: #fff;
color: var(--text);
}

.filters-close {
Expand All @@ -52,23 +54,18 @@
scrollbar-width: thin;
}

.filter-section-title {
margin-top: 28px;
margin-bottom: 18px;
}

.filter-section-title:first-child {
margin-top: 0;
}

.filter-subsection-title {
margin-top: 18px;
margin-bottom: 10px;
margin-top: 20px;
margin-bottom: 20px;
}

.filter-subsection-title h3 {
font-size: 16px;
color: #fff;
color: var(--text);
margin: 0;
}

Expand All @@ -87,7 +84,7 @@
gap: 12px;
cursor: pointer;
font-size: 16px;
color: #C3C3C3;
color: var(--text-muted);
user-select: none;
}

Expand All @@ -96,7 +93,7 @@
-webkit-appearance: none;
width: 18px;
height: 18px;
border: 2px solid #666;
border: 2px solid var(--border);
border-radius: 4px;
background: transparent;
cursor: pointer;
Expand All @@ -105,8 +102,8 @@
}

.filter-row input[type="checkbox"]:checked {
background: #9D6A69;
border-color: #9D6A69;
background: var(--accent);
border-color: var(--accent);
}

.filter-row input[type="checkbox"]:checked::after {
Expand All @@ -116,7 +113,7 @@
top: 0;
width: 5px;
height: 10px;
border: solid #fff;
border: solid var(--text);
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
Expand All @@ -126,12 +123,54 @@
margin-top: 24px;
min-height: 44px;
border-radius: 14px;
border: 1px solid rgba(255,255,255,0.12);
background: #161616;
color: #fff;
border: 1px solid rgba(255, 255, 255, 0.12);
background: var(--buttons);
color: var(--text);
font-size: 16px;
cursor: pointer;
}
.filter-subsection {
margin-bottom: 10px;
}

.filter-subsection-title {
width: 100%;
margin-top: 20px;
margin-bottom: 20px;
padding: 0;
border: none;
background: transparent;
color: var(--text);
font: inherit;
cursor: pointer;
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
text-align: left;
flex-direction: row-reverse;
}

.filter-subsection-title h3 {
font-size: 16px;
color: var(--text);
margin: 0;
}

.filter-toggle-icon {
font-size: 18px;
line-height: 1;
transition: transform 0.2s ease;
}

.filter-subsection.collapsed .filter-toggle-icon {
transform: rotate(-90deg);
}

.filter-subsection.collapsed .filter-subsection-content {
display: none;
}


@media (max-width: 980px) {
.filters {
Expand Down
16 changes: 8 additions & 8 deletions Api/wwwroot/css/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
max-width: 640px;
margin: 0 auto;
}

.footer-title {
font-size: 28px;
font-weight: 600;
Expand Down Expand Up @@ -56,11 +57,10 @@
border-radius: 20px;
text-decoration: none;
color: inherit;
transition:
transform 0.2s ease,
border-color 0.2s ease,
background 0.2s ease,
box-shadow 0.2s ease;
transition: transform 0.2s ease,
border-color 0.2s ease,
background 0.2s ease,
box-shadow 0.2s ease;
}

.footer-link-card:hover {
Expand All @@ -80,18 +80,18 @@
.footer-link-title {
font-size: 20px;
font-weight: 600;
color: #fff;
color: var(--text);
}

.footer-link-text {
font-size: 14px;
line-height: 1.45;
color: #C3C3C3;
color: var(--text-muted);
}

.footer-bottom {
text-align: center;
padding-top: px;
padding-top: 30px;
border-top: 1px solid rgba(255, 255, 255, 0.06);
}

Expand Down
Loading
Loading