victor HF Staff commited on
Commit
17a7bb7
·
1 Parent(s): 9eb8b3f

fix: adjust spacing and styles in ShareConversationModal and MobileNav components

Browse files
src/lib/components/MobileNav.svelte CHANGED
@@ -91,7 +91,9 @@
91
  >
92
  <div class="flex h-full items-center justify-center overflow-hidden">
93
  {#if page.params?.id}
94
- <span class="max-w-full truncate px-4" data-testid="chat-title">{title}</span>
 
 
95
  {/if}
96
  </div>
97
  <div class="flex items-center">
 
91
  >
92
  <div class="flex h-full items-center justify-center overflow-hidden">
93
  {#if page.params?.id}
94
+ <span class="max-w-full truncate px-4 first-letter:uppercase" data-testid="chat-title"
95
+ >{title}</span
96
+ >
97
  {/if}
98
  </div>
99
  <div class="flex items-center">
src/lib/components/ShareConversationModal.svelte CHANGED
@@ -66,7 +66,7 @@
66
 
67
  {#if open}
68
  <Modal onclose={close} width="w-[90dvh] md:w-[500px]">
69
- <div class="flex w-full flex-col gap-5 p-6">
70
  <!-- Header + copy -->
71
  {#if createdUrl}
72
  <div class="flex items-start justify-between">
@@ -108,10 +108,7 @@
108
  </button>
109
  </div>
110
  <div class="text-sm text-gray-600 dark:text-gray-400">
111
- Any messages you add after sharing stay private. <a
112
- href="{base}/privacy"
113
- class="underline hover:no-underline dark:text-gray-300">Learn more</a
114
- >.
115
  </div>
116
  {/if}
117
 
@@ -128,7 +125,7 @@
128
  class="flex h-12 items-center gap-2 whitespace-nowrap rounded-2xl border border-gray-200 bg-gray-50 p-2.5 dark:border-gray-700 dark:bg-gray-800"
129
  >
130
  <input
131
- class="w-full bg-transparent px-2 text-[15px] text-gray-700 outline-none placeholder:text-gray-400 dark:text-gray-200 dark:placeholder:text-gray-500"
132
  readonly
133
  value={createdUrl ??
134
  `${page.data.publicConfig.PUBLIC_SHARE_PREFIX || `${page.data.publicConfig.PUBLIC_ORIGIN || page.url.origin}${base}`}/r/...`}
@@ -136,7 +133,7 @@
136
 
137
  {#if createdUrl}
138
  <CopyToClipBoardBtn
139
- classNames="inline-flex items-center rounded-xl -mr-0.5 border border-gray-300 bg-white px-3 py-1.5 text-sm font-medium text-gray-900 shadow enabled:hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-700 dark:text-gray-100 dark:enabled:hover:bg-gray-600"
140
  showTooltip={false}
141
  value={withLeafId(createdUrl) ?? createdUrl}
142
  onClick={() => {
@@ -165,7 +162,7 @@
165
  </CopyToClipBoardBtn>
166
  {:else}
167
  <button
168
- class="-mr-0.5 inline-flex items-center gap-2 rounded-xl border border-gray-300 bg-white px-3 py-1.5 text-sm font-medium text-gray-900 shadow hover:bg-gray-50 disabled:opacity-50 dark:border-gray-700 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600"
169
  type="button"
170
  disabled={creating}
171
  onclick={handleCreate}
 
66
 
67
  {#if open}
68
  <Modal onclose={close} width="w-[90dvh] md:w-[500px]">
69
+ <div class="flex w-full flex-col gap-3 p-5 sm:gap-5 sm:p-6">
70
  <!-- Header + copy -->
71
  {#if createdUrl}
72
  <div class="flex items-start justify-between">
 
108
  </button>
109
  </div>
110
  <div class="text-sm text-gray-600 dark:text-gray-400">
111
+ Any messages you add after sharing stay private.
 
 
 
112
  </div>
113
  {/if}
114
 
 
125
  class="flex h-12 items-center gap-2 whitespace-nowrap rounded-2xl border border-gray-200 bg-gray-50 p-2.5 dark:border-gray-700 dark:bg-gray-800"
126
  >
127
  <input
128
+ class="w-full truncate bg-transparent text-[15px] text-gray-700 outline-none placeholder:text-gray-400 dark:text-gray-200 dark:placeholder:text-gray-500 max-sm:text-sm"
129
  readonly
130
  value={createdUrl ??
131
  `${page.data.publicConfig.PUBLIC_SHARE_PREFIX || `${page.data.publicConfig.PUBLIC_ORIGIN || page.url.origin}${base}`}/r/...`}
 
133
 
134
  {#if createdUrl}
135
  <CopyToClipBoardBtn
136
+ classNames="inline-flex items-center rounded-xl -mr-1 border border-gray-300 bg-white px-3 py-1.5 text-sm font-medium text-gray-900 shadow enabled:hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-700 dark:text-gray-100 dark:enabled:hover:bg-gray-600"
137
  showTooltip={false}
138
  value={withLeafId(createdUrl) ?? createdUrl}
139
  onClick={() => {
 
162
  </CopyToClipBoardBtn>
163
  {:else}
164
  <button
165
+ class="-mr-1 inline-flex items-center gap-2 rounded-xl border border-gray-300 bg-white px-3 py-1.5 text-sm font-medium text-gray-900 shadow hover:bg-gray-50 disabled:opacity-50 dark:border-gray-700 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600"
166
  type="button"
167
  disabled={creating}
168
  onclick={handleCreate}