Skip to content

Commit 83734b8

Browse files
committed
chore: update dependencies and improve code consistency; feat: new ui, github login
- Updated webpack and webpack-bundle-analyzer to latest versions in package.json. - Upgraded @googleapis/androidpublisher, googleapis, marked to their latest versions. - Refactored OAuth routes for improved readability and consistency in oauth.js. - Cleaned up whitespace and formatting in authenticationProvider.js, authenticateWithProvider.js, tokenCrypto.js, OAuthProviderFactory.js, OAuthService.js, SessionStateService.js, and github.js. - Enhanced error handling and logging in OAuthService and githubOAuthProvider. - Ensured consistent use of semicolons and spacing throughout the codebase.
1 parent 76b36d7 commit 83734b8

35 files changed

Lines changed: 4279 additions & 2081 deletions

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
44
"files": {
55
"ignoreUnknown": true,
6-
"includes": ["**", "!**/public/**/*", "!**/*.d.ts", "!**/.vscode/**/*", "!**/jsconfig.json", "!**/.babelrc", "!**/.hintrc"]
6+
"includes": ["**", "!**/public/**/*", "!**/*.d.ts", "!**/.vscode/**/*", "!**/jsconfig.json", "!**/.babelrc", "!**/.hintrc", "!constants.js"]
77
},
88
"formatter": {
99
"enabled": true,

client/components/plugins/index.js

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ function Plugin({
7575
<div title='Downloads counter'>
7676
{downloads.toLocaleString()} <span className='icon download' />
7777
</div>
78-
{Boolean(status) && (
79-
<span data-id={id} onclick={isAdmin ? changePluginStatus : undefined} title='Plugin status' className={`status-indicator ${status}`}>
80-
{status}
81-
</span>
82-
)}
8378
<div>{calcRating(upVotes, downVotes)}</div>
8479
{comments > 0 && (
8580
<div>
@@ -94,7 +89,7 @@ function Plugin({
9489
</small>
9590
</p>
9691
<small>{updatedAt ? `Updated ${since(updatedAt)}` : ' '}</small>
97-
<Actions id={id} isAdmin={isAdmin} user={userId} pluginsUser={pluginUser} />
92+
<Actions id={id} isAdmin={isAdmin} user={userId} pluginsUser={pluginUser} status={status} />
9893
</div>
9994
</a>
10095
);
@@ -197,13 +192,29 @@ async function changePluginStatus(e) {
197192
}
198193
}
199194

200-
function Actions({ user, pluginsUser, id, isAdmin }) {
201-
const $el = <small className='icon-buttons' />;
202-
const $delete = <span title='delete plugin' className='link icon delete danger' onclick={(e) => deletePlugin(e, id)} />;
195+
function Actions({ user, pluginsUser, id, isAdmin, status }) {
196+
const $el = <div className='plugin-actions' />;
197+
const $delete = (
198+
<span title='delete plugin' className='action-btn btn-delete' onclick={(e) => deletePlugin(e, id)}>
199+
<span className='icon delete' />
200+
</span>
201+
);
203202

204203
if (user && user === pluginsUser) {
205-
$el.append(<span title='edit plugin' className='link icon create' onclick={(e) => edit(e, id)} />, $delete);
204+
$el.append(
205+
<span title='edit plugin' className='action-btn btn-edit' onclick={(e) => edit(e, id)}>
206+
<span className='icon create' />
207+
</span>,
208+
$delete,
209+
);
206210
} else if (isAdmin) {
211+
if (status) {
212+
$el.append(
213+
<span data-id={id} onclick={changePluginStatus} title='Change plugin status' className={`status-btn ${status}`}>
214+
{status === 'pending' ? 'Approve' : status}
215+
</span>,
216+
);
217+
}
207218
$el.append($delete);
208219
}
209220

client/components/plugins/style.scss

Lines changed: 188 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,50 @@
99
text-align: center;
1010
width: 100%;
1111
margin: 10px;
12+
font-size: 1.1rem;
13+
color: rgba(255, 255, 255, 0.6);
1214
}
1315

1416
.plugin {
15-
width: calc(33% - 30px);
17+
width: calc(33.33% - 20px);
1618
min-width: 250px;
17-
margin: 10px 0 0 10px;
18-
background-color: var(--secondary-color);
19+
margin: 10px;
20+
background: rgba(255, 255, 255, 0.05);
21+
backdrop-filter: blur(20px);
22+
border: 1px solid rgba(255, 255, 255, 0.1);
1923
color: var(--secondary-text-color);
20-
padding: 10px;
24+
padding: 16px;
2125
text-align: center;
22-
border-radius: 4px;
26+
border-radius: 16px;
2327
text-decoration: none;
28+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
29+
box-sizing: border-box;
30+
display: flex;
31+
flex-direction: column;
2432

2533
h2 {
26-
margin-bottom: 5px;
34+
margin-bottom: 8px;
35+
font-size: 1.1rem;
36+
font-weight: 600;
2737
}
2838

2939
@media screen and (max-width: 925px) {
30-
width: calc(50% - 35px);
40+
width: calc(50% - 20px);
3141
}
3242

3343
@media screen and (max-width: 600px) {
34-
width: calc(100% - 40px);
44+
width: calc(100% - 20px);
3545
}
3646

3747
&:hover {
38-
box-shadow: -2px 2px 12px 2px rgba($color: #000000, $alpha: 0.4);
48+
transform: translateY(-4px);
49+
background: rgba(255, 255, 255, 0.08);
50+
border-color: rgba(51, 153, 255, 0.3);
51+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
52+
53+
.plugin-icon {
54+
transform: scale(1.05);
55+
}
3956
}
4057

4158
.plugin-icon {
@@ -45,36 +62,193 @@
4562
background-position: center;
4663
background-size: 100px;
4764
margin: auto;
65+
border-radius: 16px;
66+
transition: transform 0.3s ease;
67+
}
68+
69+
.plugin-info {
70+
display: flex;
71+
flex-direction: column;
72+
flex: 1;
73+
74+
>p {
75+
margin: 4px 0;
76+
font-size: 0.85rem;
77+
color: rgba(255, 255, 255, 0.5);
78+
}
79+
80+
>small {
81+
font-size: 0.75rem;
82+
color: rgba(255, 255, 255, 0.4);
83+
}
84+
}
85+
86+
.plugin-actions {
87+
margin-top: auto;
88+
padding-top: 12px;
89+
border-top: 1px solid rgba(255, 255, 255, 0.1);
90+
display: flex;
91+
justify-content: center;
92+
align-items: center;
93+
gap: 8px;
94+
95+
&:empty {
96+
display: none;
97+
}
98+
99+
.action-btn {
100+
width: 36px;
101+
height: 36px;
102+
display: flex;
103+
align-items: center;
104+
justify-content: center;
105+
border-radius: 10px;
106+
background: rgba(255, 255, 255, 0.08);
107+
transition: all 0.2s ease;
108+
cursor: pointer;
109+
110+
.icon {
111+
margin: 0;
112+
}
113+
114+
&:hover {
115+
background: rgba(255, 255, 255, 0.15);
116+
transform: scale(1.1);
117+
}
118+
119+
&.btn-delete:hover {
120+
background: rgba(255, 85, 51, 0.2);
121+
color: #ff5533;
122+
}
123+
124+
&.btn-edit:hover {
125+
background: rgba(51, 153, 255, 0.2);
126+
color: #3399ff;
127+
}
128+
}
129+
130+
.status-btn {
131+
padding: 8px 16px;
132+
border-radius: 8px;
133+
font-size: 0.75rem;
134+
font-weight: 600;
135+
text-transform: uppercase;
136+
letter-spacing: 0.5px;
137+
cursor: pointer;
138+
transition: all 0.2s ease;
139+
140+
&.pending {
141+
background: linear-gradient(135deg, #3399ff 0%, #2277dd 100%);
142+
color: white;
143+
border: none;
144+
145+
&:hover {
146+
transform: scale(1.05);
147+
box-shadow: 0 4px 12px rgba(51, 153, 255, 0.4);
148+
}
149+
}
150+
151+
&.approved {
152+
background: rgba(51, 255, 153, 0.15);
153+
color: #33ff99;
154+
border: 1px solid rgba(51, 255, 153, 0.3);
155+
156+
&:hover {
157+
background: rgba(51, 255, 153, 0.25);
158+
transform: scale(1.05);
159+
}
160+
}
161+
162+
&.rejected {
163+
background: rgba(255, 85, 51, 0.15);
164+
color: #ff5533;
165+
border: 1px solid rgba(255, 85, 51, 0.3);
166+
167+
&:hover {
168+
background: rgba(255, 85, 51, 0.25);
169+
}
170+
}
171+
}
172+
}
173+
174+
.icon-buttons {
175+
margin-top: auto;
176+
padding-top: 12px;
177+
border-top: 1px solid rgba(255, 255, 255, 0.1);
178+
display: flex;
179+
justify-content: center;
180+
gap: 8px;
181+
182+
.icon {
183+
width: 36px;
184+
height: 36px;
185+
display: flex;
186+
align-items: center;
187+
justify-content: center;
188+
border-radius: 10px;
189+
background: rgba(255, 255, 255, 0.08);
190+
transition: all 0.2s ease;
191+
192+
&:hover {
193+
background: rgba(255, 255, 255, 0.15);
194+
transform: scale(1.1);
195+
}
196+
197+
&.danger:hover {
198+
background: rgba(255, 85, 51, 0.2);
199+
}
200+
}
48201
}
49202
}
50203

51204
.info {
52205
display: flex;
53206
justify-content: center;
207+
flex-wrap: wrap;
208+
gap: 6px 0;
54209
cursor: default;
210+
font-size: 0.9rem;
211+
color: rgba(255, 255, 255, 0.7);
55212

56213
>*:not(:last-child)::after {
57214
content: '';
58215
font-weight: bolder;
59-
margin: 0 5px;
216+
margin: 0 8px;
217+
color: rgba(255, 255, 255, 0.3);
60218
}
61219
}
62220

63221
.status-indicator {
64-
text-transform: capitalize;
222+
text-transform: uppercase;
65223
cursor: pointer;
224+
padding: 4px 12px;
225+
border-radius: 20px;
226+
font-size: 0.7rem;
227+
font-weight: 600;
228+
letter-spacing: 0.5px;
229+
transition: all 0.2s ease;
230+
231+
&:hover {
232+
transform: scale(1.05);
233+
}
66234
}
67235

68236
.pending {
69-
color: #39f;
237+
color: #ffaa33;
238+
background: rgba(255, 170, 51, 0.15);
239+
border: 1px solid rgba(255, 170, 51, 0.3);
70240
}
71241

72242
.approved {
73-
color: #3f9;
243+
color: #33ff99;
244+
background: rgba(51, 255, 153, 0.15);
245+
border: 1px solid rgba(51, 255, 153, 0.3);
74246
}
75247

76248
.deleted,
77249
.rejected {
78-
color: #f33;
250+
color: #ff5533;
251+
background: rgba(255, 85, 51, 0.15);
252+
border: 1px solid rgba(255, 85, 51, 0.3);
79253
}
80254
}

client/lib/background.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,18 @@ export default function background(canvas) {
6363
});
6464

6565
function init() {
66-
const numParticles = Math.min(150, Math.round((canvas.width * canvas.height) / 9500));
66+
const numParticles = Math.min(100, Math.round((canvas.width * canvas.height) / 15000));
6767

6868
particles = [];
6969

7070
for (let i = 0; i < numParticles; ++i) {
71-
const r = Math.random() * 3 + 1;
71+
const r = Math.random() * 2.5 + 1;
7272
const x = Math.random() * (canvas.width - r) + r;
7373
const y = Math.random() * (canvas.height - r) + r;
74-
const dx = (Math.random() > 0.5 ? 1 : -1) * Math.random() * 1.5;
75-
const dy = (Math.random() > 0.5 ? 1 : -1) * Math.random() * 1.5;
74+
const dx = (Math.random() > 0.5 ? 1 : -1) * Math.random() * 1;
75+
const dy = (Math.random() > 0.5 ? 1 : -1) * Math.random() * 1;
7676

77-
particles.push(new Particle(canvas, r, x, y, dx, dy, '#606060'));
77+
particles.push(new Particle(canvas, r, x, y, dx, dy, 'rgba(96, 96, 96, 0.6)'));
7878
}
7979

8080
if (reqId != null) cancelAnimationFrame(reqId);
@@ -106,10 +106,11 @@ export default function background(canvas) {
106106
for (const p2 of particles) {
107107
const distance = Math.sqrt((p2.x - p1.x) ** 2 + (p2.y - p1.y) ** 2);
108108

109-
if (distance < 100) {
109+
if (distance < 120) {
110+
const opacity = 0.25 * (1 - distance / 120);
110111
ctx.beginPath();
111-
ctx.strokeStyle = '#606060';
112-
ctx.lineWidth = 1;
112+
ctx.strokeStyle = `rgba(96, 96, 96, ${opacity})`;
113+
ctx.lineWidth = 0.8;
113114
ctx.moveTo(p1.x, p1.y);
114115
ctx.lineTo(p2.x, p2.y);
115116
ctx.stroke();

0 commit comments

Comments
 (0)