Skip to content

Commit a5e83d6

Browse files
committed
style: Upgrade to Bootstrap v5.3.3
1 parent 4936d7a commit a5e83d6

27 files changed

Lines changed: 380 additions & 373 deletions

package-lock.json

Lines changed: 38 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"@electron/remote": "2.1.2",
99
"@fortawesome/fontawesome-free": "^6.6.0",
1010
"adbkit-apkreader": "3.2.0",
11+
"bootstrap": "^5.3.3",
12+
"bootswatch": "^5.3.3",
1113
"command-exists": "1.2.9",
1214
"compare-versions": "6.1.1",
1315
"electron-find": "1.0.7",

views/browse_include.twig

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="card text-light bg-primary">
22
<div class="card-header sticky" id="nav-panel">
3-
<h4 class="float-left mb-0">
3+
<h4 class="float-start mb-0">
44
<a
55
class="btn btn-md btn-primary"
66
onclick="upDir()"
@@ -20,32 +20,33 @@
2020
</a>
2121
<span id="path"></span>
2222
</h4>
23-
<h4 class="float-right mb-0">
23+
<h4 class="float-end mb-0">
2424
<button
2525
class="btn btn-md btn-primary dropdown-toggle"
2626
type="button"
27-
onclick="$id('bookmarksdropdown').toggle()"
27+
data-bs-toggle="dropdown"
28+
aria-expanded="false"
2829
>
2930
<i class="fa fa-star" title="Bookmarks"></i>
3031
</button>
31-
<div
32+
<ul
3233
id="bookmarksdropdown"
3334
class="dropdown-menu"
3435
style="left: auto; top: auto"
3536
>
36-
<div class="input-group">
37+
<li class="input-group">
3738
<input
3839
id="bookmarkName"
39-
class="ml-3"
40+
class="ms-3"
4041
value=""
4142
placeholder="Bookmark name"
4243
>
43-
<a class="btn btn-warning btn-sm mr-3" id="addBookmark">
44+
<a class="btn btn-warning btn-sm me-3" id="addBookmark">
4445
<i class="fa fa-plus" title="Add current location"></i
4546
></a>
46-
</div>
47+
</li>
4748
<hr>
48-
</div>
49+
</ul>
4950
<a
5051
class="btn btn-md btn-primary"
5152
onclick="refreshDir()"
@@ -63,28 +64,37 @@
6364
<button
6465
class="btn btn-md btn-primary dropdown-toggle"
6566
type="button"
66-
onclick="$id('searchdropdownmenu').toggle()"
67+
data-bs-toggle="dropdown"
68+
aria-expanded="false"
6769
>
6870
<i class="fa fa-sort"></i> Sort By
6971
</button>
70-
<div
71-
id="searchdropdownmenu"
72+
<ul
73+
id="sortdropdownmenu"
7274
class="dropdown-menu"
7375
style="right: 0; left: auto; top: auto"
7476
>
75-
<a class="dropdown-item" onclick="sortFiles('name', 1)">
76-
<i class="fa fa-sort-alpha-asc"></i> Name</a
77-
>
78-
<a class="dropdown-item" onclick="sortFiles('name', 0)">
79-
<i class="fa fa-sort-alpha-desc"></i> Name (decending)</a
80-
>
81-
<a class="dropdown-item" onclick="sortFiles('modified', 1)">
82-
<i class="fa fa-sort-amount-asc"></i> Last modified</a
83-
>
84-
<a class="dropdown-item" onclick="sortFiles('modified', 0)">
85-
<i class="fa fa-sort-amount-desc"></i> Last modified (decending)</a
86-
>
87-
</div>
77+
<li>
78+
<a class="dropdown-item" onclick="sortFiles('name', 1)">
79+
<i class="fa fa-sort-alpha-asc"></i> Name</a
80+
>
81+
</li>
82+
<li>
83+
<a class="dropdown-item" onclick="sortFiles('name', 0)">
84+
<i class="fa fa-sort-alpha-desc"></i> Name (decending)</a
85+
>
86+
</li>
87+
<li>
88+
<a class="dropdown-item" onclick="sortFiles('modified', 1)">
89+
<i class="fa fa-sort-amount-asc"></i> Last modified</a
90+
>
91+
</li>
92+
<li>
93+
<a class="dropdown-item" onclick="sortFiles('modified', 0)">
94+
<i class="fa fa-sort-amount-desc"></i> Last modified (decending)</a
95+
>
96+
</li>
97+
</ul>
8898
</h4>
8999
</div>
90100
<div class="card-body">

views/css/bootstrap-slate.min.css

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

views/css/bootstrap.min.css

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

views/css/main.css

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ a {
4040
.badge {
4141
text-shadow: none;
4242
}
43-
.badge-success {
43+
.bg-success {
4444
background: #5a4;
4545
}
4646
.alert-warning {
@@ -250,6 +250,16 @@ html {
250250
overflow-y: scroll;
251251
}
252252

253+
.small,
254+
small {
255+
font-size: 0.75em;
256+
}
257+
258+
.form-check-input:checked {
259+
background-color: #bfbfbf;
260+
border-color: #bfbfbf;
261+
}
262+
253263
/* width */
254264
::-webkit-scrollbar {
255265
width: 6pt;
@@ -366,3 +376,11 @@ html {
366376
#installedmodaldiv .modal-content {
367377
min-height: 700px;
368378
}
379+
380+
#bookmarksdropdown a {
381+
text-decoration: none;
382+
}
383+
384+
#bookmarksdropdown a:hover {
385+
text-decoration: underline;
386+
}

views/device_info.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
const danger = Math.min(5, Math.max(0, percent - 95));
2121
2222
id('storageDiv').innerHTML = `
23-
<small class="pull-left">Used: ${storage.used} of ${storage.size}(${storage.percent})</small>
24-
<small class="pull-right">Free: ${storage.free}</small><br/>
23+
<small class="float-start">Used: ${storage.used} of ${storage.size}(${storage.percent})</small>
24+
<small class="float-end">Free: ${storage.free}</small><br/>
2525
<div class="progress">
2626
<div class="progress-bar progress-bar-striped bg-success" role="progressbar" style="width: ${success}%" aria-valuenow="${success}" aria-valuemin="0" aria-valuemax="100"></div>
2727
<div class="progress-bar progress-bar-striped bg-warning" role="progressbar" style="width: ${warning}%" aria-valuenow="${warning}" aria-valuemin="0" aria-valuemax="100"></div>

views/index.twig

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@
2222
Sidenoder Dir: {{ sidenoderHome }}
2323
</h4>
2424
<h4>
25-
<div class="badge badge-warning text-left" id="adbCheckIndicator">
25+
<div class="badge bg-warning text-start" id="adbCheckIndicator">
2626
Android Debug Bridge - checking..
2727
</div>
2828
</h4>
2929
<h4>
30-
<div class="badge badge-warning text-left" id="rcloneCheckIndicator">
30+
<div class="badge bg-warning text-start" id="rcloneCheckIndicator">
3131
RCLONE - checking..
3232
</div>
3333
</h4>
3434
<h4>
35-
<div class="badge badge-warning text-left" id="zipCheckIndicator">
35+
<div class="badge bg-warning text-start" id="zipCheckIndicator">
3636
7zip Archiver - checking..
3737
</div>
3838
</h4>
3939
<h4>
40-
<div class="badge badge-warning text-left" id="scrcpyCheckIndicator">
40+
<div class="badge bg-warning text-start" id="scrcpyCheckIndicator">
4141
SCRCPY - checking..
4242
</div>
4343
</h4>
@@ -61,12 +61,12 @@
6161
if (adb) {
6262
const el = $id('adbCheckIndicator');
6363
if (adb.version) {
64-
el.removeClass('badge-warning').addClass('badge-success')
64+
el.removeClass('bg-warning').addClass('bg-success')
6565
.html(`<i class="fa fa-check-circle-o"></i> ADB Instaled (${adb.cmd})
6666
<br/><pre style="font-size: x-small;">${adb.version}</pre>`);
6767
} else {
68-
el.removeClass('badge-warning')
69-
.addClass('badge-danger')
68+
el.removeClass('bg-warning')
69+
.addClass('bg-danger')
7070
.html(
7171
`<i class="fa fa-times-circle"></i> ADB Failed. Maybe global installation will be fixed this issue`,
7272
);
@@ -80,12 +80,12 @@
8080
if (rclone) {
8181
const el = $id('rcloneCheckIndicator');
8282
if (rclone.version) {
83-
el.removeClass('badge-warning').addClass('badge-success')
83+
el.removeClass('bg-warning').addClass('bg-success')
8484
.html(`<i class="fa fa-check-circle-o"></i> RCLONE Installed (${rclone.cmd})
8585
<br/><pre style="font-size: x-small;">${rclone.version}</pre>`);
8686
if (remote.getGlobal('currentConfiguration').autoMount) checkMount();
8787
} else {
88-
el.removeClass('badge-warning').addClass('badge-danger')
88+
el.removeClass('bg-warning').addClass('bg-danger')
8989
.html(`<i class="fa fa-times-circle-o"></i>
9090
Can't find RCLONE - try to manualy download latest <a class="btn btn-sm btn-info" onclick="shell.openExternal('https://downloads.rclone.org/')">RClone</a> and set custom location at settings`);
9191
if (rclone.error)
@@ -98,11 +98,11 @@
9898
if (zip) {
9999
const el = $id('zipCheckIndicator');
100100
if (zip.version) {
101-
el.removeClass('badge-warning').addClass('badge-success')
101+
el.removeClass('bg-warning').addClass('bg-success')
102102
.html(`<i class="fa fa-check-circle-o"></i> 7zip Archiver installed (${zip.cmd})
103103
<br/><pre style="font-size: x-small;">${zip.version}</pre>`);
104104
} else {
105-
el.removeClass('badge-warning').addClass('badge-danger')
105+
el.removeClass('bg-warning').addClass('bg-danger')
106106
.html(`<i class="fa fa-times-circle-o"></i>
107107
Can't find 7zip Archiver - try to manualy download latest <a class="btn btn-sm btn-info" onclick="shell.openExternal('https://www.7-zip.org/download.html')">7ZIP</a> and set custom location at settings`);
108108
if (zip.error)
@@ -115,8 +115,8 @@
115115
if (scrcpy) {
116116
const el = $id('scrcpyCheckIndicator');
117117
if (scrcpy.version) {
118-
el.removeClass('badge-warning')
119-
.addClass('badge-success')
118+
el.removeClass('bg-warning')
119+
.addClass('bg-success')
120120
.html(
121121
`<i class="fa fa-check-circle-o"></i> SCRCPY Installed (${scrcpy.cmd})<br/><pre style="font-size: x-small;">${scrcpy.version}</pre>`,
122122
);
@@ -125,7 +125,7 @@
125125
.getGlobal('platform')
126126
.replace('win', 'windows')
127127
.replace('mac', 'macos');
128-
el.removeClass('badge-warning').addClass('badge-danger')
128+
el.removeClass('bg-warning').addClass('bg-danger')
129129
.html(`<i class="fa fa-times-circle-o"></i>
130130
SCRCPY global installation not found, please read the <a class="btn btn-sm btn-info" onclick="shell.openExternal('https://github.com/Genymobile/scrcpy#${tag}')">MANUAL</a>`);
131131
if (scrcpy.error)

views/js/bootstrap.min.js

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

views/js/bootstrap.min.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)