cloudcmd 16.7.0 → 16.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const RENAME_FILE = 'Rename file';
4
+ const CDN = 'https://cdn.jsdelivr.net/gh/cloudcmd/user-menu@';
4
5
 
5
6
  module.exports = {
6
7
  '__settings': {
@@ -13,12 +14,45 @@ module.exports = {
13
14
  await DOM.renameCurrent();
14
15
  },
15
16
 
17
+ 'F6 - Copy URL to current file': async ({DOM}) => {
18
+ const {copyURLToCurrentFile} = await import(`${CDN}@1.1.0/menu/copy-url-to-current-file.js`);
19
+ await copyURLToCurrentFile({DOM});
20
+ },
21
+
22
+ 'R - cd /': async ({CloudCmd}) => {
23
+ await CloudCmd.changeDir('/');
24
+ },
25
+ 'Y - Convert YouTube to MP3': async ({CloudCmd, DOM}) => {
26
+ const {convertYouTubeToMp3} = await import(`${CDN}@v1.1.0/menu/convert-youtube-to-mp3.js`);
27
+ await convertYouTubeToMp3({CloudCmd, DOM});
28
+ },
29
+
30
+ 'F - Convert flac to mp3 [ffmpeg]': async ({CloudCmd, DOM}) => {
31
+ const {convertFlacToMp3} = await import(`${CDN}@v1.1.0/menu/ffmpeg.js`);
32
+ await convertFlacToMp3({CloudCmd, DOM});
33
+ },
34
+ 'M - Convert mpeg to mp3 [ffmpeg]': async ({CloudCmd, DOM}) => {
35
+ const {convertMp4ToMp3} = await import(`${CDN}@v1.1.0/menu/ffmpeg.js`);
36
+ await convertMp4ToMp3({CloudCmd, DOM});
37
+ },
38
+
16
39
  'C - Create User Menu File': async ({DOM, CloudCmd}) => {
40
+ const {Dialog} = DOM;
41
+ const currentFile = DOM.getCurrentByName('.cloudcmd.menu.js')
42
+
43
+ if (currentFile) {
44
+ const [cancel] = await Dialog.confirm(`Looks like file '.cloudcmd.menu.js' already exists. Overwrite?`);
45
+
46
+ if (cancel)
47
+ return;
48
+ }
49
+
17
50
  const {CurrentInfo} = DOM;
18
51
  const {dirPath} = CurrentInfo;
19
52
  const path = `${dirPath}.cloudcmd.menu.js`;
20
53
  const {prefix} = CloudCmd;
21
54
 
55
+
22
56
  const data = await readDefaultMenu({prefix});
23
57
  await createDefaultMenu({
24
58
  path,