Updated user pages to show when a user is banned

This commit is contained in:
Jemma
2024-01-02 14:13:47 -06:00
parent c047aa86bd
commit 5070608e41
3 changed files with 23 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<% var banned = (userContent.account_status < 0 || userContent.account_status > 1 || pnid.accessLevel < 0); %></0>
<%- include('partials/head', { title: pnid.mii.name }); %>
<body>
<div id="body">
@@ -7,11 +8,12 @@
<h1 id="page-title" class="community">
<span>
<span class="icon-container">
<img src="http://mii.olv.pretendo.cc/mii/<%=pnid.pid%>/normal_face.png" class="icon">
<img src="<%if (banned || pnid.deleted) { %><%= cdnURL %>/images/bandwidthlost.png<% } else { %>https://mii.olv.pretendo.cc/mii/<%=pnid.pid%>/normal_face.png<%}%>" class="icon">
</span>
<span class="community-name">
<%= pnid.mii.name %> - @<%= pnid.username %>
<% if(banned) { %>Banned User<% } else if(pnid.deleted){%>Deleted User<%} else {%><%= pnid.mii.name %> @<%= pnid.username %><%}%>
</span>
<%if(!pnid.deleted && !banned) {%>
<span class="text">
<span>
<span class="sprite posts"></span>
@@ -22,19 +24,21 @@
<span id="followers"><%= userContent.following_users.length - 1 %></span>
</span>
</span>
<% } %>
</span>
</span>
</h1>
<%if(pnid.pid === pid) {%>
<a id="header-communities-button" class="header-button left" href="/users/me/settings" data-pjax="#body">Settings</a>
<%}%>
<%if(pnid.pid !== pid) {%>
<%if(pnid.pid !== pid && !pnid.deleted && !banned) {%>
<button type="button" class="submit follow yeah-button <%if(parentUserContent.followed_users.indexOf(userContent.pid) !== -1){ %>selected<%}%>" onclick="follow(this)" data-sound="SE_WAVE_CHECKBOX_UNCHECK" data-url="/users/follow" data-community-id="<%=pnid.pid%>">
<span class="sprite yeah"></span>
</button>
<%}%>
</header>
<div class="body-content tab2-content" id="community-post-list">
<%if(!pnid.deleted && !banned) {%>
<menu class="tab-header user-page no-margin">
<li id="tab-header-post" class="tab-button <%if(selection === 0){ %>selected<%}%>">
<a href="<%= link %>" data-sound="SE_WAVE_SELECT_TAB">
@@ -73,6 +77,7 @@
<div class="tab-body post-list">
<%- include('partials/' + template, { bundle }); %>
</div>
<%}%>
</div>
</div>
</body>

View File

@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<% var banned = (userContent.account_status < 0 || userContent.account_status > 1 || pnid.accessLevel < 0); %></0>
<%- include('partials/head', { title: pnid.mii.name }); %>
<body>
<%- include('partials/nav_bar', { selection: -1, pid: pid }); %>
@@ -14,16 +15,16 @@
<img src="<%= cdnURL %>/images/banner.png" class="header-banner with-top-button">
</div>
<div class="community-info info-content with-header-banner">
<span class="icon-container"><img src="<%if(pnid.deleted){%><%= cdnURL %>/images/bandwidthlost.png<%}else{%>https://mii.olv.pretendo.cc/mii/<%=pnid.pid%>/normal_face.png<%}%>" class="icon" alt=""></span>
<%if(pnid.pid !== pid && !pnid.deleted) {%>
<span class="icon-container"><img src="<%if (banned || pnid.deleted) { %><%= cdnURL %>/images/bandwidthlost.png<% } else { %>https://mii.olv.pretendo.cc/mii/<%=pnid.pid%>/normal_face.png<%}%>" class="icon" alt=""></span>
<%if(pnid.pid !== pid && !pnid.deleted && !(banned)) {%>
<a href="#" class="favorite-button favorite-button-mini button <%if(parentUserContent.followed_users.indexOf(userContent.pid) !== -1){ %>checked<%}%>" onclick="follow(this)" data-sound="SE_WAVE_CHECKBOX_UNCHECK" data-url="/users/follow" data-community-id="<%=pnid.pid%>"></a>
<%if(friends.indexOf(pid) !== -1) { /*Is mutual*/%>
<a href="/friend_messages/new/<%=userContent.pid%>" class="message-button favorite-button-mini button" data-sound="SE_WAVE_CHECKBOX_UNCHECK"></a>
<%}%>
<%}%>
<span class="title"><%if(pnid.deleted){%>Deleted User<%} else {%><%= pnid.mii.name %><%}%></span>
<span class="title"><% if(banned) { %>Banned User<% } else if(pnid.deleted){%>Deleted User<%} else {%><%= pnid.mii.name %><%}%></span>
<span class="text">
<%if(!pnid.deleted){%>
<%if(!pnid.deleted && !(banned)){%>
<span>
@<%= pnid.username %>
</span>
@@ -104,7 +105,7 @@
<%}%>
</span>
</div>
<%if(!pnid.deleted){%>
<%if(!pnid.deleted && !(banned)){%>
<menu class="tab-header user-page">
<li id="tab-header-post" class="tab-button <%if(selection === 0){ %>selected<%}%>">
<a href="<%= link %>" data-sound="SE_WAVE_SELECT_TAB">

View File

@@ -1,8 +1,10 @@
<html lang="en">
<head>
<title>Juxt - <%= pnid.mii.name %></title>
<% var banned = (userContent.account_status < 0 || userContent.account_status > 1 || pnid.accessLevel < 0); %>
<%- include('partials/head'); %>
<!-- Google / Search Engine Tags -->
<% if(!banned) { %>
<title>Juxt - <%= pnid.mii.name %></title>
<meta itemprop="name" content="<%= pnid.mii.name %> (@<%= pnid.username %>)">
<%if(userSettings.profile_comment_visibility){%><meta itemprop="description" content="<%= userSettings.profile_comment%>"> <%}%>
@@ -18,7 +20,7 @@
<%if(userSettings.profile_comment_visibility){%><meta name="twitter:description" content="<%= userSettings.profile_comment%>"/><%}%>
<meta name="twitter:site" content="@PretendoNetwork"/>
<meta name="twitter:creator" content="@PretendoNetwork"/>
<% } %>
</head>
<body>
<div id="main">
@@ -29,9 +31,9 @@
<div class="community-top">
<img class="banner" src="https://juxt-web-cdn.b-cdn.net/images/banner.png" alt="">
<div class="community-info">
<img class="user-icon <%if(pnid.accessLevel > 2) {%>verified<%}%>" src="https://pretendo-cdn.b-cdn.net/mii/<%= userSettings.pid %>/normal_face.png">
<h2 class="community-title"><%= pnid.mii.name %> @<%= pnid.username %><%if(pnid.accessLevel >= 2) {%><span class="verified-badge">✓</span><%}%></h2>
<%if(pnid.pid !== pid && pid !== 1000000000) {%>
<img class="user-icon <%if(pnid.accessLevel > 2) {%>verified<%}%>" src="<%if (pnid.deleted || banned) { %>https://juxt-web-cdn.b-cdn.net/images/bandwidthlost.png<% } else { %>https://juxt-web-cdn.b-cdn.net/mii/<%=pnid.pid%>/normal_face.png<%}%>">
<h2 class="community-title"><% if(banned) { %>Banned User<% } else if(pnid.deleted){%>Deleted User<%} else {%><%= pnid.mii.name %> @<%= pnid.username %><%}%><%if(pnid.accessLevel >= 2) {%><span class="verified-badge">✓</span><%}%></h2>
<%if(pnid.pid !== pid && pid !== 1000000000 && !pnid.deleted && !banned) {%>
<% var following = parentUserContent.followed_users.indexOf(userContent.pid) !== -1; %>
<a href="#" class="favorite-button <%if(following){ %>checked<%}%>" onclick="follow(this)" data-sound="SE_WAVE_CHECKBOX_UNCHECK" data-url="/users/follow" data-community-id="<%=pnid.pid%>" data-text="<% if(following){ %><%= lang.user_page.follow_user %><%} else {%><%= lang.user_page.following_user %><%}%>"><% if(following){ %> <%= lang.user_page.following_user %> <%} else {%> <%= lang.user_page.follow_user %> <%}%></a>
<%if(following && userContent.followed_users.indexOf(parentUserContent.pid) !== -1) { /*Is mutual*/%>
@@ -39,6 +41,7 @@
<%}%>
<%}%>
</div>
<% if (!pnid.deleted && !banned) { %>
<h4 class="community-description">
<!--<%if(userSettings.profile_comment_visibility){%> <%= userSettings.profile_comment%> <%}else {%><%= lang.global.private %><%}%>
<%if(pnid.tierName) {%>
@@ -129,6 +132,7 @@
</div>
</div>
<%- include('partials/' + template, { bundle }); %>
<% } %>
</div>
</div>
</body>