Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
198 changes: 189 additions & 9 deletions css/ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ button:disabled {
background: #939393;
cursor: not-allowed;
}
label {
color: #bdbdbd;
font-size: 14px;
}
#status {
margin-top: 10px;
font-size: 14px;
Expand All @@ -46,18 +50,27 @@ button:disabled {
background-color: var(--primary-color);
border-radius: 8px;
}
#rateLimitInput, #formatSelector {
width: 60px;
padding: 4px;
#cover {
display: none;
float: left;
width: 80px;
height: auto;
margin-right: 10px;
}
#rateLimitInput {
width: 80px;
padding: 6px;
font-size: 14px;
margin-left: 8px;
margin-right: 8px;
text-align: center;
background: #252527;
color: #fff;
border: 1px solid #444;
border-radius: 4px;
-moz-appearance: textfield;
}
#rateLimitInput:focus, #rateLimitInput:hover, #formatSelector:focus, #formatSelector:hover {
#rateLimitInput:focus, #rateLimitInput:hover {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 5px var(--primary-color);
Expand All @@ -71,21 +84,37 @@ input[type="number"] {
-moz-appearance: none;
-webkit-appearance: none;
}
#formatSelector {
#maxSizeInput {
width: 80px;
padding: 6px;
font-size: 14px;
margin-left: 8px;
margin-right: 8px;
text-align: center;
background: #252527;
color: #fff;
border: 1px solid #444;
border-radius: 4px;
-moz-appearance: textfield;
}
#maxSizeInput, #maxChaptersInput {
width: 60px;
padding: 4px;
#maxSizeInput:focus, #maxSizeInput:hover {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 5px var(--primary-color);
}
#maxChaptersInput {
width: 80px;
padding: 6px;
font-size: 14px;
margin-left: 8px;
margin-right: 8px;
text-align: center;
background: #252527;
color: #fff;
border: 1px solid #444;
border-radius: 4px;
-moz-appearance: textfield;
}
#maxSizeInput:focus, #maxSizeInput:hover,
#maxChaptersInput:focus, #maxChaptersInput:hover {
outline: none;
border-color: var(--primary-color);
Expand All @@ -98,3 +127,154 @@ input[type="number"] {
-webkit-appearance: none;
margin: 0;
}
#releaseDate {
text-align: center;
color: #bdbdbd;
font-size: 12px;
margin-top: 8px;
margin-bottom: 8px;
}
#formatContainer {
text-align: center;
margin-top: 10px;
margin-bottom: 10px;
}
#formatSelector {
width: 80px;
padding: 6px;
font-size: 14px;
margin-left: 8px;
margin-right: 8px;
text-align: center;
background: #252527;
color: #fff;
border: 1px solid #444;
border-radius: 4px;
-moz-appearance: textfield;
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Этот селектор уже определён на строке 49. Стоит убрать его оттуда и прописать только здесь.

#formatSelector:focus, #formatSelector:hover {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 5px var(--primary-color);
}
#rateLimitContainer {
text-align: center;
margin-top: 10px;
margin-bottom: 10px;
}
#activeDownloadsInfo {
text-align: center;
color: #bdbdbd;
font-size: 12px;
margin-top: 8px;
margin-bottom: 8px;
display: none;
}
#fileInputContainer {
text-align: center;
margin-top: 10px;
margin-bottom: 10px;
}
#fileInput {
display: none;
}
#customFileBtn {
padding: 8px 16px;
cursor: pointer;
font-size: 14px;
transition: all 0.3s ease;
}
#downloadControls {
display: none;
text-align: center;
margin-top: 10px;
}
#pauseBtn {
padding: 8px 16px;
cursor: pointer;
width: calc(50% - 4px);
transition: all 0.3s ease;
}
#backgroundBtn {
padding: 8px 16px;
cursor: pointer;
width: calc(50% - 4px);
transition: all 0.3s ease;
}
#pauseBtn, #backgroundBtn, #customFileBtn {
border: 2px solid var(--primary-color) !important;
background: #252527 !important;
}
#pauseBtn:hover, #backgroundBtn:hover, #customFileBtn:hover {
border: 2px solid var(--secondary-color) !important;
background: #252527 !important;
}
#stopBtn {
margin-top: 12px;
padding: 8px 16px;
cursor: pointer;
display: block;
width: 100%;
transition: all 0.3s ease;
}
#btnRow {
display: flex;
justify-content: space-between;
}
#splitModeContainer {
text-align: center;
margin-top: 10px;
margin-bottom: 5px;
}
#chapterRangeContainer {
text-align: center;
margin-top: 10px;
margin-bottom: 10px;
display: none;
}
#chapterSelectRow {
display: flex;
justify-content: space-between;
align-items: center;
}
#chapterFromLabel {
color: #bdbdbd;
font-size: 14px;
margin-bottom: 2px;
width: 50%;
text-align: center;
}
#chapterToLabel{
color: #bdbdbd;
font-size: 14px;
margin-bottom: 2px;
width: 50%;
text-align: center;
}
#chapterLabelsRow{
display: flex;
justify-content: space-between;
}
#chapterFromSelect {
padding: 8px 16px;
font-size: 14px;
width: calc(50% - 4px);
cursor: pointer;
border: 2px solid var(--primary-color);
background: #252527;
color: #bdbdbd;
transition: all 0.3s ease;
}
#chapterToSelect {
padding: 8px 16px;
font-size: 14px;
width: calc(50% - 4px);
cursor: pointer;
border: 2px solid var(--primary-color);
background: #252527;
color: #bdbdbd;
transition: all 0.3s ease;
}
#chapterToSelect:hover, #chapterFromSelect:hover {
border: 2px solid var(--secondary-color);
}
30 changes: 1 addition & 29 deletions tests/ui/PopupController.new.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -782,34 +782,6 @@ describe('PopupController second test file', () => {
expect(fromSelect.value).toBe('1');
});

it('Changes fromSelect border on mouseenter and restores on mouseleave', async () => {
const controller = new PopupController();

await new Promise(resolve => setTimeout(resolve, 100));

const fromSelect = document.getElementById('chapterFromSelect');

fromSelect.dispatchEvent(new Event('mouseenter'));
expect(fromSelect.style.border).toBe('2px solid var(--secondary-color)');

fromSelect.dispatchEvent(new Event('mouseleave'));
expect(fromSelect.style.border).toBe('2px solid var(--primary-color)');
});

it('Changes toSelect border on mouseenter and restores on mouseleave', async () => {
const controller = new PopupController();

await new Promise(resolve => setTimeout(resolve, 100));

const toSelect = document.getElementById('chapterToSelect');

toSelect.dispatchEvent(new Event('mouseenter'));
expect(toSelect.style.border).toBe('2px solid var(--secondary-color)');

toSelect.dispatchEvent(new Event('mouseleave'));
expect(toSelect.style.border).toBe('2px solid var(--primary-color)');
});

it('Logs no saved format when localStorage has no format and logs UI setup complete', async () => {
const logSpy = vi.spyOn(console, 'log');

Expand Down Expand Up @@ -966,4 +938,4 @@ describe('PopupController second test file', () => {
controller.resetUI();
expect(splitModeContainer.style.display).toBe('block');
});
});
});
Loading
Loading