incorporate page layout changes from dev and other cleanup
This commit is contained in:
@@ -25,9 +25,9 @@
|
|||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSCameraUsageDescription</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
<string>Flotilla uses the camera for video in voice rooms.</string>
|
<string>Flotilla uses the camera when you enable it in a voice room.</string>
|
||||||
<key>NSMicrophoneUsageDescription</key>
|
<key>NSMicrophoneUsageDescription</key>
|
||||||
<string>Flotilla uses the microphone for voice chat in rooms.</string>
|
<string>Flotilla uses the microphone when you enable it in a voice room.</string>
|
||||||
<key>UIBackgroundModes</key>
|
<key>UIBackgroundModes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>remote-notification</string>
|
<string>remote-notification</string>
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
--saib: var(--safe-area-inset-bottom, env(safe-area-inset-bottom));
|
--saib: var(--safe-area-inset-bottom, env(safe-area-inset-bottom));
|
||||||
--sail: var(--safe-area-inset-left, env(safe-area-inset-left));
|
--sail: var(--safe-area-inset-left, env(safe-area-inset-left));
|
||||||
--sair: var(--safe-area-inset-right, env(safe-area-inset-right));
|
--sair: var(--safe-area-inset-right, env(safe-area-inset-right));
|
||||||
--video-call-panel-bg: #181e24;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@utility py-sai {
|
@utility py-sai {
|
||||||
|
|||||||
@@ -152,11 +152,11 @@
|
|||||||
const panelChrome = $derived(
|
const panelChrome = $derived(
|
||||||
cx(
|
cx(
|
||||||
variant === "mobile" &&
|
variant === "mobile" &&
|
||||||
"cb top-[calc(var(--sait)+6rem)] cw z-compose bg-[var(--video-call-panel-bg)] fixed inset-x-0 flex min-h-0 flex-col gap-2 overflow-y-auto overflow-x-hidden px-2 pb-2 pt-1 md:hidden",
|
"flex min-h-0 w-full flex-1 flex-col gap-2 overflow-y-auto overflow-x-hidden bg-base-200 px-2 pt-4 md:hidden pb-[calc(3.5rem+var(--saib))]",
|
||||||
variant === "desktop-split" &&
|
variant === "desktop-split" &&
|
||||||
"cb ct cw-split-video z-compose bg-[var(--video-call-panel-bg)] fixed hidden min-h-0 flex-col gap-2 overflow-hidden p-2 md:flex",
|
"flex min-h-0 w-full min-w-0 flex-1 flex-col gap-2 overflow-hidden bg-base-200 px-2 pb-2 pt-4",
|
||||||
variant === "desktop-full" &&
|
variant === "desktop-full" &&
|
||||||
"cb ct cw z-compose bg-[var(--video-call-panel-bg)] fixed hidden min-h-0 flex-col gap-2 overflow-hidden p-2 md:flex",
|
"flex min-h-0 w-full min-w-0 flex-1 flex-col gap-2 overflow-hidden bg-base-200 px-2 pb-2 pt-4",
|
||||||
className,
|
className,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -246,7 +246,7 @@
|
|||||||
<div class="min-h-0 flex-1 overflow-hidden">
|
<div class="min-h-0 flex-1 overflow-hidden">
|
||||||
{@render videoPanelBody()}
|
{@render videoPanelBody()}
|
||||||
</div>
|
</div>
|
||||||
<div class="shrink-0">
|
<div class="shrink-0 pb-2">
|
||||||
<VoiceWidget />
|
<VoiceWidget />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
const onLayoutToggle = () => {
|
const onLayoutToggle = () => {
|
||||||
if (!showVoiceLayoutToggle) return
|
if (!showVoiceLayoutToggle) return
|
||||||
if (isMd) {
|
if (isMd) {
|
||||||
voiceDesktopRoomPanel.update(p => (p === "split" ? "chat" : "split"))
|
voiceDesktopRoomPanel.update(p => (p === "split" ? "video" : "split"))
|
||||||
} else {
|
} else {
|
||||||
voiceMobileRoomPanel.update(p => (p === "chat" ? "video" : "chat"))
|
voiceMobileRoomPanel.update(p => (p === "chat" ? "video" : "chat"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -456,72 +456,72 @@
|
|||||||
: "flex flex-col-reverse pt-4",
|
: "flex flex-col-reverse pt-4",
|
||||||
pageContentHiddenDesktopVideoOnly && "md:hidden",
|
pageContentHiddenDesktopVideoOnly && "md:hidden",
|
||||||
)}>
|
)}>
|
||||||
{#if $room.isPrivate && $membershipStatus !== MembershipStatus.Granted}
|
{#if $room.isPrivate && $membershipStatus !== MembershipStatus.Granted}
|
||||||
<div class="py-20">
|
<div class="py-20">
|
||||||
<div class="card2 col-8 m-auto max-w-md items-center text-center">
|
<div class="card2 col-8 m-auto max-w-md items-center text-center">
|
||||||
<p class="opacity-75">You aren't currently a member of this room.</p>
|
<p class="opacity-75">You aren't currently a member of this room.</p>
|
||||||
{#if $membershipStatus === MembershipStatus.Pending}
|
{#if $membershipStatus === MembershipStatus.Pending}
|
||||||
<Button class="btn btn-neutral btn-sm" disabled={leaving} onclick={leave}>
|
<Button class="btn btn-neutral btn-sm" disabled={leaving} onclick={leave}>
|
||||||
<Icon icon={ClockCircle} />
|
<Icon icon={ClockCircle} />
|
||||||
Access Pending
|
Access Pending
|
||||||
</Button>
|
</Button>
|
||||||
{:else}
|
|
||||||
<Button class="btn btn-neutral btn-sm" disabled={joining} onclick={join}>
|
|
||||||
{#if joining}
|
|
||||||
<span class="loading loading-spinner loading-sm"></span>
|
|
||||||
{:else}
|
{:else}
|
||||||
<Icon icon={Login2} />
|
<Button class="btn btn-neutral btn-sm" disabled={joining} onclick={join}>
|
||||||
|
{#if joining}
|
||||||
|
<span class="loading loading-spinner loading-sm"></span>
|
||||||
|
{:else}
|
||||||
|
<Icon icon={Login2} />
|
||||||
|
{/if}
|
||||||
|
Join Room
|
||||||
|
</Button>
|
||||||
{/if}
|
{/if}
|
||||||
Join Room
|
|
||||||
</Button>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{:else}
|
|
||||||
{#if loadingForward}
|
|
||||||
<p class="py-20 flex justify-center">
|
|
||||||
<Spinner loading={loadingForward}>Looking for messages...</Spinner>
|
|
||||||
</p>
|
|
||||||
{/if}
|
|
||||||
{#each elements as { type, id, value, showPubkey, addSpaceBelow } (id)}
|
|
||||||
{#if type === "new-messages"}
|
|
||||||
<div
|
|
||||||
{id}
|
|
||||||
class="flex items-center py-2 text-xs transition-colors"
|
|
||||||
class:opacity-0={showFixedNewMessages}>
|
|
||||||
<div class="h-px grow bg-primary"></div>
|
|
||||||
<p class="rounded-full bg-primary px-2 py-1 text-primary-content">New Messages</p>
|
|
||||||
<div class="h-px grow bg-primary"></div>
|
|
||||||
</div>
|
|
||||||
{:else if type === "date"}
|
|
||||||
<Divider>{value}</Divider>
|
|
||||||
{:else}
|
|
||||||
{@const event = $state.snapshot(value as TrustedEvent)}
|
|
||||||
{#if event.kind === ROOM_ADD_MEMBER}
|
|
||||||
<RoomItemAddMember {url} {event} />
|
|
||||||
{:else}
|
|
||||||
<div in:slide class="cv">
|
|
||||||
<RoomItem
|
|
||||||
{url}
|
|
||||||
{event}
|
|
||||||
{replyTo}
|
|
||||||
{showPubkey}
|
|
||||||
{addSpaceBelow}
|
|
||||||
canEdit={canEditEvent}
|
|
||||||
onEdit={onEditEvent} />
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
</div>
|
||||||
{/if}
|
|
||||||
{/each}
|
|
||||||
<p class="flex h-10 items-center justify-center py-20">
|
|
||||||
{#if loadingBackward}
|
|
||||||
<Spinner loading={loadingBackward}>Looking for messages...</Spinner>
|
|
||||||
{:else}
|
{:else}
|
||||||
<Spinner>End of message history</Spinner>
|
{#if loadingForward}
|
||||||
|
<p class="py-20 flex justify-center">
|
||||||
|
<Spinner loading={loadingForward}>Looking for messages...</Spinner>
|
||||||
|
</p>
|
||||||
|
{/if}
|
||||||
|
{#each elements as { type, id, value, showPubkey, addSpaceBelow } (id)}
|
||||||
|
{#if type === "new-messages"}
|
||||||
|
<div
|
||||||
|
{id}
|
||||||
|
class="flex items-center py-2 text-xs transition-colors"
|
||||||
|
class:opacity-0={showFixedNewMessages}>
|
||||||
|
<div class="h-px flex-grow bg-primary"></div>
|
||||||
|
<p class="rounded-full bg-primary px-2 py-1 text-primary-content">New Messages</p>
|
||||||
|
<div class="h-px flex-grow bg-primary"></div>
|
||||||
|
</div>
|
||||||
|
{:else if type === "date"}
|
||||||
|
<Divider>{value}</Divider>
|
||||||
|
{:else}
|
||||||
|
{@const event = $state.snapshot(value as TrustedEvent)}
|
||||||
|
{#if event.kind === ROOM_ADD_MEMBER}
|
||||||
|
<RoomItemAddMember {url} {event} />
|
||||||
|
{:else}
|
||||||
|
<div in:slide class="cv">
|
||||||
|
<RoomItem
|
||||||
|
{url}
|
||||||
|
{event}
|
||||||
|
{replyTo}
|
||||||
|
{showPubkey}
|
||||||
|
{addSpaceBelow}
|
||||||
|
canEdit={canEditEvent}
|
||||||
|
onEdit={onEditEvent} />
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{/if}
|
||||||
|
{/each}
|
||||||
|
<p class="flex h-10 items-center justify-center py-20">
|
||||||
|
{#if loadingBackward}
|
||||||
|
<Spinner loading={loadingBackward}>Looking for messages...</Spinner>
|
||||||
|
{:else}
|
||||||
|
<Spinner>End of message history</Spinner>
|
||||||
|
{/if}
|
||||||
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
</p>
|
<div class="h-screen"></div>
|
||||||
{/if}
|
|
||||||
<div class="h-screen"></div>
|
|
||||||
</PageContent>
|
</PageContent>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@@ -531,60 +531,60 @@
|
|||||||
showMobileVideoPanel && "max-md:hidden",
|
showMobileVideoPanel && "max-md:hidden",
|
||||||
)}>
|
)}>
|
||||||
<div class="chat__compose-inner min-w-0 flex-1">
|
<div class="chat__compose-inner min-w-0 flex-1">
|
||||||
{#if $room.isPrivate && $membershipStatus !== MembershipStatus.Granted}
|
{#if $room.isPrivate && $membershipStatus !== MembershipStatus.Granted}
|
||||||
<!-- pass -->
|
<!-- pass -->
|
||||||
{:else if $room.isRestricted && $membershipStatus !== MembershipStatus.Granted}
|
{:else if $room.isRestricted && $membershipStatus !== MembershipStatus.Granted}
|
||||||
<div class="bg-alt card m-4 flex flex-row items-center justify-between px-4 py-3">
|
<div class="bg-alt card m-4 flex flex-row items-center justify-between px-4 py-3">
|
||||||
<p class="opacity-75">Only members are allowed to post to this room.</p>
|
<p class="opacity-75">Only members are allowed to post to this room.</p>
|
||||||
{#if $membershipStatus === MembershipStatus.Pending}
|
{#if $membershipStatus === MembershipStatus.Pending}
|
||||||
<Button class="btn btn-neutral btn-sm" disabled={leaving} onclick={leave}>
|
<Button class="btn btn-neutral btn-sm" disabled={leaving} onclick={leave}>
|
||||||
<Icon icon={ClockCircle} />
|
<Icon icon={ClockCircle} />
|
||||||
Access Pending
|
Access Pending
|
||||||
</Button>
|
</Button>
|
||||||
{:else}
|
|
||||||
<Button class="btn btn-neutral btn-sm" disabled={joining} onclick={join}>
|
|
||||||
{#if joining}
|
|
||||||
<span class="loading loading-spinner loading-sm"></span>
|
|
||||||
{:else}
|
{:else}
|
||||||
<Icon icon={Login2} />
|
<Button class="btn btn-neutral btn-sm" disabled={joining} onclick={join}>
|
||||||
|
{#if joining}
|
||||||
|
<span class="loading loading-spinner loading-sm"></span>
|
||||||
|
{:else}
|
||||||
|
<Icon icon={Login2} />
|
||||||
|
{/if}
|
||||||
|
Ask to Join
|
||||||
|
</Button>
|
||||||
{/if}
|
{/if}
|
||||||
Ask to Join
|
</div>
|
||||||
</Button>
|
{:else}
|
||||||
|
<div>
|
||||||
|
{#if parent}
|
||||||
|
<RoomComposeParent event={parent} clear={clearParent} verb="Replying to" />
|
||||||
|
{/if}
|
||||||
|
{#if share}
|
||||||
|
<RoomComposeParent event={share} clear={clearShare} verb="Sharing" />
|
||||||
|
{/if}
|
||||||
|
{#if eventToEdit}
|
||||||
|
<RoomComposeEdit clear={clearEventToEdit} />
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{#key eventToEdit}
|
||||||
|
<RoomCompose
|
||||||
|
{url}
|
||||||
|
{h}
|
||||||
|
{onSubmit}
|
||||||
|
{onEscape}
|
||||||
|
{onEditPrevious}
|
||||||
|
initialValues={eventToEdit}
|
||||||
|
bind:this={compose} />
|
||||||
|
{/key}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{#if isVoiceRoom || $voiceState === VoiceState.Joining || $voiceState === VoiceState.Connected}
|
||||||
<div>
|
<div
|
||||||
{#if parent}
|
class={cx(
|
||||||
<RoomComposeParent event={parent} clear={clearParent} verb="Replying to" />
|
"hide-on-keyboard flex-shrink-0 p-2 md:hidden",
|
||||||
{/if}
|
showMobileVideoPanel && "hidden",
|
||||||
{#if share}
|
)}>
|
||||||
<RoomComposeParent event={share} clear={clearShare} verb="Sharing" />
|
<VoiceWidget />
|
||||||
{/if}
|
</div>
|
||||||
{#if eventToEdit}
|
{/if}
|
||||||
<RoomComposeEdit clear={clearEventToEdit} />
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
{#key eventToEdit}
|
|
||||||
<RoomCompose
|
|
||||||
{url}
|
|
||||||
{h}
|
|
||||||
{onSubmit}
|
|
||||||
{onEscape}
|
|
||||||
{onEditPrevious}
|
|
||||||
initialValues={eventToEdit}
|
|
||||||
bind:this={compose} />
|
|
||||||
{/key}
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
{#if isVoiceRoom || $voiceState === VoiceState.Joining || $voiceState === VoiceState.Connected}
|
|
||||||
<div
|
|
||||||
class={cx(
|
|
||||||
"hide-on-keyboard flex-shrink-0 p-2 md:hidden",
|
|
||||||
showMobileVideoPanel && "hidden",
|
|
||||||
)}>
|
|
||||||
<VoiceWidget />
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user