aboutsummaryrefslogtreecommitdiff
path: root/p
diff options
context:
space:
mode:
authorGravatar maTh <math-home@web.de> 2023-06-13 22:39:33 +0200
committerGravatar GitHub <noreply@github.com> 2023-06-13 22:39:33 +0200
commit3d9e0c47ecb19fea4f194d3a4a81d7d931e2bc0b (patch)
tree52ca8a7131822807d5cd1e7188b42100594d2988 /p
parent67130bca3aa0a8d225c43df57a08cf8c81995136 (diff)
Improved: update page (#5420)
* prependTitle() * do not need the "damn" in the alert * update page layout improved * release channel * i18n labels * add log messages while updating * Delete updatee.php * Update updateController.php * Update updateController.php * Update updateController.php * Update updateController.php * add getCurrentGitBranch() * Update updateController.php * state2 buttons * i18n * loading * Update feedback.php * Update feedback.php * Update feedback.php * Update extra.js * Apply suggestions from code review Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> * Update updateController.php * Update terminology * update button is now armed --------- Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'p')
-rw-r--r--p/scripts/extra.js12
-rw-r--r--p/themes/Origine/origine.css18
-rw-r--r--p/themes/Origine/origine.rtl.css18
3 files changed, 48 insertions, 0 deletions
diff --git a/p/scripts/extra.js b/p/scripts/extra.js
index 08037b1d2..8fa0a5c5c 100644
--- a/p/scripts/extra.js
+++ b/p/scripts/extra.js
@@ -261,6 +261,17 @@ function data_leave_validation(parent, excludeForm = null) {
return true;
}
+function init_2stateButton() {
+ const btns = document.getElementsByClassName('btn-state1');
+ Array.prototype.forEach.call(btns, function (el) {
+ el.addEventListener('click', function () {
+ const btnState2 = document.getElementById(el.dataset.state2Id);
+ btnState2.classList.add('show');
+ this.classList.add('hide');
+ });
+ });
+}
+
function init_configuration_alert() {
window.onsubmit = function (e) {
window.hasSubmit = data_leave_validation(document.body, e.submitter ? e.submitter.form : null);
@@ -288,6 +299,7 @@ function init_extra_afterDOM() {
init_password_observers(document.body);
init_select_observers();
init_configuration_alert();
+ init_2stateButton();
const slider = document.getElementById('slider');
if (slider) {
diff --git a/p/themes/Origine/origine.css b/p/themes/Origine/origine.css
index 1538bbce8..34d6ce451 100644
--- a/p/themes/Origine/origine.css
+++ b/p/themes/Origine/origine.css
@@ -283,6 +283,24 @@ form th {
text-decoration: none;
}
+.btn-state1.hide {
+ display: none;
+}
+
+.btn-state2 {
+ display: none;
+}
+
+.btn-state2.show {
+ display: inline-block;
+}
+
+#button-update-loading {
+ background: var(--frss-loading-image) 0.5rem center no-repeat;
+ background-size: 1rem;
+ padding-left: 2rem;
+}
+
a:hover .icon {
filter: brightness(1.5);
transition: 0.1s linear;
diff --git a/p/themes/Origine/origine.rtl.css b/p/themes/Origine/origine.rtl.css
index f4e647ebb..285c514c0 100644
--- a/p/themes/Origine/origine.rtl.css
+++ b/p/themes/Origine/origine.rtl.css
@@ -283,6 +283,24 @@ form th {
text-decoration: none;
}
+.btn-state1.hide {
+ display: none;
+}
+
+.btn-state2 {
+ display: none;
+}
+
+.btn-state2.show {
+ display: inline-block;
+}
+
+#button-update-loading {
+ background: var(--frss-loading-image) 0.5rem center no-repeat;
+ background-size: 1rem;
+ padding-right: 2rem;
+}
+
a:hover .icon {
filter: brightness(1.5);
transition: 0.1s linear;