-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
135 lines (122 loc) · 8.18 KB
/
index.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
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Import your local cached Snap Camera application lenses to your own Docker based Snap Camera Server">
<meta name="keywords" content="Snap Camera,Snapcamera,Snapchat,Snap,Snap Lens,Snap Lenses,Lens,Lenses,lens.lns,cache import,import">
<meta name="author" content="Patrick Trumpis">
<meta name="generator" content="Patrick Trumpis">
<title>Snap Lens Cache Import</title>
<link rel="canonical" href="https://ptrumpis.github.io/snap-lens-cache-import/">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css" integrity="sha384-b6lVK+yci+bfDmaY1u0zE8YYJt0TZxLEAFyYSLHId4xoVvsrQu3INevFKo+Xir8e" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<link rel="stylesheet" href="./style.css">
</head>
<body class="text-center text-bg-dark">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark" aria-label="navbar">
<div class="container-fluid">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-md-center" id="navbar">
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link active" aria-current="page" href="https://ptrumpis.github.io/snap-lens-cache-import/">👻 Snap Lens Cache Import</a></li>
<li class="nav-item"><a class="nav-link" href="https://github.com/ptrumpis/snap-lens-cache-import"><i class="bi bi-github"></i> Source</a></li>
<li class="nav-item"><a class="nav-link" href="https://bit.ly/snpcm">Download Snap Camera</a></li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown" aria-expanded="false">More Snap Camera Projects</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="https://github.com/ptrumpis/snap-camera-server"><i class="bi bi-github"></i> Snap Camera Server</a></li>
<li><a class="dropdown-item" href="https://github.com/ptrumpis/snap-camera-server-auto-config"><i class="bi bi-github"></i> Snap Camera Server Auto Config</a></li>
<li><a class="dropdown-item" href="https://github.com/ptrumpis/snap-lens-tool"><i class="bi bi-github"></i> Snap Lens Tool</a></li>
<li><a class="dropdown-item" href="https://ptrumpis.github.io/snap-lens-file-extractor/"><i class="bi bi-github"></i> Snap Lens File Extractor</a></li>
<li><a class="dropdown-item" href="https://ptrumpis.github.io/snap-camera-signature-patch/"><i class="bi bi-github"></i> Snap Camera Signature Patch</a></li>
<li><a class="dropdown-item" href="https://ptrumpis.github.io/snap-lens-file-format/"><i class="bi bi-github"></i> Snap Lens File Format</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<div class="cover-container w-100 h-100 p-3 mx-auto">
<main class="px-3">
<h3>Upload and Import Snap Lenses</h3>
<p class="lead">This web upload form will upload modified Lenses and import Lenses stored in your local application cache to your own Snap Camera Server.</p>
<div class="row justify-content-sm-center">
<div class="col-xs-auto col-sm-6 col-md-4 col-lg-3">
<div class="mb-4">
<label for="serverAddress" class="form-label">Server address</label>
<input type="server" class="form-control" id="serverAddress" placeholder="https://studio-app.snapchat.com" value="https://studio-app.snapchat.com">
</div>
</div>
</div>
<div class="row justify-content-sm-center">
<div class="col-xs-auto col-sm-6 col-md-4 col-lg-3">
<div class="mb-4">
<label for="uploadMode" class="form-label">Upload Mode</label>
<select id="uploadMode" class="form-select">
<option value="cacheImport" selected>Cache Import Mode</option>
<option value="lensUpload">Individual Lens Upload Mode</option>
</select>
</div>
</div>
</div>
<div class="row justify-content-sm-center">
<div class="col-xs-auto col-sm-6 col-md-4 col-lg-3">
<div class="mb-4">
<input class="form-check-input" type="checkbox" value="" id="overwriteLenses">
<label class="form-check-label" for="overwriteLenses">Allow overwrite of existing Lenses</label>
</div>
</div>
</div>
<div id="cacheImport" class="mb-4 collapse show">
<div id="cacheImportDropZone">
<p class="lead mt-4">Drag and Drop your <b>settings.json</b> and the contents of your <b>cache/lenses/</b> folder to this area.</p>
<pre id="cacheImportFileList"></pre>
</div>
<p class="lead">
<a href="#" id="resetCacheImport" class="btn btn-md btn-secondary fw-bold">Reset Files</a>
<a href="#" id="startCacheImport" class="btn btn-md btn-light fw-bold">Start Import</a>
</p>
</div>
<div id="lensUpload" class="mb-4 collapse">
<form action="#">
<div id="lensUploadGroups"></div>
<p class="lead">
<a href="#" id="addLensUpload" class="btn btn-sm btn-primary fw-bold">Add Another Lens</a>
</p>
<p class="lead">
<button type="reset" id="resetLensUpload" class="btn btn-md btn-secondary fw-bold">Reset Form</button>
<button type="submit" id="startLensUpload" class="btn btn-md btn-light fw-bold">Start Upload</button>
</p>
</form>
</div>
<div id="response"></div>
</main>
<template id="lensUploadGroup">
<div class="upload-group row justify-content-sm-center mb-3">
<div class="col-xs-auto col-sm-6 col-md-4 col-lg-3">
<div class="form-group mb-1">
<input type="file" class="form-control" name="file[]" accept=".lns" required>
</div>
<div class="form-group mb-1">
<input type="text" class="form-control" name="id[]" placeholder="Lens ID or Lens Share URL" required>
</div>
<div class="form-group mb-1">
<button class="btn btn-sm btn-danger" type="button" onclick="this.closest('.upload-group').remove()">Remove</button>
</div>
</div>
</div>
</template>
<footer class="mt-auto text-white-50 py-5">
<p>
This is <a href="https://github.com/ptrumpis/snap-lens-cache-import" class="link-secondary"><i class="bi bi-github"></i> Snap Lens Cache Import</a>
© 2023-2024 by <a href="https://github.com/ptrumpis" class="link-secondary">Patrick Trumpis</a>.
</p>
</footer>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
<script type="module" src="./script.js"></script>
</body>
</html>