Sửa chế độ chia sẻ privacy trực tiếp khi nhấn chuột phải lên scene
This commit is contained in:
+109
-1
@@ -182,6 +182,111 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal for Editing Scene Metadata (No Upload) -->
|
||||
<div id="edit-scene-metadata-modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<span class="close-btn" onclick="closeEditMetadataModal()">×</span>
|
||||
<h2 id="edit-metadata-modal-title">Sửa 3D Scene</h2>
|
||||
<form id="edit-scene-metadata-form" onsubmit="submitEditScene(event)">
|
||||
<input type="hidden" id="edit-modal-scene-id">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="edit-modal-title">Tên Scene:</label>
|
||||
<input type="text" id="edit-modal-title" required placeholder="Tên cảnh quay">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="edit-modal-description">Mô tả:</label>
|
||||
<textarea id="edit-modal-description" rows="3" placeholder="Mô tả chi tiết về cảnh này..."></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Vị trí tọa độ (Click bản đồ để đổi):</label>
|
||||
<div style="display: flex; gap: 10px; margin-bottom: 10px;">
|
||||
<input type="text" id="edit-modal-lat" readonly>
|
||||
<input type="text" id="edit-modal-lng" readonly>
|
||||
</div>
|
||||
<div id="edit-mini-map" style="height: 200px; width: 100%; border-radius: 4px; border: 1px solid #ccc; background: #eee;"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="edit-privacy-container">
|
||||
<label for="edit-modal-privacy">Quyền riêng tư:</label>
|
||||
<div style="display: flex; gap: 8px; align-items: center;">
|
||||
<select id="edit-modal-privacy" onchange="handleEditPrivacyChange()" style="flex: 1;">
|
||||
<option value="public">Public (Everyone)</option>
|
||||
<option value="private">Private (Only Me)</option>
|
||||
<option value="member">Members (Specific People)</option>
|
||||
<option value="shared">Shared via Link</option>
|
||||
</select>
|
||||
<button type="button" id="btn-edit-privacy-settings" class="privacy-settings-btn" title="Cài đặt chia sẻ" onclick="openPrivacySettingsModal()" style="display: none;">⚙️</button>
|
||||
</div>
|
||||
<div id="edit-child-privacy-info" style="display: none; color: #888; font-size: 12px; margin-top: 5px;">
|
||||
ℹ️ Cảnh con kế thừa quyền riêng tư từ cảnh cha.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer" style="padding: 0; border: none; background: transparent;">
|
||||
<button type="button" class="cancel-btn" onclick="closeEditMetadataModal()">Hủy bỏ</button>
|
||||
<button type="submit" class="save-btn">Lưu thay đổi</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Manage Shared Members -->
|
||||
<div id="share-member-modal" class="modal-overlay">
|
||||
<div class="modal-content logout-modal-dark" style="max-width: 500px;">
|
||||
<h2 style="color: #fff; margin-bottom: 15px;">Chia sẻ với thành viên</h2>
|
||||
<div class="form-group">
|
||||
<label>Thêm thành viên (Username hoặc Email):</label>
|
||||
<div style="position: relative;">
|
||||
<input type="text" id="share-user-search" placeholder="Nhập tên hoặc email..." oninput="searchUsersToShare(this.value)">
|
||||
<div id="search-results-dropdown" class="search-dropdown" style="display: none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="shared-list-container">
|
||||
<label>Danh sách đã chia sẻ:</label>
|
||||
<div id="current-shared-list" class="shared-users-list">
|
||||
<!-- Sẽ được fill bằng JS -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer" style="padding: 20px 0 0 0; background: transparent; border: none;">
|
||||
<button onclick="closeShareMemberModal()" class="save-btn">Xong</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Shared Link -->
|
||||
<div id="share-link-modal" class="modal-overlay">
|
||||
<div class="modal-content logout-modal-dark" style="max-width: 500px; text-align: center;">
|
||||
<h2 style="color: #fff; margin-bottom: 15px;">Liên kết chia sẻ</h2>
|
||||
<p style="color: #ccc; font-size: 14px; margin-bottom: 20px;">Bất kỳ ai có liên kết này đều có thể xem cảnh quay mà không cần đăng nhập.</p>
|
||||
|
||||
<div class="form-group" style="text-align: left; margin-bottom: 20px;">
|
||||
<label style="color: #fff;">Thời hạn liên kết:</label>
|
||||
<select id="share-link-expire" style="background: #222; color: #fff; border: 1px solid #444;">
|
||||
<option value="7">7 ngày (Mặc định)</option>
|
||||
<option value="1">1 ngày</option>
|
||||
<option value="30">30 ngày</option>
|
||||
<option value="never">Vĩnh viễn</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="link-display-area">
|
||||
<input type="text" id="shared-link-input" readonly style="background: rgba(0,0,0,0.3); color: #00d4ff; border: 1px solid #444; padding: 12px; width: 100%; border-radius: 4px; font-family: monospace; font-size: 13px;">
|
||||
</div>
|
||||
|
||||
<div class="action-buttons" style="margin-top: 25px;">
|
||||
<button onclick="copySharedLink()" class="edit-btn-large" style="background: #007bff; width: 100%;">
|
||||
📋 Sao chép liên kết & Đóng
|
||||
</button>
|
||||
<button onclick="closeShareLinkModal()" class="edit-btn-large" style="background: #444; width: 100%; margin-top: 10px;">
|
||||
Đóng
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Delete Asset Confirmation Modal -->
|
||||
<div id="delete-asset-confirm-modal" class="modal-overlay">
|
||||
<div class="modal-content action-modal-content logout-modal-dark">
|
||||
@@ -210,8 +315,11 @@
|
||||
<h2 id="action-modal-title">Tùy chọn Scene</h2>
|
||||
<p id="action-modal-desc">Bạn muốn thực hiện thao tác gì với scene này?</p>
|
||||
<div class="action-buttons">
|
||||
<button id="btn-edit-privacy-action" class="edit-btn-large" style="background: #6f42c1;">
|
||||
<span class="icon">🔒</span> Chỉnh sửa privacy
|
||||
</button>
|
||||
<button id="btn-edit-action" class="edit-btn-large">
|
||||
<span class="icon">✏️</span> Chỉnh sửa thông tin
|
||||
<span class="icon">✏️</span> Chế độ sửa scene
|
||||
</button>
|
||||
<button id="btn-delete-action" class="delete-btn-large">
|
||||
<span class="icon">🗑️</span> Xóa vĩnh viễn
|
||||
|
||||
Reference in New Issue
Block a user