Fossil

Diff
Login

Diff

Differences From Artifact [d94b5929bb]:

To Artifact [bade92d511]:


141
142
143
144
145
146
147










148
149
150
151
152
153
154
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
170

171
172
173
174
175
176
177
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)">&#128065;</button>
  @       <button id="chat-message-attach" \
  @         title="Attach file to message">&#128206;</button>
  @         title="Attach file to message">%s(zPaperclip)</button>
  @       <button id="chat-settings-button" \
  @         title="Configure chat">&#9881;</button>
  @       <button id="chat-message-submit" \
  @         title="Send message (Ctrl-Enter)">&#128228;</button>
  @     </div>
  @   </div>
  @   <div id='chat-input-file-area'>