Skip to content

Commit bd53f91

Browse files
deadlyjackAjit Kumar
andauthored
fix(big screen ui, global search not working) (#1534)
Co-authored-by: Ajit Kumar <dellevenjack@gmail>
1 parent 6213f9c commit bd53f91

File tree

20 files changed

+507
-489
lines changed

20 files changed

+507
-489
lines changed

src/components/collapsableList.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ export default function collapsableList(
6868

6969
[$title, $mainWrapper].forEach(defineProperties);
7070

71+
$mainWrapper.dataset.id = `${Math.random().toString(36).substring(2, 15)}`;
72+
7173
return $mainWrapper;
7274

7375
function onUlScroll() {

src/components/contextmenu/style.scss

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ body.no-animation {
2929
border: solid 1px transparent;
3030
border: solid 1px var(--popup-border-color);
3131

32-
@media (min-width: 1024px) {
33-
min-width: 260px;
34-
max-width: 400px;
35-
min-height: 48px;
36-
}
37-
3832
&+.mask {
3933
z-index: 110;
4034
}
@@ -101,25 +95,6 @@ body.no-animation {
10195
pointer-events: none;
10296
opacity: 0.5;
10397
}
104-
105-
@media (min-width: 1024px) {
106-
height: 55px;
107-
font-size: 1.05em;
108-
109-
&.notice::after {
110-
font-size: 1.3em;
111-
}
112-
113-
.text {
114-
.value {
115-
font-size: 0.85em;
116-
}
117-
}
118-
119-
.icon {
120-
font-size: 1.1em;
121-
}
122-
}
12398
}
12499

125100
&.hide {

src/components/searchbar/style.scss

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,4 @@
4444
opacity: 0;
4545
transform: translate(0, -100%, 0);
4646
}
47-
48-
@media (min-width: 1024px) {
49-
height: 50px;
50-
51-
input {
52-
margin: 8px;
53-
border-radius: 6px;
54-
font-size: 1.1em;
55-
padding: 0 12px;
56-
}
57-
58-
.icon {
59-
height: 50px;
60-
width: 50px;
61-
font-size: 1.3em;
62-
}
63-
}
6447
}

src/components/sidebar/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import toast from "components/toast";
21
import "./style.scss";
2+
import toast from "components/toast";
33
import Ref from "html-tag-js/ref";
44
import actionStack from "lib/actionStack";
55
import auth, { loginEvents } from "lib/auth";

src/components/sidebar/style.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ body.no-animation {
139139
max-height: 100%;
140140

141141
&.hidden {
142-
max-height: 30px !important;
143-
min-height: 30px !important;
142+
max-height: 30px;
143+
min-height: 30px;
144144
overflow: hidden !important;
145145
}
146146

src/components/tile/style.scss

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ header {
1818
white-space: nowrap;
1919
overflow: auto;
2020
}
21-
22-
@media (min-width: 1024px) {
23-
height: 60px;
24-
25-
>.text {
26-
font-size: 1.4em;
27-
}
28-
}
2921
}
3022
}
3123

@@ -105,12 +97,5 @@ header {
10597
transition: all 100ms ease;
10698
transform: scale(0.95) translateZ(0);
10799
}
108-
109-
@media (min-width: 1024px) {
110-
height: 60px;
111-
width: 60px;
112-
font-size: 2.5em;
113-
background-size: 2em;
114-
}
115100
}
116101
}

src/dialogs/style.scss

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
display: flex;
2525
flex-direction: column;
2626

27-
@media (min-width: 1024px) {
28-
max-width: 400px;
29-
}
30-
3127
&.box {
3228
z-index: 113;
3329
}
@@ -70,27 +66,6 @@
7066
background-position: center;
7167
}
7268
}
73-
74-
@media (min-width: 1024px) {
75-
min-width: 280px;
76-
max-width: 420px;
77-
78-
ul {
79-
padding: 15px;
80-
81-
li {
82-
height: 48px;
83-
font-size: 1.1em;
84-
margin: 2px 0;
85-
padding: 0 8px;
86-
87-
.icon {
88-
font-size: 1.1em;
89-
margin-right: 8px;
90-
}
91-
}
92-
}
93-
}
9469
}
9570

9671
ul {
@@ -121,11 +96,6 @@
12196
justify-content: center;
12297
color: rgb(37, 37, 37);
12398
color: var(--popup-text-color);
124-
125-
@media (min-width: 1024px) {
126-
height: 48px;
127-
font-size: 1.1em;
128-
}
12999
}
130100
}
131101

@@ -158,15 +128,6 @@
158128
min-height: 40px;
159129
margin: 5px 10px 0 10px;
160130
}
161-
162-
@media (min-width: 1024px) {
163-
font-size: 1.35em;
164-
165-
&:not(:empty) {
166-
min-height: 48px;
167-
margin: 8px 15px 0 15px;
168-
}
169-
}
170131
}
171132

172133
.message {
@@ -253,12 +214,6 @@
253214
padding: 10px;
254215
min-height: 40px;
255216
font-size: 1.2em;
256-
257-
@media (min-width: 1024px) {
258-
padding: 15px;
259-
min-height: 48px;
260-
font-size: 1.3em;
261-
}
262217
}
263218
}
264219

@@ -282,21 +237,6 @@
282237
height: 40px;
283238
width: 50%;
284239
}
285-
286-
@media (min-width: 1024px) {
287-
min-height: 48px;
288-
margin: 4px auto;
289-
max-width: 360px;
290-
291-
.hero {
292-
height: 48px;
293-
font-size: 1.3em;
294-
}
295-
296-
.input-checkbox {
297-
height: 48px;
298-
}
299-
}
300240
}
301241

302242
.input {
@@ -320,13 +260,6 @@
320260
border-bottom: solid 1px rgb(51, 153, 255);
321261
border-bottom: solid 1px var(--active-color);
322262
}
323-
324-
@media (min-width: 1024px) {
325-
max-width: 360px;
326-
font-size: 1.1em;
327-
margin: 4px auto;
328-
padding: 4px 0;
329-
}
330263
}
331264

332265
li {

src/lib/openFolder.js

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ function openFolder(_path, opts = {}) {
114114
$root.expand();
115115
},
116116
};
117-
addedFolder.push(folder);
118117

119118
editorManager.emit("update", "add-folder");
120119
editorManager.onupdate("add-folder", event);
@@ -136,6 +135,7 @@ function openFolder(_path, opts = {}) {
136135
}
137136

138137
folder.listFiles = listFiles;
138+
addedFolder.push(folder);
139139
})();
140140

141141
if (listState[_path]) {
@@ -834,29 +834,6 @@ function createFileTile(name, url) {
834834
return $tile;
835835
}
836836

837-
/**
838-
* Create a tail for the tile
839-
* @param {object} param0
840-
* @param {HTMLElement} param0.target
841-
* @returns {HTMLElement}
842-
*/
843-
// function Tail({ target }) {
844-
// return (
845-
// <span
846-
// className="icon more_vert"
847-
// attr-action="close"
848-
// onclick={(e) => {
849-
// e.stopPropagation();
850-
// e.preventDefault();
851-
// handleItems({
852-
// target: target(),
853-
// type: "contextmenu",
854-
// });
855-
// }}
856-
// ></span>
857-
// );
858-
// }
859-
860837
/**
861838
* Add file or folder to the list if expanded
862839
* @param {string} url Url of file or folder to add

src/main.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import "./main.scss";
55
import "res/icons/style.css";
66
import "res/file-icons/style.css";
77
import "styles/overrideAceStyle.scss";
8+
import "styles/wideScreen.scss";
89

910
import "lib/polyfill";
1011
import "ace/supportedModes";
@@ -204,16 +205,6 @@ async function onDeviceReady() {
204205
"data-small-msg",
205206
"This is taking unexpectedly long time!",
206207
);
207-
// share the log file (but currently doesn't work)
208-
// system.fileAction(
209-
// Url.join(DATA_STORAGE, constants.LOG_FILE_NAME),
210-
// constants.LOG_FILE_NAME,
211-
// "SEND",
212-
// "text/plain",
213-
// () => {
214-
// toast(strings["no app found to handle this file"]);
215-
// },
216-
// );
217208
}
218209
}, 1000 * 10);
219210

src/main.scss

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ body {
2727
width: 100%;
2828
height: 100%;
2929
font-size: 14px;
30-
31-
@media (min-width: 1024px) {
32-
font-size: 15px;
33-
}
3430
}
3531

3632
body {
@@ -331,10 +327,6 @@ footer {
331327
user-select: none;
332328
width: 100%;
333329

334-
@media (min-width: 1024px) {
335-
min-height: 45px;
336-
}
337-
338330
&.primary {
339331
button {
340332
color: white !important;
@@ -411,10 +403,6 @@ footer {
411403
.icon {
412404
color: inherit;
413405
font-size: 1.3em;
414-
415-
@media (min-width: 1024px) {
416-
font-size: 1.4em;
417-
}
418406
}
419407

420408
.search,
@@ -441,12 +429,6 @@ input {
441429
border-bottom-color: #a90000 !important;
442430
border-bottom-color: var(--active-color) !important;
443431
}
444-
445-
@media (min-width: 1024px) {
446-
height: 45px;
447-
font-size: 1.1em;
448-
text-indent: 12px;
449-
}
450432
}
451433

452434
input,
@@ -609,14 +591,6 @@ textarea {
609591
&.hide {
610592
opacity: 0 !important;
611593
}
612-
613-
@media (min-width: 1024px) {
614-
height: 65px;
615-
width: 65px;
616-
font-size: 2rem;
617-
top: 15px;
618-
right: 15px;
619-
}
620594
}
621595

622596
button {

0 commit comments

Comments
 (0)