Skip to content

Commit dd289e4

Browse files
author
Ajit Kumar
committed
fix(removed hardcoded color, fix prompt input autocapitalize)
1 parent 401808e commit dd289e4

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/dialogs/prompt.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import appSettings from "lib/settings";
88
* @property {RegExp} [match]
99
* @property {boolean} [required]
1010
* @property {string} [placeholder]
11+
* @property {boolean} [capitalize] - If true, the first letter of the input will be capitalized
1112
* @property {(any)=>boolean} [test]
1213
*/
1314

@@ -28,8 +29,9 @@ export default function prompt(
2829
) {
2930
const commands = editorManager.editor.commands;
3031
const originalExec = commands.exec;
32+
const { capitalize = true } = options;
3133

32-
commands.exec = () => {}; // Disable all shortcuts
34+
commands.exec = () => { }; // Disable all shortcuts
3335

3436
return new Promise((resolve) => {
3537
const inputType = type === "textarea" ? "textarea" : "input";
@@ -43,6 +45,7 @@ export default function prompt(
4345
value: defaultValue,
4446
className: "input",
4547
placeholder: options.placeholder,
48+
autocapitalize: capitalize ? "on" : "off",
4649
});
4750
const okBtn = tag("button", {
4851
type: "submit",

src/lib/commands.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ export default {
345345

346346
let newname = await prompt(strings.rename, file.filename, "filename", {
347347
match: constants.FILE_NAME_REGEX,
348+
capitalize: false,
348349
});
349350

350351
newname = helpers.fixFilename(newname);

src/pages/sponsor/style.scss

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
.header {
3737
text-align: center;
38-
margin-bottom: 30px;
38+
margin-bottom: 10px;
3939
animation: fadeInUp 0.8s ease-out;
4040
}
4141

@@ -74,7 +74,6 @@
7474
h1 {
7575
font-size: 28px;
7676
font-weight: 700;
77-
margin-bottom: 10px;
7877
}
7978

8079
.subtitle {
@@ -87,12 +86,12 @@
8786
width: 90%;
8887
max-width: 400px;
8988
margin: 0 auto;
90-
background: rgba(255, 255, 255, 0.15);
9189
border-radius: 16px;
9290
padding: 20px;
9391
margin-bottom: 15px;
94-
backdrop-filter: blur(10px);
95-
border: 1px solid var(--border-color);
92+
background-color: var(--popup-background-color);
93+
color: var(--popup-text-color);
94+
border: 1px solid var(--popup-border-color);
9695
transition: all 0.3s ease;
9796
animation: fadeInUp 0.8s ease-out calc(0.6s + var(--delay, 0s)) both;
9897
box-sizing: border-box;

src/pages/sponsors/style.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
font-weight: 600;
4646
cursor: pointer;
4747
transition: all 0.3s ease;
48-
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
4948
margin-bottom: 15px;
5049
width: 90%;
5150
max-width: 400px;
@@ -55,7 +54,6 @@
5554
margin: auto;
5655

5756
.icon {
58-
color: #6b6bff;
5957
margin-left: 10px;
6058
}
6159
}
@@ -69,7 +67,6 @@
6967

7068
.sponsors-container {
7169
padding: 1rem;
72-
margin-top: 2rem;
7370

7471
h2 {
7572
text-align: center;
@@ -109,7 +106,7 @@
109106
padding: 15px;
110107
text-align: center;
111108
backdrop-filter: blur(10px);
112-
border: 1px solid var(--border-color);
109+
border: 1px solid var(--popup-border-color);
113110
transition: all 0.3s ease;
114111

115112
.sponsor-avatar {

0 commit comments

Comments
 (0)