Differences From Artifact [d94b5929bb]:
- File src/chat.c — part of check-in [2b07b66d59] at 2021-10-01 17:40:13 on branch chat-input-rework — Removed the cumbersome and platform-dependent file selection widget from view and now proxy its activation via a new toolbar button. Saves space and looks nicer. (user: stephan size: 32290)
To Artifact [bade92d511]:
- File src/chat.c — part of check-in [cc709782b4] at 2021-10-03 19:34:35 on branch chat-input-rework — Experimentally replace paperclip Unicode glyph with an embedded SVG, as the glyph looks greyed out/inactive in some environments. (user: stephan size: 32816)
| ︙ | ︙ | |||
141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
** 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,
db_get("chat-alert-sound","alerts/plunk.wav"));
| > > > > > > > > > > | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
** 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 style=\"max-width:2.5ex\"><path d=\"M13.26,1.9a4.1,4.1,0,"
"0,0-5.17.6L1.84,8.75A2.79,2.79,0,0,0,1,10.94,2.84,2.84,0,0,0,"
"2.14,13a2.73,2.73,0,0,0,1.62.53,3.13,3.13,0,0,0,"
"2.18-.92l5.4-5.4A1.66,1.66,0,0,0,9,4.86L5.4,8.46l.71.71L9.7,"
"5.57a.66.66,0,0,1,.93.93L5.24,11.9a2,2,0,0,1-2.5.3,1.83,1.83,"
"0,0,1-.2-2.74L8.79,3.21a3.11,3.11,0,0,1,3.9-.48A3,3,0,0,1,14,"
"4.92a3,3,0,0,1-.86,2.37L7.86,12.55l.7.71L13.83,8a4,4,0,0,"
"0-.57-6.1Z\"></path></svg>";
login_check_credentials();
if( !g.perm.Chat ){
login_needed(g.anon.Chat);
return;
}
zAlert = mprintf("%s/builtin/%s", g.zBaseURL,
db_get("chat-alert-sound","alerts/plunk.wav"));
|
| ︙ | ︙ | |||
163 164 165 166 167 168 169 | @ data-placeholder0="%h(zInputPlaceholder0)" \ @ data-placeholder="%h(zInputPlaceholder0)" \ @ class=""></div> @ <div id='chat-edit-buttons'> @ <button id="chat-preview-button" \ @ title="Preview message (Shift-Enter)">👁</button> @ <button id="chat-message-attach" \ | | | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | @ data-placeholder0="%h(zInputPlaceholder0)" \ @ data-placeholder="%h(zInputPlaceholder0)" \ @ class=""></div> @ <div id='chat-edit-buttons'> @ <button id="chat-preview-button" \ @ title="Preview message (Shift-Enter)">👁</button> @ <button id="chat-message-attach" \ @ title="Attach file to message">%s(zPaperclip)</button> @ <button id="chat-settings-button" \ @ title="Configure chat">⚙</button> @ <button id="chat-message-submit" \ @ title="Send message (Ctrl-Enter)">📤</button> @ </div> @ </div> @ <div id='chat-input-file-area'> |
| ︙ | ︙ |