From 35268833288209007fdd79def1197a08b84750c9 Mon Sep 17 00:00:00 2001 From: Fedor_Kitanin Date: Mon, 5 Aug 2024 16:12:35 +0300 Subject: [PATCH] =?UTF-8?q?=D1=80=D0=B0=D0=B7=D0=B1=D0=B8=D0=BB=20=D1=84?= =?UTF-8?q?=D0=B0=D0=B9=D0=BB=20profile.html=20=D0=BD=D0=B0=202=20=D0=B4?= =?UTF-8?q?=D1=80=D1=83=D0=B3=D0=B8=D1=85=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0?= =?UTF-8?q?=20html=20=D0=B8=20js=20=D1=81=D0=BE=D0=BE=D1=82=D0=B2=D0=B5?= =?UTF-8?q?=D1=82=D1=81=D1=82=D0=B2=D0=B5=D0=BD=D0=BD=D0=BE=20+=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=BF=D0=B8=D1=81=D0=B0=D0=BB=20=D0=B2=20?= =?UTF-8?q?=D1=84=D0=B0=D0=B9=D0=BB=D0=B0=D1=85=20list-rooms=20=D0=B8=20pr?= =?UTF-8?q?ofile=20=D0=BF=D1=83=D1=82=D0=B8=20=D0=BA=20=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B=D0=BC=20=D1=84=D0=B0=D0=B9=D0=BB?= =?UTF-8?q?=D0=B0=D0=BC,=20=D1=82=20=D0=BA=20=D0=BF=D1=80=D0=B8=20=D0=BE?= =?UTF-8?q?=D1=82=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B5=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=BD=D1=8B=D0=B9=20=D1=80?= =?UTF-8?q?=D0=B5=D0=BF=D0=BE=D0=B7=D0=B8=D1=82=D0=BE=D1=80=D0=B8=D0=B9=20?= =?UTF-8?q?=D0=B2=D0=BE=D0=B7=D0=BD=D0=B8=D0=BA=D0=B0=D1=8E=D1=82=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=84=D0=BB=D0=B8=D0=BA=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/html/profile.html | 18 ++++-------------- assets/js/profile.js | 10 ++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 assets/js/profile.js diff --git a/assets/html/profile.html b/assets/html/profile.html index 4880f66..e193502 100644 --- a/assets/html/profile.html +++ b/assets/html/profile.html @@ -2,7 +2,7 @@ - + Профиль @@ -13,7 +13,7 @@
-
+

@@ -30,17 +30,7 @@
- + + \ No newline at end of file diff --git a/assets/js/profile.js b/assets/js/profile.js new file mode 100644 index 0000000..79750dd --- /dev/null +++ b/assets/js/profile.js @@ -0,0 +1,10 @@ +document.getElementById('fileInput').addEventListener('change', function(event) { + const file = event.target.files[0]; + if (file) { + const reader = new FileReader(); + reader.onload = function(e) { + document.getElementById('avatar').src = e.target.result; + }; + reader.readAsDataURL(file); + } + }); \ No newline at end of file