back to working on ProfileUser CSS

This commit is contained in:
Me
2023-01-17 16:35:17 +01:00
parent 2ac1d4c1bb
commit 053c630a95
3 changed files with 21 additions and 42 deletions

View File

@@ -334,24 +334,6 @@ export class FriendshipService {
return this.friendshipRepository.remove(friendship);
}
async deleteAllFriendships(user : User) {
let friendships = await this.friendshipRepository
.createQueryBuilder('friendship')
.leftJoinAndSelect('friendship.sender', 'sender')
.leftJoinAndSelect('friendship.receiver', 'receiver')
.where('friendship.sender = :sender', { sender: user })
.orWhere('friendship.receiver = :receiver', { receiver: user})
.getMany()
// return this.friendshipRepository.remove(friendships);
// return this.friendshipRepository.delete(friendships);
for (const friendship of friendships) {
this.friendshipRepository.remove(friendship);
}
return true;
}
async findIfUserIsBlockedOrHasBlocked(userConnectedId: number, userToFindId: number) {
// console.log("finding if user is blocked")
// console.log('user connected: ' + userConnectedId)

View File

@@ -113,23 +113,10 @@ export class UsersService {
}
async remove(id: number) {
console.log("deleting a user user.services")
// const user = await this.userRepository.findOneBy({id: id});
// if (!user)
// throw new HttpException(`The user could not be deleted.`,HttpStatus.NOT_FOUND);
let deleting = await this.userRepository
.createQueryBuilder()
.delete()
.from(User)
.where("user.id = :id", { id: id })
.execute();
// this.friendshipService.deleteAllFriendships(user)
// return this.userRepository.remove(user.id);
console.log("done delete user users.service")
// await this.userRepository.delete(user);
const user = await this.userRepository.findOneBy({id: id});
if (!user)
throw new HttpException(`The user could not be deleted.`,HttpStatus.NOT_FOUND);
return this.userRepository.remove(user);
}
async enableTwoFactorAuth(id: number) {

View File

@@ -330,7 +330,7 @@
<div class="sidebar-list">
<Tabs items={tabItems} activeItem={activeTabItem} size="medium" on:tabChange={switchTab}/>
{#if activeTabItem === 'All Users' && allUsers}
<h3>{activeTabItem}</h3>
<!-- <h3>{activeTabItem}</h3> -->
{#if Object.keys(allUsers).length === 0}
<div class="tip">You are alone on this platform...</div>
{/if}
@@ -355,7 +355,7 @@
<br>
{/each}
{:else if activeTabItem === 'My Friends' && myFriendships}
<h3>{activeTabItem}</h3>
<!-- <h3>{activeTabItem}</h3> -->
{#if Object.keys(myFriendships).length === 0}
<div class="tip">You don't have any Friends... Yet!</div>
{/if}
@@ -380,7 +380,7 @@
<br>
{/each}
{:else if activeTabItem === 'Friend Requests' && requestsRecieved}
<h3>{activeTabItem}</h3>
<!-- <h3>{activeTabItem}</h3> -->
{#if Object.keys(requestsRecieved).length === 0}
<div class="tip">You don't have any Friend Requests</div>
{/if}
@@ -397,8 +397,7 @@
<br>
{/each}
{:else if activeTabItem === 'Blocked Users' && blockedUsers}
<h3>{activeTabItem}</h3>
<!-- seems a little excessive... maybe a lighter way of doing this? doesn't seem like it, i hate it but at least only happens sometimes.default... -->
<!-- <h3>{activeTabItem}</h3> -->
{#if Object.keys(blockedUsers).length === 0}
<div class="tip">You have not Blocked any Users</div>
{/if}
@@ -421,7 +420,8 @@
<!-- This next bit needs to all be in a window thing above the whatever -->
{#if showModal && usernameBeingViewed}
<div class="main-display box backdrop" use:clickOutside on:outclick={() => unViewAUser()}>
<div class="backdrop"></div>
<div class="main-display box" use:clickOutside on:outclick={() => unViewAUser()}>
<!-- {#if usernameBeingViewed} -->
<DisplayAUser aUsername={usernameBeingViewed} bind:loaded={loadedUser}/>
@@ -502,7 +502,7 @@
div.sidebar-list{
/* grid-column: 1 / span 2; */
grid-column: 3 / span 4;
/* grid-column: 3 / span 4; */
background: #FB8B24;
padding: 1vw;
font-size: smaller;
@@ -514,6 +514,7 @@
border-right: 4px solid #071013;
border-bottom: 4px solid #071013;
overflow-wrap: break-word;
text-align: center;
}
@@ -521,6 +522,7 @@
/* yea i mean that seems fine... */
display: inline-block;
text-align: center;
/* somehting about the buttons too, smaller ? */
}
div.status{
@@ -558,6 +560,14 @@
width: 60px;
}
div.user {
/* left: 50%;
display: inline-block;
-ms-transform: translateX(-50%);
transform: translateY(-50%); */
}
/* Modal Stuff */
.box {