🐛 Fix bugs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-if="post" class="container max-w-5xl mx-auto mt-4">
|
||||
<n-grid cols="1 l:5" responsive="screen" :x-gap="16">
|
||||
<n-grid cols="1 l:5" responsive="screen" :x-gap="16" :y-gap="16">
|
||||
<n-gi span="3">
|
||||
<post-item :item="post" />
|
||||
</n-gi>
|
||||
|
@@ -51,17 +51,15 @@ public class PostPageData(
|
||||
.Include(e => e.Categories)
|
||||
.FilterWithVisibility(currentUser, userFriends, userPublishers)
|
||||
.FirstOrDefaultAsync();
|
||||
if (post == null) return new Dictionary<string, object?>();
|
||||
post = await ps.LoadPostInfo(post, currentUser);
|
||||
|
||||
// Track view - use the account ID as viewer ID if user is logged in
|
||||
await ps.IncreaseViewCount(post.Id, currentUser?.Id);
|
||||
|
||||
var og = OpenGraph.MakeGraph(
|
||||
title: post.Title ?? $"Post from {post.Publisher.Name}",
|
||||
type: "article",
|
||||
image: $"{_siteUrl}/cgi/drive/files/{post.Publisher.Background?.Id}?original=true",
|
||||
url: $"{_siteUrl}/@{slug}",
|
||||
description: post.Description ?? post.Content?[..80] ?? "Posted with some media",
|
||||
description: post.Description ?? (post.Content?.Length > 80 ? post.Content?[..80] : post.Content) ?? "Posted with some media",
|
||||
siteName: "Solar Network"
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user