Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 8
fix: avatars#226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
fix: avatars #226
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
eab4501
fix: avatars
grv-saini-20 a3c988a
fix: avatar in follow request page
grv-saini-20 673943f
fix: images uploaded shown in user profile
grv-saini-20 85a728f
fix: button size
grv-saini-20 cd17e21
fix: avatar
grv-saini-20 11b8114
Merge branch 'feat/w3ds-adapters' into fix/avatars
coodos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
46 changes: 29 additions & 17 deletions
46 platforms/pictique/src/lib/fragments/BottomNav/BottomNav.svelte
This file contains hidden or 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
15 changes: 10 additions & 5 deletions
15 platforms/pictique/src/lib/fragments/CreatePostModal/CreatePostModal.svelte
This file contains hidden or 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 |
|---|---|---|
| @@ -51,13 +51,14 @@ | ||
| <button | ||
| type="button" | ||
| class="rounded-full p-2 hover:bg-gray-100" | ||
| on:click={closeCreatePostModal} | ||
| onclick={closeCreatePostModal} | ||
| > | ||
| ✕ | ||
| </button> | ||
| </div> | ||
| <div class="mb-4"> | ||
| <!-- svelte-ignore element_invalid_self_closing_tag --> | ||
| <textarea | ||
| bind:value={text} | ||
| placeholder="What's on your mind?" | ||
| @@ -70,6 +71,7 @@ | ||
| <div class="mb-4 grid grid-cols-2 gap-4"> | ||
| {#each images as image, index} | ||
| <div class="relative"> | ||
| <!-- svelte-ignore a11y_img_redundant_alt --> | ||
| <img | ||
| src={image} | ||
| alt="Post image" | ||
| @@ -78,7 +80,7 @@ | ||
| <button | ||
| type="button" | ||
| class="absolute top-2 right-2 rounded-full bg-black/50 p-1 text-white hover:bg-black/70" | ||
| on:click={() => removeImage(index)} | ||
| onclick={() => removeImage(index)} | ||
| > | ||
| ✕ | ||
| </button> | ||
| @@ -87,14 +89,17 @@ | ||
| </div> | ||
| {/if} | ||
| <div class="flex items-center justify-between"> | ||
| <label class="cursor-pointer rounded-lg bg-gray-100 px-4 py-2 hover:bg-gray-200"> | ||
| <input type="file" accept="image/*" class="hidden" on:change={handleImageUpload} /> | ||
| <div class="flex items-center justify-between gap-2"> | ||
| <label | ||
| class="w-full cursor-pointer rounded-full bg-gray-100 px-4 py-3 text-center hover:bg-gray-200" | ||
| > | ||
| <input type="file" accept="image/*" class="hidden" onchange={handleImageUpload} /> | ||
This conversation was marked as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| Add Photo | ||
| </label> | ||
| <Button | ||
| variant="secondary" | ||
| size="sm" | ||
| callback={handleSubmit} | ||
| isLoading={isSubmitting} | ||
| disabled={!text.trim() && images.length === 0} | ||
2 changes: 1 addition & 1 deletion
2 platforms/pictique/src/lib/fragments/InputFile/InputFile.svelte
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2 platforms/pictique/src/lib/fragments/MessageInput/MessageInput.svelte
This file contains hidden or 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 hidden or 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
30 changes: 19 additions & 11 deletions
30 platforms/pictique/src/lib/fragments/Profile/Profile.svelte
This file contains hidden or 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 |
|---|---|---|
| @@ -3,11 +3,19 @@ | ||
| import type { userProfile, PostData } from '$lib/types'; | ||
| import Post from '../Post/Post.svelte'; | ||
| export let variant: 'user' | 'other' = 'user'; | ||
| export let profileData: userProfile; | ||
| export let handleSinglePost: (post: PostData) => void; | ||
| export let handleFollow: () => Promise<void>; | ||
| export let handleMessage: () => Promise<void>; | ||
| let { | ||
| variant = 'user', | ||
| profileData, | ||
| handleSinglePost, | ||
| handleFollow, | ||
| handleMessage | ||
| }: { | ||
| variant: 'user' | 'other'; | ||
| profileData: userProfile; | ||
| handleSinglePost: (post: PostData) => void; | ||
| handleFollow: () => Promise<void>; | ||
| handleMessage: () => Promise<void>; | ||
| } = $props(); | ||
| </script> | ||
| <div class="flex flex-col gap-4 p-4"> | ||
| @@ -23,8 +31,8 @@ | ||
| </div> | ||
| {#if variant === 'other'} | ||
| <div class="flex gap-2"> | ||
| <Button variant="primary" callback={handleFollow}>Follow</Button> | ||
| <Button variant="primary" callback={handleMessage}>Message</Button> | ||
| <Button variant="primary" size="sm" callback={handleFollow}>Follow</Button> | ||
| <Button variant="primary" size="sm" callback={handleMessage}>Message</Button> | ||
| </div> | ||
| {/if} | ||
| </div> | ||
| @@ -46,13 +54,13 @@ | ||
| <div class="grid grid-cols-3 gap-1"> | ||
| {#each profileData.posts.filter((e) => e.imgUris && e.imgUris.length > 0) as post} | ||
| <li class="mb-6"> | ||
| <li class="mb-6 list-none"> | ||
| <Post | ||
| avatar={'https://picsum.photos/200/200'} | ||
| avatar={profileData.avatarUrl || 'https://picsum.photos/200/200'} | ||
| username={profileData?.username} | ||
| imgUris={post.imgUris ?? []} | ||
| text={post.text} | ||
| time={new Date(post.createdAt).toLocaleDateString()} | ||
| text={post.caption} | ||
| time={post.time ? new Date(post.time).toLocaleDateString() : ''} | ||
This conversation was marked as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| callback={{ | ||
| like: async () => { | ||
| try { | ||
14 changes: 9 additions & 5 deletions
14 platforms/pictique/src/lib/fragments/UploadedPostView/UploadedPostView.svelte
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,21 +1,26 @@ | ||
| import type { Image, PostData } from "$lib/types"; | ||
| import type { Image, PostData } from '$lib/types'; | ||
| export const isNavigatingThroughNav = $state({ | ||
| value: false, | ||
| value: false | ||
| }); | ||
| export const showComments = $state({ | ||
| value: false, | ||
| value: false | ||
| }); | ||
| export const ownerId = $state({ | ||
| value: '1' | ||
| }); | ||
| export const selectedPost: { value: PostData | null } = $state({ | ||
| value: null, | ||
| value: null | ||
| }); | ||
| export const uploadedImages: { value: Image[] | null } = $state({ | ||
| value: null, | ||
| value: null | ||
| }); | ||
| export const audience: { value: string } = $state({ | ||
| value: "Everyone", | ||
| }); | ||
| value: 'Everyone' | ||
| }); | ||
This file contains hidden or 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
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.