Skip to content

Commit 02f4db1

Browse files
save text
1 parent a2859c9 commit 02f4db1

File tree

1 file changed

+64
-2
lines changed

1 file changed

+64
-2
lines changed

utils/x509/encrypt/encrypt.html

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,15 @@
4343
var log;
4444

4545

46+
var password;
47+
48+
49+
var btn = {};
4650

51+
52+
//:
53+
54+
4755
async function init(){
4856

4957
menumod = menumod();
@@ -126,6 +134,14 @@ <h3>encrypt</h3>
126134

127135
<div id=hdr>
128136

137+
<div id=encrypt-root>
138+
139+
<input id=password>
140+
141+
<input id=encrypt value=encrypt>
142+
143+
</div>
144+
129145
<filemod-api>
130146
<script src='https://html-loader-1024713184986.us-central1.run.app/'></script>
131147
</filemod-api>
@@ -151,7 +167,9 @@ <h3>encrypt</h3>
151167

152168
var root = rootnode;
153169

154-
170+
$('#encrypt').onclick = btn.encrypt;
171+
172+
155173
filemod.initdom(root);
156174

157175

@@ -169,9 +187,53 @@ <h3>encrypt</h3>
169187
}//initdom
170188

171189

190+
//:
191+
192+
193+
btn.encrypt = function(){
194+
}//encrypt
195+
172196

173-
function complete(){
197+
//:
198+
199+
200+
function complete(file){
201+
202+
editor.filename(file);
203+
editor.filename.save.hide();
204+
filemod.cur = file;
205+
menumod.close();
206+
editor.focus();
207+
174208
}//complete
209+
210+
211+
complete.load = async function(file,blob){
212+
213+
var txt;
214+
if(typeof blob=='string'){
215+
txt = blob;
216+
}else{
217+
txt = await blob.text();
218+
}
219+
220+
editor.clear();
221+
output.kill();
222+
editor.setValue(txt,-1);
223+
complete(file);
224+
225+
}//complete.load
226+
227+
228+
complete.save = function(file,confirm=true){
229+
230+
complete(file);
231+
232+
if(confirm){
233+
log.green(file.filename,'saved');
234+
}
235+
236+
}//save
175237

176238

177239
init.stack.complete;

0 commit comments

Comments
 (0)