9 changed files with 212 additions and 158 deletions
			
			
		@ -1,20 +1,35 @@ | 
				
			|||||
tag app-bang | 
					tag app-bang | 
				
			||||
 | 
					
 | 
				
			||||
	get encoded_bang_query | 
						get encoded_bang_query | 
				
			||||
		"{active_bang.url}{window.encodeURIComponent(state.query)}" | 
							"{bang.url}{window.encodeURIComponent(state.query)}" | 
				
			||||
 | 
					
 | 
				
			||||
	def handle_bang | 
						def handle_bang | 
				
			||||
		await api.increment_link_frequency state.active_bang | 
							await api.increment_link_frequency bang | 
				
			||||
		window.location.href = encoded_bang_query | 
							window.location.href = encoded_bang_query | 
				
			||||
 | 
					
 | 
				
			||||
	def render | 
						def render | 
				
			||||
 | 
					
 | 
				
			||||
		<self> | 
							<self | 
				
			||||
 | 
								.selected | 
				
			||||
 | 
								@click=handle_bang | 
				
			||||
 | 
							> | 
				
			||||
 | 
								css d:flex fld:row jc:space-between ai:center | 
				
			||||
 | 
									px:16px py:11px rd:5px cursor:pointer c:#FAD4AB | 
				
			||||
 | 
					
 | 
				
			||||
 | 
								<.link-left> | 
				
			||||
 | 
									css d:flex fl:1 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
									<img.link-icon src=bang.icon> | 
				
			||||
 | 
										css w:20px h:20px mr:10px rd:3px | 
				
			||||
 | 
					
 | 
				
			||||
			css .bang-text | 
									<.display-name> encoded_bang_query | 
				
			||||
				tt:none word-break:break-all | 
										css tt:capitalize fs:20px overflow-wrap:anywhere | 
				
			||||
 | 
										css tt:none word-break:break-all | 
				
			||||
 | 
					
 | 
				
			||||
			<.bang @click=handle_bang> | 
								<.link-right> | 
				
			||||
				css d:flex fld:row jc:space-between ai:center | 
									css d:flex fld:row jc:space-between ai:center | 
				
			||||
					px:16px py:11px rd:5px cursor:pointer c:blue3 | 
									css .buttons-disabled .link-button visibility:hidden | 
				
			||||
 | 
									css .selected .link-button visibility:visible | 
				
			||||
 | 
					
 | 
				
			||||
 | 
									<.frequency> bang.frequency | 
				
			||||
 | 
										css fs:15px ml:7px | 
				
			||||
 | 
				
			|||||
								
									
										File diff suppressed because one or more lines are too long
									
								
							
						
					@ -0,0 +1 @@ | 
				
			|||||
 | 
					printf "\033c" && rg --pcre2 -g '!config.imba' 'config\.(?!data.)'"$1" | 
				
			||||
					Loading…
					
					
				
		Reference in new issue