[frontend] placeholder timeline

This commit is contained in:
Lilian 2024-04-20 04:36:24 +02:00
parent 2ead364a97
commit a36a48bf34
No known key found for this signature in database
GPG key ID: 007CA12D692829E1
6 changed files with 51 additions and 2 deletions

View file

@ -0,0 +1,29 @@
@using Iceshrimp.Frontend.Core.Miscellaneous
@using Iceshrimp.Frontend.Core.Services
@using Iceshrimp.Shared.Schemas
@inject ApiService ApiService
@if (_init)
{
@foreach (var note in Timeline)
{
<TimelineNote Note="note" />
}
}
@code {
private List<NoteResponse> Timeline { get; set; } = [];
private bool _init = false;
public async Task Initialize()
{
var res = await ApiService.Timelines.GetHomeTimeline(new PaginationQuery() { Limit = 50 });
Timeline = res;
}
protected override async Task OnInitializedAsync()
{
await Initialize();
_init = true;
}
}

View file

@ -4,9 +4,9 @@
<Sidebar />
</div>
<main>
<div class="main">
@Body
</main>
</div>
<div class="widget-panel">
<WidgetPanel/>
</div>

View file

@ -3,4 +3,7 @@
flex-direction: row;
justify-content: space-between;
background-color: var(--background-color)
}
.main {
width: 100%;
}

View file

@ -0,0 +1,9 @@
@page "/"
@using Iceshrimp.Frontend.Components
<div class="scroller">
<TimelineComponent />
</div>
@code {
}

View file

@ -0,0 +1,8 @@
.scroller {
display: flex;
flex-direction: column;
overflow: scroll;
max-height: 100vh;
width: 100%;
align-items: center;
}