zmiany ux
This commit is contained in:
3
app.py
3
app.py
@ -303,7 +303,7 @@ def upload_receipt(list_id):
|
||||
file_path = os.path.join(app.config['UPLOAD_FOLDER'], f"list_{list_id}_{filename}")
|
||||
|
||||
img = Image.open(file)
|
||||
img.thumbnail((800, 800))
|
||||
img.thumbnail((2000, 2000))
|
||||
img.save(file_path)
|
||||
|
||||
flash('Wgrano paragon', 'success')
|
||||
@ -319,6 +319,7 @@ def uploaded_file(filename):
|
||||
response.headers.pop('Pragma', None)
|
||||
return response
|
||||
|
||||
# chyba do usuniecia przeniesione na eventy socket.io
|
||||
@app.route('/update-note/<int:item_id>', methods=['POST'])
|
||||
def update_note(item_id):
|
||||
item = Item.query.get_or_404(item_id)
|
||||
|
@ -50,7 +50,7 @@
|
||||
<h5>📤 Dodaj zdjęcie paragonu</h5>
|
||||
<form action="{{ url_for('upload_receipt', list_id=list.id) }}" method="post" enctype="multipart/form-data">
|
||||
<div class="input-group mb-2">
|
||||
<input type="file" name="receipt" accept="image/*" capture="environment" class="form-control" id="receiptInput">
|
||||
<input type="file" name="receipt" accept="image/*" capture="environment" class="form-control custom-file-input" id="receiptInput">
|
||||
<button type="submit" class="btn btn-success">➕ Wgraj</button>
|
||||
</div>
|
||||
</form>
|
||||
@ -97,5 +97,19 @@
|
||||
.bg-light {
|
||||
background-color: #2c2f33 !important;
|
||||
}
|
||||
|
||||
input[type="file"]::file-selector-button {
|
||||
background-color: #28a745; /* Zielony */
|
||||
color: #fff;
|
||||
border: none;
|
||||
padding: 0.5em 1em;
|
||||
border-radius: 4px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
input[type="file"]::file-selector-button:hover {
|
||||
background-color: #218838;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user