Fossil SCM

Experimentally replace paperclip Unicode glyph with an embedded SVG, as the glyph looks greyed out/inactive in some environments.

stephan 2021-10-03 19:34 chat-input-rework
Commit cc709782b467e53ad1efadbb00004ba88d1251001f3a96bd56397c4625717b26
1 file changed +11 -1
+11 -1
--- src/chat.c
+++ src/chat.c
@@ -143,10 +143,20 @@
143143
*/
144144
void chat_webpage(void){
145145
char *zAlert;
146146
char *zProjectName;
147147
char * zInputPlaceholder0; /* Common text input placeholder value */
148
+ const char *zPaperclip =
149
+ "<svg style=\"max-width:2.5ex\"><path d=\"M13.26,1.9a4.1,4.1,0,"
150
+ "0,0-5.17.6L1.84,8.75A2.79,2.79,0,0,0,1,10.94,2.84,2.84,0,0,0,"
151
+ "2.14,13a2.73,2.73,0,0,0,1.62.53,3.13,3.13,0,0,0,"
152
+ "2.18-.92l5.4-5.4A1.66,1.66,0,0,0,9,4.86L5.4,8.46l.71.71L9.7,"
153
+ "5.57a.66.66,0,0,1,.93.93L5.24,11.9a2,2,0,0,1-2.5.3,1.83,1.83,"
154
+ "0,0,1-.2-2.74L8.79,3.21a3.11,3.11,0,0,1,3.9-.48A3,3,0,0,1,14,"
155
+ "4.92a3,3,0,0,1-.86,2.37L7.86,12.55l.7.71L13.83,8a4,4,0,0,"
156
+ "0-.57-6.1Z\"></path></svg>";
157
+
148158
login_check_credentials();
149159
if( !g.perm.Chat ){
150160
login_needed(g.anon.Chat);
151161
return;
152162
}
@@ -165,11 +175,11 @@
165175
@ class=""></div>
166176
@ <div id='chat-edit-buttons'>
167177
@ <button id="chat-preview-button" \
168178
@ title="Preview message (Shift-Enter)">&#128065;</button>
169179
@ <button id="chat-message-attach" \
170
- @ title="Attach file to message">&#128206;</button>
180
+ @ title="Attach file to message">%s(zPaperclip)</button>
171181
@ <button id="chat-settings-button" \
172182
@ title="Configure chat">&#9881;</button>
173183
@ <button id="chat-message-submit" \
174184
@ title="Send message (Ctrl-Enter)">&#128228;</button>
175185
@ </div>
176186
--- src/chat.c
+++ src/chat.c
@@ -143,10 +143,20 @@
143 */
144 void chat_webpage(void){
145 char *zAlert;
146 char *zProjectName;
147 char * zInputPlaceholder0; /* Common text input placeholder value */
 
 
 
 
 
 
 
 
 
 
148 login_check_credentials();
149 if( !g.perm.Chat ){
150 login_needed(g.anon.Chat);
151 return;
152 }
@@ -165,11 +175,11 @@
165 @ class=""></div>
166 @ <div id='chat-edit-buttons'>
167 @ <button id="chat-preview-button" \
168 @ title="Preview message (Shift-Enter)">&#128065;</button>
169 @ <button id="chat-message-attach" \
170 @ title="Attach file to message">&#128206;</button>
171 @ <button id="chat-settings-button" \
172 @ title="Configure chat">&#9881;</button>
173 @ <button id="chat-message-submit" \
174 @ title="Send message (Ctrl-Enter)">&#128228;</button>
175 @ </div>
176
--- src/chat.c
+++ src/chat.c
@@ -143,10 +143,20 @@
143 */
144 void chat_webpage(void){
145 char *zAlert;
146 char *zProjectName;
147 char * zInputPlaceholder0; /* Common text input placeholder value */
148 const char *zPaperclip =
149 "<svg style=\"max-width:2.5ex\"><path d=\"M13.26,1.9a4.1,4.1,0,"
150 "0,0-5.17.6L1.84,8.75A2.79,2.79,0,0,0,1,10.94,2.84,2.84,0,0,0,"
151 "2.14,13a2.73,2.73,0,0,0,1.62.53,3.13,3.13,0,0,0,"
152 "2.18-.92l5.4-5.4A1.66,1.66,0,0,0,9,4.86L5.4,8.46l.71.71L9.7,"
153 "5.57a.66.66,0,0,1,.93.93L5.24,11.9a2,2,0,0,1-2.5.3,1.83,1.83,"
154 "0,0,1-.2-2.74L8.79,3.21a3.11,3.11,0,0,1,3.9-.48A3,3,0,0,1,14,"
155 "4.92a3,3,0,0,1-.86,2.37L7.86,12.55l.7.71L13.83,8a4,4,0,0,"
156 "0-.57-6.1Z\"></path></svg>";
157
158 login_check_credentials();
159 if( !g.perm.Chat ){
160 login_needed(g.anon.Chat);
161 return;
162 }
@@ -165,11 +175,11 @@
175 @ class=""></div>
176 @ <div id='chat-edit-buttons'>
177 @ <button id="chat-preview-button" \
178 @ title="Preview message (Shift-Enter)">&#128065;</button>
179 @ <button id="chat-message-attach" \
180 @ title="Attach file to message">%s(zPaperclip)</button>
181 @ <button id="chat-settings-button" \
182 @ title="Configure chat">&#9881;</button>
183 @ <button id="chat-message-submit" \
184 @ title="Send message (Ctrl-Enter)">&#128228;</button>
185 @ </div>
186

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button