This commit is contained in:
@@ -304,6 +304,18 @@ Do not show `no comment provided`; leave the comment empty when no comment has b
|
||||
### Assistant outcome
|
||||
Changed feed rendering to leave the comment area empty when a link has no comment, removing the `No comment provided` placeholder. Added a regression assertion and validated the change.
|
||||
|
||||
### User
|
||||
Decrease the space between LinkLog items.
|
||||
|
||||
### Assistant outcome
|
||||
Reduced the feed grid gap from 14px to 8px so link-log items sit closer together while preserving the existing item padding and responsive layout.
|
||||
|
||||
### User
|
||||
Perform the next items on the todo list.
|
||||
|
||||
### Assistant outcome
|
||||
No TODO markers remained, so addressed the next concrete requirements gap found during validation: user profile summaries now render on `/<user>/` pages even when that user has no links, by loading profile data independently from the feed.
|
||||
|
||||
### User
|
||||
Show the avatar with each entry on the home page. On the specific /<user>/ page don't show the avatar and user name with each entry
|
||||
|
||||
|
||||
@@ -136,6 +136,8 @@
|
||||
127. Show the tags in the linklog on the bottom left, move the date to the bottom right - horizontally align the tags with the date.
|
||||
128. Continue todos.
|
||||
129. Do not show 'no comment provided' but leave empty when no comment has been provided.
|
||||
130. Decrease the space between link-log items.
|
||||
131. Perform the next items on the todo list.
|
||||
|
||||
## Future entries
|
||||
|
||||
|
||||
+2
-8
@@ -19,7 +19,7 @@ from backend.app.api.setup import has_administrator
|
||||
from backend.app.api.user_config import router as user_config_router
|
||||
from backend.app.core.config import settings
|
||||
from backend.app.database import AVATARS_DIR
|
||||
from backend.app.services.link_service import list_public_links
|
||||
from backend.app.services.link_service import get_public_profile, list_public_links
|
||||
|
||||
logging.basicConfig(level=getattr(logging, settings.log_level, logging.INFO))
|
||||
|
||||
@@ -99,13 +99,7 @@ def health_check():
|
||||
@app.get('/{username}/', response_class=HTMLResponse)
|
||||
async def public_user_feed(request: Request, username: str):
|
||||
feed = list_public_links(username)
|
||||
profile = None
|
||||
if feed:
|
||||
profile = {
|
||||
'username': feed[0]['username'],
|
||||
'avatar_url': feed[0]['avatar_url'],
|
||||
'bio': feed[0]['bio'],
|
||||
}
|
||||
profile = get_public_profile(username)
|
||||
return templates.TemplateResponse(
|
||||
request,
|
||||
'feed.html',
|
||||
|
||||
@@ -127,6 +127,15 @@ def list_public_links(username: str | None = None):
|
||||
return records
|
||||
|
||||
|
||||
def get_public_profile(username: str) -> dict | None:
|
||||
with get_connection() as conn:
|
||||
row = conn.execute(
|
||||
'SELECT username, avatar_url, bio FROM users WHERE username = ?',
|
||||
(username,),
|
||||
).fetchone()
|
||||
return dict(row) if row else None
|
||||
|
||||
|
||||
def update_link(
|
||||
link_id: str,
|
||||
user_id: str,
|
||||
|
||||
@@ -470,7 +470,7 @@ button:disabled {
|
||||
.plugin-list,
|
||||
.feed {
|
||||
display: grid;
|
||||
gap: 14px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.plugin-row {
|
||||
|
||||
Reference in New Issue
Block a user