multi-account-post-schedule.../views/index.jade

75 lines
3.2 KiB
Plaintext
Raw Normal View History

2022-07-07 18:23:44 +02:00
extends layout
block content
div.column-header__wrapper
h1.button.column-header Publier un message
2022-07-07 18:23:44 +02:00
if message
p.alert.alert-error=message
2022-07-11 17:04:46 +02:00
//form(action="/add-to-queue",method="post")
form(action="/direct-post",method="post")
span.account
2022-07-10 23:02:32 +02:00
span Choix du compte
br
2022-07-10 23:02:32 +02:00
//.drawer--account
// .account__avatar(style='width: 48px; height: 48px; background-size: 48px 48px; background-image: url("https://mastodon.cipherbliss.com/system/accounts/avatars/108/409/825/840/442/987/original/eea3627456786998.jpg");')
// .navigation-bar__profile
// a.permalink.acct(href='https://mastodon.cipherbliss.com/@voixdunucleaire')
// strong @voixdunucleaire
2022-07-11 17:04:46 +02:00
//p=accounts_to_select.length
2022-07-11 17:45:28 +02:00
select(method="post", name="author", value=bodyReq? bodyReq.author:"", id="author_select")
option(value="tykayn")
2022-07-11 17:04:46 +02:00
span TyKayn
2022-07-11 17:45:28 +02:00
option(value="voixdunucleaire")
span voix du nucléaire
option(value="modominem")
span modo minem
option(value="curator")
span curator
option(value="qzine")
span qzine
option(value="meme")
span meme
option(value="cil_gometz")
span CIL Gometz
2022-07-11 17:04:46 +02:00
// each item in accounts_to_select.length ? item : ['There are no values']
// option(value=item.label)
// span=item.value
br
2022-07-11 17:45:28 +02:00
img.account__avatar-overlay(src="https://mastodon.cipherbliss.com/system/accounts/avatars/000/003/032/original/2bb8b90d21d3fdca.jpg", onclick="selectAccount('qzine')")
img.account__avatar-overlay(src="https://mastodon.cipherbliss.com/system/accounts/avatars/000/107/055/original/7dac1a35f1423b94.jpg", onclick="selectAccount('cil_gometz')")
img.account__avatar-overlay(src="https://mastodon.cipherbliss.com/system/accounts/avatars/000/002/978/original/b2f2e817572c93e9.png", onclick="selectAccount('meme')")
div.compose-form__autosuggest-wrapper
.autosuggest-textarea
label
2022-07-11 17:04:46 +02:00
span Content warning (optionnel)
input.autosuggest-textarea__textarea(name="cw", type="text", width="500")
span Quavez-vous en tête?
textarea.autosuggest-textarea__textarea(name="message", width="500", lines="20",autofocus="autofocus")
br
label
2022-07-11 17:04:46 +02:00
span Fichier à joindre (optionnel)
textarea.autosuggest-textarea__textarea(name="fichier", width="500", lines="1",value="default_picture.jpg")
2022-07-11 17:04:46 +02:00
fieldset.wip
label Schedule in time (work in progress, not working by now)
input.input.checkbox(type="checkbox", value=false, name="scheduled_at_bool")
input.input.checkbox(type="date", name="scheduled_at")
input.input.checkbox(type="text", name="scheduled_at_time",value=schedule_time)
//div(id=flatpickr)
br
div.composer--publisher
2022-07-11 17:04:46 +02:00
//input.button.primary(type="submit", value="ajouter à la file d'attente")
input.button.primary(type="submit", value="poster tout de suite")
2022-07-11 17:45:28 +02:00
script.
function selectAccount(somePseudo) {
console.log('account selected', document.querySelector('#author_select').value)
document.querySelector('#author_select').value = somePseudo
console.log('account changed', somePseudo)
}
console.log('script loaded')