From 46ff71a260c321a6238d1e41b4952d1633441784 Mon Sep 17 00:00:00 2001 From: mahdiar Date: Thu, 5 Nov 2026 16:45:16 +0330 Subject: [PATCH] =?UTF-8?q?=EF=B7=BD=20=D8=A7=D9=88=D9=84=DB=8C=D9=86=20?= =?UTF-8?q?=DA=A9=D8=A7=D9=85=DB=8C=D8=AA=20=D9=BE=D8=B1=D9=88=DA=98=D9=87?= =?UTF-8?q?=20=D9=BE=D8=A7=DB=8C=D8=A7=DA=86=D8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 39 + LICENSE.txt | 21 + README.md | 85 + accounts/__init__.py | 0 accounts/admin.py | 46 + accounts/apps.py | 7 + accounts/forms.py | 143 ++ accounts/managers.py | 29 + accounts/migrations/0001_initial.py | 44 + ...ions_alter_customuser_username_and_more.py | 28 + .../0003_alter_customuser_username.py | 18 + .../0004_customuser_avatar_customuser_bio.py | 23 + .../0005_otpcode_alter_customuser_options.py | 32 + .../migrations/0006_customuser_is_verified.py | 18 + accounts/migrations/__init__.py | 0 accounts/models.py | 91 + accounts/otp.py | 28 + accounts/tests.py | 3 + accounts/urls.py | 12 + accounts/views.py | 194 +++ chat/__init__.py | 0 chat/admin.py | 26 + chat/apps.py | 7 + chat/consumers.py | 157 ++ chat/forms.py | 115 ++ chat/migrations/0001_initial.py | 39 + ...room_created_by_room_is_public_and_more.py | 66 + chat/migrations/0003_room_avatar.py | 18 + chat/migrations/0004_alter_room_slug.py | 18 + .../0005_room_description_room_invite_code.py | 23 + ..._alter_message_options_room_is_verified.py | 22 + chat/migrations/0007_room_is_official.py | 18 + chat/migrations/__init__.py | 0 chat/models.py | 174 ++ chat/routing.py | 7 + chat/tests.py | 3 + chat/urls.py | 17 + chat/views.py | 341 ++++ json.json | 44 + manage.py | 22 + payachat/__init__.py | 0 payachat/asgi.py | 26 + payachat/settings.py | 168 ++ payachat/urls.py | 33 + payachat/wsgi.py | 16 + requirements.txt | 9 + static/icons/apple-touch-icon.png | Bin 0 -> 8618 bytes static/icons/favicon-16.png | Bin 0 -> 523 bytes static/icons/favicon-32.png | Bin 0 -> 1056 bytes static/icons/icon-192.png | Bin 0 -> 9881 bytes static/icons/icon-512.png | Bin 0 -> 33826 bytes static/icons/logo.svg | 25 + static/style.css | 1521 +++++++++++++++++ templates/accounts/login.html | 37 + templates/accounts/profile.html | 49 + templates/accounts/register.html | 35 + templates/accounts/settings.html | 108 ++ templates/accounts/verify_otp.html | 34 + templates/base.html | 31 + templates/chat/create_room.html | 94 + templates/chat/room_info.html | 203 +++ templates/chat/room_preview.html | 78 + templates/includes/_verified_badge.html | 7 + templates/index.html | 66 + templates/room.html | 302 ++++ 65 files changed, 4820 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE.txt create mode 100644 README.md create mode 100644 accounts/__init__.py create mode 100644 accounts/admin.py create mode 100644 accounts/apps.py create mode 100644 accounts/forms.py create mode 100644 accounts/managers.py create mode 100644 accounts/migrations/0001_initial.py create mode 100644 accounts/migrations/0002_alter_customuser_options_alter_customuser_username_and_more.py create mode 100644 accounts/migrations/0003_alter_customuser_username.py create mode 100644 accounts/migrations/0004_customuser_avatar_customuser_bio.py create mode 100644 accounts/migrations/0005_otpcode_alter_customuser_options.py create mode 100644 accounts/migrations/0006_customuser_is_verified.py create mode 100644 accounts/migrations/__init__.py create mode 100644 accounts/models.py create mode 100644 accounts/otp.py create mode 100644 accounts/tests.py create mode 100644 accounts/urls.py create mode 100644 accounts/views.py create mode 100644 chat/__init__.py create mode 100644 chat/admin.py create mode 100644 chat/apps.py create mode 100644 chat/consumers.py create mode 100644 chat/forms.py create mode 100644 chat/migrations/0001_initial.py create mode 100644 chat/migrations/0002_alter_room_options_room_created_by_room_is_public_and_more.py create mode 100644 chat/migrations/0003_room_avatar.py create mode 100644 chat/migrations/0004_alter_room_slug.py create mode 100644 chat/migrations/0005_room_description_room_invite_code.py create mode 100644 chat/migrations/0006_alter_message_options_room_is_verified.py create mode 100644 chat/migrations/0007_room_is_official.py create mode 100644 chat/migrations/__init__.py create mode 100644 chat/models.py create mode 100644 chat/routing.py create mode 100644 chat/tests.py create mode 100644 chat/urls.py create mode 100644 chat/views.py create mode 100644 json.json create mode 100755 manage.py create mode 100644 payachat/__init__.py create mode 100644 payachat/asgi.py create mode 100644 payachat/settings.py create mode 100644 payachat/urls.py create mode 100644 payachat/wsgi.py create mode 100644 requirements.txt create mode 100644 static/icons/apple-touch-icon.png create mode 100644 static/icons/favicon-16.png create mode 100644 static/icons/favicon-32.png create mode 100644 static/icons/icon-192.png create mode 100644 static/icons/icon-512.png create mode 100644 static/icons/logo.svg create mode 100644 static/style.css create mode 100644 templates/accounts/login.html create mode 100644 templates/accounts/profile.html create mode 100644 templates/accounts/register.html create mode 100644 templates/accounts/settings.html create mode 100644 templates/accounts/verify_otp.html create mode 100644 templates/base.html create mode 100644 templates/chat/create_room.html create mode 100644 templates/chat/room_info.html create mode 100644 templates/chat/room_preview.html create mode 100644 templates/includes/_verified_badge.html create mode 100644 templates/index.html create mode 100644 templates/room.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fcf45ac --- /dev/null +++ b/.gitignore @@ -0,0 +1,39 @@ +# Python +__pycache__/ +*.py[cod] +*.egg-info/ +.Python + +# Virtual Environment +venv/ +env/ +ENV/ + +# Django +*.log +db.sqlite3 +db.sqlite3-journal +/mediafiles/ +/staticfiles/ + +# Environment +.env +.env.local +.env.*.local + +# IDE +.vscode/ +.idea/ +*.swp +*.swo + +# OS +.DS_Store +Thumbs.db + +# Tests +.pytest_cache/ +.coverage +htmlcov/ + +ah.md diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..4dbbd8f --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 payanovin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e01c88b --- /dev/null +++ b/README.md @@ -0,0 +1,85 @@ +# پایاچت، پیام‌رسان تحت وب ساخته شده با `django` +پایاچت، یک پروژه پیام‌رسان تحت وب است که با `django` ساخته شده است و از پروتکل `WebSocket` برای انتقال لحظه‌ای پیام‌ها بین کاربران استفاده می‌کند. +در لیست پایین، قابلیت‌های فعلی این پروژه را مشاهده می‌کنید: +- [X] قابلیت ساخت کانال/گروه و چت شخصی با افراد +- [X] قابلیت تنظیم کردن توضیحات و تصویر پروفایل برای کانال/گروه/اکانت +- [X] استفاده از پنل ادمین `django` برای مدیریت کانال‌ها و گروه‌ها و اعطای تیک آبی و ... +- [X] استفاده از پروتکل `WebSocket` برای انتقال لحظه‌ای پیام‌ها در اتاق‌های چت +- [X] نشانگر پیام جدید در اتاق‌های چت (با استفاده از پروتکل `http`) +- [X] امکان اضافه کردن ادمین در گروه/کانال +- [ ] امکان زدن ریپلای و ریکشن به پیام‌ها +- [ ] امکان حذف یا ویرایش پیام +- [ ] نشانگر در حال تایپ و آنلاین/آفلاین بودن افراد +- [ ] پشتیبانی از پروتکل `WebSocket` در صفحاتی غیر از اتاق چت +- [ ] ارسال اعلان‌های لحظه‌ای + +# پیش‌نیازهای راه‌اندازی +برای راه‌اندازی این پیام‌رسان در سرور خود، نیاز به نصب پایتون (نسخه ۳.۱۰ یا بالاتر) و Redis دارید. + +پس از نصب پایتون، یک پوشه برای پروژه ایجاد کنید و محیط مجازی پروژه (`venv`) را با دستور زیر ایجاد و فعال کنید: +```bash +python -m venv venv +source venv/bin/activate # لینوکس/مک +# venv\Scripts\activate # ویندوز +``` + +سپس با دستور زیر، پیش‌نیازهای پروژه را نصب کنید: +```bash +pip install -r requirements.txt +``` + +## راه‌اندازی Redis +پایاچت از Redis به‌عنوان Channel Layer استفاده می‌کند. با دستور زیر نصب و اجرا کنید: +```bash +sudo apt install redis-server +sudo systemctl start redis-server +sudo systemctl enable redis-server +``` + +## تنظیمات +یک فایل `.env` در ریشه‌ی پروژه بسازید و مقادیر زیر را قرار دهید: +```env +SECRET_KEY=توکن_شما +DEBUG=False +API_TOKEN_OTP_SMS=توکن_شما +``` + +سپس برای ایجاد دیتابیس، با دستور زیر مایگریشن‌ها را اجرا کنید: +```bash +python manage.py migrate +``` + +برای دسترسی به پنل ادمین `django`، یک کاربر مدیر بسازید: +```bash +python manage.py createsuperuser +``` + +و برای جمع‌آوری فایل‌های استاتیک (برای اجرا در پروداکشن)، دستور زیر را اجرا کنید +```bash +python manage.py collectstatic --noinput +``` + +و در نهایت با دستور زیر، پروژه را اجرا نمایید: +```bash +daphne payachat.asgi:application +``` + +> برای اجرا در محیط توسعه می‌توانید از `python manage.py runserver` نیز استفاده کنید. + +# ساختار پروژه +``` +payachat/ +├── chat/ # WebSocket، مدل Room و Message +├── accounts/ # احراز هویت، CustomUser +├── templates/ # قالب‌های HTML +├── static/ # فایل‌های CSS و JS +└── payachat/ # تنظیمات اصلی پروژه +``` + +# نسخه واقعی پایاچت +پایاچت، یک نسخه واقعی و آماده استفاده نیز دارد که در آدرس زیر قابل استفاده است: +[payachat.pn-src.ir](payachat.pn-src.ir) + +## مجوز + +این پروژه تحت مجوز [MIT](LICENSE.txt) منتشر شده است. diff --git a/accounts/__init__.py b/accounts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accounts/admin.py b/accounts/admin.py new file mode 100644 index 0000000..25d43d1 --- /dev/null +++ b/accounts/admin.py @@ -0,0 +1,46 @@ +from django.contrib import admin +from django.contrib.auth.admin import UserAdmin as BaseUserAdmin +from .models import CustomUser, OTPCode + + + +@admin.register(CustomUser) +class CustomUserAdmin(BaseUserAdmin): + ordering = ('phone_number',) + list_display = ('phone_number', 'first_name', 'username', 'is_verified', 'is_active', 'date_joined') + list_filter = ('is_verified', 'is_active', 'is_staff') + search_fields = ('phone_number', 'first_name', 'last_name', 'username') + + # فرم‌های داخلی BaseUserAdmin به username اشاره می‌کنن، + # پس fieldsets رو بازنویسی می‌کنیم + fieldsets = ( + (None, {'fields': ('phone_number', 'password')}), + ('اطلاعات شخصی', {'fields': ('first_name', 'last_name', 'username', 'email')}), + ('دسترسی‌ها', {'fields': ( + 'is_verified', # ← این خط اضافه شد + 'is_active', 'is_staff', 'is_superuser', + 'groups', 'user_permissions', + )}), + ('تاریخ‌ها', {'fields': ('last_login', 'date_joined')}), + ) + + add_fieldsets = ( + (None, { + 'classes': ('wide',), + 'fields': ('phone_number', 'first_name', 'password1', 'password2'), + }), + ) + + + + + + + + +@admin.register(OTPCode) +class OTPCodeAdmin(admin.ModelAdmin): + list_display = ('phone_number', 'code', 'is_used', 'created_at') + list_filter = ('is_used', 'created_at') + search_fields = ('phone_number',) + readonly_fields = ('created_at',) \ No newline at end of file diff --git a/accounts/apps.py b/accounts/apps.py new file mode 100644 index 0000000..362d02c --- /dev/null +++ b/accounts/apps.py @@ -0,0 +1,7 @@ +from django.apps import AppConfig + + +class AccountsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'accounts' + verbose_name = 'مدیریت اکانت ها' \ No newline at end of file diff --git a/accounts/forms.py b/accounts/forms.py new file mode 100644 index 0000000..c99a212 --- /dev/null +++ b/accounts/forms.py @@ -0,0 +1,143 @@ +import re +from django import forms +from django.core.exceptions import ValidationError +from .models import CustomUser + + +class RegisterForm(forms.Form): + phone_number = forms.CharField( + max_length=11, + label='شماره موبایل', + widget=forms.TextInput(attrs={'placeholder': '09123456789', 'dir': 'ltr'}), + ) + first_name = forms.CharField( + max_length=150, + label='نام', + widget=forms.TextInput(attrs={'placeholder': 'مثلاً علی'}), + ) + password1 = forms.CharField( + label='رمز عبور', + widget=forms.PasswordInput(attrs={'placeholder': 'حداقل ۸ کاراکتر'}), + ) + password2 = forms.CharField( + label='تکرار رمز', + widget=forms.PasswordInput(attrs={'placeholder': 'تکرار رمز'}), + ) + + def clean_phone_number(self): + phone = self.cleaned_data['phone_number'].strip() + if not re.match(r'^09\d{9}$', phone): + raise ValidationError('شماره باید با ۰۹ شروع شود و ۱۱ رقم باشد.') + if CustomUser.objects.filter(phone_number=phone).exists(): + raise ValidationError('این شماره قبلاً ثبت‌نام کرده.') + return phone + + def clean(self): + data = super().clean() + p1, p2 = data.get('password1'), data.get('password2') + if p1 and p2 and p1 != p2: + raise ValidationError('رمزها یکسان نیستند.') + return data + + +class VerifyOTPForm(forms.Form): + code = forms.CharField( + max_length=6, + min_length=6, + label='کد تأیید', + widget=forms.TextInput(attrs={ + 'placeholder': '۱۲۳۴۵۶', + 'dir': 'ltr', + 'inputmode': 'numeric', + 'autocomplete': 'one-time-code', + }), + ) + + +class LoginForm(forms.Form): + phone_number = forms.CharField( + max_length=11, + label='شماره موبایل', + widget=forms.TextInput(attrs={'placeholder': '09123456789', 'dir': 'ltr'}), + ) + password = forms.CharField( + label='رمز عبور', + widget=forms.PasswordInput(attrs={'placeholder': 'رمز عبور'}), + ) + + + + + + + + + + + + +class ProfileSettingsForm(forms.ModelForm): + delete_avatar = forms.BooleanField( + required=False, + label='حذف عکس فعلی', + widget=forms.CheckboxInput(attrs={'class': 'delete-checkbox'}), + ) + + class Meta: + model = CustomUser + fields = ['first_name', 'username', 'bio', 'avatar'] + widgets = { + 'first_name': forms.TextInput(attrs={'placeholder': 'نام نمایشی'}), + 'username': forms.TextInput(attrs={'placeholder': 'اختیاری', 'dir': 'ltr'}), + 'bio': forms.Textarea(attrs={ + 'placeholder': 'درباره‌ی خودت بنویس...', + 'rows': 3, + 'maxlength': 200, + }), + } + labels = { + 'first_name': 'نام نمایشی', + 'username': 'نام کاربری (اختیاری)', + 'bio': 'بیوگرافی', + 'avatar': 'عکس پروفایل', + } + + def clean_username(self): + u = self.cleaned_data.get('username', '').strip() + if u: + qs = CustomUser.objects.filter(username=u) + if self.instance.pk: + qs = qs.exclude(pk=self.instance.pk) + if qs.exists(): + raise forms.ValidationError('این نام کاربری قبلاً گرفته شده.') + return u or '' + + def clean_avatar(self): + avatar = self.cleaned_data.get('avatar') + + if not avatar: + return avatar + + # ← این چک رو اول بذار (نه size) + # فقط فایل‌های تازه‌آپلود شده content_type دارن + if not hasattr(avatar, 'content_type'): + return avatar # فایل قبلی، چک لازم نیست + + # حالا قطعاً فایل جدید آپلود شده + if avatar.size > 5 * 1024 * 1024: + raise forms.ValidationError('حجم عکس نباید بیشتر از ۵ مگابایت باشد.') + + if not avatar.content_type.startswith('image/'): + raise forms.ValidationError('فقط فایل‌های تصویری مجاز هستند.') + + return avatar + + def save(self, commit=True): + user = super().save(commit=False) + if self.cleaned_data.get('delete_avatar'): + if user.avatar: + user.avatar.delete(save=False) + user.avatar = None + if commit: + user.save() + return user \ No newline at end of file diff --git a/accounts/managers.py b/accounts/managers.py new file mode 100644 index 0000000..8a8af1a --- /dev/null +++ b/accounts/managers.py @@ -0,0 +1,29 @@ +from django.contrib.auth.base_user import BaseUserManager + + +class CustomUserManager(BaseUserManager): + use_in_migrations = True + + def create_user(self, phone_number, password=None, **extra): + if not phone_number: + raise ValueError('شماره موبایل الزامی است.') + + user = self.model(phone_number=phone_number, **extra) + + if password: + user.set_password(password) + else: + # رمز غیرقابل استفاده → کاربر فقط با OTP می‌تونه وارد بشه + user.set_unusable_password() + + user.save(using=self._db) + return user + + def create_superuser(self, phone_number, password=None, **extra): + extra.setdefault('is_staff', True) + extra.setdefault('is_superuser', True) + + if not password: + raise ValueError('سوپریوزر باید رمز عبور داشته باشد.') + + return self.create_user(phone_number, password, **extra) \ No newline at end of file diff --git a/accounts/migrations/0001_initial.py b/accounts/migrations/0001_initial.py new file mode 100644 index 0000000..3243dc2 --- /dev/null +++ b/accounts/migrations/0001_initial.py @@ -0,0 +1,44 @@ +# Generated by Django 5.2.18 on 2026-10-21 12:24 + +import accounts.managers +import django.utils.timezone +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('auth', '0012_alter_user_first_name_max_length'), + ] + + operations = [ + migrations.CreateModel( + name='CustomUser', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('password', models.CharField(max_length=128, verbose_name='password')), + ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), + ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), + ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')), + ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), + ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), + ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), + ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), + ('username', models.CharField(blank=True, max_length=150, null=True, unique=True, verbose_name='نام کاربری')), + ('phone_number', models.CharField(max_length=11, unique=True, verbose_name='شماره موبایل')), + ('first_name', models.CharField(max_length=150, verbose_name='نام')), + ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')), + ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')), + ], + options={ + 'verbose_name': 'user', + 'verbose_name_plural': 'users', + 'abstract': False, + }, + managers=[ + ('objects', accounts.managers.CustomUserManager()), + ], + ), + ] diff --git a/accounts/migrations/0002_alter_customuser_options_alter_customuser_username_and_more.py b/accounts/migrations/0002_alter_customuser_options_alter_customuser_username_and_more.py new file mode 100644 index 0000000..8076fc2 --- /dev/null +++ b/accounts/migrations/0002_alter_customuser_options_alter_customuser_username_and_more.py @@ -0,0 +1,28 @@ +# Generated by Django 5.2.18 on 2026-10-22 09:54 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0001_initial'), + ('auth', '0012_alter_user_first_name_max_length'), + ] + + operations = [ + migrations.AlterModelOptions( + name='customuser', + options={}, + ), + migrations.AlterField( + model_name='customuser', + name='username', + field=models.CharField(blank=True, default='', max_length=150, unique=True, verbose_name='نام کاربری'), + preserve_default=False, + ), + migrations.AddConstraint( + model_name='customuser', + constraint=models.UniqueConstraint(condition=models.Q(('username', ''), _negated=True), fields=('username',), name='unique_username_when_set'), + ), + ] diff --git a/accounts/migrations/0003_alter_customuser_username.py b/accounts/migrations/0003_alter_customuser_username.py new file mode 100644 index 0000000..9f8e916 --- /dev/null +++ b/accounts/migrations/0003_alter_customuser_username.py @@ -0,0 +1,18 @@ +# Generated by Django 5.2.18 on 2026-10-22 10:10 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0002_alter_customuser_options_alter_customuser_username_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='customuser', + name='username', + field=models.CharField(blank=True, max_length=150, verbose_name='نام کاربری'), + ), + ] diff --git a/accounts/migrations/0004_customuser_avatar_customuser_bio.py b/accounts/migrations/0004_customuser_avatar_customuser_bio.py new file mode 100644 index 0000000..4820d3c --- /dev/null +++ b/accounts/migrations/0004_customuser_avatar_customuser_bio.py @@ -0,0 +1,23 @@ +# Generated by Django 5.2.18 on 2026-10-24 13:31 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0003_alter_customuser_username'), + ] + + operations = [ + migrations.AddField( + model_name='customuser', + name='avatar', + field=models.ImageField(blank=True, null=True, upload_to='user_avatars/', verbose_name='عکس پروفایل'), + ), + migrations.AddField( + model_name='customuser', + name='bio', + field=models.CharField(blank=True, max_length=200, verbose_name='بیوگرافی'), + ), + ] diff --git a/accounts/migrations/0005_otpcode_alter_customuser_options.py b/accounts/migrations/0005_otpcode_alter_customuser_options.py new file mode 100644 index 0000000..783b680 --- /dev/null +++ b/accounts/migrations/0005_otpcode_alter_customuser_options.py @@ -0,0 +1,32 @@ +# Generated by Django 5.2.18 on 2026-10-28 17:48 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0004_customuser_avatar_customuser_bio'), + ] + + operations = [ + migrations.CreateModel( + name='OTPCode', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('phone_number', models.CharField(db_index=True, max_length=11)), + ('code', models.CharField(max_length=6)), + ('is_used', models.BooleanField(default=False)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ], + options={ + 'verbose_name': 'کد تأیید', + 'verbose_name_plural': 'کدهای تأیید', + 'ordering': ['-created_at'], + }, + ), + migrations.AlterModelOptions( + name='customuser', + options={'verbose_name': 'حساب کاربری', 'verbose_name_plural': 'حساب های کاربری'}, + ), + ] diff --git a/accounts/migrations/0006_customuser_is_verified.py b/accounts/migrations/0006_customuser_is_verified.py new file mode 100644 index 0000000..41630f6 --- /dev/null +++ b/accounts/migrations/0006_customuser_is_verified.py @@ -0,0 +1,18 @@ +# Generated by Django 5.2.18 on 2026-10-28 18:58 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0005_otpcode_alter_customuser_options'), + ] + + operations = [ + migrations.AddField( + model_name='customuser', + name='is_verified', + field=models.BooleanField(default=False, verbose_name='تأیید شده'), + ), + ] diff --git a/accounts/migrations/__init__.py b/accounts/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accounts/models.py b/accounts/models.py new file mode 100644 index 0000000..f430cf8 --- /dev/null +++ b/accounts/models.py @@ -0,0 +1,91 @@ +from django.contrib.auth.models import AbstractUser +from django.db import models +from .managers import CustomUserManager +from django.utils import timezone +from datetime import timedelta + + +class CustomUser(AbstractUser): + # username رو اختیاری می‌کنیم (به‌جای حذف کامل) + username = models.CharField( + max_length=150, + #unique=True, + blank=True, + #null=True, + verbose_name='نام کاربری', + ) + + # هویت اصلی + phone_number = models.CharField( + max_length=11, + unique=True, + verbose_name='شماره موبایل', + ) + + bio = models.CharField( + max_length=200, + blank=True, + verbose_name='بیوگرافی', + ) + is_verified = models.BooleanField( + default=False, + verbose_name='تأیید شده', + ) + avatar = models.ImageField( + upload_to='user_avatars/', + null=True, + blank=True, + verbose_name='عکس پروفایل', + ) + + # نام، اجباری + first_name = models.CharField(max_length=150, verbose_name='نام') + + USERNAME_FIELD = 'phone_number' + REQUIRED_FIELDS = ['first_name'] # فقط برای createsuperuser + + objects = CustomUserManager() + + class Meta: + constraints = [ + models.UniqueConstraint( + fields=['username'], + condition=~models.Q(username=''), + name='unique_username_when_set', + ) + ] + verbose_name = 'حساب کاربری' + verbose_name_plural = 'حساب های کاربری' + + def __str__(self): + return self.first_name or self.phone_number + + + + + + + + + + + + + +class OTPCode(models.Model): + phone_number = models.CharField(max_length=11, db_index=True) + code = models.CharField(max_length=6) + is_used = models.BooleanField(default=False) + created_at = models.DateTimeField(auto_now_add=True) + + class Meta: + ordering = ['-created_at'] + verbose_name = 'کد تأیید' + verbose_name_plural = 'کدهای تأیید' + + def is_expired(self): + """بعد از ۲ دقیقه منقضی می‌شه""" + return timezone.now() - self.created_at > timedelta(minutes=2) + + def __str__(self): + return f'{self.phone_number} - {self.code}' \ No newline at end of file diff --git a/accounts/otp.py b/accounts/otp.py new file mode 100644 index 0000000..507a436 --- /dev/null +++ b/accounts/otp.py @@ -0,0 +1,28 @@ +import requests +from django.conf import settings + + +def send_sms_otp(mobile, code): + url = "https://s.api.ir/api/sw1/SmsOTP" + + headers = { + "Authorization": f"Bearer {settings.API_TOKEN_OTP_SMS}", + "Content-Type": "application/json" + } + + data = { + "code": code, + "mobile": mobile, + "template": 2 + } + + try: + response = requests.post(url, json=data, headers=headers, timeout=10) + + if response.status_code == 200: + result = response.json() + return bool(result.get("success")) + return False + + except requests.exceptions.RequestException: + return False \ No newline at end of file diff --git a/accounts/tests.py b/accounts/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/accounts/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/accounts/urls.py b/accounts/urls.py new file mode 100644 index 0000000..47c546c --- /dev/null +++ b/accounts/urls.py @@ -0,0 +1,12 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('register/', views.register_view, name='register'), + path('verify/', views.verify_otp_view, name='verify_otp'), # ← جدید + path('login/', views.login_view, name='login'), + path('logout/', views.logout_view, name='logout'), + path('settings/', views.settings_view, name='settings'), + path('u//', views.user_profile_view, name='user_profile'), + path('u//chat/', views.start_private_view, name='start_private'), +] \ No newline at end of file diff --git a/accounts/views.py b/accounts/views.py new file mode 100644 index 0000000..f230525 --- /dev/null +++ b/accounts/views.py @@ -0,0 +1,194 @@ +from django.shortcuts import render, redirect, get_object_or_404 +from django.contrib.auth import login, logout, authenticate +from django.contrib import messages +from .forms import RegisterForm, LoginForm, VerifyOTPForm, ProfileSettingsForm +from django.contrib.auth.decorators import login_required +from chat.models import Room +from .models import CustomUser, OTPCode +import random +from django.contrib.auth.hashers import make_password +from accounts.otp import send_sms_otp +from django.utils import timezone +from datetime import timedelta +from chat.models import RoomMembership + +def register_view(request): + if request.user.is_authenticated: + return redirect('index') + + form = RegisterForm(request.POST or None) + if form.is_valid(): + phone = form.cleaned_data['phone_number'] + + # ← Rate Limit: ۵ پیامک در ۲۴ ساعت + today_start = timezone.now() - timedelta(hours=24) + recent_count = OTPCode.objects.filter( + phone_number=phone, + created_at__gte=today_start, + ).count() + + if recent_count >= 5: + form.add_error(None, 'تعداد درخواست کد زیاد است. ۲۴ ساعت دیگر امتحان کنید.') + return render(request, 'accounts/register.html', {'form': form}) + + + # ساخت کد + code = str(random.randint(100000, 999999)) + OTPCode.objects.create(phone_number=phone, code=code) + + # ذخیره اطلاعات موقت توی session + request.session['pending_user'] = { + 'phone_number': phone, + 'first_name': form.cleaned_data['first_name'], + 'password': make_password(form.cleaned_data['password1']), + } + + # ارسال SMS (فعلاً توی کنسول) + #print(f'\n📱 OTP for {phone}: {code}\n') + if not send_sms_otp(mobile=phone, code=code): + # پاک کردن OTP ساخته‌شده (چون ارسال نشد) + OTPCode.objects.filter(phone_number=phone, code=code).delete() + request.session.pop('pending_user', None) + + form.add_error(None, 'خطا در ارسال پیامک. لطفاً شماره را بررسی کنید یا بعداً تلاش کنید.') + return render(request, 'accounts/register.html', {'form': form}) + + return redirect('verify_otp') + + return render(request, 'accounts/register.html', {'form': form}) + + +def verify_otp_view(request): + pending = request.session.get('pending_user') + if not pending: + return redirect('register') + + form = VerifyOTPForm(request.POST or None) + if form.is_valid(): + code = form.cleaned_data['code'] + phone = pending['phone_number'] + + otp = OTPCode.objects.filter( + phone_number=phone, code=code, is_used=False + ).first() + + if not otp or otp.is_expired(): + form.add_error('code', 'کد نامعتبر یا منقضی شده.') + else: + otp.is_used = True + otp.save() + + # ← حالا اکانت بساز + user = CustomUser.objects.create( + phone_number=pending['phone_number'], + first_name=pending['first_name'], + password=pending['password'], # از قبل hash شده + ) + + del request.session['pending_user'] + + login(request, user, backend='django.contrib.auth.backends.ModelBackend') + + # اضافه کردن به کانال و گروه های رسمی + for room in Room.objects.filter(is_official=True): + role = 'readonly' if room.room_type == 'channel' else 'member' + RoomMembership.objects.get_or_create( + room=room, + user=user, + defaults={'role': role}, + ) + + return redirect('index') + + return render(request, 'accounts/verify_otp.html', { + 'form': form, + 'phone': pending['phone_number'], + }) + + +def login_view(request): + if request.user.is_authenticated: + return redirect('index') + + form = LoginForm(request.POST or None) + if request.method == 'POST' and form.is_valid(): + user = authenticate( + request, + phone_number=form.cleaned_data['phone_number'], + password=form.cleaned_data['password'], + ) + if user: + login(request, user) + return redirect('index') + messages.error(request, 'شماره یا رمز اشتباه است.') + + return render(request, 'accounts/login.html', {'form': form}) + + +def logout_view(request): + logout(request) + return redirect('login') + + + + + + + + + + + + + + +@login_required +def settings_view(request): + if request.method == 'POST': + form = ProfileSettingsForm(request.POST, request.FILES, instance=request.user) + if form.is_valid(): + form.save() + messages.success(request, '✅ تغییرات ذخیره شد') + return redirect('settings') + else: + form = ProfileSettingsForm(instance=request.user) + + rooms = Room.objects.filter(members=request.user).distinct() + + return render(request, 'accounts/settings.html', { + 'form': form, + 'rooms': rooms, + }) + + + + + + + + + + + + +@login_required +def user_profile_view(request, user_id): + profile_user = get_object_or_404(CustomUser, id=user_id) + + if profile_user.id == request.user.id: + return redirect('settings') + + return render(request, 'accounts/profile.html', { + 'profile_user': profile_user, + }) + + +@login_required +def start_private_view(request, user_id): + other = get_object_or_404(CustomUser, id=user_id) + + if other.id == request.user.id: + return redirect('settings') + + room, created = Room.get_or_create_private(request.user, other) + return redirect('room', room_id=room.id) \ No newline at end of file diff --git a/chat/__init__.py b/chat/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/chat/admin.py b/chat/admin.py new file mode 100644 index 0000000..45cdacb --- /dev/null +++ b/chat/admin.py @@ -0,0 +1,26 @@ +from django.contrib import admin +from chat.models import Room, Message, RoomMembership + +# Register your models here. +class RoomMembershipInline(admin.TabularInline): + model = RoomMembership + extra = 1 + autocomplete_fields = ['user'] + + +@admin.register(Room) +class RoomAdmin(admin.ModelAdmin): + list_display = ('name', 'room_type', 'slug', 'is_verified', 'is_public', 'created_at') + list_filter = ('room_type', 'is_verified', 'is_public') + search_fields = ('name', 'slug') + prepopulated_fields = {'slug': ('name',)} + inlines = [RoomMembershipInline] + + +@admin.register(Message) +class MessageAdmin(admin.ModelAdmin): + list_display = ('id', 'room', 'author', 'text', 'created_at') + list_filter = ('room', 'author', 'created_at') + search_fields = ('text', 'author__phone_number', 'author__first_name') + date_hierarchy = 'created_at' + list_per_page = 50 \ No newline at end of file diff --git a/chat/apps.py b/chat/apps.py new file mode 100644 index 0000000..836513f --- /dev/null +++ b/chat/apps.py @@ -0,0 +1,7 @@ +from django.apps import AppConfig + + +class ChatConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'chat' + verbose_name = 'چت' \ No newline at end of file diff --git a/chat/consumers.py b/chat/consumers.py new file mode 100644 index 0000000..fe13493 --- /dev/null +++ b/chat/consumers.py @@ -0,0 +1,157 @@ +from channels.generic.websocket import AsyncWebsocketConsumer +import json +from channels.db import database_sync_to_async +from chat.models import Room, Message, RoomMembership +from django.utils import timezone + + +class ChatConsumer(AsyncWebsocketConsumer): + async def connect(self): + self.user = self.scope['user'] + if not self.user.is_authenticated: + await self.close(code=4001) + return + + self.room_id = self.scope['url_route']['kwargs']['room_id'] + self.room = await self._get_room() + if self.room is None: + await self.close(code=4004) + return + + # ← عضویت رو چک کن + self.membership = await self._get_membership(self.room) + if self.membership is None: + await self.close(code=4003) # دسترسی نداره + return + + self.group_name = f'chat_{self.room_id}' + await self.channel_layer.group_add(self.group_name, self.channel_name) + await self.accept() + await self._mark_as_read() + + # ← این ۴ خط را اضافه کن + history = await self._get_history() + await self.send(text_data=json.dumps({ + 'action': 'history', + 'messages': history, + })) + + + async def disconnect(self, close_code): + await self.channel_layer.group_discard(self.group_name, self.channel_name) + + async def receive(self, text_data): + text_data = json.loads(text_data) + + # ← چک کن اجازه داره + if not self.membership.can_post(): + await self.send(text_data=json.dumps({ + 'action': 'error', + 'text': 'شما اجازه‌ی ارسال در این اتاق را ندارید.', + })) + return + + type_event = text_data.get('type_event') + if not type_event: + return + #--- + if type_event == 'message': + # ← این ۳ خط را اضافه کن + text = (text_data.get('text') or '').strip() + if not text: + return + msg = await self._save_message(text) + + await self.channel_layer.group_send(self.group_name, { + 'type': 'new_message', + 'id': msg.id, + 'message': text_data['text'], + 'author': self.user.id, + 'author_name': self.user.first_name, + 'author_avatar': self.user.avatar.url if self.user.avatar else None, + 'created_at': msg.created_at.isoformat(), + 'author_verified': self.user.is_verified, + }) + + elif type_event == 'fetch_more': + before_id = text_data.get('before_id') + if not isinstance(before_id, int): + return + older = await self._get_more_history(before_id) + await self.send(text_data=json.dumps({ + 'action': 'history', + 'messages': older, + 'append': True, + })) + + async def new_message(self, event): + await self.send(text_data=json.dumps({ + 'id': event['id'], + 'text': event['message'], + 'author': event['author'], + 'author_name': event['author_name'], + 'author_avatar': event.get('author_avatar'), + 'created_at': event['created_at'], + 'author_verified': event.get('author_verified', False), + })) + await self._mark_as_read() + + + + + + @database_sync_to_async + def _save_message(self, text): + room = Room.objects.get(id=self.room_id) + return Message.objects.create( + room=room, + author=self.user, + text=text, + ) + + @database_sync_to_async + def _get_history(self): + qs = Message.objects.filter( + room__id=self.room_id + ).order_by('-created_at')[:20] + return [ + {'id': m.id, 'text': m.text, 'author': m.author.id, 'author_name': m.author.first_name, 'author_avatar': m.author.avatar.url if m.author.avatar else None, 'created_at': m.created_at.isoformat(), 'author_verified': m.author.is_verified,} + for m in reversed(list(qs)) + ] + + @database_sync_to_async + def _get_more_history(self, before_id, limit=20): + qs = Message.objects.filter( + room__id=self.room_id, + id__lt=before_id, # ← فقط پیام‌های قدیمی‌تر + ).order_by('-id')[:limit] + return [ + { + 'id': m.id, + 'text': m.text, + 'author': m.author.id, + 'author_name': m.author.first_name, + 'author_avatar': m.author.avatar.url if m.author.avatar else None, + 'created_at': m.created_at.isoformat(), + 'author_verified': m.author.is_verified, + } + for m in reversed(list(qs)) + ] + + @database_sync_to_async + def _get_room(self): + return Room.objects.filter(id=self.room_id).first() + + @database_sync_to_async + def _get_membership(self, room): + return RoomMembership.objects.select_related('room').filter( + room=room, user=self.user + ).first() + + + @database_sync_to_async + def _mark_as_read(self): + RoomMembership.objects.filter( + room_id=self.room_id, + user=self.user, + ).update(last_read_at=timezone.now()) \ No newline at end of file diff --git a/chat/forms.py b/chat/forms.py new file mode 100644 index 0000000..81834e1 --- /dev/null +++ b/chat/forms.py @@ -0,0 +1,115 @@ +from django import forms +from django.contrib.auth.models import User +from django.contrib.auth.forms import UserCreationForm +from django.contrib.auth.forms import AuthenticationForm +from .models import Room + + +class RegisterForm(UserCreationForm): + + first_name = forms.CharField( + label="نام", + widget=forms.TextInput(attrs={ + "placeholder": "نام خود را وارد کنید" + }) + ) + + last_name = forms.CharField( + label="نام خانوادگی", + widget=forms.TextInput(attrs={ + "placeholder": "نام خانوادگی خود را وارد کنید" + }) + ) + + username = forms.CharField( + label="نام کاربری", + widget=forms.TextInput(attrs={ + "placeholder": "یک نام کاربری انتخاب کنید" + }) + ) + + email = forms.EmailField( + label="ایمیل (اختیاری)", + required=False, + widget=forms.EmailInput(attrs={ + "placeholder": "example@email.com" + }) + ) + + password1 = forms.CharField( + label="رمز عبور", + widget=forms.PasswordInput(attrs={ + "placeholder": "رمز عبور قوی انتخاب کنید" + }) + ) + + password2 = forms.CharField( + label="تکرار رمز عبور", + widget=forms.PasswordInput(attrs={ + "placeholder": "رمز عبور را دوباره وارد کنید" + }) + ) + + class Meta: + model = User + fields = [ + "first_name", + "last_name", + "username", + "email", + "password1", + "password2", + ] + + +class LoginForm(AuthenticationForm): + + username = forms.CharField( + label="نام کاربری", + widget=forms.TextInput(attrs={ + "placeholder": "نام کاربری خود را وارد کنید" + }) + ) + + password = forms.CharField( + label="رمز عبور", + widget=forms.PasswordInput(attrs={ + "placeholder": "رمز عبور خود را وارد کنید" + }) + ) + + + + + + + + + + + +class CreateRoomForm(forms.ModelForm): + room_type = forms.ChoiceField( + choices=[('group', 'گروه'), ('channel', 'کانال')], + initial='group', + label='نوع', + widget=forms.RadioSelect, + ) + + class Meta: + model = Room + fields = ['name', 'room_type', 'description', 'avatar', 'is_public'] + widgets = { + 'name': forms.TextInput(attrs={'placeholder': 'مثلاً گروه برنامه‌نویسان'}), + 'description': forms.Textarea(attrs={ + 'rows': 3, + 'placeholder': 'این گروه درباره چیه؟ (اختیاری)', + 'maxlength': 300, + }), + } + labels = { + 'name': 'نام', + 'description': 'توضیحات', + 'avatar': 'عکس (اختیاری)', + 'is_public': 'قابل کشف باشد', + } \ No newline at end of file diff --git a/chat/migrations/0001_initial.py b/chat/migrations/0001_initial.py new file mode 100644 index 0000000..4c4f46c --- /dev/null +++ b/chat/migrations/0001_initial.py @@ -0,0 +1,39 @@ +# Generated by Django 5.2.18 on 2026-10-21 12:24 + +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Room', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=100)), + ('slug', models.SlugField(max_length=100, unique=True)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ], + ), + migrations.CreateModel( + name='Message', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('text', models.TextField()), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ('room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='chat.room')), + ], + options={ + 'ordering': ['created_at'], + }, + ), + ] diff --git a/chat/migrations/0002_alter_room_options_room_created_by_room_is_public_and_more.py b/chat/migrations/0002_alter_room_options_room_created_by_room_is_public_and_more.py new file mode 100644 index 0000000..a252840 --- /dev/null +++ b/chat/migrations/0002_alter_room_options_room_created_by_room_is_public_and_more.py @@ -0,0 +1,66 @@ +# Generated by Django 5.2.18 on 2026-10-22 16:51 + +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('chat', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.AlterModelOptions( + name='room', + options={'ordering': ['-created_at'], 'verbose_name': 'اتاق', 'verbose_name_plural': 'اتاق\u200cها'}, + ), + migrations.AddField( + model_name='room', + name='created_by', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='created_rooms', to=settings.AUTH_USER_MODEL, verbose_name='سازنده'), + ), + migrations.AddField( + model_name='room', + name='is_public', + field=models.BooleanField(default=False, verbose_name='قابل کشف در لیست عمومی'), + ), + migrations.AddField( + model_name='room', + name='room_type', + field=models.CharField(choices=[('group', 'گروه'), ('channel', 'کانال'), ('private', 'خصوصی')], default='group', max_length=10, verbose_name='نوع اتاق'), + ), + migrations.AlterField( + model_name='room', + name='name', + field=models.CharField(blank=True, max_length=100, verbose_name='نام'), + ), + migrations.AlterField( + model_name='room', + name='slug', + field=models.SlugField(max_length=100, unique=True, verbose_name='اسلاگ'), + ), + migrations.CreateModel( + name='RoomMembership', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('role', models.CharField(choices=[('owner', 'مالک'), ('admin', 'مدیر'), ('member', 'عضو'), ('readonly', 'فقط خواندن')], default='member', max_length=10)), + ('joined_at', models.DateTimeField(auto_now_add=True)), + ('last_read_at', models.DateTimeField(blank=True, null=True)), + ('room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='memberships', to='chat.room')), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='memberships', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'verbose_name': 'عضویت', + 'verbose_name_plural': 'عضویت\u200cها', + 'unique_together': {('room', 'user')}, + }, + ), + migrations.AddField( + model_name='room', + name='members', + field=models.ManyToManyField(blank=True, related_name='rooms', through='chat.RoomMembership', to=settings.AUTH_USER_MODEL, verbose_name='اعضا'), + ), + ] diff --git a/chat/migrations/0003_room_avatar.py b/chat/migrations/0003_room_avatar.py new file mode 100644 index 0000000..7287c35 --- /dev/null +++ b/chat/migrations/0003_room_avatar.py @@ -0,0 +1,18 @@ +# Generated by Django 5.2.18 on 2026-10-22 17:48 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('chat', '0002_alter_room_options_room_created_by_room_is_public_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='room', + name='avatar', + field=models.ImageField(blank=True, null=True, upload_to='room_avatars/'), + ), + ] diff --git a/chat/migrations/0004_alter_room_slug.py b/chat/migrations/0004_alter_room_slug.py new file mode 100644 index 0000000..79aa947 --- /dev/null +++ b/chat/migrations/0004_alter_room_slug.py @@ -0,0 +1,18 @@ +# Generated by Django 5.2.18 on 2026-10-25 18:27 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('chat', '0003_room_avatar'), + ] + + operations = [ + migrations.AlterField( + model_name='room', + name='slug', + field=models.SlugField(blank=True, max_length=100, null=True, unique=True, verbose_name='اسلاگ'), + ), + ] diff --git a/chat/migrations/0005_room_description_room_invite_code.py b/chat/migrations/0005_room_description_room_invite_code.py new file mode 100644 index 0000000..40a1591 --- /dev/null +++ b/chat/migrations/0005_room_description_room_invite_code.py @@ -0,0 +1,23 @@ +# Generated by Django 5.2.18 on 2026-10-26 18:23 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('chat', '0004_alter_room_slug'), + ] + + operations = [ + migrations.AddField( + model_name='room', + name='description', + field=models.CharField(blank=True, max_length=300), + ), + migrations.AddField( + model_name='room', + name='invite_code', + field=models.CharField(blank=True, max_length=8, null=True, unique=True), + ), + ] diff --git a/chat/migrations/0006_alter_message_options_room_is_verified.py b/chat/migrations/0006_alter_message_options_room_is_verified.py new file mode 100644 index 0000000..57bce5b --- /dev/null +++ b/chat/migrations/0006_alter_message_options_room_is_verified.py @@ -0,0 +1,22 @@ +# Generated by Django 5.2.18 on 2026-10-28 18:58 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('chat', '0005_room_description_room_invite_code'), + ] + + operations = [ + migrations.AlterModelOptions( + name='message', + options={'ordering': ['created_at'], 'verbose_name': 'پیام', 'verbose_name_plural': 'پیام\u200cها'}, + ), + migrations.AddField( + model_name='room', + name='is_verified', + field=models.BooleanField(default=False, verbose_name='تأیید شده'), + ), + ] diff --git a/chat/migrations/0007_room_is_official.py b/chat/migrations/0007_room_is_official.py new file mode 100644 index 0000000..db0db34 --- /dev/null +++ b/chat/migrations/0007_room_is_official.py @@ -0,0 +1,18 @@ +# Generated by Django 5.2.18 on 2026-10-28 19:50 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('chat', '0006_alter_message_options_room_is_verified'), + ] + + operations = [ + migrations.AddField( + model_name='room', + name='is_official', + field=models.BooleanField(default=False, verbose_name='رسمی(عضو خودکار با ساخت اکانت)'), + ), + ] diff --git a/chat/migrations/__init__.py b/chat/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/chat/models.py b/chat/models.py new file mode 100644 index 0000000..4a1edbb --- /dev/null +++ b/chat/models.py @@ -0,0 +1,174 @@ +from django.db import models +from django.conf import settings +import secrets + + +def generate_invite_code(): + """کد ۸ رقمی بدون کاراکترهای گیج‌کننده (O, I, L, 0, 1)""" + alphabet = 'ABCDEFGHJKMNPQRSTUVWXYZ23456789' + return ''.join(secrets.choice(alphabet) for _ in range(8)) + + +class Room(models.Model): + # ─── نوع اتاق ─── + TYPE_GROUP = 'group' + TYPE_CHANNEL = 'channel' + TYPE_PRIVATE = 'private' + TYPE_CHOICES = [ + (TYPE_GROUP, 'گروه'), + (TYPE_CHANNEL, 'کانال'), + (TYPE_PRIVATE, 'خصوصی'), + ] + + room_type = models.CharField( + max_length=10, + choices=TYPE_CHOICES, + default=TYPE_GROUP, + verbose_name='نوع اتاق', + ) + + name = models.CharField(max_length=100, blank=True, verbose_name='نام') + slug = models.SlugField(max_length=100, unique=True, null=True, blank=True, verbose_name='اسلاگ') + + created_by = models.ForeignKey( + settings.AUTH_USER_MODEL, + on_delete=models.SET_NULL, + null=True, + blank=True, + related_name='created_rooms', + verbose_name='سازنده', + ) + + members = models.ManyToManyField( + settings.AUTH_USER_MODEL, + through='RoomMembership', + related_name='rooms', + blank=True, + verbose_name='اعضا', + ) + + is_public = models.BooleanField( + default=False, + verbose_name='قابل کشف در لیست عمومی', + ) + is_verified = models.BooleanField( + default=False, + verbose_name='تأیید شده', + ) + is_official = models.BooleanField( + default=False, + verbose_name='رسمی(عضو خودکار با ساخت اکانت)', + ) + avatar = models.ImageField(upload_to='room_avatars/', null=True, blank=True) + invite_code = models.CharField(max_length=8, unique=True, null=True, blank=True) + description = models.CharField(max_length=300, blank=True) + created_at = models.DateTimeField(auto_now_add=True) + + class Meta: + ordering = ['-created_at'] + verbose_name = 'اتاق' + verbose_name_plural = 'اتاق‌ها' + + def __str__(self): + return self.name or self.slug or f'چت {self.id}' + + + def save(self, *args, **kwargs): + if not self.invite_code and self.room_type != self.TYPE_PRIVATE: + while True: + code = generate_invite_code() + if not Room.objects.filter(invite_code=code).exists(): + self.invite_code = code + break + super().save(*args, **kwargs) + + + @classmethod + def get_or_create_private(cls, user1, user2): + existing = cls.objects.filter( + room_type=cls.TYPE_PRIVATE, + members=user1, + ).filter(members=user2).first() + + if existing: + return existing, False + + room = cls.objects.create( + room_type=cls.TYPE_PRIVATE, + slug=None, + ) + room.memberships.create(user=user1, role='member') + room.memberships.create(user=user2, role='member') + + return room, True + + +class RoomMembership(models.Model): + # ─── نقش‌ها ─── + ROLE_OWNER = 'owner' # مالک + ROLE_ADMIN = 'admin' # ادمین + ROLE_MEMBER = 'member' # عضو عادی + ROLE_READONLY = 'readonly' # فقط خواندن (مثل سابسکرایبر کانال) + ROLE_CHOICES = [ + (ROLE_OWNER, 'مالک'), + (ROLE_ADMIN, 'مدیر'), + (ROLE_MEMBER, 'عضو'), + (ROLE_READONLY, 'فقط خواندن'), + ] + + room = models.ForeignKey( + Room, + on_delete=models.CASCADE, + related_name='memberships', + ) + user = models.ForeignKey( + settings.AUTH_USER_MODEL, + on_delete=models.CASCADE, + related_name='memberships', + ) + role = models.CharField( + max_length=10, + choices=ROLE_CHOICES, + default=ROLE_MEMBER, + ) + joined_at = models.DateTimeField(auto_now_add=True) + last_read_at = models.DateTimeField(null=True, blank=True) # ← برای «پیام‌های خوانده‌نشده» + + class Meta: + unique_together = ('room', 'user') + verbose_name = 'عضویت' + verbose_name_plural = 'عضویت‌ها' + + def __str__(self): + return f'{self.user} → {self.room} ({self.role})' + + def can_post(self): + """آیا این کاربر می‌تونه پیام بفرسته؟""" + if self.room.room_type == Room.TYPE_CHANNEL: + # توی کانال، فقط owner و admin + return self.role in (self.ROLE_OWNER, self.ROLE_ADMIN) + # توی گروه و خصوصی، همه‌ی نقش‌ها جز readonly + return self.role != self.ROLE_READONLY + + def count_unread(self): + """تعداد پیام‌های خوانده‌نشده‌ی این عضویت.""" + qs = Message.objects.filter(room=self.room).exclude(author=self.user) + if self.last_read_at: + qs = qs.filter(created_at__gt=self.last_read_at) + return qs.count() + + + +class Message(models.Model): + room = models.ForeignKey(Room, on_delete=models.CASCADE) + author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) + text = models.TextField() + created_at = models.DateTimeField(auto_now_add=True) + + class Meta: + ordering = ['created_at'] # قدیمی‌ترین اول (طبیعی برای چت) + verbose_name = 'پیام' + verbose_name_plural = 'پیام‌ها' + + def __str__(self): + return f'{self.author.username}: {self.text[:30]}' \ No newline at end of file diff --git a/chat/routing.py b/chat/routing.py new file mode 100644 index 0000000..3658ba2 --- /dev/null +++ b/chat/routing.py @@ -0,0 +1,7 @@ +from django.urls import path + +from .consumers import ChatConsumer + +websocket_urlpatterns = [ + path('ws/chat//', ChatConsumer.as_asgi()), +] \ No newline at end of file diff --git a/chat/tests.py b/chat/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/chat/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/chat/urls.py b/chat/urls.py new file mode 100644 index 0000000..1fab105 --- /dev/null +++ b/chat/urls.py @@ -0,0 +1,17 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('', views.index_view, name='index'), + path('/', views.room_view, name='room'), + path('chat/new/', views.create_room_view, name='create_room'), + path('room//info/', views.room_info_view, name='room_info'), + path('preview//', views.room_preview_view, name='room_preview'), + path('preview//join/', views.join_room_view, name='join_room'), + path('join//', views.join_by_code_view, name='join_by_code'), + path('room//manage/role///', views.change_role_view, name='change_role'), + path('room//manage/remove//', views.remove_member_view, name='remove_member'), + path('register/', views.register_view, name='register'), + path('login/', views.login_view, name='login'), + path('logout/', views.logout_view, name='logout'), +] \ No newline at end of file diff --git a/chat/views.py b/chat/views.py new file mode 100644 index 0000000..3edbf9f --- /dev/null +++ b/chat/views.py @@ -0,0 +1,341 @@ +from django.shortcuts import render, get_object_or_404, redirect +from .models import Room +from chat.forms import RegisterForm, LoginForm +from django.contrib.auth import login, logout +from django.contrib import messages +from django.contrib.auth.decorators import login_required +from django.http import Http404 +from django.conf import settings +from .forms import CreateRoomForm +from .models import RoomMembership +from django.views.decorators.http import require_POST +from django.utils import timezone + + +def _decorate_rooms(rooms, user): + """اسم و آواتار نمایشی رو برای هر اتاق اضافه می‌کنه""" + for room in rooms: + if room.room_type == 'private': + other = room.members.exclude(id=user.id).first() + room.display_name = other.first_name if other else 'چت خصوصی' + room.display_avatar = other.avatar.url if other and other.avatar else None + room.display_verified = other.is_verified if other else False + else: + room.display_name = room.name + room.display_avatar = room.avatar.url if room.avatar else None + room.display_verified = room.is_verified + membership = RoomMembership.objects.filter(room=room, user=user).first() + room.unread_count = membership.count_unread() if membership else 0 + return rooms + + +@login_required +def index_view(request): + rooms = Room.objects.filter(members=request.user).distinct().order_by('name') + rooms = _decorate_rooms(rooms, request.user) + return render(request, 'index.html', {'rooms': rooms}) + + +@login_required +def room_view(request, room_id): + room = get_object_or_404(Room, id=room_id) + if not room.members.filter(id=request.user.id).exists(): + raise Http404('عضو نیستید') + + RoomMembership.objects.filter( + room=room, user=request.user + ).update(last_read_at=timezone.now()) + + other_user = None + if room.room_type == 'private': + other_user = room.members.exclude(id=request.user.id).first() + + rooms = Room.objects.filter(members=request.user).distinct().order_by('name') + rooms = _decorate_rooms(rooms, request.user) + + return render(request, 'room.html', { + 'room': room, + 'rooms': rooms, + 'member_count': room.members.count(), + 'other_user': other_user, + }) + + +def register_view(request): + if request.user.is_authenticated: + return redirect('index') + + if request.method == 'POST': + form = RegisterForm(request.POST) + if form.is_valid(): + user = form.save() + login(request, user) # بعد از ثبت‌نام، خودکار لاگین + return redirect('index') + else: + form = RegisterForm() + + return render(request, 'register.html', {'form': form}) + + +def login_view(request): + if request.user.is_authenticated: + return redirect('index') + + if request.method == 'POST': + form = LoginForm(request, data=request.POST) + if form.is_valid(): + login(request, form.get_user()) + return redirect('index') + else: + messages.error(request, 'نام کاربری یا رمز عبور اشتباه است.') + else: + form = LoginForm() + + return render(request, 'login.html', {'form': form}) + + +def logout_view(request): + logout(request) + return redirect('login') + + + + + + + +def static_version(request): + return { + 'STATIC_VERSION': getattr(settings, 'STATIC_VERSION', '1') + } + + + + + + + + + + +@login_required +def create_room_view(request): + if request.method == 'POST': + form = CreateRoomForm(request.POST, request.FILES) + if form.is_valid(): + room = form.save(commit=False) + room.created_by = request.user + room.save() + RoomMembership.objects.create(room=room, user=request.user, role='owner') + messages.success(request, f'✅ ساخته شد! کد دعوت: {room.invite_code}') + return redirect('room', room_id=room.id) # ← اگه URL اسمش فرق داره، عوض کن + else: + form = CreateRoomForm() + + return render(request, 'chat/create_room.html', {'form': form}) + + + + + + + + +@login_required +def room_info_view(request, oid): + room = get_object_or_404(Room, id=oid) + + # ← عضویت کاربر فعلی + membership = RoomMembership.objects.filter(room=room, user=request.user).first() + if not membership: + raise Http404('عضو نیستید') + + # چت خصوصی → مستقیم برو پروفایل طرف مقابل + if room.room_type == 'private': + other = room.members.exclude(id=request.user.id).first() + if other: + return redirect('user_profile', user_id=other.id) + return redirect('index') + + # ← آیا کاربر مالک یا ادمین‌ه؟ (بر اساس role، نه created_by) + is_owner = membership.role in ('owner', 'admin') + + if request.method == 'POST' and is_owner: + name = (request.POST.get('name') or '').strip() + description = (request.POST.get('description') or '').strip() + avatar = request.FILES.get('avatar') + + # ← چک حجم (۵ مگ) + if avatar and avatar.size > 5 * 1024 * 1024: + messages.error(request, 'حجم عکس نباید بیشتر از ۵ مگابایت باشد') + return redirect('room_info', oid=oid) + + # ← چک نوع فایل + if avatar and not avatar.content_type.startswith('image/'): + messages.error(request, 'فقط فایل تصویری مجاز است') + return redirect('room_info', oid=oid) + + if name: + room.name = name[:100] + room.description = description[:300] + if avatar: + room.avatar = avatar + room.save() + messages.success(request, '✅ تغییرات ذخیره شد') + return redirect('room_info', oid=oid) + else: + messages.error(request, 'نام خالی است') + + if room.room_type == 'channel' and not is_owner: + members = [] + else: + members = list(room.members.all().order_by('first_name')) + + # ← نقش هر عضو رو بگیر + roles_map = { + m.user_id: m.role + for m in RoomMembership.objects.filter(room=room, user__in=members) + } + for member in members: + member.role_display = roles_map.get(member.id, 'member') + + return render(request, 'chat/room_info.html', { + 'room': room, + 'members': members, + 'is_owner': is_owner, + 'member_count': room.members.count(), + 'my_role': membership.role, + }) + + + + + + + + + + + + + +@login_required +def room_preview_view(request, oid): + room = get_object_or_404(Room, id=oid) + + # چت خصوصی، پیش‌نمایش نداره + if room.room_type == 'private': + raise Http404('چت خصوصی پیش‌نمایش ندارد') + + # کاربر عضو هست → مستقیم برو به اتاق + if room.members.filter(id=request.user.id).exists(): + return redirect('room', room_id=oid) + + # فقط گروه/کانال عمومی پیش‌نمایش دارن + if not room.is_public: + raise Http404('این اتاق عمومی نیست') + + # ۵ پیام آخر برای پیش‌نمایش + preview_messages = list( + room.message_set.select_related('author').order_by('-id')[:5] + ) + preview_messages.reverse() + + return render(request, 'chat/room_preview.html', { + 'room': room, + 'preview_messages': preview_messages, + 'member_count': room.members.count(), + }) + + +@login_required +@require_POST +def join_room_view(request, oid): + room = get_object_or_404(Room, id=oid) + + if room.room_type == 'private' or not room.is_public: + raise Http404('این اتاق قابل پیوستن نیست') + + # اگه از قبل عضو بود → برو به اتاق + if room.members.filter(id=request.user.id).exists(): + return redirect('room', room_id=oid) + + # کانال = readonly، گروه = member + role = 'readonly' if room.room_type == 'channel' else 'member' + RoomMembership.objects.create(room=room, user=request.user, role=role) + + messages.success(request, f'✅ به «{room.name}» پیوستید') + return redirect('room', room_id=oid) + + + + + + + + + + +@login_required +def join_by_code_view(request, code): + room = Room.objects.filter(invite_code=code).first() + if not room: + raise Http404('کد دعوت معتبر نیست') + + # اگه از قبل عضو بود → برو به اتاق + if not room.members.filter(id=request.user.id).exists(): + role = 'readonly' if room.room_type == 'channel' else 'member' + RoomMembership.objects.create(room=room, user=request.user, role=role) + + return redirect('room', room_id=room.id) + + + + + + + + + +@login_required +@require_POST +def remove_member_view(request, oid, user_id): + room = get_object_or_404(Room, id=oid) + membership = RoomMembership.objects.filter(room=room, user=request.user).first() + if not membership or membership.role not in ('owner', 'admin'): + raise Http404('دسترسی ندارید') + + target = RoomMembership.objects.filter(room=room, user_id=user_id).first() + if not target or target.role == 'owner': + raise Http404('قابل حذف نیست') + + if target.role == 'admin' and membership.role != 'owner': + raise Http404('فقط مالک می‌تونه ادمین رو حذف کنه') + + target.delete() + messages.success(request, '✅ عضو حذف شد') + return redirect('room_info', oid=oid) + + +@login_required +@require_POST +def change_role_view(request, oid, user_id, role): + room = get_object_or_404(Room, id=oid) + membership = RoomMembership.objects.filter(room=room, user=request.user).first() + if not membership or membership.role != 'owner': + raise Http404('فقط مالک') + + if role not in ('admin', 'member'): + raise Http404('نقش نامعتبر') + + target = RoomMembership.objects.filter(room=room, user_id=user_id).first() + if not target or target.role == 'owner': + raise Http404('قابل تغییر نیست') + + if room.room_type == 'channel' and role != 'admin': + role = 'readonly' + + target.role = role + target.save(update_fields=['role']) + messages.success(request, '✅ نقش تغییر کرد') + return redirect('room_info', oid=oid) \ No newline at end of file diff --git a/json.json b/json.json new file mode 100644 index 0000000..fb97b27 --- /dev/null +++ b/json.json @@ -0,0 +1,44 @@ +{ + "type": "websocket", + "path": "/ws/chat/tst/", + "raw_path": "/ws/chat/tst/", + "root_path": "", + "headers": { + "host": "127.0.0.1:8000", + "user-agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:157.0) Gecko/20100101 Firefox/157.0", + "accept": "*/*", + "accept-language": "en-US,en;q=0.9", + "accept-encoding": "gzip, deflate, br, zstd", + "sec-websocket-version": "13", + "origin": "http://127.0.0.1:8000", + "sec-websocket-extensions": "permessage-deflate", + "sec-websocket-key": "oGu63t/0jY0Dt/4MR3Qnqg==", + "connection": "Upgrade", + "cookie": "csrftoken=sUhVgChMusRR0QBRjS7ebm8AXEjkVDfY", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "websocket", + "sec-fetch-site": "same-origin", + "pragma": "no-cache", + "cache-control": "no-cache", + "upgrade": "websocket" + }, + "query_string": "", + "client": ["127.0.0.1", 52978], + "server": ["127.0.0.1", 8000], + "subprotocols": [], + "asgi": { + "version": "3.0" + }, + "cookies": { + "csrftoken": "sUhVgChMusRR0QBRjS7ebm8AXEjkVDfY" + }, + "session": "", + "user": "", + "path_remaining": "", + "url_route": { + "args": [], + "kwargs": { + "room_name": "tst" + } + } +} \ No newline at end of file diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..eb88dfb --- /dev/null +++ b/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'payachat.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == '__main__': + main() diff --git a/payachat/__init__.py b/payachat/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/payachat/asgi.py b/payachat/asgi.py new file mode 100644 index 0000000..c117c23 --- /dev/null +++ b/payachat/asgi.py @@ -0,0 +1,26 @@ +""" +ASGI config for payachat project. +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'payachat.settings') + +# ⚠️ اول جنگو رو راه بنداز +django_asgi_app = get_asgi_application() + +# حالا که جنگو آماده‌ست، اپ‌ها رو ایمپورت کن +from channels.auth import AuthMiddlewareStack +from channels.routing import ProtocolTypeRouter, URLRouter +import chat.routing + +application = ProtocolTypeRouter({ + "http": django_asgi_app, + "websocket": AuthMiddlewareStack( + URLRouter( + chat.routing.websocket_urlpatterns + ) + ), +}) \ No newline at end of file diff --git a/payachat/settings.py b/payachat/settings.py new file mode 100644 index 0000000..30b2c4e --- /dev/null +++ b/payachat/settings.py @@ -0,0 +1,168 @@ +""" +Django settings for payachat project. + +Generated by 'django-admin startproject' using Django 5.2.18. + +For more information on this file, see +https://docs.djangoproject.com/en/5.2/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/5.2/ref/settings/ +""" + +from pathlib import Path +from dotenv import load_dotenv +import os +import time + + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + + +load_dotenv(BASE_DIR / '.env') + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = os.environ.get('SECRET_KEY') + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = os.environ.get('DEBUG') == 'True' + +ALLOWED_HOSTS = ["127.0.0.1", 'payachat.pn-src.ir'] + +STATIC_VERSION = int(time.time()) + +CSRF_TRUSTED_ORIGINS = [ + 'https://payachat.pn-src.ir', + 'http://payachat.pn-src.ir', +] + +# Application definition + +INSTALLED_APPS = [ + 'daphne', + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'channels', + 'chat', + 'accounts', + 'django_cleanup.apps.CleanupConfig', # همیشه خط آخر یا بعد تمام اپ ها باشد! +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'payachat.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [BASE_DIR / 'templates'], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + 'chat.views.static_version', + ], + }, + }, +] + +ASGI_APPLICATION = 'payachat.asgi.application' + +CHANNEL_LAYERS = { + "default": { + "BACKEND": "channels_redis.core.RedisChannelLayer", + "CONFIG": { + "hosts": [{"address": "redis://localhost:6379/0", "socket_timeout": 20}], + }, + }, +} + + +# Database +# https://docs.djangoproject.com/en/5.2/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/5.2/topics/i18n/ + +LANGUAGE_CODE = 'fa-ir' + +TIME_ZONE = 'Asia/Tehran' + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/5.2/howto/static-files/ + +STATIC_URL = '/static/' +STATIC_ROOT = BASE_DIR / 'staticfiles' + +MEDIA_URL = '/media/' +MEDIA_ROOT = BASE_DIR / 'mediafiles' + + +STATICFILES_DIRS = [ + BASE_DIR / "static", +] + +# Default primary key field type +# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' + + + + + +LOGIN_URL = 'login' + +AUTH_USER_MODEL = 'accounts.CustomUser' + +API_TOKEN_OTP_SMS = os.environ.get('API_TOKEN_OTP_SMS') \ No newline at end of file diff --git a/payachat/urls.py b/payachat/urls.py new file mode 100644 index 0000000..5ac96ef --- /dev/null +++ b/payachat/urls.py @@ -0,0 +1,33 @@ +""" +URL configuration for payachat project. + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/5.2/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" +from django.contrib import admin +from django.urls import path, include +from django.conf import settings +from django.conf.urls.static import static + +admin.site.site_header = "💠 پایاچت" +admin.site.site_title = "پایاچت" +admin.site.index_title = "پنل مدیریت پایاچت" + +urlpatterns = [ + path('admin/', admin.site.urls), + path('', include('chat.urls')), + path('accounts/', include('accounts.urls')), +] + +if settings.DEBUG: + urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/payachat/wsgi.py b/payachat/wsgi.py new file mode 100644 index 0000000..fe3bd36 --- /dev/null +++ b/payachat/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for payachat project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/5.2/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'payachat.settings') + +application = get_wsgi_application() diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..4d6380d --- /dev/null +++ b/requirements.txt @@ -0,0 +1,9 @@ +Django>=5.0,<6.0 +channels>=4.0 +daphne>=4.1 +# فقط برای اجرای چندپروسه‌ای/پروداکشن: +channels-redis>=4.2 +python-dotenv +pillow +django-cleanup +requests \ No newline at end of file diff --git a/static/icons/apple-touch-icon.png b/static/icons/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..2247416f7631821484ccfca7ed0cdf302791ce7f GIT binary patch literal 8618 zcmV;bAywXqP)edfDqb1(i4lsrYu+_mT-(@ zY?dPf#twmmBoH`0!4RLriS5{&*yJR}$H6BiVF@4z0gPqYU?diU3C0);WP{eH70Hs2 zKtk`myUa{4Rr#Z;r+enk%$=D#)3e)XHn)vtb4EzAynW#y!c(dLLK za{-3)fHQ$Z237@DfwdXduS9=r8rTxp0v-eIL*%H@97V~k(f0B00P!p;CPfMh*4Cab ziTsp-%YYXG>qW{hQ5ZIWuL^v{BW778)&2@>%dC^ zHR?CRy<02z~O&Cs$hWZwm5ez?)dPC6*Z)_&=e~TiMunY!U@d zgwR3lz%Ljv?-n?166KZHcX$}&ZDHfY$M;&$UI|^V*4E!+gg5N9A|*-y9}OF|e+NI@ z9Jhe62^|D$7oy~o2+tU|j1nb!;HXjhRpZ*$V-dPmTfJP1`eRBza*63+OGJLIwSD5c zQ8SL*c?;?XUSmW)4b(@?TcX5}2!K~9zxsfV!@nCP<4Az#-`qt(822Jv(W0Vu+eWN@(=-~I)B@rT$((Lalh_=`q8@cw?sEK@ytI8H#ct{ zlxP=1pSBvTY~O(4$RumFkVr}EdG1&3BVv@L6R*~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od0FQ}daTr{{>l~@KCW8`0kjT6@llX&RClOzsrRzdKn zAXiY5xNMS%`nnvppL>Dyh`mZ;Ack7TcX5>2ti&OH8!xTU0VPE0aHmt zK~z38N~Wr4^NNp#jg^-s(c=${Tfjs*cR~HY&ts== zJz)~%mDqRqKA2w)8=IflYe5s~*d=l6=45^K11e5d1bH6i1c4I6L5t!2VcmaOvT@?u zlPGZF?zdod^;u~3>%hw?iCv;MG;j?{zq31@d9Rq7KRF22F2s{}0I$L>)>WcJ1bl+T zyvxmwnmDFEKyu)~!AfkdQij(Wc)`@=m6$&Ww_>=uqV$KiwzeLbuBZYL1nU=wCoeXb z%YYXGClx8bL}54%d{vMyqs{fL*2dAI1kZ8^+pDacbdhLt1jPjy&I5B6a1dC_eM-z9 wHglgJfqW0)4h**$iEoRxx4#R_Dw3*jn*S^xk507*qoM6N<$f-P|!CjbBd literal 0 HcmV?d00001 diff --git a/static/icons/favicon-16.png b/static/icons/favicon-16.png new file mode 100644 index 0000000000000000000000000000000000000000..2c144304ae97cf2741a55eda3ddc40a0b7a24146 GIT binary patch literal 523 zcmV+m0`&cfP)%{1_y#@;`s$e7aaD?&XhsV?(FO?;)9}wo_eoeRhIxH zGo2MxZUZL(&%coYA4KF%*x7y|6?v^uVhlJJGeB8FzaR4`gtOMVx2AyZ>;N^5iM70tT>Em@2GdUT@&8oF51T@$HUAJ3_Yc3)*Q- zo|f}J`1yUHk>-YGoC7P!mrd-08z9kf)oXNr>mJ(e#o9cNzlIKyglv5aEXeO4we2eO z;Qlz9Jm8NXf)K_W5N*oOub5|#tJkP+FE3s~d%f7o2x@_%h{dzJ&?5`=&5KKDw_DGl zr126>0aKuJd(qQpYC__hL!^j1F(IIedvu>-;-x2$0q;fRTG-is`4>mJiD4D}Y2p9? N002ovPDHLkV1jNx@CX0^ literal 0 HcmV?d00001 diff --git a/static/icons/favicon-32.png b/static/icons/favicon-32.png new file mode 100644 index 0000000000000000000000000000000000000000..0ed69ad19d4ba6d2df027d0f103b7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@(1*|`s||y{B*Y1!-<_@$_gpI)E))|MYjbvOM&6k6 zz4u*3&ECXt&n$1sY@gJDZl({8?xZ2a5-DtG5(#_AQtnUE~}=p za$og^pnQFuJz~m#@GszX-lkQoX4Z;WydAN1BV!Zsg+(s5>w zDNG_Yv(y&)e+J*C19XOAcN1K6@^_>Y6Pe8EPOpGEpJfTAE1pfNJn9}C=$@l@v)O6X zvjQg=f;k-O8O|`Hf(j578NGW8K1wg05yRWa?U?B?0D#|dPnuB9PmtA?V8}ayODY!WMN>yYKq9cTR@tX6%M=NEMTktALY zS#qrSre8AtMx7RXb|B@sL|RQI@F}@*awecCZNRUSa4dB9X5$FZ&t`Qzi&zAX*)-AO zmQ|s3LHjmb*U6m1uU@3%(#r-(4wNr^7U_0V)4L) zXuRpHZoLxX>yLXc__B|)M5^?)(U0E}y*}fnz%gty7kEPHCBwIaHT0QbhH>Kg$TnSl ex#`3GTM(ORrM7*jc+nl#40tK4EK~LZ5%fQ#i@yW_ literal 0 HcmV?d00001 diff --git a/static/icons/icon-512.png b/static/icons/icon-512.png new file mode 100644 index 0000000000000000000000000000000000000000..2fddae4107e8d8f254591fbf9f6d7c6072d66ce6 GIT binary patch literal 33826 zcmYgXbzD>Z_rKeK(IGu)L{RBws2eRRWg!g;(hX9=Myr5;sI;VnNJuxsAfy{bN|5dv zx&1EsJm2T{@(+A%_kKR-yze>Z{XXY@_Dok>gN7182><|%<~7w@000I53kAr@z&|_Q zgNNWBvIjRbQ~~1Yzx0OOH~`=QG*y-Ec&Ds1_?3%jn#>=ZsI4{hDBw-*vgYMtp?A@G z^~@xLzXZxhVbajT;3B0Gqpy0&L-rhXxg#HB#;+75el17ZU5dIQ(xI-0He`7BJO}qn zfRFE$Zav8dR^1*WysN1q|6FurTV!NvqN17K`p@|%DErhpe0QhwBg=`W`zOCxqnTnL zE(fvgAK}~=46i_Yqs0-qQB!9iqJdM=)LhUuO@I=oc_|5yuPr^tsC?~{58$_V#10_D z>2Om{-?&rI$AW^u1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Av;F+}mEmm|15`YR#Y3j?kOD^icib@7r*ivX8Co9s_Z@s_Ij zMGbIepaxS8WPxIy#0EmnLMS_Gl>mrnsrX%~u#3$C5Jfew^DB&=pQ0Cn-2$&2FC@Vr zXj=AJ=LkglbEW5Fr}dZmdoe(N|1=NC6Htemh_i3+ejg<^=X5kA_QcBs02&QFpCe^aiFUM#;Fx6F#NTGr?(2ct=67q{oNGNhS zu|dov0N6MIS>EoT+DQU*Z(cCG>w(uZeGz35_<=P@9BDQu4?h25m!K1nf*qD(ud(+@ zs*LIf@~#r#u$Jyql|L%2aZe${#s~}@(!KN9_bPQzlC)DjDFUY1M+l?8+c8MXe~0p} z>>xH>A!%A#Y2EHJ#jktWQqjde7rYL6|$o3gNSud-VKuz!~WgM~V=NRpeii-MhDDQ5a z4VAuV_)dRwz(jl3mw`Z8@H|)SVi|HtXd_VU;_Kq4`#JzWk_OoH`T3DqgXcO>3>gHH zC~!&Y-sJj8)Y3)dy6tTa#z7(ZA|YQ#5BPyULEMHscm#&=RmYb%Gd=+Lr>AYC^ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..ce1bb3f --- /dev/null +++ b/static/style.css @@ -0,0 +1,1521 @@ +/* ============================================================ + SCRATCH CHAT — Stylesheet + ساختار: متغیرها → ریست → اسکرول‌بار → چیدمان → سایدبار + → چت → پیام‌ها → کامپوزر → حالت خالی → موبایل + → انیمیشن‌ها → احراز هویت + ============================================================ */ + +/* ---------- 1. متغیرها ---------- */ +:root { + /* رنگ پس‌زمینه */ + --bg: #06090d; + --bg-2: #0b1118; + --bg-card: rgba(13, 19, 28, 0.88); + --bg-input: rgba(8, 18, 28, 0.82); + --bg-hover: rgba(0, 255, 255, 0.1); + + /* رنگ متن */ + --text: #eafaff; + --text-soft: #b9dff1; + --text-muted: #7ea3b8; + + /* رنگ نئون */ + --neon: #00ffff; + --neon-2: #00cfff; + --border: rgba(0, 255, 255, 0.18); + + /* افکت نئون */ + --glow: 0 0 18px rgba(0, 255, 255, 0.3); + --glow-strong: 0 0 32px rgba(0, 255, 255, 0.55); + + /* اندازه‌ها */ + --radius: 16px; + --radius-sm: 10px; + --radius-lg: 22px; + --radius-pill: 999px; + --sidebar-w: 320px; + + /* انیمیشن */ + --transition: all 0.22s ease; +} + +/* ---------- 2. ریست ---------- */ +*, +*::before, +*::after { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +html { + height: 100%; + -webkit-text-size-adjust: 100%; + -webkit-tap-highlight-color: transparent; +} + +body { + height: 100%; + font-family: 'Vazirmatn', system-ui, sans-serif; + font-size: 15px; + line-height: 1.55; + color: var(--text); + overflow: hidden; + overscroll-behavior: none; + -webkit-font-smoothing: antialiased; + background: + radial-gradient(ellipse at top, rgba(0, 207, 255, 0.08), transparent 55%), + radial-gradient(ellipse at bottom, rgba(0, 255, 255, 0.05), transparent 55%), + var(--bg); +} + +/* ---------- 3. اسکرول‌بار ---------- */ +* { + scrollbar-width: thin; + scrollbar-color: rgba(0, 255, 255, 0.25) transparent; +} + +::-webkit-scrollbar { + width: 6px; + height: 6px; +} + +::-webkit-scrollbar-thumb { + background: rgba(0, 255, 255, 0.2); + border-radius: var(--radius-pill); +} + +::-webkit-scrollbar-thumb:hover { + background: rgba(0, 255, 255, 0.4); +} + +/* ---------- 4. چیدمان کلی ---------- */ +.app { + display: flex; + height: 100vh; + height: 100dvh; /* رفع باگ ارتفاع در موبایل */ + overflow: hidden; +} + +/* ---------- 5. سایدبار ---------- */ +.sidebar { + width: var(--sidebar-w); + flex-shrink: 0; + display: flex; + flex-direction: column; + background: var(--bg-2); + border-left: 1px solid var(--border); +} + +.sidebar-header { + display: flex; + justify-content: space-between; + align-items: center; + gap: 10px; + padding: 18px; + font-size: 1.05rem; + font-weight: 700; + border-bottom: 1px solid var(--border); + background: linear-gradient(180deg, rgba(0, 255, 255, 0.06), transparent); +} + +.room-list { + flex: 1; + min-height: 0; + overflow-y: auto; + padding: 8px; + list-style: none; +} + +/* آیتم لیست گفتگوها */ +.room-item { + position: relative; + display: flex; + align-items: center; + gap: 12px; + padding: 10px 12px; + margin-bottom: 4px; + font-size: 0.95rem; + color: var(--text-soft); + text-decoration: none; + cursor: pointer; + border: 1px solid transparent; + border-radius: var(--radius-sm); + transition: var(--transition); + /* 👇 این دو خط جدید اضافه شده */ + background: rgba(13, 19, 28, 0.4); + border: 1px solid rgba(0, 255, 255, 0.08); /* یک مرز نئونی خیلی محو و ملایم */ +} + +.room-item:hover { + color: var(--text); + background: var(--bg-hover); + border-color: rgba(0, 255, 255, 0.3); + box-shadow: 0 0 16px rgba(0, 255, 255, 0.15); + transform: translateX(-2px); +} + +.room-item.active { + color: var(--neon); + background: var(--bg-hover); + border-color: rgba(0, 255, 255, 0.3); + box-shadow: inset 0 0 15px rgba(0, 255, 255, 0.08); +} + +/* آواتار اتاق توی لیست */ +.room-item-avatar { + width: 42px; + height: 42px; + flex-shrink: 0; + display: flex; + align-items: center; + justify-content: center; + font-size: 1rem; + font-weight: 700; + color: #001018; + background: linear-gradient(135deg, var(--neon-2), var(--neon)); + border-radius: 50%; + overflow: hidden; + user-select: none; +} + +.room-item-avatar img { + width: 100%; + height: 100%; + object-fit: cover; + border-radius: 50%; + display: block; +} + +/* اطلاعات کنار آواتار */ +.room-item-info { + display: flex; + flex-direction: column; + min-width: 0; /* برای اینکه متن طولانی با ... کوتاه بشه */ +} + +.room-item-name { + font-weight: 600; + color: var(--text); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.room-item-meta { + font-size: 0.75rem; + color: var(--text-muted); + margin-top: 2px; +} + +/* ---------- 6. پنل چت ---------- */ +.chat { + flex: 1; + min-width: 0; + min-height: 0; + display: flex; + flex-direction: column; + background: var(--bg); +} + +.chat-header { + position: relative; + z-index: 2; + display: flex; + align-items: center; + gap: 10px; + padding: 16px 18px; + font-weight: 700; + border-bottom: 1px solid var(--border); + background: var(--bg-2); + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25); +} + +.chat-header .back { + display: none; + padding: 4px 10px; + font-size: 1.4rem; + line-height: 1; + color: var(--neon); + text-decoration: none; + border-radius: var(--radius-sm); + transition: var(--transition); +} + +.chat-header .back:hover { + background: var(--bg-hover); + text-shadow: 0 0 12px var(--neon); +} + +/* آواتار اتاق */ +.chat-avatar { + width: 42px; + height: 42px; + flex-shrink: 0; + display: flex; + align-items: center; + justify-content: center; + font-size: 1.05rem; + font-weight: 700; + color: #001018; + background: linear-gradient(135deg, var(--neon-2), var(--neon)); + border-radius: 50%; + box-shadow: 0 0 14px rgba(0, 255, 255, 0.3); + user-select: none; + overflow: hidden; /* ← جدید */ +} + +.chat-avatar img { + width: 42px; /* ← به‌جای 100% */ + height: 42px; /* ← به‌جای 100% */ + object-fit: cover; + border-radius: 50%; + display: block; /* ← جلوگیری از baseline issue */ + max-width: 100%; + max-height: 100%; +} + +/* اطلاعات کنار آواتار */ +.chat-header-info { + display: flex; + flex-direction: column; + gap: 1px; + min-width: 0; +} + +.chat-header-title { + font-size: 0.98rem; + font-weight: 700; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.chat-header-meta { + font-size: 0.72rem; + font-weight: 500; + color: var(--text-muted); +} + +/* ---------- 7. پیام‌ها ---------- */ +.messages { + flex: 1; + min-height: 0; + display: flex; + flex-direction: column; + gap: 10px; + padding: 18px 16px; + overflow-y: auto; + /*scroll-behavior: smooth;*/ + overflow-anchor: none; +} + +/* پوشش هر پیام (آواتار + حباب) */ +.msg-wrap { + display: flex; + align-items: flex-start; + gap: 8px; + max-width: min(72%, 560px); + align-self: flex-start; + animation: fadeIn 0.2s ease both; +} + +/* پیام خودم — سمت راست، بدون آواتار */ +.msg-wrap.me { + align-self: flex-end; + flex-direction: row-reverse; +} + +/* حباب پیام */ +.msg { + padding: 10px 14px; + line-height: 1.55; + color: var(--text); + background: var(--bg-card); + border: 1px solid var(--border); + border-radius: var(--radius); + word-wrap: break-word; + overflow-wrap: anywhere; +} + +.msg.me { + color: #001018; + background: linear-gradient(135deg, var(--neon-2), var(--neon)); + border-color: transparent; + box-shadow: var(--glow); +} + +/* نویسنده (فقط توی گروه) */ +.msg-author-link { + color: var(--neon); + text-decoration: none; + font-weight: 600; + margin-left: 4px; +} + +/* آواتار کنار پیام (فقط توی گروه) */ +.msg-avatar { + width: 32px; + height: 32px; + flex-shrink: 0; + display: flex; + align-items: center; + justify-content: center; + font-size: 0.8rem; + font-weight: 700; + color: #001018; + background: linear-gradient(135deg, var(--neon-2), var(--neon)); + border-radius: 50%; + overflow: hidden; + text-decoration: none; + margin-top: 6px; +} + +.msg-avatar img { + width: 100%; + height: 100%; + object-fit: cover; +} + +/* ---------- 8. نوار ارسال ---------- */ +.composer { + display: flex; + gap: 8px; + padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); + border-top: 1px solid var(--border); + background: var(--bg-2); + box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25); +} + +.composer input { + flex: 1; + min-width: 0; + padding: 11px 16px; + font-family: inherit; + font-size: 0.95rem; + color: var(--text); + background: var(--bg-input); + border: 1px solid var(--border); + border-radius: var(--radius-pill); + outline: none; + transition: var(--transition); +} + +.composer input::placeholder { + color: var(--text-muted); +} + +.composer input:focus { + background: rgba(8, 18, 28, 0.95); + border-color: var(--neon); + box-shadow: var(--glow); +} + +.composer button { + padding: 11px 22px; + font-family: inherit; + font-size: 0.95rem; + font-weight: 700; + color: #001018; + white-space: nowrap; + cursor: pointer; + background: linear-gradient(135deg, var(--neon-2), var(--neon)); + border: none; + border-radius: var(--radius-pill); + transition: var(--transition); +} + +.composer button:hover { + box-shadow: var(--glow-strong); + transform: translateY(-1px); +} + +/* ---------- 9. حالت خالی ---------- */ +.empty-state { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + padding: 24px; + font-size: 0.95rem; + line-height: 1.7; + color: var(--text-muted); + text-align: center; +} + +/* ---------- 10. ریسپانسیو — موبایل ---------- */ +@media (max-width: 768px) { + .sidebar { + width: 100%; + border-left: none; + } + + .chat { + display: none; + } + + .chat.mobile-show { + display: flex; + } + + .sidebar.mobile-hide { + display: none; + } + + .chat-header .back { + display: inline-block; + } + + .chat-header, + .sidebar-header { + padding-top: max(16px, env(safe-area-inset-top, 0px)); + } +} + +/* ---------- 11. انیمیشن‌ها ---------- */ +@keyframes fadeIn { + from { + opacity: 0; + transform: translateY(6px); + } + to { + opacity: 1; + transform: none; + } +} + +@media (prefers-reduced-motion: reduce) { + *, + *::before, + *::after { + animation-duration: 0.01ms !important; + transition-duration: 0.01ms !important; + } +} + +/* ---------- 12. فرم‌های احراز هویت ---------- */ +.auth-page { + min-height: 100vh; + min-height: 100dvh; + display: flex; + align-items: center; + justify-content: center; + padding: 20px; + background: + radial-gradient(circle at 30% 20%, rgba(0, 255, 255, 0.1), transparent 45%), + radial-gradient(circle at 70% 80%, rgba(0, 207, 255, 0.07), transparent 45%); +} + +.auth-card { + width: 100%; + max-width: 420px; + padding: 30px 26px; + background: var(--bg-card); + border: 1px solid var(--border); + border-radius: var(--radius-lg); + box-shadow: var(--glow), 0 20px 60px rgba(0, 0, 0, 0.4); + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); + animation: fadeIn 0.3s ease both; +} + +.auth-card h1 { + margin-bottom: 22px; + font-size: 1.4rem; + color: var(--text); + text-align: center; + letter-spacing: 0.3px; + text-shadow: 0 0 20px rgba(0, 255, 255, 0.3); +} + +.auth-card .field { + margin-bottom: 14px; +} + +.auth-card label { + display: block; + margin-bottom: 6px; + font-size: 0.85rem; + font-weight: 600; + color: var(--text-soft); +} + +.auth-card input { + width: 100%; + padding: 11px 14px; + font-family: inherit; + font-size: 0.95rem; + color: var(--text); + background: var(--bg-input); + border: 1px solid var(--border); + border-radius: var(--radius-sm); + outline: none; + transition: var(--transition); +} + +.auth-card input:focus { + border-color: var(--neon); + box-shadow: var(--glow); +} + +.auth-card button { + width: 100%; + margin-top: 10px; + padding: 12px; + font-family: inherit; + font-size: 0.95rem; + font-weight: 700; + color: #001018; + cursor: pointer; + background: linear-gradient(135deg, var(--neon-2), var(--neon)); + border: none; + border-radius: var(--radius-pill); + transition: var(--transition); +} + +.auth-card button:hover { + box-shadow: var(--glow-strong); + transform: translateY(-1px); +} + +.auth-card .error { + padding: 9px 12px; + margin-bottom: 14px; + font-size: 0.85rem; + color: #ff9ea8; + background: rgba(255, 95, 109, 0.12); + border: 1px solid rgba(255, 95, 109, 0.3); + border-radius: var(--radius-sm); + animation: fadeIn 0.2s ease both; +} + +.auth-card .hint { + margin-top: 16px; + font-size: 0.85rem; + color: var(--text-muted); + text-align: center; +} + +.auth-card .hint a { + font-weight: 600; + color: var(--neon); + text-decoration: none; + transition: var(--transition); +} + +.auth-card .hint a:hover { + text-shadow: 0 0 12px rgba(0, 255, 255, 0.7); +} + +/* ============================================================ + صفحه‌ی تنظیمات + ============================================================ */ + +.settings-layout { + display: flex; + flex-direction: column; + height: 100vh; + height: 100dvh; + background: var(--bg); +} + +.settings-header { + display: flex; + align-items: center; + gap: 12px; + padding: 14px 18px; + padding-top: max(14px, env(safe-area-inset-top, 0px)); + background: var(--bg-2); + border-bottom: 1px solid var(--border); + flex-shrink: 0; +} + +.settings-back { + color: var(--neon); + text-decoration: none; + font-size: 1.4rem; + padding: 4px 10px; + border-radius: 8px; + transition: var(--transition); +} + +.settings-back:hover { + background: var(--bg-hover); +} + +.settings-header-title { + flex: 1; + font-weight: 700; + font-size: 1rem; +} + +.settings-header-save { + padding: 8px 18px; + border: none; + border-radius: var(--radius-pill); + background: linear-gradient(135deg, var(--neon-2), var(--neon)); + color: #001018; + font-family: inherit; + font-weight: 700; + font-size: 0.85rem; + cursor: pointer; + transition: var(--transition); +} + +.settings-header-save:hover { + box-shadow: var(--glow-strong); +} + +.settings-body { + flex: 1; + min-height: 0; + overflow-y: auto; + padding: 24px 20px 40px; +} + +.settings-toast { + max-width: 600px; + margin: 0 auto 16px; + padding: 10px 14px; + background: rgba(0, 255, 255, 0.1); + border: 1px solid rgba(0, 255, 255, 0.3); + border-radius: var(--radius-sm); + color: var(--neon); + text-align: center; + font-size: 0.85rem; +} + +/* آواتار */ +.settings-avatar-btn { + position: relative; + cursor: pointer; + display: inline-block; +} + +.settings-avatar { + width: 100px; + height: 100px; + display: flex; + align-items: center; + justify-content: center; + font-size: 2.4rem; + font-weight: 700; + color: #001018; + background: linear-gradient(135deg, var(--neon-2), var(--neon)); + border-radius: 50%; + overflow: hidden; + box-shadow: 0 0 24px rgba(0, 255, 255, 0.35); + user-select: none; + transition: var(--transition); +} + +.settings-avatar-btn:hover .settings-avatar { + box-shadow: 0 0 32px rgba(0, 255, 255, 0.55); +} + +.settings-avatar img { + width: 100%; + height: 100%; + object-fit: cover; +} + +.settings-avatar-badge { + position: absolute; + bottom: 2px; + left: 2px; + width: 30px; + height: 30px; + display: flex; + align-items: center; + justify-content: center; + background: var(--bg-2); + border: 2px solid var(--neon); + border-radius: 50%; + font-size: 0.8rem; +} + +/* گروه‌ها */ +.settings-group { + max-width: 600px; + margin: 0 auto 16px; + background: var(--bg-card); + border: 1px solid var(--border); + border-radius: var(--radius); + /* overflow: hidden; ← حذفش کن */ +} + +/* جبران: گوشه‌های گرد برای اولین و آخرین فرزند */ +.settings-group > :first-child { + border-top-left-radius: var(--radius); + border-top-right-radius: var(--radius); +} + +.settings-group > :last-child { + border-bottom-left-radius: var(--radius); + border-bottom-right-radius: var(--radius); +} + +.settings-group-title { + padding: 8px 16px; + font-size: 0.7rem; + font-weight: 700; + color: var(--neon); + text-transform: uppercase; + letter-spacing: 0.5px; + background: rgba(0, 255, 255, 0.05); + border-bottom: 1px solid var(--border); +} + +.settings-row { + padding: 12px 16px; + border-bottom: 1px solid rgba(0, 255, 255, 0.06); +} + +.settings-row:last-child { + border-bottom: none; +} + +.settings-row label { + display: block; + font-size: 0.7rem; + color: var(--text-muted); + margin-bottom: 4px; +} + +.settings-row input, +.settings-row textarea { + width: 100%; + padding: 2px 0; + background: transparent; + border: none; + border-bottom: 1px solid transparent; + color: var(--text); + font-family: inherit; + font-size: 0.95rem; + outline: none; + resize: none; + transition: border-color 0.15s ease; +} + +.settings-row input:focus, +.settings-row textarea:focus { + border-bottom-color: var(--neon); +} + +/* بخش آواتار + دکمه‌ی حذف */ +.settings-avatar-section { + position: relative; + display: flex; + justify-content: center; + padding-bottom: 28px; +} + +/* دکمه‌ی حذف عکس */ +.settings-delete-avatar { + position: absolute; + left: calc(50% + 72px); + top: 50%; + transform: translateY(-50%); + display: inline-flex; + align-items: center; + gap: 8px; + padding: 8px 14px; + background: rgba(255, 95, 109, 0.06); + color: #ff9ea8; + font-size: 0.82rem; + border: 1px solid rgba(255, 95, 109, 0.3); + border-radius: var(--radius-pill); + cursor: pointer; + white-space: nowrap; + transition: var(--transition); +} + +.settings-delete-avatar:hover { + background: rgba(255, 95, 109, 0.12); + border-color: rgba(255, 95, 109, 0.6); +} + +/* موبایل — زیر آواتار */ +@media (max-width: 640px) { + .settings-avatar-section { + flex-direction: column; + align-items: center; + } + + .settings-delete-avatar { + position: static; + transform: none; + margin-top: 16px; + } +} + +.settings-row-error { + font-size: 0.75rem; + color: #ff9ea8; + margin-top: 4px; +} + +.settings-row-danger { + display: block; + color: #ff9ea8; + text-decoration: none; + font-weight: 600; +} + +.settings-row-danger:hover { + background: rgba(255, 95, 109, 0.06); +} + +@media (max-width: 768px) { + .settings-body { + padding: 18px 12px 30px; + } + + .settings-avatar { + width: 85px; + height: 85px; + font-size: 2rem; + } +} + +/* ============================================================ + صفحه‌ی پروفایل + ============================================================ */ + +/* کارت پروفایل — برای پروفایل کاربر، کانال، گروه */ +.profile-card { + max-width: 600px; + margin: 0 auto 24px; + text-align: center; + padding: 30px 20px 24px; +} + +/* آواتار بزرگ — قابل استفاده برای کاربر/اتاق */ +.profile-avatar { + width: 120px; + height: 120px; + margin: 0 auto 18px; + display: flex; + align-items: center; + justify-content: center; + font-size: 3rem; + font-weight: 700; + color: #001018; + background: linear-gradient(135deg, var(--neon-2), var(--neon)); + border-radius: 50%; + overflow: hidden; + box-shadow: 0 0 32px rgba(0, 255, 255, 0.4); + border: 3px solid rgba(0, 255, 255, 0.2); + user-select: none; +} + +.profile-avatar img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; +} + +/* نام نمایشی */ +.profile-name { + font-size: 1.5rem; + font-weight: 700; + color: var(--text); + margin-bottom: 4px; +} + +/* نام کاربری — می‌شه برای هر جایی که @username نشون می‌دیم استفاده کرد */ +.profile-username { + font-size: 0.9rem; + color: var(--neon); + font-weight: 600; + direction: ltr; + display: inline-block; + margin-bottom: 8px; +} + +/* بیو */ +.profile-bio { + font-size: 0.92rem; + color: var(--text-soft); + line-height: 1.7; + max-width: 400px; + margin: 10px auto 0; + padding: 12px 16px; + background: rgba(0, 255, 255, 0.04); + border: 1px solid rgba(0, 255, 255, 0.08); + border-radius: var(--radius); +} + +/* دکمه‌ها — قابل استفاده در هر جایی که گروه دکمه داریم */ +.profile-actions { + display: flex; + gap: 8px; + margin-top: 22px; + justify-content: center; + flex-wrap: wrap; +} + +.profile-btn { + display: inline-flex; + align-items: center; + gap: 8px; + padding: 11px 22px; + font-family: inherit; + font-size: 0.9rem; + font-weight: 700; + text-decoration: none; + border-radius: var(--radius-pill); + cursor: pointer; + transition: var(--transition); + border: 1px solid transparent; +} + +.profile-btn-primary { + color: #001018; + background: linear-gradient(135deg, var(--neon-2), var(--neon)); + box-shadow: var(--glow); +} + +.profile-btn-primary:hover { + box-shadow: var(--glow-strong); + transform: translateY(-1px); +} + +.profile-btn-secondary { + color: var(--neon); + background: transparent; + border-color: var(--border); +} + +.profile-btn-secondary:hover { + background: var(--bg-hover); + border-color: rgba(0, 255, 255, 0.3); +} + +/* مقدار فقط‌خواندنی — برای ردیف‌های تنظیمات که input نیستن */ +.settings-value { + font-size: 0.95rem; + color: var(--text); + padding: 2px 0; +} + +/* موبایل */ +@media (max-width: 768px) { + .profile-avatar { + width: 100px; + height: 100px; + font-size: 2.4rem; + } + + .profile-name { + font-size: 1.25rem; + } + + .profile-card { + padding: 20px 16px; + } +} + +/* placeholder برای چت خالی */ +.chat-empty { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 12px; + color: var(--text-muted); + text-align: center; + padding: 24px; +} + +.chat-empty-icon { + font-size: 3rem; + opacity: 0.6; +} + +.chat-empty-text { + font-size: 0.95rem; + line-height: 1.7; +} + +/* ============================================================ + فرم‌های خاص: رادیو، چک‌باکس، آپلود فایل + ============================================================ */ + +/* رادیو به‌صورت کارت انتخاب */ +.settings-row .radio-group { + display: flex; + gap: 10px; + margin-top: 6px; +} + +.settings-row .radio-group label { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + gap: 8px; + padding: 14px; + background: var(--bg-input); + border: 1px solid var(--border); + border-radius: var(--radius); + cursor: pointer; + font-size: 0.92rem; + color: var(--text-soft); + transition: var(--transition); + margin: 0; +} + +.settings-row .radio-group label:hover { + border-color: rgba(0, 255, 255, 0.4); + background: rgba(0, 255, 255, 0.04); +} + +.settings-row .radio-group label:has(input:checked) { + background: rgba(0, 255, 255, 0.12); + border-color: var(--neon); + color: var(--neon); + box-shadow: 0 0 16px rgba(0, 255, 255, 0.2); + font-weight: 700; +} + +.settings-row .radio-group input[type="radio"] { + display: none; +} + +/* چک‌باکس به‌صورت سوییچ */ +.settings-row .toggle-row { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + cursor: pointer; + margin: 0; +} + +.settings-row .toggle-row span { + font-size: 0.92rem; + color: var(--text); +} + +.settings-row .toggle-switch { + position: relative; + width: 44px; + height: 24px; + flex-shrink: 0; + background: var(--bg-input); + border: 1px solid var(--border); + border-radius: var(--radius-pill); + transition: var(--transition); +} + +.settings-row .toggle-switch::after { + content: ''; + position: absolute; + top: 2px; + right: 2px; + width: 18px; + height: 18px; + background: var(--text-muted); + border-radius: 50%; + transition: var(--transition); +} + +.settings-row .toggle-row input[type="checkbox"] { + display: none; +} + +.settings-row .toggle-row input:checked + .toggle-switch { + background: rgba(0, 255, 255, 0.15); + border-color: var(--neon); +} + +.settings-row .toggle-row input:checked + .toggle-switch::after { + background: var(--neon); + right: calc(100% - 20px); + box-shadow: 0 0 10px var(--neon); +} + +/* آپلود فایل — ناحیه کلیک‌شدنی */ +.file-upload-area { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 6px; + padding: 24px 16px; + margin-top: 6px; + background: var(--bg-input); + border: 1.5px dashed var(--border); + border-radius: var(--radius); + cursor: pointer; + text-align: center; + transition: var(--transition); +} + +.file-upload-area:hover { + border-color: var(--neon); + background: rgba(0, 255, 255, 0.04); +} + +.file-upload-area.has-file { + border-style: solid; + border-color: var(--neon); + background: rgba(0, 255, 255, 0.06); +} + +.file-upload-icon { + font-size: 1.8rem; + opacity: 0.7; +} + +.file-upload-text { + font-size: 0.85rem; + color: var(--text-muted); +} + +.file-upload-name { + font-size: 0.85rem; + color: var(--neon); + font-weight: 600; + direction: ltr; +} + +.file-upload-area input[type="file"] { + display: none; +} + +/* لینک مطلق که کل هدر رو می‌پوشونه */ +.chat-header-link { + position: absolute; + inset: 0; + z-index: 1; + text-decoration: none; +} + +/* دکمه‌ی بازگشت، بالای لینک */ +.chat-header .back { + position: relative; + z-index: 2; +} + +/* کد دعوت بزرگ */ +.invite-code-big { + padding: 8px 16px; + background: rgba(0, 255, 255, 0.1); + border: 1px solid var(--neon); + border-radius: var(--radius-pill); + color: var(--neon); + font-family: 'Courier New', monospace; + font-size: 1.1rem; + font-weight: 700; + letter-spacing: 2px; + direction: ltr; + display: inline-block; +} + +/* ============================================================ + دکمه‌ی عضویت (پیش‌نمایش) + ============================================================ */ + +.join-cta { + max-width: 380px; + margin: 8px auto 40px; + padding: 0 20px; + animation: fadeIn 0.4s ease both; +} + +.join-cta form { + margin: 0; +} + +.join-btn { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + gap: 8px; + padding: 16px 24px; + font-family: inherit; + font-size: 1rem; + font-weight: 700; + letter-spacing: 0.3px; + color: #001018; + background: linear-gradient(135deg, var(--neon-2), var(--neon)); + border: none; + border-radius: var(--radius-pill); + cursor: pointer; + box-shadow: var(--glow); + transition: var(--transition); + position: relative; + overflow: hidden; +} + +.join-btn::before { + content: ''; + position: absolute; + inset: 0; + background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.4), transparent); + transform: translateX(-100%); + transition: transform 0.6s ease; +} + +.join-btn:hover::before { + transform: translateX(100%); +} + +.join-btn:hover { + box-shadow: var(--glow-strong); + transform: translateY(-2px); +} + +.join-btn:active { + transform: translateY(0); +} + +/* موبایل */ +@media (max-width: 768px) { + .join-cta { + margin-bottom: 32px; + } + + .join-btn { + padding: 14px 20px; + font-size: 0.95rem; + } +} + +/* ============================================================ + منوی ۳ نقطه برای اعضا + ============================================================ */ + +.member-row { + position: relative; + display: flex; + align-items: stretch; +} + +/* ردیف بازشده، روی ردیف‌های بعدی */ +.member-row:has(.member-menu[open]) { + z-index: 10; +} + +.member-row .room-item { + flex: 1; + min-width: 0; + padding-left: 48px; + margin-bottom: 0 !important; +} + +/* دکمه‌ی ⋯ — دقیقاً هم‌ارتفاع دکمه، وسط ردیف */ +.member-menu { + position: absolute; + left: 8px; + top: 50%; + transform: translateY(-50%); + z-index: 20; +} + +.member-menu summary { + list-style: none; + cursor: pointer; + width: 32px; + height: 32px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 8px; + color: var(--text-muted); + font-size: 1.2rem; + line-height: 1; + transition: var(--transition); + user-select: none; +} + +.member-menu summary::-webkit-details-marker { display: none; } + +.member-menu summary:hover, +.member-menu[open] summary { + background: var(--bg-hover); + color: var(--neon); +} + +/* منو — دقیقاً زیر دکمه */ +.member-menu-list { + position: absolute; + top: calc(100% + 4px); + left: 0; + min-width: 190px; + background: var(--bg-2); + border: 1px solid var(--border); + border-radius: var(--radius-sm); + box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7); + z-index: 100; + overflow: hidden; + animation: fadeIn 0.15s ease both; +} + +.member-menu:not([open]) .member-menu-list { display: none; } + +.member-menu-list form { margin: 0; } + +.member-menu-list button { + width: 100%; + padding: 11px 16px; + background: transparent; + border: none; + color: var(--text); + text-align: right; + cursor: pointer; + font-family: inherit; + font-size: 0.85rem; + transition: var(--transition); + white-space: nowrap; +} + +.member-menu-list button:hover { + background: var(--bg-hover); +} + +.member-menu-list button.danger { color: #ff9ea8; } +.member-menu-list button.danger:hover { + background: rgba(255, 95, 109, 0.1); +} + +/* ورودی‌های editable توی اطلاعات اتاق */ +.room-info-input { + width: 100%; + max-width: 360px; + margin: 8px auto 0; + display: block; + padding: 10px 14px; + background: var(--bg-input); + border: 1px solid var(--border); + border-radius: var(--radius-sm); + color: var(--text); + font-family: inherit; + outline: none; + text-align: center; + transition: var(--transition); + resize: none; +} + +.room-info-input:focus { + border-color: var(--neon); + box-shadow: var(--glow); +} + +.room-info-input-title { + font-size: 1.3rem; + font-weight: 700; + margin-bottom: 10px; +} + +.room-info-input-bio { + font-size: 0.9rem; + line-height: 1.6; + min-height: 50px; +} + +/* آواتار کلیک‌شدنی برای ویرایش */ +.profile-avatar-label { + position: relative; + display: inline-block; + cursor: pointer; + margin: 0 auto 18px; + transition: var(--transition); +} + +.profile-avatar-label:hover .profile-avatar { + box-shadow: 0 0 40px rgba(0, 255, 255, 0.6); + transform: scale(1.03); +} + +.profile-avatar-label .settings-avatar-badge { + position: absolute; + bottom: 4px; + left: 4px; + width: 36px; + height: 36px; + display: flex; + align-items: center; + justify-content: center; + background: var(--bg-2); + border: 2px solid var(--neon); + border-radius: 50%; + font-size: 1rem; + box-shadow: var(--glow); +} + +/* ساعت پیام */ +.msg-time { + display: block; + margin-top: 4px; + font-size: 0.65rem; + color: var(--text-muted); + text-align: left; + direction: ltr; + opacity: 0.8; +} + +.msg.me .msg-time { + text-align: right; + color: rgba(0, 16, 24, 0.65); +} + +/* تیک آبی */ +.verified-pro { + display: inline-flex; + align-items: center; + justify-content: center; + flex: 0 0 auto; + width: 1.1em; + height: 1.1em; + font-size: inherit; + vertical-align: middle; + margin: 0 0.05em; + transform: translateY(-0.24em); + filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15)); + transition: transform 0.2s ease, filter 0.2s ease; + cursor: default; +} +.verified-pro svg { display: block; width: 100%; height: 100%; fill: currentColor; } +.verified-blue { color: #3390ec; } +.verified-white { color: #ffffff; } + +/* انیمیشن ورود پیام جدید */ +@keyframes msgInMe { + from { + opacity: 0; + transform: translateY(20px) translateX(20px) scale(0.95); + } + to { + opacity: 1; + transform: translateY(0) translateX(0) scale(1); + } +} + +.msg-new.me { + animation: msgInMe 0.25s ease-out; +} + +.unread-bubble { + position: absolute; + left: 12px; + bottom: 12px; + background: #3390ec; + color: white; + font-size: 12px; + font-weight: 600; + min-width: 22px; + height: 22px; + padding: 0 6px; + border-radius: 11px; + display: flex; + align-items: center; + justify-content: center; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); + font-family: system-ui, -apple-system, sans-serif; +} \ No newline at end of file diff --git a/templates/accounts/login.html b/templates/accounts/login.html new file mode 100644 index 0000000..b433afa --- /dev/null +++ b/templates/accounts/login.html @@ -0,0 +1,37 @@ +{% extends "base.html" %} + +{% block title %}ورود - پایاچت{% endblock %} + +{% block body %} +
+
+

ورود

+ + {% if messages %} + {% for m in messages %} +
{{ m }}
+ {% endfor %} + {% endif %} + +
+ {% csrf_token %} + + {% for field in form %} +
+ + {{ field }} + {% if field.errors %} +
{{ field.errors.0 }}
+ {% endif %} +
+ {% endfor %} + + +
+ +

+ حساب نداری؟ ثبت‌نام کن +

+
+
+{% endblock %} \ No newline at end of file diff --git a/templates/accounts/profile.html b/templates/accounts/profile.html new file mode 100644 index 0000000..6c563a6 --- /dev/null +++ b/templates/accounts/profile.html @@ -0,0 +1,49 @@ +{% extends "base.html" %} +{% load static %} + +{% block title %}{{ profile_user.first_name }} - پایاچت{% endblock %} + +{% block body %} +
+ +
+ → +
پروفایل
+
+ +
+ +
+
+ {% if profile_user.avatar %} + {{ profile_user.first_name }} + {% else %} + {{ profile_user.first_name|first|default:"؟" }} + {% endif %} +
+ +

+ {{ profile_user.first_name }} + {% include "includes/_verified_badge.html" with is_verified=profile_user.is_verified %} +

+ + {% if profile_user.username %} +
{{ profile_user.username }}
+ {% endif %} + + {% if profile_user.bio %} +

{{ profile_user.bio|linebreaksbr }}

+ {% endif %} + +
+ {% if profile_user.id == request.user.id %} + ✏️ ویرایش پروفایل + {% else %} + 💬 ارسال پیام + {% endif %} +
+
+ +
+
+{% endblock %} \ No newline at end of file diff --git a/templates/accounts/register.html b/templates/accounts/register.html new file mode 100644 index 0000000..e4930fb --- /dev/null +++ b/templates/accounts/register.html @@ -0,0 +1,35 @@ +{% extends "base.html" %} + +{% block title %}ثبت‌نام - پایاچت{% endblock %} + +{% block body %} +
+
+

ثبت‌نام

+ {% if form.non_field_errors %} + {% for error in form.non_field_errors %} +
{{ error }}
+ {% endfor %} + {% endif %} +
+ {% csrf_token %} + + {% for field in form %} +
+ + {{ field }} + {% if field.errors %} +
{{ field.errors.0 }}
+ {% endif %} +
+ {% endfor %} + + +
+ +

+ حساب داری؟ وارد شو +

+
+
+{% endblock %} \ No newline at end of file diff --git a/templates/accounts/settings.html b/templates/accounts/settings.html new file mode 100644 index 0000000..b004a6d --- /dev/null +++ b/templates/accounts/settings.html @@ -0,0 +1,108 @@ +{% extends "base.html" %} +{% load static %} + +{% block title %}تنظیمات - پایاچت{% endblock %} + +{% block body %} +
+ +
+ → +
تنظیمات
+ +
+ +
+ + {% if messages %} + {% for m in messages %} +
{{ m }}
+ {% endfor %} + {% endif %} + +
+ {% csrf_token %} + +
+ + + + {% if request.user.avatar %} + + {% endif %} +
+ +
+
اطلاعات شخصی
+ +
+ + {{ form.first_name }} + {% if form.first_name.errors %}
{{ form.first_name.errors.0 }}
{% endif %} +
+ +
+ + {{ form.username }} + {% if form.username.errors %}
{{ form.username.errors.0 }}
{% endif %} +
+ +
+ + {{ form.bio }} + {% if form.bio.errors %}
{{ form.bio.errors.0 }}
{% endif %} +
+
+ + + + + +
+
+
+{% endblock %} + +{% block extra_js %} + +{% endblock %} \ No newline at end of file diff --git a/templates/accounts/verify_otp.html b/templates/accounts/verify_otp.html new file mode 100644 index 0000000..4b036b5 --- /dev/null +++ b/templates/accounts/verify_otp.html @@ -0,0 +1,34 @@ +{% extends "base.html" %} + +{% block title %}تأیید شماره - پایاچت{% endblock %} + +{% block body %} +
+
+

تأیید شماره

+

+ کد ۶ رقمی ارسال‌شده به + {{ phone }} + را وارد کنید. +

+ +
+ {% csrf_token %} + + {% for field in form %} +
+ + {{ field }} + {% if field.errors %}
{{ field.errors.0 }}
{% endif %} +
+ {% endfor %} + + +
+ +

+ شماره رو اشتباه زدی؟ برگرد +

+
+
+{% endblock %} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..fffbd11 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,31 @@ +{% load static %} + + + + + + + {% block title %}پایاچت{% endblock %} + + + + + + + + + + + + + + {% block extra_head %}{% endblock %} + + + + {% block body %}{% endblock %} + + + {% block extra_js %}{% endblock %} + + \ No newline at end of file diff --git a/templates/chat/create_room.html b/templates/chat/create_room.html new file mode 100644 index 0000000..8571a9b --- /dev/null +++ b/templates/chat/create_room.html @@ -0,0 +1,94 @@ +{% extends "base.html" %} + +{% block title %}ساخت گروه/کانال - پایاچت{% endblock %} + +{% block body %} +
+
+ → +
ساخت جدید
+ +
+ +
+
+ {% csrf_token %} + +
+
اطلاعات اتاق
+ + +
+ + {{ form.name }} + {% if form.name.errors %}
{{ form.name.errors.0 }}
{% endif %} +
+ + +
+ +
+ + +
+ {% if form.room_type.errors %}
{{ form.room_type.errors.0 }}
{% endif %} +
+ + +
+ + {{ form.description }} + {% if form.description.errors %}
{{ form.description.errors.0 }}
{% endif %} +
+ + +
+ + + {% if form.avatar.errors %}
{{ form.avatar.errors.0 }}
{% endif %} +
+ + +
+ +
+
+
+
+
+{% endblock %} + +{% block extra_js %} + +{% endblock %} \ No newline at end of file diff --git a/templates/chat/room_info.html b/templates/chat/room_info.html new file mode 100644 index 0000000..1b535c4 --- /dev/null +++ b/templates/chat/room_info.html @@ -0,0 +1,203 @@ +{% extends "base.html" %} +{% load static %} + +{% block title %}{{ room.name }} - اطلاعات{% endblock %} + +{% block body %} +
+ +
+ → +
اطلاعات
+
+ +
+ + {% if is_owner %} +
+ {% csrf_token %} + + + + + + +
+ {% if room.room_type == 'channel' %}📢 کانال{% else %}👥 گروه{% endif %} + · {{ member_count }} عضو +
+ + + + +
+ {% else %} + +
+
+ {% if room.avatar %} + {{ room.name }} + {% else %} + {{ room.name|first }} + {% endif %} +
+

+ {{ room.name }} + {% include "includes/_verified_badge.html" with is_verified=room.is_verified %} +

+
+ {% if room.room_type == 'channel' %}📢 کانال{% else %}👥 گروه{% endif %} + · {{ member_count }} عضو +
+ {% if room.description %} +

{{ room.description|linebreaksbr }}

+ {% endif %} +
+ {% endif %} + + {% if is_owner and room.invite_code %} +
+
کد دعوت
+
+ {{ room.invite_code }} + +
+
+ {% endif %} + + {% if members %} +
+
اعضا ({{ member_count }})
+
+ {% for member in members %} +
+ + +
+ {% if member.avatar %} + {{ member.first_name }} + {% else %} + {{ member.first_name|first }} + {% endif %} +
+
+ + {{ member.first_name }} + {% include "includes/_verified_badge.html" with is_verified=member.is_verified %} + + + {% if member.role_display == 'owner' %}👑 مالک + {% elif member.role_display == 'admin' %}⭐ ادمین + {% elif member.username %}@{{ member.username }} + {% else %}عضو{% endif %} + +
+
+ + {% if my_role == 'owner' or my_role == 'admin' %} + {% if member.id != request.user.id and member.role_display != 'owner' %} +
+ ⋯ +
+ + {% if my_role == 'owner' and member.role_display != 'admin' %} +
+ {% csrf_token %} + +
+ {% endif %} + + {% if my_role == 'owner' and member.role_display == 'admin' %} +
+ {% csrf_token %} + +
+ {% endif %} + + {% if my_role == 'owner' or member.role_display == 'member' %} +
+ {% csrf_token %} + +
+ {% endif %} + +
+
+ {% endif %} + {% endif %} + +
+ {% endfor %} +
+
+ {% endif %} + +
+
+{% endblock %} + +{% block extra_js %} + +{% endblock %} \ No newline at end of file diff --git a/templates/chat/room_preview.html b/templates/chat/room_preview.html new file mode 100644 index 0000000..26ea88f --- /dev/null +++ b/templates/chat/room_preview.html @@ -0,0 +1,78 @@ +{% extends "base.html" %} +{% load static %} + +{% block title %}{{ room.name }} - پیش‌نمایش{% endblock %} + +{% block body %} +
+ +
+ → +
پیش‌نمایش
+
+ {% csrf_token %} + +
+
+ +
+ +
+
+ {% if room.avatar %} + {{ room.name }} + {% else %} + {{ room.name|first }} + {% endif %} +
+

{{ room.name }}

+
+ {% if room.room_type == 'channel' %}📢 کانال{% else %}👥 گروه{% endif %} + · {{ member_count }} عضو +
+ {% if room.description %} +

{{ room.description|linebreaksbr }}

+ {% endif %} +
+ + {% if preview_messages %} +
+
پیش‌نمایش پیام‌ها
+
+ {% for m in preview_messages %} + + {% endfor %} +
+
+ {% endif %} + +
+
+ {% csrf_token %} + +
+
+ +
+
+{% endblock %} \ No newline at end of file diff --git a/templates/includes/_verified_badge.html b/templates/includes/_verified_badge.html new file mode 100644 index 0000000..6c0ad98 --- /dev/null +++ b/templates/includes/_verified_badge.html @@ -0,0 +1,7 @@ +{% if is_verified %} + + + + + +{% endif %} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..70cc8f8 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,66 @@ +{% extends "base.html" %} +{% load static %} + +{% block title %}پایاچت{% endblock %} + +{% block body %} + +{% endblock %} \ No newline at end of file diff --git a/templates/room.html b/templates/room.html new file mode 100644 index 0000000..79b518e --- /dev/null +++ b/templates/room.html @@ -0,0 +1,302 @@ +{% extends "base.html" %} +{% load static %} + +{% block title %}{{ room.name }} - پایاچت{% endblock %} + +{% block body %} +
+ + + +
+
+ {% if other_user %} + + {% else %} + + {% endif %} + + → + +
+ {% if other_user %} + {% if other_user.avatar %}{{ other_user.first_name }}{% else %}{{ other_user.first_name|first }}{% endif %} + {% elif room.avatar %} + {{ room.name }} + {% else %} + {{ room.name|first }} + {% endif %} +
+ +
+
+ {% if other_user %} + {{ other_user.first_name }} + {% include "includes/_verified_badge.html" with is_verified=other_user.is_verified %} + {% else %} + {{ room.name }} + {% include "includes/_verified_badge.html" with is_verified=room.is_verified %} + {% endif %} +
+
{% if not other_user %}{{ room.members.count }} عضو{% endif %}
+
+ + + + ⚙️ +
+ +
+ + + + +
+ + +
+
+ +
+{% endblock %} + +{% block extra_js %} + +{% endblock %} \ No newline at end of file