-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.html
More file actions
223 lines (194 loc) · 8.29 KB
/
Copy pathoptions.html
File metadata and controls
223 lines (194 loc) · 8.29 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
223
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Slack Export Extension - Options</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
max-width: 500px;
margin: 20px auto;
padding: 20px;
background: #f5f5f5;
}
.container {
background: white;
padding: 30px;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
h1 {
color: #333;
margin-bottom: 20px;
border-bottom: 2px solid #4a154b;
padding-bottom: 10px;
}
.form-group {
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #333;
}
input[type="text"], input[type="checkbox"] {
width: 100%;
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
}
input[type="checkbox"] {
width: auto;
margin-right: 8px;
}
.checkbox-group {
display: flex;
align-items: center;
}
.description {
font-size: 12px;
color: #666;
margin-top: 5px;
}
.buttons {
display: flex;
gap: 10px;
margin-top: 30px;
}
button {
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
font-weight: bold;
}
.save-btn {
background: #4a154b;
color: white;
}
.save-btn:hover {
background: #5d1a5d;
}
.reset-btn {
background: #ddd;
color: #333;
}
.reset-btn:hover {
background: #ccc;
}
.status {
margin-top: 15px;
padding: 10px;
border-radius: 4px;
text-align: center;
font-weight: bold;
}
.status.success {
background: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}
.status.error {
background: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}
</style>
</head>
<body>
<div class="container">
<h1>Slack Export Extension Settings</h1>
<form id="optionsForm">
<div class="form-group">
<label for="downloadDirectory">Download Directory:</label>
<input type="text" id="downloadDirectory" name="downloadDirectory" placeholder="slack-exports">
<div class="description">Subdirectory name in Downloads folder where files will be saved</div>
</div>
<div class="form-group">
<label for="fileNameFormat">Filename Format:</label>
<input type="text" id="fileNameFormat" name="fileNameFormat" placeholder="YYYYMMDD-HHmm-{channel}.md">
<div class="description">Use {channel} for channel name. YYYY, MM, DD, HH, mm for date/time</div>
</div>
<div class="form-group">
<label for="historyDays">History Window (days):</label>
<input type="number" id="historyDays" name="historyDays" min="1" placeholder="7">
<div class="description">Export messages from the last N days (default 7)</div>
</div>
<div class="form-group">
<div class="checkbox-group">
<input type="checkbox" id="includeTimestamps" name="includeTimestamps">
<label for="includeTimestamps">Include timestamps in export</label>
</div>
</div>
<div class="form-group">
<div class="checkbox-group">
<input type="checkbox" id="includeThreadReplies" name="includeThreadReplies">
<label for="includeThreadReplies">Include thread replies</label>
</div>
</div>
<div class="buttons">
<button type="submit" class="save-btn">Save Settings</button>
<button type="button" id="resetBtn" class="reset-btn">Reset to Defaults</button>
</div>
<div id="status" class="status" style="display: none;"></div>
</form>
<hr style="margin: 30px 0; border: none; border-top: 2px solid #4a154b;">
<h2 style="color: #333; margin-bottom: 10px;">Batch Export Channels</h2>
<p style="font-size: 12px; color: #666; margin-bottom: 15px;">
Configure channels for batch export. Each channel needs a <strong>channelId</strong>
(found in the URL when viewing a channel, e.g. <code>C0123456789</code>).
Edit the JSON below or use the form to add channels.
</p>
<!-- Add channel form -->
<div style="background: #f9f9f9; padding: 15px; border-radius: 6px; margin-bottom: 15px; border: 1px solid #eee;">
<h3 style="font-size: 14px; margin-bottom: 10px; color: #333;">Add Channel</h3>
<div class="form-group" style="margin-bottom: 10px;">
<label for="newChannelName" style="font-size: 13px;">Name:</label>
<input type="text" id="newChannelName" placeholder="e.g. team-general" style="width: 100%;">
</div>
<div class="form-group" style="margin-bottom: 10px;">
<label for="newChannelId" style="font-size: 13px;">Channel ID:</label>
<input type="text" id="newChannelId" placeholder="e.g. C0123456789" style="width: 100%;">
</div>
<div style="display: flex; gap: 10px; margin-bottom: 10px;">
<div style="flex: 1;">
<label for="newChannelTier" style="font-size: 13px;">Tier:</label>
<select id="newChannelTier" style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px;">
<option value="1">Tier 1</option>
<option value="2">Tier 2</option>
<option value="3">Tier 3</option>
</select>
</div>
<div style="flex: 1;">
<label for="newChannelType" style="font-size: 13px;">Type:</label>
<select id="newChannelType" style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px;">
<option value="channel">Channel</option>
<option value="dm">DM</option>
<option value="group">Group</option>
</select>
</div>
</div>
<button type="button" id="addChannelBtn" class="save-btn" style="width: 100%; padding: 8px;">Add Channel</button>
</div>
<!-- Channel JSON editor -->
<div class="form-group">
<label for="channelsJson">Channel Configuration (JSON):</label>
<textarea id="channelsJson" rows="12" style="width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 12px; font-family: 'SF Mono', Monaco, Consolas, monospace; resize: vertical;"></textarea>
<div class="description">
Each channel: { name, channelId, tier (1-3), type (channel|dm|group), enabled (true|false) }
</div>
</div>
<div class="buttons" style="margin-top: 15px;">
<button type="button" id="saveChannelsBtn" class="save-btn">Save Channels</button>
<button type="button" id="resetChannelsBtn" class="reset-btn">Reset to Defaults</button>
</div>
<div id="channelStatus" class="status" style="display: none;"></div>
</div>
<script src="src/config.js"></script>
<script src="options.js"></script>
</body>
</html>