mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
Feature: Implement Mobile Responsiveness (#2092)
* WIP * WIP * WIP * WIP * WIP * WIP * WIP * format * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * fix conflict * fix conflict * chore: run rubocop * fix test * update PWA logo * fix tests * chore: lint * fix test * Refactor: Remove duplicate data attribute in activity partial and add chat form rendering in chats index --------- Co-authored-by: Josh Pigford <josh@joshpigford.com>
This commit is contained in:
@@ -8,6 +8,9 @@ export default class extends Controller {
|
||||
"deleteProfileImage",
|
||||
"input",
|
||||
"clearBtn",
|
||||
"uploadText",
|
||||
"changeText",
|
||||
"cameraIcon"
|
||||
];
|
||||
|
||||
clearFileInput() {
|
||||
@@ -17,6 +20,12 @@ export default class extends Controller {
|
||||
this.attachedImageTarget.classList.add("hidden");
|
||||
this.previewImageTarget.classList.add("hidden");
|
||||
this.deleteProfileImageTarget.value = "1";
|
||||
this.uploadTextTarget.classList.remove("hidden");
|
||||
this.changeTextTarget.classList.add("hidden");
|
||||
this.changeTextTarget.setAttribute("aria-hidden", "true");
|
||||
this.uploadTextTarget.setAttribute("aria-hidden", "false");
|
||||
this.cameraIconTarget.classList.remove("!hidden");
|
||||
|
||||
}
|
||||
|
||||
showFileInputPreview(event) {
|
||||
@@ -28,7 +37,11 @@ export default class extends Controller {
|
||||
this.previewImageTarget.classList.remove("hidden");
|
||||
this.clearBtnTarget.classList.remove("hidden");
|
||||
this.deleteProfileImageTarget.value = "0";
|
||||
|
||||
this.uploadTextTarget.classList.add("hidden");
|
||||
this.changeTextTarget.classList.remove("hidden");
|
||||
this.changeTextTarget.setAttribute("aria-hidden", "false");
|
||||
this.uploadTextTarget.setAttribute("aria-hidden", "true");
|
||||
this.cameraIconTarget.classList.add("!hidden");
|
||||
this.previewImageTarget.querySelector("img").src =
|
||||
URL.createObjectURL(file);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user