uploaderのスタイルを若干更新

This commit is contained in:
yuuki 2024-02-29 11:19:14 +00:00
parent dc61e1e077
commit e0379f5b2f
3 changed files with 9 additions and 9 deletions

7
app.py
View File

@ -761,12 +761,9 @@ def send_songs(ref):
def send_manifest(): def send_manifest():
return cache_wrap(flask.send_from_directory("public", "manifest.json"), 3600) return cache_wrap(flask.send_from_directory("public", "manifest.json"), 3600)
@app.route("/upload/") @app.route("/upload/", defaults={"ref": "index.html"})
def send_upload():
return cache_wrap(flask.send_from_directory("public/upload", "index.html"), 3600)
@app.route("/upload/<path:ref>") @app.route("/upload/<path:ref>")
def send_upload_sub(ref): def send_upload(ref):
return cache_wrap(flask.send_from_directory("public/upload", ref), 3600) return cache_wrap(flask.send_from_directory("public/upload", ref), 3600)
@app.route("/upload", methods=["POST"]) @app.route("/upload", methods=["POST"])

View File

@ -16,12 +16,10 @@
<label for="file_music">音楽ファイル:</label> <label for="file_music">音楽ファイル:</label>
<input type="file" name="file_music" accept=".ogg,.mp3,.wav" required><br> <input type="file" name="file_music" accept=".ogg,.mp3,.wav" required><br>
<br>
<button type="button" onclick="uploadFiles()">今すぐ投稿! (30秒ほどかかる場合があります)</button>
</form> </form>
<br> <button type="button" onclick="uploadFiles()">今すぐ投稿! (30秒ほどかかる場合があります)</button>
<div id="error-view"></div> <div id="error-view"></div>
</body> </body>
</html> </html>

View File

@ -1,3 +1,8 @@
body > *:not(:last-child) {
margin-bottom: 3rem;
}
#error-view { #error-view {
word-break: break-word;
white-space: pre-line; white-space: pre-line;
} }