Add folders with password sharing and email invites
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ folder.name }} — Shared folder{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="page-header">
|
||||
<div class="container">
|
||||
<h1 class="page-header__title">📁 {{ folder.name }}</h1>
|
||||
<p class="page-header__subtitle">Общая папка · {{ photos|length }} фото</p>
|
||||
{% if share_url %}
|
||||
<div class="page-header__actions">
|
||||
<button type="button" class="btn btn--ghost copy-btn" data-url="{{ share_url }}">Копировать ссылку</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% include "partials/alerts.html" %}
|
||||
|
||||
{% if can_edit %}
|
||||
<section id="upload" class="upload-section">
|
||||
<div class="container">
|
||||
<h2 class="section-title">Загрузить в папку</h2>
|
||||
<form action="{{ url_for('main.upload') }}" method="post" enctype="multipart/form-data" class="upload-form" id="uploadForm">
|
||||
<input type="hidden" name="folder_id" value="{{ folder.id }}">
|
||||
<div class="dropzone" id="dropzone">
|
||||
<input type="file" name="photo" id="photoInput" accept="image/png,image/jpeg,image/gif,image/webp,image/bmp" hidden>
|
||||
<p class="dropzone__title">Перетащите фото сюда</p>
|
||||
<div class="dropzone__preview" id="preview" hidden>
|
||||
<img id="previewImg" alt="Предпросмотр">
|
||||
<span id="previewName"></span>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn--primary" id="submitBtn" disabled>Загрузить</button>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<section class="gallery-section">
|
||||
<div class="container">
|
||||
{% with photos=photos, empty_title='В папке пока нет фото' %}
|
||||
{% include "partials/photo_gallery.html" %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,22 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Пароль — {{ folder.name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="auth-section">
|
||||
<div class="container auth-container">
|
||||
<div class="auth-card">
|
||||
<h1 class="auth-card__title">Папка «{{ folder.name }}»</h1>
|
||||
<p class="auth-card__subtitle">Эта папка защищена паролем</p>
|
||||
{% include "partials/alerts.html" %}
|
||||
<form method="post" class="auth-form">
|
||||
<div class="form-group">
|
||||
<label for="password">Пароль</label>
|
||||
<input type="password" id="password" name="password" required autofocus>
|
||||
</div>
|
||||
<button type="submit" class="btn btn--primary btn--full">Открыть папку</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user