Skip to content

Commit

Permalink
feat: working but bad looking partial user list that cannot be scrolled
Browse files Browse the repository at this point in the history
  • Loading branch information
arihant2math committed Sep 12, 2024
1 parent 461f8ce commit 3c8e456
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 7 additions & 2 deletions crates/client/src/routes/bubble_membership_search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub struct GetBubbleMembershipSearchResponse {
pub ok: bool,
#[serde(rename = "pagesize")]
pub page_size: u64,
#[serde(rename = "memberships")]
pub membership: Vec<Member>,
}

Expand All @@ -55,10 +56,14 @@ pub async fn get(
request: GetBubbleMembershipSearchRequest,
) -> Result<GetBubbleMembershipSearchResult, reqwest::Error> {
let r = client
.get(format!("{pronto_base_url}v1/bubble.membershipsearch"))
.post(format!("{pronto_base_url}v1/bubble.membershipsearch"))
.json(&request)
.send()
.await?;
let json = r.json::<GetBubbleMembershipSearchResult>().await?;
// let json = r.json::<GetBubbleMembershipSearchResult>().await?;
let text = r.text().await?;
println!("{text}");
let json: GetBubbleMembershipSearchResponse = serde_json::from_str(&text).unwrap();

Check failure on line 66 in crates/client/src/routes/bubble_membership_search.rs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

unused variable: `json`

Check failure on line 66 in crates/client/src/routes/bubble_membership_search.rs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

unused variable: `json`

Check failure on line 66 in crates/client/src/routes/bubble_membership_search.rs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

unused variable: `json`

Check failure on line 66 in crates/client/src/routes/bubble_membership_search.rs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

unused variable: `json`

Check failure on line 66 in crates/client/src/routes/bubble_membership_search.rs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

unused variable: `json`

Check failure on line 66 in crates/client/src/routes/bubble_membership_search.rs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

unused variable: `json`
let json = serde_json::from_str(&text).unwrap();
Ok(json)
}
9 changes: 5 additions & 4 deletions ui/src/routes/Main.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import Message from "./Message.svelte";
import Settings, {showSettings} from "./Settings.svelte";
import SideCategory from "./sidebar/SideCategory.svelte"
import UserCard from "./CurrentUserCard.svelte"
import CurrentUserCard from "./CurrentUserCard.svelte"
import UserCard from "./UserCard.svelte"
import {
loadChannel,
Expand Down Expand Up @@ -105,7 +106,7 @@
class="h-full">
<div class="w-[375px] h-full overflow-y-auto overflow-x-hidden pb-4 bg-gray-50 dark:bg-gray-900 z-40">
<!--TODO: maybe move this to the bottom-->
<UserCard user={currentUser} showSettings={showSettings}/>
<CurrentUserCard user={currentUser} showSettings={showSettings}/>
<ul class="space-y-2 font-medium px-3" id="sidebar-list">
{#each Object.keys(sidebarCategories) as category}
<SideCategory name={sidebarCategoriesInfo[category].title} items={sidebarCategories[category]} buttonClick={handleSidebarClick}/>
Expand All @@ -123,8 +124,8 @@
</div>
</div>
{#if showMemberList}
<div class="max-w-md h-full">
<ul class="flex flex-col">
<div class="w-lg h-full">
<ul class="flex flex-col w-full">
{#each channelUsers as user}
<UserCard user={user}/>
{/each}
Expand Down

0 comments on commit 3c8e456

Please sign in to comment.