Skip to content

Commit

Permalink
Added button to see full changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
BERNARDO31P committed Sep 28, 2022
1 parent 6e98cb8 commit 3497e12
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 71 deletions.
2 changes: 1 addition & 1 deletion app/assets/css/style.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/css/style.min.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions app/assets/js/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const {ipcRenderer} = require('electron');
const {ipcRenderer, shell} = require('electron');
import * as tools from "./tools.js";

// TODO: Comment
Expand Down Expand Up @@ -40,4 +40,9 @@ window.onload = async function () {
});

ipcRenderer.send("lang", tools.selectedLang ?? tools.getCookie("lang") ?? "en");
}
}

// TODO: Comment
tools.bindEvent("click", "button[data-href]", function () {
shell.openExternal(this.getAttribute("data-href"));
})
3 changes: 2 additions & 1 deletion app/assets/js/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ export async function getChildProcessRecursive(ppid) {
// TODO: Comment
export function selectOption(option) {
let select = option.closest(".select");
let button = select.querySelector(".button");
let button = select.querySelector("div");

let selected = select.querySelector("[aria-selected='true']");
selected.ariaSelected = "false";
Expand Down Expand Up @@ -807,6 +807,7 @@ export function setTheme(themeSet) {
setCookie("theme", themeSet);
}

// TODO: Comment
function addLeadingZero(string, size) {
let count = Number(size) - string.toString().length;

Expand Down
135 changes: 69 additions & 66 deletions app/assets/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,21 @@ progress::-webkit-progress-bar {
}

settings {
position: absolute;
left: 0;
top: 100%;
z-index: 1;

display: none;

& > div:not(.toggle) {
margin: 15px 0 0 0;
}

.audioSettings, .videoSettings {
display: none;
}

#nav {
margin: 0 !important;
padding: 0 !important;
Expand Down Expand Up @@ -197,6 +212,11 @@ settings {
}
}

#link-count {
font-size: 13px;
opacity: 0;
}

#contextMenu {
position: absolute;

Expand Down Expand Up @@ -257,60 +277,6 @@ settings {
}
}

#info {
background-color: var(--body-background);

z-index: 2;
overflow: auto;

display: none;
position: fixed;

width: 500px;
height: 450px;

left: 0;
right: 0;

margin: 5% auto;
padding: 0 20px;

border-top: 20px solid var(--body-background);
border-bottom: 20px solid var(--body-background);
border-radius: 5px;

box-shadow: 1px 1px 1px var(--shadow-dark), -1px -1px 1px var(--shadow-light);

#dynamic {
white-space: pre-wrap;
}

&.show {
display: initial;

& ~ settings {
filter: blur(2px);
}
}
}

.toggle {
display: inline-flex;
justify-content: center;
align-items: center;

position: absolute;
top: 10px;

border-radius: 20px;
height: 40px;
width: 40px;
}

.theme-toggler {
right: 25px;
}

#info-close {
position: absolute;

Expand Down Expand Up @@ -355,26 +321,63 @@ settings {
}
}

settings {
position: absolute;
left: 0;
top: 100%;
z-index: 1;
#info {
background-color: var(--body-background);

z-index: 2;
overflow: auto;

display: none;
position: fixed;

& > div:not(.toggle) {
margin: 15px 0 0 0;
width: 500px;
height: 450px;

left: 0;
right: 0;

margin: 5% auto;
padding: 0 20px;

border-top: 20px solid var(--body-background);
border-bottom: 20px solid var(--body-background);
border-radius: 5px;

box-shadow: 1px 1px 1px var(--shadow-dark), -1px -1px 1px var(--shadow-light);

#dynamic {
white-space: pre-wrap;
}

.audioSettings, .videoSettings {
display: none;
&.show {
display: initial;

& ~ settings {
filter: blur(2px);
}
}
}

#link-count {
font-size: 13px;
opacity: 0;
.text-button {
padding: 5px 10px;
margin: 10px 0 5px 0;
}

.toggle {
display: inline-flex;
justify-content: center;
align-items: center;

position: absolute;
top: 10px;

border-radius: 20px;
height: 40px;
width: 40px;
}

.theme-toggler {
right: 25px;
}

.divider {
Expand Down
1 change: 1 addition & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<p>© 2022 BERNARDO.FM - All rights reserved</p>
</div>
<div id="dynamic"></div>
<button class="text-button" data-href="https://github.com/BERNARDO31P/FastDownloader/releases">See full changelog</button>
</div>
<main></main>
<settings></settings>
Expand Down

0 comments on commit 3497e12

Please sign in to comment.