Fossil

Check-in [74479fb593]
Login

Check-in [74479fb593]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Replace the /chat attach button SVG with the corresponding Unicode 6.0 glyph. Not sure why we didn't do that in the first place, as all of the other buttons use emoji icons.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | fts5-chat-search
Files: files | file ages | folders
SHA3-256: 74479fb5930b8448e9c1696ba065cd260aa0e9eb9b17eefd29a5e21cc690450e
User & Date: stephan 2024-07-01 11:31:07.316
Context
2024-07-01
15:22
Use temporary triggers, instead of normal schema triggers, to populate the fts index. Fossil disables schema triggers to prevent malicious uses. ... (check-in: 21d9ea4ade user: dan tags: fts5-chat-search)
11:31
Replace the /chat attach button SVG with the corresponding Unicode 6.0 glyph. Not sure why we didn't do that in the first place, as all of the other buttons use emoji icons. ... (check-in: 74479fb593 user: stephan tags: fts5-chat-search)
11:24
Increase the size of the /chat attach button image and fix it to be rescaled in non-dark themes. ... (check-in: ae0940db82 user: stephan tags: fts5-chat-search)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/chat.c.
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
** Other /chat-OP pages are used by XHR requests from this page to
** send new chat message, delete older messages, or poll for changes.
*/
void chat_webpage(void){
  char *zAlert;
  char *zProjectName;
  char * zInputPlaceholder0;  /* Common text input placeholder value */
  const char *zPaperclip =
    "<svg height=\"8.0\" width=\"16.0\"><path "
    "stroke=\"rgb(100,100,100)\" "
    "d=\"M 15.93452,3.2530441 "
    "A 4.1499493,4.1265346 0 0 0 11.804809,6.5256284e-4 H 2.8582923 A "
    "2.8239899,2.8080565 0 0 0 0.68965668,0.96142476 2.874599,2.8583801 "
    "0 0 0 0.03119302,3.2388108 2.7632589,2.7476682 0 0 0 "
    "0.81132923,4.7689293 3.168132,3.1502569 0 0 0 3.0300653,5.66565 l "
    "7.7297897,-4e-7 a 1.6802234,1.6707433 0 0 0 0.0072,-3.3377933 H "
    "5.6138192 v 1.0105899 l 5.1460358,-0.00712 a 0.66804062,0.66427143 "
    "0 0 1 0,1.3237305 l -7.7226325,0.00712 A 2.0243655,2.0129437 0 0 1 "
    "1.0332029,3.0964741 1.8522944,1.8418435 0 0 1 2.8511351,1.0041257 h "
    "8.9465169 a 3.1478884,3.1301275 0 0 1 3.134859,2.4339559 3.0365483,"
    "3.0194156 0 0 1 -0.629835,2.4908908 3.0365483,3.0194156 0 0 1 "
    "-2.31178,1.0746415 l -7.5437026,-0.014233 -0.00716,1.0034736 "
    "7.5365456,0.00715 a 4.048731,4.0258875 0 0 0 3.957938,-4.7469259 z\""
    "/></svg>";

  login_check_credentials();
  if( !g.perm.Chat ){
    login_needed(g.anon.Chat);
    return;
  }
  zAlert = mprintf("%s/builtin/%s", g.zBaseURL,







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







154
155
156
157
158
159
160

















161
162
163
164
165
166
167
** Other /chat-OP pages are used by XHR requests from this page to
** send new chat message, delete older messages, or poll for changes.
*/
void chat_webpage(void){
  char *zAlert;
  char *zProjectName;
  char * zInputPlaceholder0;  /* Common text input placeholder value */


















  login_check_credentials();
  if( !g.perm.Chat ){
    login_needed(g.anon.Chat);
    return;
  }
  zAlert = mprintf("%s/builtin/%s", g.zBaseURL,
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
  @      class="chat-input-field hidden"></div>
  @     <div id='chat-buttons-wrapper'>
  @       <span class='cbutton' id="chat-button-preview" \
  @         title="Preview message (Shift-Enter)">&#128065;</span>
  @       <span class='cbutton' id="chat-button-search" \
  @         title="Search chat history">&#x1f50d;</span>
  @       <span class='cbutton' id="chat-button-attach" \
  @         title="Attach file to message">%s(zPaperclip)</span>
  @       <span class='cbutton' id="chat-button-settings" \
  @         title="Configure chat">&#9881;</span>
  @       <span class='cbutton' id="chat-button-submit" \
  @         title="Send message (Ctrl-Enter)">&#128228;</span>
  @     </div>
  @   </div>
  @   <div id='chat-input-file-area'>







|







187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
  @      class="chat-input-field hidden"></div>
  @     <div id='chat-buttons-wrapper'>
  @       <span class='cbutton' id="chat-button-preview" \
  @         title="Preview message (Shift-Enter)">&#128065;</span>
  @       <span class='cbutton' id="chat-button-search" \
  @         title="Search chat history">&#x1f50d;</span>
  @       <span class='cbutton' id="chat-button-attach" \
  @         title="Attach file to message">&#x1f4ce;</span>
  @       <span class='cbutton' id="chat-button-settings" \
  @         title="Configure chat">&#9881;</span>
  @       <span class='cbutton' id="chat-button-submit" \
  @         title="Send message (Ctrl-Enter)">&#128228;</span>
  @     </div>
  @   </div>
  @   <div id='chat-input-file-area'>
Changes to src/style.chat.css.
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
  display: none;
}
body.chat #chat-user-list .chat-user.selected {
  font-weight: bold;
  text-decoration: underline;
}

body.chat.fossil-dark-style #chat-button-attach > svg {
  /* The black paperclip is barely visible in dark-mode
     skins when they have dark buttons */
  filter: invert(0.8);
}
body.chat #chat-button-attach > svg {
  transform: scale(170%);
}

body.cpage-chat-search .searchForm {
  margin-top: 1em;
}
body.cpage-chat-search .spacer-widget button {
  margin-left: 1ex;
  margin-right: 1ex;
  display: block;







<
<
<
<
<
<
<
<
<







611
612
613
614
615
616
617









618
619
620
621
622
623
624
  display: none;
}
body.chat #chat-user-list .chat-user.selected {
  font-weight: bold;
  text-decoration: underline;
}










body.cpage-chat-search .searchForm {
  margin-top: 1em;
}
body.cpage-chat-search .spacer-widget button {
  margin-left: 1ex;
  margin-right: 1ex;
  display: block;