feat: allow suspended *and* self-deleted users to access a handful of pages
This commit is contained in:
		
							parent
							
								
									36cb1d2043
								
							
						
					
					
						commit
						f766a2054b
					
				
					 7 changed files with 32 additions and 16 deletions
				
			
		|  | @ -26,6 +26,7 @@ export type MeUser = UserWithMembers & { | |||
| 	last_active: string; | ||||
| 	last_sid_reroll: string; | ||||
| 	timezone: string; | ||||
| 	suspended: boolean; | ||||
| 	deleted: boolean; | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
|  | @ -21,10 +21,17 @@ | |||
| </script> | ||||
| 
 | ||||
| {#if user && user.deleted} | ||||
| 	<div class="suspended-alert text-center py-3 mb-2 px-2"> | ||||
| 		<strong>{$t("nav.suspended-account-hint")}</strong> | ||||
| 		<br /> | ||||
| 		<a href="/contact">{$t("nav.appeal-suspension-link")}</a> | ||||
| 	<div class="deleted-alert text-center py-3 mb-2 px-2"> | ||||
| 		{#if user.suspended} | ||||
| 			<strong>{$t("nav.suspended-account-hint")}</strong> | ||||
| 			<br /> | ||||
| 			<a href="/contact">{$t("nav.appeal-suspension-link")}</a> | ||||
| 		{:else} | ||||
| 			<strong>{$t("nav.deleted-account-hint")}</strong> | ||||
| 			<br /> | ||||
| 			<a href="/settings/reactivate">{$t("nav.reactivate-account-link")}</a> • | ||||
| 			<a href="/contact">{$t("nav.delete-permanently-link")}</a> | ||||
| 		{/if} | ||||
| 	</div> | ||||
| {/if} | ||||
| 
 | ||||
|  | @ -66,7 +73,7 @@ | |||
| </Navbar> | ||||
| 
 | ||||
| <style> | ||||
| 	.suspended-alert { | ||||
| 	.deleted-alert { | ||||
| 		color: var(--bs-danger-text-emphasis); | ||||
| 		background-color: var(--bs-danger-bg-subtle); | ||||
| 	} | ||||
|  |  | |||
|  | @ -4,7 +4,10 @@ | |||
| 		"log-in": "Log in or sign up", | ||||
| 		"settings": "Settings", | ||||
| 		"suspended-account-hint": "Your account has been suspended. Your profile has been hidden and you will not be able to change any settings.", | ||||
| 		"appeal-suspension-link": "I want to appeal" | ||||
| 		"appeal-suspension-link": "I want to appeal", | ||||
| 		"deleted-account-hint": "You have requested deletion of your account. If you want to reactivate it, click the link below.", | ||||
| 		"reactivate-account-link": "Reactivate account", | ||||
| 		"delete-permanently-link": "I want my account deleted permanently" | ||||
| 	}, | ||||
| 	"avatar-tooltip": "Avatar for {{name}}", | ||||
| 	"profile": { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue