Skip to content

Commit 887c453

Browse files
authored
Merge pull request #94 from epochtalk/server-migration
Update Dependencies - Proxy
2 parents 60ffefa + 2c0e981 commit 887c453

22 files changed

+739
-446
lines changed

.tool-versions

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
elixir 1.11.4-otp-23
2-
erlang 23.3.4.1
3-
nodejs 16.15.0
1+
elixir 1.18.2-otp-27
2+
erlang 27.2.4
3+
nodejs 22.14.0

DEVELOPMENT.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# DEVELOPMENT GUIDE
2+
3+
## Proxy Project
4+
5+
The proxy server queries the existing BCT database and manipulates that data to fit into Epochtalk's data models. The backend serves that manipulated data to the frontend project. This version of the project is for a read only mobile deployment of BCT.
6+
7+
### Continued Development
8+
9+
* Prequisites
10+
* SSH tunnel to BCT database from localhost if developing locally, this is required to make the proxy queries work
11+
* Checkout each of the three projects and switch to the branch in parentheses
12+
* `epochtalk/epochtalk` (ui-refactor-2020)
13+
* There should be no modifications made to this project, it is just running to stop the frontend from breaking when hitting api routes which have not been ported to the new `epochtalk-server` yet
14+
* `epochtalk/epochtalk-vue` (proxy)
15+
* Changes can be made here when proxy BCT data doesn't quite fit into the current model design scheme of Epochtalk
16+
* `slickage/epochtalk-server` (main)
17+
* This should only be modified if there is an issue with existing proxied routes, or if there is a requirement to proxy more BCT data for the mobile read only site
18+
* Key Files
19+
* `lib/epochtalk_server/smf_query.ex` - used to proxy SMF data into Epochtalk format
20+
* `lib/epochtalk_server_web/controller/*.ex` - to override a standard route with data queried from the proxy, the controller must be modified. See existing examples of using the plug `:check_proxy` the `post.ex` controller is a good example of this.
21+
* `lib/epochtalk_server/bbc_parser.ex` - used to turn the bbcode parser into genserver process which can be deployed as a pool via `poolboy`
22+
* `parsing.php` - bbcode parser
23+
* `parsing_extra.php` - additional settings and functions required to run bbcode parser
24+
25+
## Main Project
26+
27+
The main project was initially written in Node/Angular an is in the process of being ported to Vue JS (Frontend) and Elixir (Backend).
28+
29+
### Continued Development
30+
31+
* Checkout each of the three projects and switch to the branch in parentheses
32+
* `epochtalk/epochtalk` (ui-refactor-2020)
33+
* There should be no modifications made to this project, it is just running to stop the frontend from breaking when hitting api routes which have not been ported to the new `epochtalk-server` yet.
34+
* `epochtalk/epochtalk-vue` (main)
35+
* Frontend changes should be made here. When new routes are ported to the new elixir server, the front end api/views must be updated as well.
36+
* See `PortRoadMap.md` within this project to view a list of remaining views to be ported.
37+
* `epochtalk/epochtalk-server` (main)
38+
* See `PortRoadmap.md` within the `epochtalk-server` project for a list of which models and features have been ported.

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# build stage
2-
FROM node:16-alpine as build-stage
2+
FROM node:22-alpine as build-stage
33
ENV JQ_VERSION=1.6
44
RUN wget --no-check-certificate https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64 -O /tmp/jq-linux64
55
RUN cp /tmp/jq-linux64 /usr/bin/jq

PortRoadmap.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## Port Roadmap
2+
3+
This document is used to track progress of porting views from the original node/angular `epochtalk/epochtalk` project to the new elixir/vue `epochtalk/epochtalk-vue`
4+
5+
## Non Authenticated View Port Progress
6+
| View Name | Completed? |
7+
| --------- | ---------- |
8+
| Boards | :white_check_mark: |
9+
| Threads | :white_check_mark: |
10+
| Posts | :white_check_mark: |
11+
| Profile | :white_check_mark: |
12+
| About | :x: |
13+
14+
## Public Authenticated View Port Progress
15+
| View Name | Completed? |
16+
| --------- | ---------- |
17+
| Boards | :white_check_mark: |
18+
| Threads | :white_check_mark: |
19+
| Posts | :white_check_mark: |
20+
| Profile | :white_check_mark: |
21+
| WatchList | :construction_worker: |
22+
| Messages | :construction_worker: |
23+
| Trust | :white_check_mark: |
24+
| Trust Settings | :white_check_mark: |
25+
| Settings | :white_check_mark: |
26+
| Invite User | :white_check_mark: |
27+
28+
## Administrative Authenticated View Port Progress
29+
| View Name | Completed? |
30+
| --------- | ---------- |
31+
| General Settings | :x: |
32+
| Advanced Settings | :x: |
33+
| Legal Settings | :x: |
34+
| Theme Settings | :x: |
35+
| Board Management | :x: |
36+
| Users Management | :x: |
37+
| Roles Management | :x: |
38+
| Banned Addresses Management | :x: |
39+
| Users Moderation | :x: |
40+
| Posts Moderation | :x: |
41+
| Messages Moderation | :x: |
42+
| Board Bans Moderation | :x: |
43+
| Moderation Logs | :x: |

package.json

+17-17
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,34 @@
1919
"url": "git://github.com/epochtalk/epochtalk-vue"
2020
},
2121
"dependencies": {
22-
"@fortawesome/fontawesome-free": "^6.4.0",
23-
"@vueform/multiselect": "^2.6.2",
24-
"axios": "^1.4.0",
25-
"core-js": "^3.32.0",
26-
"dayjs": "^1.11.8",
27-
"emittery": "^1.0.1",
28-
"jquery": "^3.7.0",
22+
"@fortawesome/fontawesome-free": "^6.7.2",
23+
"@vueform/multiselect": "^2.6.11",
24+
"axios": "^1.8.1",
25+
"core-js": "^3.40.0",
26+
"dayjs": "^1.11.13",
27+
"emittery": "^1.1.0",
28+
"jquery": "^3.7.1",
2929
"nestable": "https://github.com/epochtalk/Nestable.git",
3030
"normalize.css": "^8.0.1",
3131
"nprogress": "^0.2.0",
32-
"phoenix": "^1.7.7",
33-
"sass": "^1.64.1",
32+
"phoenix": "^1.7.20",
33+
"sass": "1.77.6",
3434
"slugify": "^1.6.6",
35-
"socketcluster-client": "^17.1.1",
36-
"swrv": "^1.0.3",
37-
"vue": "^3.3.4",
38-
"vue-router": "^4.2.2",
35+
"socketcluster-client": "^19.2.3",
36+
"swrv": "^1.1.0",
37+
"vue": "^3.5.13",
38+
"vue-router": "^4.5.0",
3939
"vuedraggable": "^4.1.0"
4040
},
4141
"devDependencies": {
42-
"@babel/eslint-parser": "^7.21.8",
42+
"@babel/eslint-parser": "^7.26.8",
4343
"@vue/cli-plugin-babel": "~5.0.8",
4444
"@vue/cli-plugin-eslint": "~5.0.8",
4545
"@vue/cli-service": "~5.0.8",
46-
"@vue/compiler-sfc": "^3.3.4",
46+
"@vue/compiler-sfc": "^3.5.13",
4747
"eslint": "^8.46.0",
48-
"eslint-plugin-vue": "^9.14.1",
49-
"sass-loader": "^13.3.1"
48+
"eslint-plugin-vue": "^9.32.0",
49+
"sass-loader": "^16.0.5"
5050
},
5151
"eslintConfig": {
5252
"root": true,

src/assets/scss/_variables.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ $font-size-tiny: 0.6375rem;
4444
$color-brightness: brightness($color);
4545
$light-text-brightness: brightness($light);
4646
$dark-text-brightness: brightness($dark);
47-
@return if(abs($color-brightness - $light-text-brightness) > abs($color-brightness - $dark-text-brightness), $light, $dark);
47+
@return if(math.abs($color-brightness - $light-text-brightness) > math.abs($color-brightness - $dark-text-brightness), $light, $dark);
4848
}
4949
}
5050
@import '~@/assets/scss/_default-variables.scss';

src/components/admin/settings/AdManager.vue

+11-7
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@
9595
<section class="ads-container">
9696
<table class="striped ads-table full-width">
9797
<thead>
98-
<th>Number</th>
99-
<th>Display</th>
100-
<th>Actions</th>
98+
<tr>
99+
<th>Number</th>
100+
<th>Display</th>
101+
<th>Actions</th>
102+
</tr>
101103
</thead>
102104
<tbody>
103105
<tr v-for="(ad, index) in ads" :key="ad.id">
@@ -181,10 +183,12 @@
181183
<section class="factoids-container full-width">
182184
<table class="striped ads-table full-width">
183185
<thead>
184-
<th>Number</th>
185-
<th>Display</th>
186-
<th>Enabled</th>
187-
<th>Actions</th>
186+
<tr>
187+
<th>Number</th>
188+
<th>Display</th>
189+
<th>Enabled</th>
190+
<th>Actions</th>
191+
</tr>
188192
</thead>
189193
<tbody>
190194
<tr v-for="(factoid, index) in factoids" :key="factoid.id">

src/components/modals/profile/ManageBans.vue

+26-24
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,32 @@
77
<!-- Manage Bans -->
88
<label class="bold">User Information</label>
99
<table v-if="userCopy.username" class="striped" width="100%">
10-
<tr>
11-
<td>Username</td>
12-
<td>{{ userCopy.username }}</td>
13-
</tr>
14-
<tr>
15-
<td>Email</td>
16-
<td>{{ userCopy.email }}</td>
17-
</tr>
18-
<tr>
19-
<td>Register Date</td>
20-
<td>{{ humanDate(userCopy.created_at) }}</td>
21-
</tr>
22-
<tr v-if="userCopy.ban_expiration">
23-
<td>Global Ban Expiration (UTC)</td>
24-
<td>{{ humanDate(dayjs.utc(userCopy.ban_expiration), true) }}</td>
25-
</tr>
26-
<tr v-if="userCopy?.banned_board_names?.length">
27-
<td>Banned From Boards</td>
28-
<td>
29-
<span v-for="(boardName, i) in userCopy.banned_board_names" :key="i">
30-
{{ boardName }}<span v-if="(i + 1) !== userCopy.banned_board_names.length">, </span>
31-
</span>
32-
</td>
33-
</tr>
10+
<tbody>
11+
<tr>
12+
<td>Username</td>
13+
<td>{{ userCopy.username }}</td>
14+
</tr>
15+
<tr>
16+
<td>Email</td>
17+
<td>{{ userCopy.email }}</td>
18+
</tr>
19+
<tr>
20+
<td>Register Date</td>
21+
<td>{{ humanDate(userCopy.created_at) }}</td>
22+
</tr>
23+
<tr v-if="userCopy.ban_expiration">
24+
<td>Global Ban Expiration (UTC)</td>
25+
<td>{{ humanDate(dayjs.utc(userCopy.ban_expiration), true) }}</td>
26+
</tr>
27+
<tr v-if="userCopy?.banned_board_names?.length">
28+
<td>Banned From Boards</td>
29+
<td>
30+
<span v-for="(boardName, i) in userCopy.banned_board_names" :key="i">
31+
{{ boardName }}<span v-if="(i + 1) !== userCopy.banned_board_names.length">, </span>
32+
</span>
33+
</td>
34+
</tr>
35+
</tbody>
3436
</table>
3537
<div v-if="!userCopy.username">
3638
<Multiselect ref="focusInput" v-model="userToBan.value" v-bind="userToBan" />

src/components/threads/RecentThreads.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
</a>
1515
</div>
1616
<transition>
17-
<div>
18-
<div v-if="!threads && collapsedCats.indexOf(recentThreadsId) < 0" class="centered-text">
17+
<div v-if="collapsedCats.indexOf(recentThreadsId) < 0">
18+
<div v-if="!threads" class="centered-text">
1919
<h5>No recently updated threads available</h5>
2020
</div>
21-
<div class="threads-container" v-if="threads && collapsedCats.indexOf(recentThreadsId) < 0">
21+
<div class="threads-container" v-if="threads">
2222
<!-- Thread listing -->
2323
<div class="threads-data threads-recent" v-for="thread in threads" :key="thread.id">
2424
<div class="states">

src/components/users/UserPosts.vue

+8-4
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@
2929
<div v-if="postData && postData?.posts?.length">
3030
<table class="profile-posts-table" width="100%">
3131
<thead>
32-
<th class="thread">Thread</th>
33-
<th class="timestamp pointer" @click="setDesc()"><span :class="getSortClass()"></span>&nbsp;Post Date</th>
32+
<tr>
33+
<th class="thread">Thread</th>
34+
<th class="timestamp pointer" @click="setDesc()"><span :class="getSortClass()"></span>&nbsp;Post Date</th>
35+
</tr>
3436
</thead>
3537

3638
<tbody>
@@ -71,8 +73,10 @@
7173
<div v-if="postData?.posts.length">
7274
<table class="profile-posts-table" width="100%">
7375
<thead>
74-
<th class="thread">Thread</th>
75-
<th class="timestamp pointer" @click="setDesc()"><span :class="getSortClass()"></span>&nbsp;Post Date</th>
76+
<tr>
77+
<th class="thread">Thread</th>
78+
<th class="timestamp pointer" @click="setDesc()"><span :class="getSortClass()"></span>&nbsp;Post Date</th>
79+
</tr>
7680
</thead>
7781

7882
<tbody>

src/views/admin/management/BannedAddresses.vue

+10-8
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@
1818
<div class="banned-address-content fill-row" v-if="banData?.data?.length > 0 || query?.search">
1919
<table class="underlined" width="100%">
2020
<thead>
21-
<th>Address</th>
22-
<th class="pointer" @click="setSortField('weight')"><span :class="getSortClass('weight')"></span>&nbsp;Weight</th>
23-
<th class="pointer" @click="setSortField('created_at')"><span :class="getSortClass('created_at')"></span>&nbsp;Date Banned</th>
24-
<th class="pointer" @click="setSortField('decay')"><span :class="getSortClass('decay')"></span>&nbsp;Decays</th>
25-
<th class="pointer" @click="setSortField('updates')"><span :class="getSortClass('updates')"></span>Last Updated</th>
26-
<th class="pointer" @click="setSortField('update_count')"><span :class="getSortClass('update_count')"></span>&nbsp;Update Count</th>
27-
<th class="pointer" @click="setSortField('imported_at')"><span :class="getSortClass('imported_at')"></span>&nbsp;Date Imported</th>
28-
<th class="user-actions">Actions</th>
21+
<tr>
22+
<th>Address</th>
23+
<th class="pointer" @click="setSortField('weight')"><span :class="getSortClass('weight')"></span>&nbsp;Weight</th>
24+
<th class="pointer" @click="setSortField('created_at')"><span :class="getSortClass('created_at')"></span>&nbsp;Date Banned</th>
25+
<th class="pointer" @click="setSortField('decay')"><span :class="getSortClass('decay')"></span>&nbsp;Decays</th>
26+
<th class="pointer" @click="setSortField('updates')"><span :class="getSortClass('updates')"></span>Last Updated</th>
27+
<th class="pointer" @click="setSortField('update_count')"><span :class="getSortClass('update_count')"></span>&nbsp;Update Count</th>
28+
<th class="pointer" @click="setSortField('imported_at')"><span :class="getSortClass('imported_at')"></span>&nbsp;Date Imported</th>
29+
<th class="user-actions">Actions</th>
30+
</tr>
2931
</thead>
3032
<tbody>
3133
<tr v-for="address in banData?.data" :key="address">

src/views/admin/management/Invitations.vue

+5-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
<div class="invitations-content fill-row" v-if="inviteData?.invitations?.length">
1313
<table class="underlined" width="100%">
1414
<thead>
15-
<th>Email</th>
16-
<th>Sent</th>
17-
<th class="user-actions">Actions</th>
15+
<tr>
16+
<th>Email</th>
17+
<th>Sent</th>
18+
<th class="user-actions">Actions</th>
19+
</tr>
1820
</thead>
1921
<tbody>
2022
<tr v-for="invite in inviteData?.invitations" :key="invite">

src/views/admin/management/Roles.vue

+5-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,11 @@
6969
<div v-if="userData.count > 0">
7070
<table class="underlined" width="100%">
7171
<thead>
72-
<th>Username</th>
73-
<th>Email</th>
74-
<th>Actions</th>
72+
<tr>
73+
<th>Username</th>
74+
<th>Email</th>
75+
<th>Actions</th>
76+
</tr>
7577
</thead>
7678
<tbody v-for="user in userData.users" :key="user.id">
7779
<tr>

src/views/admin/management/Users.vue

+9-7
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,15 @@
4545
</div>
4646
<table class="underlined" width="100%">
4747
<thead>
48-
<th class="pointer" @click="setSortField('username')"><span :class="getSortClass('username')"></span>&nbsp;Username</th>
49-
<th class="pointer" :class="{'hide-mobile': query?.filter === 'banned' }" @click="setSortField('email')"><span :class="getSortClass('email')"></span>&nbsp;Email</th>
50-
<th class="pointer" v-if="query?.filter === 'banned'" @click="setSortField('ban_expiration')"><span :class="getSortClass('ban_expiration')"></span>&nbsp;Ban Expiration</th>
51-
<th class="pointer hide-mobile" @click="setSortField('created_at')"><span :class="getSortClass('created_at')"></span>&nbsp;Registered Date</th>
52-
<th class="hide-mobile">Last Active Date</th>
53-
<th class="hide-mobile">IP Addresses</th>
54-
<th class="user-actions">Actions</th>
48+
<tr>
49+
<th class="pointer" @click="setSortField('username')"><span :class="getSortClass('username')"></span>&nbsp;Username</th>
50+
<th class="pointer" :class="{'hide-mobile': query?.filter === 'banned' }" @click="setSortField('email')"><span :class="getSortClass('email')"></span>&nbsp;Email</th>
51+
<th class="pointer" v-if="query?.filter === 'banned'" @click="setSortField('ban_expiration')"><span :class="getSortClass('ban_expiration')"></span>&nbsp;Ban Expiration</th>
52+
<th class="pointer hide-mobile" @click="setSortField('created_at')"><span :class="getSortClass('created_at')"></span>&nbsp;Registered Date</th>
53+
<th class="hide-mobile">Last Active Date</th>
54+
<th class="hide-mobile">IP Addresses</th>
55+
<th class="user-actions">Actions</th>
56+
</tr>
5557
</thead>
5658
<tbody>
5759
<tr v-for="user in users" :key="user.username">

src/views/admin/moderation/BoardBans.vue

+7-5
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@
4040
<div class="board-ban-content">
4141
<table class="underlined" width="100%">
4242
<thead>
43-
<th class="left-icon-col"></th>
44-
<th>User</th>
45-
<th>Email</th>
46-
<th class="banned-boards">Banned Boards</th>
47-
<th>Action</th>
43+
<tr>
44+
<th class="left-icon-col"></th>
45+
<th>User</th>
46+
<th>Email</th>
47+
<th class="banned-boards">Banned Boards</th>
48+
<th>Action</th>
49+
</tr>
4850
</thead>
4951
<tbody v-if="boardBanData?.data?.length">
5052
<tr v-for="boardBan in boardBanData?.data" :key="boardBan">

0 commit comments

Comments
 (0)