Skip to content

Commit 47d4be1

Browse files
committed
Revert "Merge branch 'proxy' into server-migration"
This reverts commit 3c39cfc, reversing changes made to d734f8c.
1 parent 3c39cfc commit 47d4be1

File tree

13 files changed

+44
-67
lines changed

13 files changed

+44
-67
lines changed

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<!-- built files will be auto injected -->
1717
<script id="config-remote" async>
1818
window.configScript = document.createElement('script')
19-
window.configScript.src = '<%= process.env.VUE_APP_BACKEND_URL || "$VUE_APP_BACKEND_URL"%>/config.js'
19+
window.configScript.src = '<%= process.env.VUE_APP_BACKEND_URL%>/config.js'
2020
window.configScript.type = 'text/javascript'
2121

2222
// Try to append config from backend

src/api/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const $axios = axios.create({
1111
})
1212
export const $axios2 = axios.create({
1313
baseURL: process.env.VUE_APP_BACKEND_URL || config.VUE_APP_BACKEND_URL,
14-
timeout: 15000,
14+
timeout: 3000,
1515
crossDomain: true
1616
})
1717

@@ -208,7 +208,7 @@ export const usersApi = {
208208
memberSearch: params => $http('/api/search/users', { params }),
209209
lookup: (username, params) => $http(`/api/users/lookup/${username}`, { params }),
210210
update: (userId, data) => $http(`/api/users/${userId}`, { method: 'PUT', data }),
211-
find: id => $http2(`/api/users/byid?id=${id}`),
211+
find: username => $http2(`/api/users/${username}`),
212212
delete: userId => $http(`/api/users/${userId}`, { method: 'DELETE' }),
213213
deactivate: userId => $http(`/api/users/${userId}/deactivate`, { method: 'POST' }),
214214
reactivate: userId => $http(`/api/users/${userId}/reactivate`, { method: 'POST' }),

src/components/layout/HeaderComponent.vue

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,10 @@
8484
<!-- Login Section -->
8585
<ul class="signed-out" v-if="!loggedIn">
8686
<li>
87-
<!-- <a href="" @click.prevent="showRegister = true" disabled="true">REGISTER</a> -->
88-
<span>REGISTER</span>
87+
<a href="" @click.prevent="showRegister = true">REGISTER</a>
8988
</li>
9089
<li>
91-
<!-- <a href="" id="login-link" @click.prevent="showLogin = true" disabled="true">LOGIN</a> -->
92-
<span>LOGIN</span>
93-
</li>
94-
<li>
95-
<a href="https://forms.clickup.com/57751/f/1rcq-791/HNWSBPWCDSRMDMS9TF" target="_blank">REPORT A BUG</a>
90+
<a href="" id="login-link" @click.prevent="showLogin = true">LOGIN</a>
9691
</li>
9792
</ul>
9893

@@ -664,16 +659,11 @@ header {
664659
cursor: pointer;
665660
}
666661
&.signed-out li { padding-left: 1.25rem; }
667-
&.signed-out li a, &.signed-out li span {
662+
&.signed-out li a {
668663
display: table-cell;
669664
height: inherit;
670665
vertical-align: middle;
671666
}
672-
li span {
673-
cursor: not-allowed;
674-
color: $secondary-font-color;
675-
font-size: $header-login-font-size;
676-
}
677667
li a {
678668
color: $header-login-font-color;
679669
font-size: $header-login-font-size;

src/components/threads/RecentThreads.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<router-link v-if="thread?.board" class="thread-board" :title="decode(thread.board.name)" :to="{ name: 'Threads', params: { boardSlug: thread.board.slug } }" onclick="event.stopPropagation()"><span v-html="decode(thread.board.name)"></span></router-link>
5353
by
5454
<span v-if="thread.deleted">deleted</span>
55-
<router-link onclick="event.stopPropagation()" v-if="!thread.deleted" :to="{ path: '/profile/' + thread?.user?.username.toLowerCase(), query: { id: thread?.user?.id } }">{{thread?.user?.username}}</router-link>
55+
<router-link onclick="event.stopPropagation()" v-if="!thread.deleted" :to="{ path: '/profile/' + thread?.user?.username.toLowerCase() }">{{thread?.user?.username}}</router-link>
5656
</div>
5757
<div class="last-reply">
5858
<div>{{humanDate(thread?.post?.created_at)}}</div>

src/components/users/RankDisplay.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ export default {
1616
const init = u => {
1717
const rankMap = u.metadata.ranks
1818
const metricToRankMaps = u.metadata.rank_metric_maps
19-
if (metricToRankMaps) {
20-
let ranks = Object.keys(metricToRankMaps).reduce((mappedRanks, metricName) => {
19+
let ranks = Object.keys(metricToRankMaps).reduce((mappedRanks, metricName) => {
2120
let rank = -1
2221
for (let i = 0; i < metricToRankMaps[metricName].length; i++) {
2322
if (u[metricName] >= metricToRankMaps[metricName][i]) rank = i
@@ -32,7 +31,6 @@ export default {
3231
3332
if (lowestRankNumber >= 0) v.userRank = rankMap[lowestRankNumber].name
3433
else v.userRank = ''
35-
} else v.userRank = ''
3634
}
3735
3836
init(v.user)

src/components/users/UserPosts.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ export default {
115115
next(vm => {
116116
const params = {
117117
username: to.params.username,
118-
id: to.query.id,
119118
limit: localStoragePrefs().data.posts_per_page,
120119
page: to.query.page || 1,
121120
field: to.query.field,
@@ -132,7 +131,6 @@ export default {
132131
beforeRouteUpdate(to, from, next) {
133132
const params = {
134133
username: to.params.username,
135-
id: to.query.id,
136134
limit: localStoragePrefs().data.posts_per_page,
137135
page: to.query.page || 1,
138136
field: to.query.field,
@@ -160,7 +158,6 @@ export default {
160158
const refresh = () => {
161159
const params = {
162160
username: $route.params.username,
163-
id: $route.query.id,
164161
limit: v.prefs.posts_per_page,
165162
page: $route.query.page || 1,
166163
field: $route.query.field,
@@ -172,8 +169,8 @@ export default {
172169
173170
const toggleThreads = threads => {
174171
const params = { ...$route.params, saveScrollPos: true }
175-
if (threads) $router.replace({ name: $route.name, params: params, query: { threads: threads, id: $route.query.id }})
176-
else $router.replace({ name: $route.name, params: params, query: { id: $route.query.id }})
172+
if (threads) $router.replace({ name: $route.name, params: params, query: { threads }})
173+
else $router.replace({ name: $route.name, params: params })
177174
v.threads = threads
178175
}
179176

src/composables/stores/prefs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ const AUTH_KEY = 'auth'
88

99
const appCache = localStorageCache(0, 'app')
1010
const emtpyPrefs = {
11-
posts_per_page: 10,
12-
threads_per_page: 10,
11+
posts_per_page: 25,
12+
threads_per_page: 25,
1313
timezone_offset: {
1414
sign: '',
1515
hours: '',

src/composables/utils/boardUtils.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const buildLastPostData = data => {
66
last_post_created_at: data.last_post_created_at,
77
last_post_position: data.last_post_position,
88
last_post_username: data.last_post_username,
9-
last_post_user_id: data.last_post_user_id,
109
last_post_avatar: data.last_post_avatar,
1110
last_thread_id: data.last_thread_id,
1211
last_thread_slug: data.last_thread_slug,

src/views/Boards.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
<recent-threads v-if="boardData && boardData.data && boardData.data.threads" :threads="boardData.data.threads"></recent-threads>
44

55
<div v-if="!loggedIn" class="dashboard-actions">
6-
<!-- <a href="" class="button" @click.prevent="showRegister = true">Create an Account</a> -->
7-
<a href="" class="button disabled" @click.stop.prevent="">Create an Account</a>
8-
<!-- <a href="" class="button" @click.prevent="showLogin = true">Log In</a> -->
9-
<a href="" class="button disabled" @click.stop.prevent="">Log In</a>
6+
<a href="" class="button" @click.prevent="showRegister = true">Create an Account</a>
7+
<a href="" class="button" @click.prevent="showLogin = true">Log In</a>
108
</div>
119
<div v-if="loggedIn" class="dashboard-actions">
1210
<router-link :to="{ name: 'Watchlist' }" class="button">Watchlist</router-link>
@@ -69,7 +67,7 @@
6967
<div v-if="board.last_post_username">
7068
<span v-if="board.user_deleted || board.post_deleted">deleted</span>
7169
<img v-if="!board.user_deleted && !board.post_deleted" class="avatar-small" :class="defaultAvatarShape" :src="board.last_post_avatar || defaultAvatar" @error="$event.target.src=defaultAvatar" />
72-
<router-link v-if="!board.user_deleted && !board.post_deleted" :to="{ path: '/profile/' + board.last_post_username.toLowerCase(), query: { id: board.last_post_user_id }}">{{board.last_post_username}}</router-link> posted in
70+
<router-link v-if="!board.user_deleted && !board.post_deleted" :to="{ path: '/profile/' + board.last_post_username.toLowerCase() }">{{board.last_post_username}}</router-link> posted in
7371
<span v-if="board.last_thread_title">
7472
<router-link :to="{ name: 'Posts', params: { threadSlug: board.last_thread_slug }, query: { start: board.last_post_position} }">
7573
<span v-html="board.last_thread_title"></span>
@@ -352,7 +350,6 @@ img.avatar-small {
352350
margin: 0 1rem;
353351
min-width: 160px;
354352
&:last-child { margin-left: 0; }
355-
&.disabled { cursor: not-allowed; }
356353
}
357354
358355
@include break-mobile-sm {

src/views/Posts.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,19 +123,19 @@
123123
<div v-if="!post._deleted && !post.user.ignored" class="post-block-grid">
124124
<!-- Post Profile Section -->
125125
<div class="post-user">
126-
<router-link :to="{ path: '/profile/' + post.user.username.toLowerCase(), query: { id: post.user.id }}">
126+
<router-link :to="{ path: '/profile/' + post.user.username.toLowerCase() }">
127127
<div class="user-avatar" :class="defaultAvatarShape">
128128
<span v-if="post.user.online" class="online green" :data-balloon="post.user.username + ' is online'">
129129
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
130130
<title></title>
131131
<circle cx="24" cy="24" r="16" />
132132
</svg>
133133
</span>
134-
<router-link :to="{ path: '/profile/' + post.user.username.toLowerCase(), query: { id: post.user.id } }">
134+
<router-link :to="{ path: '/profile/' + post.user.username.toLowerCase() }">
135135
<img :src="post.avatar || defaultAvatar" @error="$event.target.src=defaultAvatar" />
136136
</router-link>
137137
</div>
138-
<router-link :to="{ path: '/profile/' + post.user.username.toLowerCase(), query: { id: post.user.id } }" class="hide-mobile">
138+
<router-link class="hide-mobile" :to="{ path: '/profile/' + post.user.username.toLowerCase() }">
139139
<div class="original-poster" v-if="post.user.original_poster">OP</div>
140140
<div v-if="post.user.title" :title="('Title: ' + post.user.title)" class="user-activity"><span class="user-activity-value">{{post.user.title}}</span></div>
141141
<div v-if="post.user.merit > -1" :title="('Merit: ' + post.user.merit)" class="user-activity">Merit: <span class="user-activity-value">{{post.user.merit}}</span></div>
@@ -166,7 +166,7 @@
166166
</div>
167167
<div :title="post.user.role_name || 'user'" class="user-role" :style="userRoleHighlight(post.user.highlight_color)">{{post.user.role_name || 'user'}}</div>
168168
</div>
169-
<router-link :to="{ path: '/profile/' + post.user.username.toLowerCase(), query: { id: post.user.id } }" class="user-activity-mobile">
169+
<router-link :to="{ path: '/profile/' + post.user.username.toLowerCase() }" class="user-activity-mobile">
170170
<div class="original-poster" v-if="post.user.original_poster">OP</div>
171171
<div v-if="post.user.title" :title="('Title: ' + post.user.title)" class="user-activity"><span class="user-activity-value">{{post.user.title}}</span></div>
172172
<div v-if="post.user.merit > -1" :title="('Merit: ' + post.user.merit)" class="user-activity">Merit: <span class="user-activity-value">{{post.user.merit}}</span></div>
@@ -188,7 +188,7 @@
188188
<!-- Post Title -->
189189
<div class="hide-mobile post-title">
190190
<div class="post-title-user">
191-
<span class="username" :data-balloon="post.user.role_name || 'User'"><router-link :to="{ path: '/profile/' + post.user.username.toLowerCase(), query: { id: post.user.id } }">
191+
<span class="username" :data-balloon="post.user.role_name || 'User'"><router-link :to="{ path: '/profile/' + post.user.username.toLowerCase() }">
192192
<span v-html="post.user.username"></span>
193193
</router-link></span>
194194
<div :title="post.user.name" v-if="post.user.name" class="display-name">

0 commit comments

Comments
 (0)