Spaces:
Sleeping
Sleeping
Commit ·
1ea4eb2
1
Parent(s): d063204
session-spec UI
Browse files- static/index.html +19 -6
- static/styles.css +70 -17
static/index.html
CHANGED
|
@@ -194,18 +194,31 @@
|
|
| 194 |
<div class="card-header">
|
| 195 |
<h2>💬 Chat with Documents</h2>
|
| 196 |
<p>Ask questions about your uploaded materials and get AI-powered answers</p>
|
| 197 |
-
<div class="session-controls"
|
| 198 |
-
<div class="session-dropdown-wrapper"
|
| 199 |
<select id="session-dropdown" class="session-dropdown">
|
| 200 |
<option value="">Select Session</option>
|
| 201 |
</select>
|
| 202 |
-
<button id="create-session-btn" class="btn-icon" title="Create new session">+</button>
|
| 203 |
</div>
|
| 204 |
<div class="session-actions" style="display:none;">
|
| 205 |
-
<button id="rename-session-btn" class="btn-icon" title="Rename session">
|
| 206 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 207 |
</div>
|
| 208 |
-
<button id="clear-chat-btn" class="btn-secondary">Clear History</button>
|
| 209 |
</div>
|
| 210 |
</div>
|
| 211 |
<div id="chat">
|
|
|
|
| 194 |
<div class="card-header">
|
| 195 |
<h2>💬 Chat with Documents</h2>
|
| 196 |
<p>Ask questions about your uploaded materials and get AI-powered answers</p>
|
| 197 |
+
<div class="session-controls">
|
| 198 |
+
<div class="session-dropdown-wrapper">
|
| 199 |
<select id="session-dropdown" class="session-dropdown">
|
| 200 |
<option value="">Select Session</option>
|
| 201 |
</select>
|
|
|
|
| 202 |
</div>
|
| 203 |
<div class="session-actions" style="display:none;">
|
| 204 |
+
<button id="rename-session-btn" class="btn-icon session-action-btn" title="Rename session">
|
| 205 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 206 |
+
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/>
|
| 207 |
+
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/>
|
| 208 |
+
</svg>
|
| 209 |
+
</button>
|
| 210 |
+
<button id="delete-session-btn" class="btn-icon session-action-btn" title="Delete session">
|
| 211 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 212 |
+
<polyline points="3,6 5,6 21,6"/>
|
| 213 |
+
<path d="M19,6v14a2,2 0 0,1 -2,2H7a2,2 0 0,1 -2,-2V6m3,0V4a2,2 0 0,1 2,-2h4a2,2 0 0,1 2,2v2"/>
|
| 214 |
+
<line x1="10" y1="11" x2="10" y2="17"/>
|
| 215 |
+
<line x1="14" y1="11" x2="14" y2="17"/>
|
| 216 |
+
</svg>
|
| 217 |
+
</button>
|
| 218 |
+
</div>
|
| 219 |
+
<div class="clear-history-wrapper">
|
| 220 |
+
<button id="clear-chat-btn" class="btn-secondary">Clear History</button>
|
| 221 |
</div>
|
|
|
|
| 222 |
</div>
|
| 223 |
</div>
|
| 224 |
<div id="chat">
|
static/styles.css
CHANGED
|
@@ -1639,15 +1639,13 @@
|
|
| 1639 |
.session-controls {
|
| 1640 |
display: flex;
|
| 1641 |
align-items: center;
|
| 1642 |
-
|
| 1643 |
-
flex-wrap: wrap;
|
| 1644 |
margin-top: 16px;
|
|
|
|
| 1645 |
}
|
| 1646 |
|
| 1647 |
.session-dropdown-wrapper {
|
| 1648 |
-
|
| 1649 |
-
align-items: center;
|
| 1650 |
-
gap: 4px;
|
| 1651 |
}
|
| 1652 |
|
| 1653 |
.session-dropdown {
|
|
@@ -1655,47 +1653,95 @@
|
|
| 1655 |
color: var(--text);
|
| 1656 |
border: 1px solid var(--border);
|
| 1657 |
border-radius: var(--radius);
|
| 1658 |
-
padding:
|
| 1659 |
font-size: 14px;
|
| 1660 |
-
min-width:
|
| 1661 |
cursor: pointer;
|
| 1662 |
-
transition:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1663 |
}
|
| 1664 |
|
| 1665 |
.session-dropdown:focus {
|
| 1666 |
outline: none;
|
| 1667 |
border-color: var(--accent);
|
|
|
|
| 1668 |
}
|
| 1669 |
|
| 1670 |
.session-dropdown:hover {
|
| 1671 |
border-color: var(--border-light);
|
|
|
|
| 1672 |
}
|
| 1673 |
|
| 1674 |
.session-actions {
|
| 1675 |
display: flex;
|
| 1676 |
align-items: center;
|
| 1677 |
-
gap:
|
|
|
|
| 1678 |
}
|
| 1679 |
|
| 1680 |
-
.session-
|
| 1681 |
-
background:
|
| 1682 |
-
color: var(--text
|
| 1683 |
border: 1px solid var(--border);
|
| 1684 |
border-radius: var(--radius);
|
| 1685 |
-
padding:
|
| 1686 |
cursor: pointer;
|
| 1687 |
transition: all 0.2s ease;
|
| 1688 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1689 |
}
|
| 1690 |
|
| 1691 |
-
.session-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1692 |
background: var(--card-hover);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1693 |
color: var(--text);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1694 |
border-color: var(--border-light);
|
|
|
|
| 1695 |
}
|
| 1696 |
|
| 1697 |
-
.
|
| 1698 |
-
transform:
|
| 1699 |
}
|
| 1700 |
|
| 1701 |
/* Modal styles for session management */
|
|
@@ -1725,6 +1771,7 @@
|
|
| 1725 |
.session-controls {
|
| 1726 |
flex-direction: column;
|
| 1727 |
align-items: stretch;
|
|
|
|
| 1728 |
}
|
| 1729 |
|
| 1730 |
.session-dropdown-wrapper {
|
|
@@ -1738,5 +1785,11 @@
|
|
| 1738 |
|
| 1739 |
.session-actions {
|
| 1740 |
justify-content: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1741 |
}
|
| 1742 |
}
|
|
|
|
| 1639 |
.session-controls {
|
| 1640 |
display: flex;
|
| 1641 |
align-items: center;
|
| 1642 |
+
justify-content: space-between;
|
|
|
|
| 1643 |
margin-top: 16px;
|
| 1644 |
+
gap: 16px;
|
| 1645 |
}
|
| 1646 |
|
| 1647 |
.session-dropdown-wrapper {
|
| 1648 |
+
flex: 0 0 auto;
|
|
|
|
|
|
|
| 1649 |
}
|
| 1650 |
|
| 1651 |
.session-dropdown {
|
|
|
|
| 1653 |
color: var(--text);
|
| 1654 |
border: 1px solid var(--border);
|
| 1655 |
border-radius: var(--radius);
|
| 1656 |
+
padding: 10px 16px;
|
| 1657 |
font-size: 14px;
|
| 1658 |
+
min-width: 220px;
|
| 1659 |
cursor: pointer;
|
| 1660 |
+
transition: all 0.2s ease;
|
| 1661 |
+
appearance: none;
|
| 1662 |
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
|
| 1663 |
+
background-position: right 12px center;
|
| 1664 |
+
background-repeat: no-repeat;
|
| 1665 |
+
background-size: 16px;
|
| 1666 |
+
padding-right: 40px;
|
| 1667 |
}
|
| 1668 |
|
| 1669 |
.session-dropdown:focus {
|
| 1670 |
outline: none;
|
| 1671 |
border-color: var(--accent);
|
| 1672 |
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
| 1673 |
}
|
| 1674 |
|
| 1675 |
.session-dropdown:hover {
|
| 1676 |
border-color: var(--border-light);
|
| 1677 |
+
background-color: var(--card-hover);
|
| 1678 |
}
|
| 1679 |
|
| 1680 |
.session-actions {
|
| 1681 |
display: flex;
|
| 1682 |
align-items: center;
|
| 1683 |
+
gap: 8px;
|
| 1684 |
+
flex: 0 0 auto;
|
| 1685 |
}
|
| 1686 |
|
| 1687 |
+
.session-action-btn {
|
| 1688 |
+
background: transparent;
|
| 1689 |
+
color: var(--text);
|
| 1690 |
border: 1px solid var(--border);
|
| 1691 |
border-radius: var(--radius);
|
| 1692 |
+
padding: 8px;
|
| 1693 |
cursor: pointer;
|
| 1694 |
transition: all 0.2s ease;
|
| 1695 |
+
display: flex;
|
| 1696 |
+
align-items: center;
|
| 1697 |
+
justify-content: center;
|
| 1698 |
+
width: 36px;
|
| 1699 |
+
height: 36px;
|
| 1700 |
}
|
| 1701 |
|
| 1702 |
+
.session-action-btn svg {
|
| 1703 |
+
width: 16px;
|
| 1704 |
+
height: 16px;
|
| 1705 |
+
stroke: var(--text);
|
| 1706 |
+
}
|
| 1707 |
+
|
| 1708 |
+
.session-action-btn:hover {
|
| 1709 |
background: var(--card-hover);
|
| 1710 |
+
border-color: var(--border-light);
|
| 1711 |
+
transform: translateY(-1px);
|
| 1712 |
+
}
|
| 1713 |
+
|
| 1714 |
+
.session-action-btn:active {
|
| 1715 |
+
transform: translateY(0);
|
| 1716 |
+
}
|
| 1717 |
+
|
| 1718 |
+
.clear-history-wrapper {
|
| 1719 |
+
flex: 0 0 auto;
|
| 1720 |
+
display: flex;
|
| 1721 |
+
justify-content: center;
|
| 1722 |
+
flex: 1;
|
| 1723 |
+
}
|
| 1724 |
+
|
| 1725 |
+
.clear-history-wrapper .btn-secondary {
|
| 1726 |
+
background: var(--card);
|
| 1727 |
color: var(--text);
|
| 1728 |
+
border: 1px solid var(--border);
|
| 1729 |
+
border-radius: var(--radius);
|
| 1730 |
+
padding: 10px 20px;
|
| 1731 |
+
font-size: 14px;
|
| 1732 |
+
font-weight: 500;
|
| 1733 |
+
cursor: pointer;
|
| 1734 |
+
transition: all 0.2s ease;
|
| 1735 |
+
}
|
| 1736 |
+
|
| 1737 |
+
.clear-history-wrapper .btn-secondary:hover {
|
| 1738 |
+
background: var(--card-hover);
|
| 1739 |
border-color: var(--border-light);
|
| 1740 |
+
transform: translateY(-1px);
|
| 1741 |
}
|
| 1742 |
|
| 1743 |
+
.clear-history-wrapper .btn-secondary:active {
|
| 1744 |
+
transform: translateY(0);
|
| 1745 |
}
|
| 1746 |
|
| 1747 |
/* Modal styles for session management */
|
|
|
|
| 1771 |
.session-controls {
|
| 1772 |
flex-direction: column;
|
| 1773 |
align-items: stretch;
|
| 1774 |
+
gap: 12px;
|
| 1775 |
}
|
| 1776 |
|
| 1777 |
.session-dropdown-wrapper {
|
|
|
|
| 1785 |
|
| 1786 |
.session-actions {
|
| 1787 |
justify-content: center;
|
| 1788 |
+
order: 2;
|
| 1789 |
+
}
|
| 1790 |
+
|
| 1791 |
+
.clear-history-wrapper {
|
| 1792 |
+
order: 3;
|
| 1793 |
+
justify-content: center;
|
| 1794 |
}
|
| 1795 |
}
|