-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.html
More file actions
222 lines (211 loc) · 17.8 KB
/
dashboard.html
File metadata and controls
222 lines (211 loc) · 17.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Stash - Dashboard</title>
<link rel="icon" type="image/png" href="icons/icon32.png">
<link rel="stylesheet" href="dashboard.css">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
</head>
<body>
<div class="app">
<header class="header">
<div class="header-left">
<div class="logo">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 10C3 8.34315 4.34315 7 6 7H9C9.55228 7 10 7.44772 10 8V9.5C10 10.3284 10.6716 11 11.5 11H12.5C13.3284 11 14 10.3284 14 9.5V8C14 7.44772 14.4477 7 15 7H18C19.6569 7 21 8.34315 21 10V18C21 19.1046 19.6569 20 18 20H6C4.34315 20 3 18.6569 3 17V10Z" fill="currentColor" />
<rect x="10.5" y="4.5" width="3" height="6" rx="1.5" fill="#f59e0b" />
</svg>
<span class="logo-text">Stash</span>
</div>
</div>
<div class="header-center">
<div class="search-box">
<svg class="search-icon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />
</svg>
<input type="text" id="searchInput" placeholder="Search..." data-i18n-placeholder="searchPlaceholder">
<div class="search-result" id="searchResult"></div>
</div>
</div>
<div class="header-right">
<button class="btn-primary" id="saveAllBtn">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" /><polyline points="17 21 17 13 7 13 7 21" /><polyline points="7 3 7 8 15 8" />
</svg>
<span data-i18n="saveAll">Save All</span>
</button>
</div>
</header>
<main class="main-content">
<div class="groups-grid" id="groupsGrid"></div>
<div class="empty-state" id="emptyState" style="display: none;">
<div class="empty-icon" id="emptyIcon"></div>
<h2 id="emptyTitle">No tabs yet</h2>
<p id="emptyDesc">Click "Save All" to save your open tabs</p>
</div>
<div class="settings-view" id="settingsView" style="display: none;">
<div class="settings-container">
<div class="settings-grid">
<!-- General Settings -->
<div class="settings-card">
<div class="card-header">
<div class="card-title-group">
<svg class="card-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path d="M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z" /></svg>
<h3 data-i18n="general">General</h3>
</div>
</div>
<div class="card-body">
<div class="setting-row">
<div class="setting-label">
<span class="title" data-i18n="closeAfterSave">Close after save</span>
<span class="desc" data-i18n="closeAfterSaveDesc">Automatically close tabs after they are stashed</span>
</div>
<label class="toggle-switch"><input type="checkbox" id="settingCloseAfterSave"><span class="slider"></span></label>
</div>
<div class="setting-row">
<div class="setting-label">
<span class="title" data-i18n="includePinned">Include pinned</span>
<span class="desc" data-i18n="includePinnedDesc">Also save your pinned tabs</span>
</div>
<label class="toggle-switch"><input type="checkbox" id="settingIncludePinned"><span class="slider"></span></label>
</div>
</div>
</div>
<!-- Auto Save Settings -->
<div class="settings-card">
<div class="card-header">
<div class="card-title-group">
<svg class="card-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg>
<h3 data-i18n="autoSave">Auto Save</h3>
</div>
</div>
<div class="card-body">
<div class="setting-row">
<div class="setting-label">
<span class="title" data-i18n="enableAutoSave">Enable Auto Save</span>
<span class="desc" data-i18n="autoSaveDesc">Automatically save tabs at regular intervals</span>
</div>
<label class="toggle-switch"><input type="checkbox" id="settingAutoSave"><span class="slider"></span></label>
</div>
<!-- Added d-none class for explicit hidden state -->
<div class="setting-row d-none" id="autoSaveIntervalRow">
<div class="setting-label">
<span class="title" data-i18n="autoSaveInterval">Interval</span>
<span class="desc" data-i18n="autoSaveIntervalDesc">How often should we save?</span>
</div>
<select id="settingAutoSaveInterval" class="modern-select" style="width: 120px;">
<option value="15">15 min</option>
<option value="30">30 min</option>
<option value="60">1 hour</option>
<option value="120">2 hours</option>
</select>
</div>
</div>
</div>
</div>
<div class="settings-grid">
<div class="settings-card">
<div class="card-header">
<div class="card-title-group">
<svg class="card-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41" /><circle cx="12" cy="12" r="5" /></svg>
<h3 data-i18n="appearance">Appearance</h3>
</div>
</div>
<div class="card-body">
<select id="settingThemeMode" class="modern-select">
<option value="dark" data-i18n="themeDark">Dark</option>
<option value="light" data-i18n="themeLight">Light</option>
<option value="system" data-i18n="themeSystem">System</option>
</select>
</div>
</div>
<div class="settings-card">
<div class="card-header">
<div class="card-title-group">
<svg class="card-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M12 21a9 9 0 100-18 9 9 0 000 18zM12 8V7M12 17v-4M8 12l8 0" /></svg>
<h3 data-i18n="language">Language</h3>
</div>
</div>
<div class="card-body">
<select id="settingLanguage" class="modern-select">
<option value="en">English (US)</option>
<option value="tr">Türkçe (TR)</option>
</select>
</div>
</div>
</div>
<div class="settings-grid">
<!-- Data Management - Left -->
<div class="settings-card">
<div class="card-header">
<div class="card-title-group">
<svg class="card-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M7 10l5 5 5-5M12 15V3" /></svg>
<h3 data-i18n="dataManagement">Data Management</h3>
</div>
</div>
<div class="card-body">
<div class="action-buttons-vertical">
<button class="action-btn-modern" id="exportBtn"><span data-i18n="export">Export</span></button>
<button class="action-btn-modern" id="importBtn"><span data-i18n="import">Import</span></button>
<button class="action-btn-modern danger reset-btn" id="clearAllBtn">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="3 6 5 6 21 6"></polyline><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"></path></svg>
<span data-i18n="clearAllData">Reset</span>
</button>
</div>
<input type="file" id="importFile" accept=".json" style="display: none;">
</div>
</div>
<!-- About Section - Right -->
<div class="settings-card about-card">
<div class="card-header">
<div class="card-title-group">
<svg class="card-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>
<h3 data-i18n="about">About</h3>
</div>
</div>
<div class="card-body about-body">
<div class="about-content-vertical">
<div class="about-brand">
<svg class="about-logo" width="40" height="40" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 10C3 8.34315 4.34315 7 6 7H9C9.55228 7 10 7.44772 10 8V9.5C10 10.3284 10.6716 11 11.5 11H12.5C13.3284 11 14 10.3284 14 9.5V8C14 7.44772 14.4477 7 15 7H18C19.6569 7 21 8.34315 21 10V18C21 19.1046 19.6569 20 18 20H6C4.34315 20 3 18.6569 3 17V10Z" fill="currentColor" />
<rect x="10.5" y="4.5" width="3" height="6" rx="1.5" fill="var(--accent)" />
</svg>
<span class="about-name">Stash</span>
</div>
<div class="about-meta">
<div class="author-row">
<span class="crafted-label" data-i18n="craftedBy">Crafted by</span>
<a href="https://erencakar.com" target="_blank" class="author-link">
Eren Çakar
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>
</a>
</div>
<p class="os-text" data-i18n="openSourceMsg">This project is open source.</p>
</div>
<a href="https://github.com/sudoeren/stash" target="_blank" class="source-btn">
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>
<span data-i18n="sourceCode">Source Code</span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<div class="toast" id="toast"><span id="toastMessage"></span></div>
<nav class="floating-nav">
<div class="floating-nav-container">
<button class="floating-nav-item active" data-view="all"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7" rx="2" /><rect x="14" y="3" width="7" height="7" rx="2" /><rect x="14" y="14" width="7" height="7" rx="2" /><rect x="3" y="14" width="7" height="7" rx="2" /></svg><span class="floating-nav-label" data-i18n="allTabs">All</span></button>
<button class="floating-nav-item" data-view="favorites"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polygon points="12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26" /></svg><span class="floating-nav-label" data-i18n="favorites">Favorites</span></button>
<button class="floating-nav-item" data-view="trash"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="3 6 5 6 21 6"></polyline><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"></path></svg><span class="floating-nav-label" data-i18n="trash">Trash</span></button>
<button class="floating-nav-item" data-view="settings"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="3" /><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" /></svg><span class="floating-nav-label" data-i18n="settings">Settings</span></button>
</div>
</nav>
<script src="i18n.js"></script>
<script src="dashboard.js"></script>
</body>
</html>