Skip to content

Commit 161a098

Browse files
author
Ajit Kumar
committed
feat(using cron npm library)
1 parent 3768b0f commit 161a098

26 files changed

Lines changed: 1381 additions & 1181 deletions

.github/workflows/deploy.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ jobs:
2525
sudo apt-get install -y git
2626
fi
2727
cd ~/sites/acode.app
28+
git restore .
2829
git pull
29-
yarn install
30-
yarn build-release
30+
npm install
31+
npm run build
3132
pm2 restart acode.app

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"pallete",
6666
"pubsite",
6767
"rgba",
68+
"salesreport",
6869
"sdcard",
6970
"settitle",
7071
"showloading",

client/components/plugins/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,10 @@ function Plugin({
6868
<div title='Downloads counter'>
6969
{downloads.toLocaleString()} <span className='icon download' />
7070
</div>
71-
{status ? (
71+
{Boolean(status) && (
7272
<span data-id={id} onclick={isAdmin ? changePluginStatus : undefined} title='Plugin status' className={`status-indicator ${status}`}>
7373
{status}
7474
</span>
75-
) : (
76-
''
7775
)}
7876
<div>{calcRating(upVotes, downVotes)}</div>
7977
{comments > 0 && (

client/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ window.onload = async () => {
5454
Router.add('/edit-user', () => loadModule('registerUser', { mode: 'edit' }));
5555
Router.add('/publish', (_params, query) => loadModule('publishPlugin', query));
5656
Router.add('/plugin/:id/:section?', (params) => loadModule('plugin', params));
57-
Router.add('/user/:userEmail?', (params) => loadModule('user', params));
57+
Router.add('/user/:userId?', (params) => loadModule('user', params));
5858
Router.add('/earnings', (_params, query) => loadModule('earnings', query));
5959
Router.add('/:filename(index.html?)?', () => loadModule('home'));
6060

client/pages/plugin/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export default async function Plugin({ id: pluginId, section = 'description' })
3131
user_id: userId,
3232
votes_up: votesUp,
3333
votes_down: votesDown,
34-
author_email: authorEmail,
3534
comment_count: commentCount,
3635
author_verified: authorVerified,
3736
} = plugin;
@@ -139,7 +138,7 @@ export default async function Plugin({ id: pluginId, section = 'description' })
139138
</div>
140139
<div className='info'>
141140
<span className='chip'>
142-
<a href={`/user/${authorEmail}`}>{author}</a>&nbsp;{!!authorVerified && <span className='icon verified' />}
141+
<a href={`/user/${userId}`}>{author}</a>&nbsp;{!!authorVerified && <span className='icon verified' />}
143142
</span>
144143
{repository && (
145144
<a className='chip' href={repository}>

client/pages/plugins/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default async function PluginList({ filter }) {
1616
<section style={{ padding: '20px 0' }} id='plugins'>
1717
<div className='header'>
1818
<h1 ref={title}>Plugins</h1>
19-
{loggedInUser?.isAdmin ? (
19+
{loggedInUser?.isAdmin && (
2020
<nav>
2121
<span className='link' onclick={updatePlugins} data-filter='all'>
2222
All
@@ -34,8 +34,6 @@ export default async function PluginList({ filter }) {
3434
Deleted
3535
</span>
3636
</nav>
37-
) : (
38-
''
3937
)}
4038
<nav>
4139
<span className='link' onclick={updatePlugins} data-filter='newest'>

client/pages/user/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ import moment from 'moment';
1010
import Earnings from 'pages/earnings';
1111
import userImage from 'res/user.png';
1212

13-
export default async function User({ userEmail }) {
13+
export default async function User({ userId }) {
1414
const amount = Ref();
1515
const loggedInUser = await getLoggedInUser();
1616
let user;
1717

18-
if (userEmail) {
18+
if (userId) {
1919
try {
20-
const res = await fetch(`/api/user/${userEmail}`);
20+
const res = await fetch(`/api/user/${userId}`);
2121
user = await res.json();
2222

2323
if (user.error) {
@@ -98,7 +98,7 @@ export default async function User({ userEmail }) {
9898
{isSelf ? <a href='/publish'>Publish Plugin</a> : ''}
9999
</div>
100100
</div>
101-
<Plugins user={user?.email || userEmail} />
101+
<Plugins user={userId} />
102102
</section>
103103
);
104104

client/res/icons/style.css

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -20,156 +20,156 @@
2020
-moz-osx-font-smoothing: grayscale;
2121
}
2222

23-
.certificate:before {
23+
.icon.certificate:before {
2424
content: "\e90d";
2525
}
2626

27-
.bitcoin:before {
27+
.icon.bitcoin:before {
2828
content: "\e90c";
2929
color: #f7931a;
3030
}
3131

32-
.github:before {
32+
.icon.github:before {
3333
content: "\e901";
3434
}
3535

36-
.paypal:before {
36+
.icon.paypal:before {
3737
content: "\e905";
3838
color: #00457c;
3939
}
4040

41-
.navigate_next:before {
41+
.icon.navigate_next:before {
4242
content: "\e90a";
4343
}
4444

45-
.navigate_before:before {
45+
.icon.navigate_before:before {
4646
content: "\e90b";
4747
}
4848

49-
.chevron_left:before {
49+
.icon.chevron_left:before {
5050
content: "\e90b";
5151
}
5252

53-
.verified:before {
53+
.icon.verified:before {
5454
content: "\e909";
5555
}
5656

57-
.star_outline:before {
57+
.icon.star_outline:before {
5858
content: "\e906";
5959
}
6060

61-
.star:before {
61+
.icon.star:before {
6262
content: "\e907";
6363
}
6464

65-
.favorite:before {
65+
.icon.favorite:before {
6666
content: "\e908";
6767
}
6868

69-
.account_balance:before {
69+
.icon.account_balance:before {
7070
content: "\e904";
7171
}
7272

73-
.warning:before {
73+
.icon.warning:before {
7474
content: "\e903";
7575
}
7676

77-
.chat_bubble:before {
77+
.icon.chat_bubble:before {
7878
content: "\e96d";
7979
}
8080

81-
.add:before {
81+
.icon.add:before {
8282
content: "\e992";
8383
}
8484

85-
.clear:before {
85+
.icon.clear:before {
8686
content: "\e999";
8787
}
8888

89-
.content_copy:before {
89+
.icon.content_copy:before {
9090
content: "\e99a";
9191
}
9292

93-
.create:before {
93+
.icon.create:before {
9494
content: "\e99d";
9595
}
9696

97-
.flag:before {
97+
.icon.flag:before {
9898
content: "\e9a0";
9999
}
100100

101-
.report:before {
101+
.icon.report:before {
102102
content: "\e9ab";
103103
}
104104

105-
.outlined_flag:before {
105+
.icon.outlined_flag:before {
106106
content: "\e9b9";
107107
}
108108

109-
.access_time:before {
109+
.icon.access_time:before {
110110
content: "\e9c7";
111111
}
112112

113-
.publish:before {
113+
.icon.publish:before {
114114
content: "\ea26";
115115
}
116116

117-
.download:before {
117+
.icon.download:before {
118118
content: "\ea46";
119119
}
120120

121-
.menu:before {
121+
.icon.menu:before {
122122
content: "\eb58";
123123
}
124124

125-
.refresh:before {
125+
.icon.refresh:before {
126126
content: "\eb5b";
127127
}
128128

129-
.person:before {
129+
.icon.person:before {
130130
content: "\ebad";
131131
}
132132

133-
.share:before {
133+
.icon.share:before {
134134
content: "\ebb3";
135135
}
136136

137-
.delete:before {
137+
.icon.delete:before {
138138
content: "\ebe1";
139139
}
140140

141-
.done:before {
141+
.icon.done:before {
142142
content: "\ebe4";
143143
}
144144

145-
.done_all:before {
145+
.icon.done_all:before {
146146
content: "\ebe5";
147147
}
148148

149-
.thumb_down:before {
149+
.icon.thumb_down:before {
150150
content: "\ec34";
151151
}
152152

153-
.thumb_up:before {
153+
.icon.thumb_up:before {
154154
content: "\ec35";
155155
}
156156

157-
.logout:before {
157+
.icon.logout:before {
158158
content: "\ece8";
159159
}
160160

161-
.thumb_down_alt:before {
161+
.icon.thumb_down_alt:before {
162162
content: "\ed07";
163163
}
164164

165-
.thumb_up_alt:before {
165+
.icon.thumb_up_alt:before {
166166
content: "\ed08";
167167
}
168168

169-
.mail:before {
169+
.icon.mail:before {
170170
content: "\e902";
171171
}
172172

173-
.earth:before {
173+
.icon.earth:before {
174174
content: "\e900";
175175
}

cron-jobs/daily.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

cron-jobs/monthly.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)