fix: solve small pm chat ui issues
unwrap the pill fix the fetching images in pm not auto download
This commit is contained in:
@@ -153,10 +153,10 @@
|
||||
/>
|
||||
|
||||
<section
|
||||
class="flex min-h-0 flex-col"
|
||||
class="min-h-0 overflow-y-auto"
|
||||
[class.hidden]="isMobile() && mobileTab() !== 'servers'"
|
||||
>
|
||||
<div class="z-10 flex shrink-0 items-center justify-between border-b border-border bg-background/95 px-3 py-2 backdrop-blur">
|
||||
<div class="sticky top-0 z-10 flex items-center justify-between border-b border-border bg-background/95 px-3 py-2 backdrop-blur">
|
||||
<div>
|
||||
<h3 class="text-sm font-semibold text-foreground">Servers</h3>
|
||||
<p class="text-xs text-muted-foreground">{{ searchResults().length }} found</p>
|
||||
@@ -164,11 +164,11 @@
|
||||
</div>
|
||||
|
||||
@if (isSearching()) {
|
||||
<div class="flex flex-1 items-center justify-center py-8">
|
||||
<div class="flex items-center justify-center py-8">
|
||||
<div class="h-8 w-8 animate-spin rounded-full border-b-2 border-primary"></div>
|
||||
</div>
|
||||
} @else if (searchResults().length === 0) {
|
||||
<div class="flex flex-1 flex-col items-center justify-center px-4 py-10 text-muted-foreground">
|
||||
<div class="flex flex-col items-center justify-center px-4 py-10 text-muted-foreground">
|
||||
<ng-icon
|
||||
name="lucideSearch"
|
||||
class="mb-3 h-10 w-10 opacity-50"
|
||||
@@ -176,20 +176,10 @@
|
||||
<p class="text-sm font-medium">No servers found</p>
|
||||
</div>
|
||||
} @else {
|
||||
<app-virtual-list
|
||||
class="block min-h-0 flex-1 p-3"
|
||||
[items]="searchResults()"
|
||||
[estimateSize]="140"
|
||||
[overscan]="4"
|
||||
[trackBy]="trackServerById"
|
||||
>
|
||||
<ng-template
|
||||
#item
|
||||
let-server
|
||||
>
|
||||
<div class="pb-2">
|
||||
<div
|
||||
class="group w-full cursor-pointer rounded-lg border bg-card p-3 text-left transition-colors"
|
||||
<div class="space-y-2 p-3">
|
||||
@for (server of searchResults(); track server.id) {
|
||||
<div
|
||||
class="group w-full cursor-pointer rounded-lg border bg-card p-3 text-left transition-colors"
|
||||
[class.border-border]="!isServerMarkedBanned(server)"
|
||||
[class.hover:border-primary/50]="!isServerMarkedBanned(server)"
|
||||
[class.hover:bg-card/80]="!isServerMarkedBanned(server)"
|
||||
@@ -325,9 +315,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</app-virtual-list>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +58,6 @@ import {
|
||||
import { ChatMessageMarkdownComponent } from '../../../chat';
|
||||
import { hasRoomBanForUser } from '../../../access-control';
|
||||
import { UserSearchListComponent } from '../../../direct-message/feature/user-search-list/user-search-list.component';
|
||||
import { VirtualListComponent } from '../../../../shared/components/virtual-list';
|
||||
import { RealtimeSessionFacade } from '../../../../core/realtime';
|
||||
import {
|
||||
PluginRequirementService,
|
||||
@@ -83,8 +82,7 @@ interface JoinPluginConsentDialog {
|
||||
ChatMessageMarkdownComponent,
|
||||
ConfirmDialogComponent,
|
||||
LeaveServerDialogComponent,
|
||||
UserSearchListComponent,
|
||||
VirtualListComponent
|
||||
UserSearchListComponent
|
||||
],
|
||||
viewProviders: [
|
||||
provideIcons({
|
||||
@@ -189,9 +187,6 @@ export class ServerSearchComponent implements OnInit {
|
||||
this.searchSubject.next(query);
|
||||
}
|
||||
|
||||
/** Stable trackBy reference for the virtualized server results list. */
|
||||
readonly trackServerById = (_index: number, server: ServerInfo): string => server.id;
|
||||
|
||||
/** Join a server from the search results. Redirects to login if unauthenticated. */
|
||||
async joinServer(server: ServerInfo): Promise<void> {
|
||||
const currentUserId = localStorage.getItem('metoyou_currentUserId');
|
||||
|
||||
Reference in New Issue
Block a user