Skip to content

Commit 8757ad5

Browse files
author
Ajit Kumar
committed
fix(UI for firefox)
1 parent a4243ca commit 8757ad5

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

client/components/plugins/index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import AdSense from 'components/adsense';
21
import './style.scss';
2+
import AdSense from 'components/adsense';
33
import alert from 'components/dialogs/alert';
44
import confirm from 'components/dialogs/confirm';
55
import prompt from 'components/dialogs/prompt';
66
import select from 'components/dialogs/select';
7-
import DotsLoading from 'components/dots';
87
import Router from 'lib/Router';
98
import { calcRating, capitalize, getLoggedInUser, hideLoading, showLoading } from 'lib/helpers';
109

@@ -29,10 +28,12 @@ export default function Plugins({ user, orderBy, status, name }) {
2928
const res = await fetch(url);
3029
const { isAdmin, id: userId } = (await getLoggedInUser()) || {};
3130
const plugins = await res.json();
31+
const adsPosition = [2, 15, 28];
3232

3333
el.setAttribute('data-msg', 'No plugins found. :(');
34-
for (const plugin of plugins) {
35-
if (Math.random() < 0.1) {
34+
for (let i = 0; i < plugins.length; i++) {
35+
const plugin = plugins[i];
36+
if (adsPosition.includes(i) || (i > 33 && Math.random() < 0.1)) {
3637
el.append(<AdSense className='plugin' style={{ position: 'relative' }} />);
3738
}
3839
el.append(<Plugin {...plugin} isAdmin={isAdmin} userId={userId} />);
@@ -86,7 +87,7 @@ function Plugin({
8687
)}
8788
</div>
8889
<p>
89-
{id}{' '}
90+
{id}&nbsp;•&nbsp;
9091
<small>
9192
<strong>{version}</strong>
9293
</small>

client/main.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ header {
219219

220220
main {
221221
width: 100%;
222+
min-height: 100%;
222223

223224
&:empty {
224225
position: relative;

client/pages/home/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
justify-content: center;
77
flex-direction: column;
88
text-align: center;
9-
min-height: 100%;
9+
min-height: calc(100vh - 50px);
1010
scrollbar-width: none; // hide scrollbar in Firefox
1111

1212
// hide scrollbar

client/pages/loginUser/style.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,19 @@
44
flex-direction: column;
55
align-items: center;
66
justify-content: center;
7-
min-height: 100%;
7+
min-height: calc(100vh - 50px);
88
width: 100%;
99
max-width: unset;
1010
background-color: transparent;
1111
z-index: 1;
1212

1313
form {
1414
width: 90%;
15+
max-width: 400px;
16+
17+
h1 {
18+
margin-top: 0;
19+
}
1520
}
1621

1722
&::before {

client/pages/plugin/style.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@
5353
overflow: auto;
5454
scrollbar-width: none;
5555

56+
h2 {
57+
margin: 0;
58+
}
59+
5660
>* {
5761
cursor: pointer;
5862
padding: 10px;

0 commit comments

Comments
 (0)