mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +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,33 +85,26 @@ async function search() {
 | 
			
		|||
	}
 | 
			
		||||
	//#endregion
 | 
			
		||||
 | 
			
		||||
	if (query.length > 1 && !query.includes(' ')) {
 | 
			
		||||
		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({
 | 
			
		||||
				type: 'info',
 | 
			
		||||
				text: i18n.ts.openTagPageConfirm,
 | 
			
		||||
			});
 | 
			
		||||
			if (!confirm.canceled) {
 | 
			
		||||
				router.push(`/user-tags/${encodeURIComponent(query.substring(1))}`);
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
	if (query.length > 1 && !query.includes(' ') && query.startsWith('#')) {
 | 
			
		||||
		const confirm = await os.confirm({
 | 
			
		||||
			type: 'info',
 | 
			
		||||
			text: i18n.ts.openTagPageConfirm,
 | 
			
		||||
		});
 | 
			
		||||
		if (!confirm.canceled) {
 | 
			
		||||
			router.push(`/user-tags/${encodeURIComponent(query.substring(1))}`);
 | 
			
		||||
			return;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (query.match(/^@[a-z0-9_.-]+@[a-z0-9_.-]+$/i)) {
 | 
			
		||||
		router.push(`/${query}`);
 | 
			
		||||
		return;
 | 
			
		||||
		const confirm = await os.confirm({
 | 
			
		||||
			type: 'info',
 | 
			
		||||
			text: i18n.ts.lookupConfirm,
 | 
			
		||||
		});
 | 
			
		||||
		if (!confirm.canceled) {
 | 
			
		||||
			router.push(`/${query}`);
 | 
			
		||||
			return;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	userPagination.value = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue