-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.html
More file actions
106 lines (102 loc) · 4.08 KB
/
Copy pathsettings.html
File metadata and controls
106 lines (102 loc) · 4.08 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tab Saver - Settings</title>
<link rel="stylesheet" href="styles.css" />
<link rel="stylesheet" href="settings.css" />
</head>
<body>
<div class="container">
<header>
<button id="backButton" class="back-button" title="Back to main">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M19 12H5M12 19l-7-7 7-7"/>
</svg>
</button>
<h1>Settings</h1>
</header>
<main>
<!-- Category Management Section -->
<section class="settings-section">
<h2>Manage Categories</h2>
<div class="category-input-group">
<input
type="text"
id="newCategoryInput"
placeholder="Enter category name"
maxlength="30"
/>
<button id="addCategoryBtn" class="btn btn-primary">Add Category</button>
</div>
<div id="categoryList" class="category-list"></div>
</section>
<!-- Import/Export Section -->
<section class="settings-section">
<h2>Import & Export Data</h2>
<p class="section-description">
Backup your saved tabs and categories to move them between browsers or devices.
</p>
<div class="import-export-controls">
<button id="exportBtn" class="btn btn-secondary">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"/>
</svg>
Export Data
</button>
<button id="importBtn" class="btn btn-secondary">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12"/>
</svg>
Import Data
</button>
</div>
<input type="file" id="importFileInput" accept=".json" style="display: none;" />
<div id="importExportMessage" class="message hidden"></div>
</section>
<!-- Statistics Section -->
<section class="settings-section">
<h2>Statistics</h2>
<div class="stats-grid">
<div class="stat-item">
<span class="stat-label">Total Saved Tabs:</span>
<span id="totalTabs" class="stat-value">0</span>
</div>
<div class="stat-item">
<span class="stat-label">Total Categories:</span>
<span id="totalCategories" class="stat-value">0</span>
</div>
</div>
</section>
<!-- Auto-Save Settings -->
<section class="settings-section">
<h2>Auto-Save Options</h2>
<p class="section-description">
Automatically save all open tabs when closing the browser.
</p>
<div class="toggle-option">
<label class="toggle-label">
<input type="checkbox" id="autoSaveEnabled" class="toggle-checkbox">
<span class="toggle-switch"></span>
<span class="toggle-text">Enable Auto-Save on Browser Close</span>
</label>
<p class="toggle-description">
When enabled, you'll be prompted to save all open tabs before closing the browser.
Tabs will be saved with a timestamped category name.
</p>
</div>
</section>
<!-- Danger Zone -->
<section class="settings-section danger-zone">
<h2>Danger Zone</h2>
<p class="section-description">
These actions are irreversible. Please be careful.
</p>
<button id="clearAllBtn" class="btn btn-danger">Clear All Data</button>
</section>
</main>
</div>
<script src="settings.js"></script>
</body>
</html>