Fossil SCM
In the forum editor, when replying but not logged in, show a clear warning that the post will be anonymous. This has been brought up by several users and has bitten me twice (causing me to inadvertently post anonymously).
Commit
2ad508a11c63127b001c3ca3ea4522e8c62401bcd529e967d222d00dcdf91952
Parent
a8c66b188c5dffe…
1 file changed
+17
| --- src/fossil.page.forumpost.js | ||
| +++ src/fossil.page.forumpost.js | ||
| @@ -251,10 +251,27 @@ | ||
| 251 | 251 | e.editor = D.attr( |
| 252 | 252 | D.addClass(D.textarea(), 'editor'), |
| 253 | 253 | 'placeholder', |
| 254 | 254 | 'Your message to other forum-goers...' |
| 255 | 255 | ); |
| 256 | + if( opt.inReplyTo && !F.user.isIndividual ){ | |
| 257 | + const w = D.addClass(D.div(), 'warning'); | |
| 258 | + w.append( | |
| 259 | + "You are not ", | |
| 260 | + D.a(F.repoUrl( | |
| 261 | + 'login' | |
| 262 | + /*, { | |
| 263 | + // Leads to a confusing 'you need more permissions | |
| 264 | + // to view /forumpost/.... warning | |
| 265 | + g: 'forumpost/'+(opt.inReplyTo || opt.edit?.uuid) | |
| 266 | + }*/ | |
| 267 | + ), 'logged in'), ' so will be posting anonymously. ', | |
| 268 | + "If you log in then return here, your draft edit will ", | |
| 269 | + "still be here." | |
| 270 | + ); | |
| 271 | + e.tabEdit.append(w); | |
| 272 | + } | |
| 256 | 273 | e.tabEdit.append(e.editor); |
| 257 | 274 | e.tabEdit.dataset.tabLabel = (opt.edit || !opt.inReplyTo) |
| 258 | 275 | ? 'Edit' : 'Reply'; |
| 259 | 276 | this.#tabs.addTab( e.tabEdit ); |
| 260 | 277 | this.#tabs.switchToTab( e.tabEdit ); |
| 261 | 278 |
| --- src/fossil.page.forumpost.js | |
| +++ src/fossil.page.forumpost.js | |
| @@ -251,10 +251,27 @@ | |
| 251 | e.editor = D.attr( |
| 252 | D.addClass(D.textarea(), 'editor'), |
| 253 | 'placeholder', |
| 254 | 'Your message to other forum-goers...' |
| 255 | ); |
| 256 | e.tabEdit.append(e.editor); |
| 257 | e.tabEdit.dataset.tabLabel = (opt.edit || !opt.inReplyTo) |
| 258 | ? 'Edit' : 'Reply'; |
| 259 | this.#tabs.addTab( e.tabEdit ); |
| 260 | this.#tabs.switchToTab( e.tabEdit ); |
| 261 |
| --- src/fossil.page.forumpost.js | |
| +++ src/fossil.page.forumpost.js | |
| @@ -251,10 +251,27 @@ | |
| 251 | e.editor = D.attr( |
| 252 | D.addClass(D.textarea(), 'editor'), |
| 253 | 'placeholder', |
| 254 | 'Your message to other forum-goers...' |
| 255 | ); |
| 256 | if( opt.inReplyTo && !F.user.isIndividual ){ |
| 257 | const w = D.addClass(D.div(), 'warning'); |
| 258 | w.append( |
| 259 | "You are not ", |
| 260 | D.a(F.repoUrl( |
| 261 | 'login' |
| 262 | /*, { |
| 263 | // Leads to a confusing 'you need more permissions |
| 264 | // to view /forumpost/.... warning |
| 265 | g: 'forumpost/'+(opt.inReplyTo || opt.edit?.uuid) |
| 266 | }*/ |
| 267 | ), 'logged in'), ' so will be posting anonymously. ', |
| 268 | "If you log in then return here, your draft edit will ", |
| 269 | "still be here." |
| 270 | ); |
| 271 | e.tabEdit.append(w); |
| 272 | } |
| 273 | e.tabEdit.append(e.editor); |
| 274 | e.tabEdit.dataset.tabLabel = (opt.edit || !opt.inReplyTo) |
| 275 | ? 'Edit' : 'Reply'; |
| 276 | this.#tabs.addTab( e.tabEdit ); |
| 277 | this.#tabs.switchToTab( e.tabEdit ); |
| 278 |