mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Cookie for tracking if info tab should be shown
This commit is contained in:
parent
e5b066a50c
commit
bc2ed9e2be
2 changed files with 18 additions and 5 deletions
|
@ -2,7 +2,7 @@
|
|||
Onlylegs - Image View
|
||||
"""
|
||||
from math import ceil
|
||||
from flask import Blueprint, render_template, url_for, current_app
|
||||
from flask import Blueprint, render_template, url_for, current_app, request
|
||||
from onlylegs.models import Post, GroupJunction, Group
|
||||
from onlylegs.extensions import db
|
||||
|
||||
|
@ -72,10 +72,15 @@ def image(image_id):
|
|||
return_page = i + 1
|
||||
break
|
||||
|
||||
close_tab = True
|
||||
if request.cookies.get("image-info") == "0":
|
||||
close_tab = False
|
||||
|
||||
return render_template(
|
||||
"image.html",
|
||||
image=image,
|
||||
next_url=next_url,
|
||||
prev_url=prev_url,
|
||||
return_page=return_page,
|
||||
close_tab=close_tab,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue