removed redundant restore button, WIP’d mail button, move theme assets on render

This commit is contained in:
Ro 2021-04-27 01:28:11 +00:00
parent 4d44ea2a06
commit c89fe5be30
4 changed files with 22 additions and 17 deletions

View file

@ -23,6 +23,21 @@ class Render
"description" => $settings["global"]["descriptions"], "description" => $settings["global"]["descriptions"],
"image" => $settings["global"]["background"], "image" => $settings["global"]["background"],
]; ];
//copy current theme assets to public
if (is_file("../public/assets/css/base.css")) {
unlink("../public/assets/css/base.css");
}
copy(
"../content/themes/" . $this->theme . "/assets/css/base.css",
"../public/assets/css/base.css"
);
if (is_file("../public/assets/scripts/start.min.js")) {
unlink("../public/assets/scripts/start.min.js");
}
copy(
"../content/themes/" . $this->theme . "/assets/scripts/start.min.js",
"../public/assets/scripts/start.min.js"
);
} }
public function renderPages() public function renderPages()

View file

@ -69,8 +69,6 @@
{% else %} {% else %}
<span>span No back ups. Frowny face.</span> <span>span No back ups. Frowny face.</span>
{% endif %} {% endif %}
<button id="restore-backup" for='backup-upload'>RESTORE BACKUP</button>
<input id="backup-upload" type="file" name="backup-upload" />
</div> </div>
<div id="util-2" class="column"> <div id="util-2" class="column">
<label> MAINTENANCE </label><br /> <label> MAINTENANCE </label><br />

File diff suppressed because one or more lines are too long

View file

@ -42,9 +42,6 @@ export default class SettingsIndex {
document.getElementById("background").addEventListener("click", () => { document.getElementById("background").addEventListener("click", () => {
document.getElementById("background-upload").click(); document.getElementById("background-upload").click();
}); });
document.getElementById("restore-backup").addEventListener("click", () => {
document.getElementById("backup-upload").click();
});
document.getElementById("avatar-upload").addEventListener( document.getElementById("avatar-upload").addEventListener(
"change", "change",
(e) => { (e) => {
@ -59,13 +56,7 @@ export default class SettingsIndex {
}, },
false false
); );
document.getElementById("backup-upload").addEventListener(
"change",
(e) => {
self.handleBackup(e);
},
false
);
//handle privacy toggle //handle privacy toggle
//document //document
//.getElementById('privacy-toggle') //.getElementById('privacy-toggle')
@ -124,8 +115,9 @@ export default class SettingsIndex {
} }
} }
handleMailer() { handleMailer() {
let mailer = new Mailer(); //let mailer = new Mailer();
mailer.sendMail(); //mailer.sendMail();
notify.alert("Mail will be active soon. Hang tight", true);
} }
handleThemes(e) { handleThemes(e) {
e.stopPropagation(); e.stopPropagation();