removed fullscreen and added default_search_noo

This commit is contained in:
2022-01-30 23:02:42 +11:00
parent 075fa2b6f4
commit c6efd29a48
5 changed files with 21 additions and 32 deletions

View File

@@ -24,7 +24,6 @@ class PA_UserState(db.Model):
st_offset = db.Column(db.Integer, unique=False, nullable=False )
size = db.Column(db.Integer, unique=False, nullable=False )
folders = db.Column(db.Boolean, unique=False, nullable=False )
fullscreen = db.Column(db.Boolean, unique=False, nullable=False )
root = db.Column(db.String, unique=False, nullable=False )
cwd = db.Column(db.String, unique=False, nullable=False )
## for now being lazy and not doing a separate table until I settle on needed fields and when
@@ -46,7 +45,7 @@ class PA_UserState(db.Model):
################################################################################
# States: class to store set of default values for viewing (order/size, etc.)
# and if a request object (from a POST) is passed in, it returns those instead
# it also handles the cwd appropriately, paths, fullscreen, search, etc.
# it also handles the cwd appropriately, paths, search, etc.
################################################################################
class States(PA):
def __init__(self, request):
@@ -178,8 +177,8 @@ class States(PA):
self.folders = u.default_storage_folders
else:
# is a search so...
print( "For now, search defaults for noo / folders are hardcoded" )
self.noo = 'Newest'
print( "For now, search does not show in folders, force folders=False")
self.noo=u.default_search_noo
self.folders=False
self.cwd=self.root
@@ -227,10 +226,6 @@ class States(PA):
# possible to not be set for an AI: search
if 'cwd' in request.form:
self.cwd = request.form['cwd']
if 'fullscreen' in request.form:
self.fullscreen=request.form['fullscreen']
else:
self.fullscreen=False
if 'prev' in request.form:
self.offset -= int(self.how_many)
# just in case we hit prev too fast, stop this...