-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform.html
91 lines (87 loc) · 2.6 KB
/
form.html
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
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 20px;
color: #333;
background-color: #f4f7f9;
}
h2 {
margin-bottom: 20px;
color: #2c3e50;
}
label {
display: block;
margin-top: 10px;
font-weight: 500;
color: #34495e;
}
input[type="text"] {
width: 95%;
padding: 10px;
margin-top: 5px;
border: 1px solid #bdc3c7;
border-radius: 6px;
box-sizing: border-box;
background-color: white;
}
button {
background-color: #2c3e50;
color: white;
padding: 12px 25px;
margin-top: 20px;
border: none;
border-radius: 6px;
cursor: pointer;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
button:hover {
background-color: #1a2533;
}
.form-group {
margin-bottom: 15px;
}
</style>
</head>
<body>
<form id="myForm">
<div class="form-group">
<label for="folderId">Folder ID (leave blank for root):</label>
<input type="text" id="folderId" name="folderId">
</div>
<div class="form-group">
<label for="level">Level (leave blank for all):</label>
<input type="text" id="level" name="level">
</div>
<div class="form-group">
<label for="skipExtensions">Skip Extensions (comma-separated):</label>
<input type="text" id="skipExtensions" name="skipExtensions" value=".jpg, .xml, .png, .pyc, .tif">
</div>
<div class="form-group">
<label for="skipFolders">Skip Folders (comma-separated):</label>
<input type="text" id="skipFolders" name="skipFolders" value=".git, .venv, build, bin, __pycache__, wandb, .ipynb_checkpoints">
</div>
<div class="form-group">
<label for="showFiles">Show Files (true/false):</label>
<input type="text" id="showFiles" name="showFiles" value="false">
</div>
<button type="button" onclick="submitForm()">Generate Tree</button>
</form>
<script>
function submitForm() {
var folderId = document.getElementById('folderId').value;
var level = document.getElementById('level').value;
var skipExtensions = document.getElementById('skipExtensions').value;
var skipFolders = document.getElementById('skipFolders').value;
var showFiles = document.getElementById('showFiles').value;
google.script.run.withSuccessHandler(closeDialog).generateDriveTreeFromForm(folderId, level, skipExtensions, skipFolders, showFiles);
}
function closeDialog() {
google.script.host.close();
}
</script>
</body>
</html>