mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-10-31 13:34:12 +00:00 
			
		
		
		
	merge: fix lookup confirmations (!926)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/926 Approved-by: Marie <github@yuugi.dev> Approved-by: Hazelnoot <acomputerdog@gmail.com>
This commit is contained in:
		
						commit
						8a65074f23
					
				
					 1 changed files with 16 additions and 23 deletions
				
			
		|  | @ -85,19 +85,7 @@ async function search() { | ||||||
| 	} | 	} | ||||||
| 	//#endregion | 	//#endregion | ||||||
| 
 | 
 | ||||||
| 	if (query.length > 1 && !query.includes(' ')) { | 	if (query.length > 1 && !query.includes(' ') && query.startsWith('#')) { | ||||||
| 		if (query.startsWith('@')) { |  | ||||||
| 			const confirm = await os.confirm({ |  | ||||||
| 				type: 'info', |  | ||||||
| 				text: i18n.ts.lookupConfirm, |  | ||||||
| 			}); |  | ||||||
| 			if (!confirm.canceled) { |  | ||||||
| 				router.push(`/${query}`); |  | ||||||
| 				return; |  | ||||||
| 			} |  | ||||||
| 		} |  | ||||||
| 
 |  | ||||||
| 		if (query.startsWith('#')) { |  | ||||||
| 		const confirm = await os.confirm({ | 		const confirm = await os.confirm({ | ||||||
| 			type: 'info', | 			type: 'info', | ||||||
| 			text: i18n.ts.openTagPageConfirm, | 			text: i18n.ts.openTagPageConfirm, | ||||||
|  | @ -107,12 +95,17 @@ async function search() { | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	} |  | ||||||
| 
 | 
 | ||||||
| 	if (query.match(/^@[a-z0-9_.-]+@[a-z0-9_.-]+$/i)) { | 	if (query.match(/^@[a-z0-9_.-]+@[a-z0-9_.-]+$/i)) { | ||||||
|  | 		const confirm = await os.confirm({ | ||||||
|  | 			type: 'info', | ||||||
|  | 			text: i18n.ts.lookupConfirm, | ||||||
|  | 		}); | ||||||
|  | 		if (!confirm.canceled) { | ||||||
| 			router.push(`/${query}`); | 			router.push(`/${query}`); | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	userPagination.value = { | 	userPagination.value = { | ||||||
| 		endpoint: 'users/search', | 		endpoint: 'users/search', | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue