Added quick mention, improved create experience
This commit is contained in:
parent
bd188a02bc
commit
528e9e2c1c
4 changed files with 6 additions and 4 deletions
1
app.py
1
app.py
|
|
@ -407,7 +407,6 @@ def create():
|
||||||
file.save(UPLOAD_DIRECTORY + str(upload.id) + '.' + ext)
|
file.save(UPLOAD_DIRECTORY + str(upload.id) + '.' + ext)
|
||||||
flash('Your message has been posted successfully')
|
flash('Your message has been posted successfully')
|
||||||
return redirect(url_for('user_detail', username=user.username))
|
return redirect(url_for('user_detail', username=user.username))
|
||||||
|
|
||||||
return render_template('create.html')
|
return render_template('create.html')
|
||||||
|
|
||||||
@app.route('/notifications/')
|
@app.route('/notifications/')
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,4 @@ body{margin:0}
|
||||||
.header h1{margin:0;display:inline-block}
|
.header h1{margin:0;display:inline-block}
|
||||||
.flash{background-color:#ff9;border:yellow 1px solid}
|
.flash{background-color:#ff9;border:yellow 1px solid}
|
||||||
.message-visual img{max-width:100%;max-height:8em}
|
.message-visual img{max-width:100%;max-height:8em}
|
||||||
|
.create_text{width:100%;height:8em}
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,9 @@
|
||||||
<form action="{{ url_for('create') }}" method="POST" enctype="multipart/form-data">
|
<form action="{{ url_for('create') }}" method="POST" enctype="multipart/form-data">
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Message:</dt>
|
<dt>Message:</dt>
|
||||||
<dd><textarea name="text" placeholder="What's happening?"></textarea></dd>
|
<dd><textarea name="text" placeholder="What's happening?" class="create_text">{{ request.args['preload'] }}</textarea></dd>
|
||||||
<dd id="fileInputContainer"><a href="javascript:attachFileInput();">Add a file...</a>
|
<dd id="fileInputContainer"><a href="javascript:attachFileInput();">Add a file...</a>
|
||||||
|
<dd><small>Messages are public and can be seen on your profile as well as public timeline.</small></dd>
|
||||||
<dd><input type="submit" value="Create" /></dd>
|
<dd><input type="submit" value="Create" /></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,14 @@
|
||||||
{% if user.username != current_user.username %}
|
{% if user.username != current_user.username %}
|
||||||
{% if current_user|is_following(user) %}
|
{% if current_user|is_following(user) %}
|
||||||
<form action="{{ url_for('user_unfollow', username=user.username) }}" method="post">
|
<form action="{{ url_for('user_unfollow', username=user.username) }}" method="post">
|
||||||
<input type="submit" value="- Un-follow" />
|
<input type="submit" class="follow_button following" value="- Un-follow" />
|
||||||
</form>
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
<form action="{{ url_for('user_follow', username=user.username) }}" method="post">
|
<form action="{{ url_for('user_follow', username=user.username) }}" method="post">
|
||||||
<input type="submit" value="+ Follow" />
|
<input type="submit" class="follow_button" value="+ Follow" />
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<p><a href="/create/?preload=%2B{{ user.username }}">Mention this user in a message</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue