-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26b3186
commit 81cadf3
Showing
7 changed files
with
100 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
backend/inbox/migrations/0005_inboxentry_userfrom_alter_inboxentry_user.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Generated by Django 5.0 on 2024-01-25 02:03 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('inbox', '0004_inboxentry_title'), | ||
('users', '0014_user_dateofbirth'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='inboxentry', | ||
name='userFrom', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='users.user'), | ||
), | ||
migrations.AlterField( | ||
model_name='inboxentry', | ||
name='user', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user', to='users.user'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
|
||
export default function InboxEntry(props) { | ||
|
||
return( | ||
<> | ||
<div onClick={() => props.click(props.id)} className="flex gap-3 hover:scale-105 duration-75 active:scale-100 select-none cursor-pointer"> | ||
<img src={`https://ui-avatars.com/api/?name=${props.user.name}&size=40`} className="rounded-full" alt="" width={40} /> | ||
<div className="self-center flex grow basis-[0%] flex-col items-stretch my-auto"> | ||
<div className="text-zinc-500 text-xs font-medium">{props.user.name}</div> | ||
<div className="text-white text-sm font-medium whitespace-nowrap mt-1.5">{props.user.username}</div> | ||
</div> | ||
</div> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters