-
-
Notifications
You must be signed in to change notification settings - Fork 341
Improvement/mobile responsiveness #139
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
Changes from all commits
c0cbc73
bd94fc7
cc33515
eb0b3cd
40cad52
212495d
d9b8ec4
810e538
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,7 +50,7 @@ export function Receiver({ onTransferStateChange }: ReceiverProps) { | |
| }, [isReceiving, onTransferStateChange]) | ||
|
|
||
| return ( | ||
| <div className="p-6 space-y-6 relative h-112 overflow-y-auto flex flex-col"> | ||
| <div className="p-2 sm:p-6 space-y-6 relative h-[62dvh] sm:h-112 overflow-y-auto flex flex-col"> | ||
| {!isReceiving ? ( | ||
| <> | ||
| <div className="text-center"> | ||
|
|
@@ -63,7 +63,7 @@ export function Receiver({ onTransferStateChange }: ReceiverProps) { | |
| type="button" | ||
| variant="ghost" | ||
| onClick={() => setShowInstructionsDialog(true)} | ||
| className="absolute top-6 right-6" | ||
| className="absolute top-0 right-0 sm:top-6 sm:right-6" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Consider slight offset for the info button on mobile. With the container padding reduced to If it looks cramped during testing, a small offset like |
||
| > | ||
| <Info /> | ||
| </Button> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,15 +56,18 @@ export function Dropzone({ | |
| const getSubText = () => { | ||
| if (isLoading) return t('common:sender.pleaseWaitProcessing') | ||
| if (selectedPath) { | ||
| const fileName = selectedPath.split('/').pop() ?? '' | ||
| const displayName = | ||
| fileName.length > 60 ? `${fileName.slice(0, 60)}…` : fileName | ||
| return ( | ||
| <div> | ||
| <div | ||
| className="font-medium cursor-pointer hover:opacity-80 transition-opacity flex items-center justify-center" | ||
| onClick={onToggleFullPath} | ||
| title="Click to toggle full path" | ||
| > | ||
| {selectedPath.split('/').pop()} | ||
| <span className="-mr-2"> | ||
| {displayName} | ||
| <span className="-mr-2 hidden sm:block "> | ||
| {showFullPath ? ( | ||
| <ChevronDown className="p-0.5 h-6 w-6" size={16} /> | ||
| ) : ( | ||
|
|
@@ -73,7 +76,7 @@ export function Dropzone({ | |
| </span> | ||
| </div> | ||
| <div | ||
| className="text-xs mt-1 opacity-75 break-all transition-opacity" | ||
| className="text-xs mt-1 opacity-75 break-all transition-opacity max-sm:hidden" | ||
| style={{ | ||
| visibility: showFullPath ? 'visible' : 'hidden', | ||
| }} | ||
|
|
@@ -144,7 +147,7 @@ export function Dropzone({ | |
| </div> | ||
|
|
||
| <div> | ||
| <p className="text-lg font-medium mb-2 text-accent-foreground"> | ||
| <p className=" hidden sm:block text-lg font-medium mb-2 text-accent-foreground"> | ||
| {getStatusText()} | ||
| </p> | ||
|
Comment on lines
+150
to
152
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor: Leading space in className. There's a leading space before "hidden" in the className string. 🧹 Suggested fix- <p className=" hidden sm:block text-lg font-medium mb-2 text-accent-foreground">
+ <p className="hidden sm:block text-lg font-medium mb-2 text-accent-foreground"> |
||
| <div className="text-sm text-muted-foreground">{getSubText()}</div> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.