add option to show thumbs by default; closes #31
This commit is contained in:
		
							parent
							
								
									60a1ff0fc0
								
							
						
					
					
						commit
						025a537413
					
				| @ -471,6 +471,7 @@ click the `🌲` or pressing the `B` hotkey to toggle between breadcrumbs path ( | ||||
| ## thumbnails | ||||
| 
 | ||||
| press `g` or `田` to toggle grid-view instead of the file listing  and `t` toggles icons / thumbnails | ||||
| * can be made default globally with `--grid` or per-volume with volflag `grid` | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
|  | ||||
| @ -963,6 +963,7 @@ def add_db_metadata(ap): | ||||
| 
 | ||||
| def add_ui(ap, retry): | ||||
|     ap2 = ap.add_argument_group('ui options') | ||||
|     ap2.add_argument("--grid", action="store_true", help="show grid/thumbnails by default (volflag=grid)") | ||||
|     ap2.add_argument("--lang", metavar="LANG", type=u, default="eng", help="language") | ||||
|     ap2.add_argument("--theme", metavar="NUM", type=int, default=0, help="default theme to use") | ||||
|     ap2.add_argument("--themes", metavar="NUM", type=int, default=8, help="number of themes installed") | ||||
|  | ||||
| @ -24,6 +24,7 @@ def vf_bmap() -> dict[str, str]: | ||||
|         "e2v", | ||||
|         "e2vu", | ||||
|         "e2vp", | ||||
|         "grid", | ||||
|         "hardlink", | ||||
|         "magic", | ||||
|         "no_sb_md", | ||||
| @ -133,6 +134,7 @@ flagcats = { | ||||
|         "xm=CMD": "execute CMD on message", | ||||
|     }, | ||||
|     "client and ux": { | ||||
|         "grid": "show grid/thumbnails by default", | ||||
|         "html_head=TXT": "includes TXT in the <head>", | ||||
|         "robots": "allows indexing by search engines (default)", | ||||
|         "norobots": "kindly asks search engines to leave", | ||||
|  | ||||
| @ -3500,6 +3500,7 @@ class HttpCli(object): | ||||
|             "readme": readme, | ||||
|             "title": html_escape(self.vpath, crlf=True) or "💾🎉", | ||||
|             "srv_info": srv_infot, | ||||
|             "dgrid": "grid" in vf, | ||||
|             "dtheme": self.args.theme, | ||||
|             "themes": self.args.themes, | ||||
|             "turbolvl": self.args.turbo, | ||||
|  | ||||
| @ -138,6 +138,7 @@ | ||||
| 			TS = "{{ ts }}", | ||||
| 			acct = "{{ acct }}", | ||||
| 			perms = {{ perms }}, | ||||
| 			dgrid = {{ dgrid|tojson }}, | ||||
| 			themes = {{ themes }}, | ||||
| 			dtheme = "{{ dtheme }}", | ||||
| 			srvinf = "{{ srv_info }}", | ||||
|  | ||||
| @ -4526,7 +4526,7 @@ var thegrid = (function () { | ||||
| 
 | ||||
| 	bcfg_bind(r, 'thumbs', 'thumbs', true, r.setdirty); | ||||
| 	bcfg_bind(r, 'sel', 'gridsel', false, r.loadsel); | ||||
| 	bcfg_bind(r, 'en', 'griden', false, function (v) { | ||||
| 	bcfg_bind(r, 'en', 'griden', dgrid, function (v) { | ||||
| 		v ? loadgrid() : r.setvis(true); | ||||
| 		pbar.onresize(); | ||||
| 		vbar.onresize(); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 ed
						ed