Skip to content

Commit 6729b6d

Browse files
committed
Revert to commit 5045853: restore previous stable version
1 parent 627ebd6 commit 6729b6d

File tree

28 files changed

+1839
-3868
lines changed

28 files changed

+1839
-3868
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
}
1313
]
1414
],
15-
"compact": true
15+
"compact": false
1616
}

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", "!constants.js"]
6+
"includes": ["**", "!**/public/**/*", "!**/*.d.ts", "!**/.vscode/**/*", "!**/jsconfig.json", "!**/.babelrc", "!**/.hintrc"]
77
},
88
"formatter": {
99
"enabled": true,

client/components/plugins/index.js

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ 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+
)}
7883
<div>{calcRating(upVotes, downVotes)}</div>
7984
{comments > 0 && (
8085
<div>
@@ -89,7 +94,7 @@ function Plugin({
8994
</small>
9095
</p>
9196
<small>{updatedAt ? `Updated ${since(updatedAt)}` : ' '}</small>
92-
<Actions id={id} isAdmin={isAdmin} user={userId} pluginsUser={pluginUser} status={status} />
97+
<Actions id={id} isAdmin={isAdmin} user={userId} pluginsUser={pluginUser} />
9398
</div>
9499
</a>
95100
);
@@ -192,29 +197,13 @@ async function changePluginStatus(e) {
192197
}
193198
}
194199

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-
);
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)} />;
202203

203204
if (user && user === pluginsUser) {
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-
);
205+
$el.append(<span title='edit plugin' className='link icon create' onclick={(e) => edit(e, id)} />, $delete);
210206
} 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-
}
218207
$el.append($delete);
219208
}
220209

client/components/plugins/style.scss

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

1614
.plugin {
17-
width: calc(33.33% - 20px);
15+
width: calc(33% - 30px);
1816
min-width: 250px;
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);
17+
margin: 10px 0 0 10px;
18+
background-color: var(--secondary-color);
2319
color: var(--secondary-text-color);
24-
padding: 16px;
20+
padding: 10px;
2521
text-align: center;
26-
border-radius: 16px;
22+
border-radius: 4px;
2723
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;
3224

3325
h2 {
34-
margin-bottom: 8px;
35-
font-size: 1.1rem;
36-
font-weight: 600;
26+
margin-bottom: 5px;
3727
}
3828

3929
@media screen and (max-width: 925px) {
40-
width: calc(50% - 20px);
30+
width: calc(50% - 35px);
4131
}
4232

4333
@media screen and (max-width: 600px) {
44-
width: calc(100% - 20px);
34+
width: calc(100% - 40px);
4535
}
4636

4737
&:hover {
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-
}
38+
box-shadow: -2px 2px 12px 2px rgba($color: #000000, $alpha: 0.4);
5639
}
5740

5841
.plugin-icon {
@@ -62,193 +45,36 @@
6245
background-position: center;
6346
background-size: 100px;
6447
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-
}
20148
}
20249
}
20350

20451
.info {
20552
display: flex;
20653
justify-content: center;
207-
flex-wrap: wrap;
208-
gap: 6px 0;
20954
cursor: default;
210-
font-size: 0.9rem;
211-
color: rgba(255, 255, 255, 0.7);
21255

21356
>*:not(:last-child)::after {
21457
content: '';
21558
font-weight: bolder;
216-
margin: 0 8px;
217-
color: rgba(255, 255, 255, 0.3);
59+
margin: 0 5px;
21860
}
21961
}
22062

22163
.status-indicator {
222-
text-transform: uppercase;
64+
text-transform: capitalize;
22365
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-
}
23466
}
23567

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

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

24876
.deleted,
24977
.rejected {
250-
color: #ff5533;
251-
background: rgba(255, 85, 51, 0.15);
252-
border: 1px solid rgba(255, 85, 51, 0.3);
78+
color: #f33;
25379
}
25480
}

client/lib/background.js

Lines changed: 8 additions & 9 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(100, Math.round((canvas.width * canvas.height) / 15000));
66+
const numParticles = Math.min(150, Math.round((canvas.width * canvas.height) / 9500));
6767

6868
particles = [];
6969

7070
for (let i = 0; i < numParticles; ++i) {
71-
const r = Math.random() * 2.5 + 1;
71+
const r = Math.random() * 3 + 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;
75-
const dy = (Math.random() > 0.5 ? 1 : -1) * Math.random() * 1;
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;
7676

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

8080
if (reqId != null) cancelAnimationFrame(reqId);
@@ -106,11 +106,10 @@ 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 < 120) {
110-
const opacity = 0.25 * (1 - distance / 120);
109+
if (distance < 100) {
111110
ctx.beginPath();
112-
ctx.strokeStyle = `rgba(96, 96, 96, ${opacity})`;
113-
ctx.lineWidth = 0.8;
111+
ctx.strokeStyle = '#606060';
112+
ctx.lineWidth = 1;
114113
ctx.moveTo(p1.x, p1.y);
115114
ctx.lineTo(p2.x, p2.y);
116115
ctx.stroke();

0 commit comments

Comments
 (0)