back to working on ProfileUser CSS
This commit is contained in:
@@ -334,24 +334,6 @@ export class FriendshipService {
|
|||||||
return this.friendshipRepository.remove(friendship);
|
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) {
|
async findIfUserIsBlockedOrHasBlocked(userConnectedId: number, userToFindId: number) {
|
||||||
// console.log("finding if user is blocked")
|
// console.log("finding if user is blocked")
|
||||||
// console.log('user connected: ' + userConnectedId)
|
// console.log('user connected: ' + userConnectedId)
|
||||||
|
|||||||
@@ -113,23 +113,10 @@ export class UsersService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async remove(id: number) {
|
async remove(id: number) {
|
||||||
console.log("deleting a user user.services")
|
const user = await this.userRepository.findOneBy({id: id});
|
||||||
// const user = await this.userRepository.findOneBy({id: id});
|
if (!user)
|
||||||
// if (!user)
|
throw new HttpException(`The user could not be deleted.`,HttpStatus.NOT_FOUND);
|
||||||
// throw new HttpException(`The user could not be deleted.`,HttpStatus.NOT_FOUND);
|
return this.userRepository.remove(user);
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async enableTwoFactorAuth(id: number) {
|
async enableTwoFactorAuth(id: number) {
|
||||||
|
|||||||
@@ -330,7 +330,7 @@
|
|||||||
<div class="sidebar-list">
|
<div class="sidebar-list">
|
||||||
<Tabs items={tabItems} activeItem={activeTabItem} size="medium" on:tabChange={switchTab}/>
|
<Tabs items={tabItems} activeItem={activeTabItem} size="medium" on:tabChange={switchTab}/>
|
||||||
{#if activeTabItem === 'All Users' && allUsers}
|
{#if activeTabItem === 'All Users' && allUsers}
|
||||||
<h3>{activeTabItem}</h3>
|
<!-- <h3>{activeTabItem}</h3> -->
|
||||||
{#if Object.keys(allUsers).length === 0}
|
{#if Object.keys(allUsers).length === 0}
|
||||||
<div class="tip">You are alone on this platform...</div>
|
<div class="tip">You are alone on this platform...</div>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -355,7 +355,7 @@
|
|||||||
<br>
|
<br>
|
||||||
{/each}
|
{/each}
|
||||||
{:else if activeTabItem === 'My Friends' && myFriendships}
|
{:else if activeTabItem === 'My Friends' && myFriendships}
|
||||||
<h3>{activeTabItem}</h3>
|
<!-- <h3>{activeTabItem}</h3> -->
|
||||||
{#if Object.keys(myFriendships).length === 0}
|
{#if Object.keys(myFriendships).length === 0}
|
||||||
<div class="tip">You don't have any Friends... Yet!</div>
|
<div class="tip">You don't have any Friends... Yet!</div>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -380,7 +380,7 @@
|
|||||||
<br>
|
<br>
|
||||||
{/each}
|
{/each}
|
||||||
{:else if activeTabItem === 'Friend Requests' && requestsRecieved}
|
{:else if activeTabItem === 'Friend Requests' && requestsRecieved}
|
||||||
<h3>{activeTabItem}</h3>
|
<!-- <h3>{activeTabItem}</h3> -->
|
||||||
{#if Object.keys(requestsRecieved).length === 0}
|
{#if Object.keys(requestsRecieved).length === 0}
|
||||||
<div class="tip">You don't have any Friend Requests</div>
|
<div class="tip">You don't have any Friend Requests</div>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -397,8 +397,7 @@
|
|||||||
<br>
|
<br>
|
||||||
{/each}
|
{/each}
|
||||||
{:else if activeTabItem === 'Blocked Users' && blockedUsers}
|
{:else if activeTabItem === 'Blocked Users' && blockedUsers}
|
||||||
<h3>{activeTabItem}</h3>
|
<!-- <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... -->
|
|
||||||
{#if Object.keys(blockedUsers).length === 0}
|
{#if Object.keys(blockedUsers).length === 0}
|
||||||
<div class="tip">You have not Blocked any Users</div>
|
<div class="tip">You have not Blocked any Users</div>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -421,7 +420,8 @@
|
|||||||
<!-- This next bit needs to all be in a window thing above the whatever -->
|
<!-- This next bit needs to all be in a window thing above the whatever -->
|
||||||
|
|
||||||
{#if showModal && usernameBeingViewed}
|
{#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} -->
|
<!-- {#if usernameBeingViewed} -->
|
||||||
<DisplayAUser aUsername={usernameBeingViewed} bind:loaded={loadedUser}/>
|
<DisplayAUser aUsername={usernameBeingViewed} bind:loaded={loadedUser}/>
|
||||||
|
|
||||||
@@ -502,7 +502,7 @@
|
|||||||
|
|
||||||
div.sidebar-list{
|
div.sidebar-list{
|
||||||
/* grid-column: 1 / span 2; */
|
/* grid-column: 1 / span 2; */
|
||||||
grid-column: 3 / span 4;
|
/* grid-column: 3 / span 4; */
|
||||||
background: #FB8B24;
|
background: #FB8B24;
|
||||||
padding: 1vw;
|
padding: 1vw;
|
||||||
font-size: smaller;
|
font-size: smaller;
|
||||||
@@ -514,6 +514,7 @@
|
|||||||
border-right: 4px solid #071013;
|
border-right: 4px solid #071013;
|
||||||
border-bottom: 4px solid #071013;
|
border-bottom: 4px solid #071013;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -521,6 +522,7 @@
|
|||||||
/* yea i mean that seems fine... */
|
/* yea i mean that seems fine... */
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
/* somehting about the buttons too, smaller ? */
|
/* somehting about the buttons too, smaller ? */
|
||||||
}
|
}
|
||||||
div.status{
|
div.status{
|
||||||
@@ -558,6 +560,14 @@
|
|||||||
width: 60px;
|
width: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.user {
|
||||||
|
/* left: 50%;
|
||||||
|
display: inline-block;
|
||||||
|
-ms-transform: translateX(-50%);
|
||||||
|
transform: translateY(-50%); */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Modal Stuff */
|
/* Modal Stuff */
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
|
|||||||
Reference in New Issue
Block a user