@silexlabs/silex-dashboard 1.0.41 → 1.0.45
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.
- package/.gitmodules +2 -2
- package/11ty/eleventy.config.mjs +62 -0
- package/README.md +8 -2
- package/_site/css/connectors-61bd21c2345101e48cc530cacf3afc0156ce7e089fcef3a34f853a537f0c55f2.css +1 -0
- package/_site/css/websites-4b9b2b0a0a907b33eca109d50c2a3eee97f1955c742cef487110d21a0bbf8f50.css +1 -0
- package/_site/en/connectors/index.html +176 -181
- package/_site/en/index.html +59 -470
- package/_site/fr/connectors/index.html +176 -181
- package/_site/fr/index.html +59 -470
- package/_site/js/main.js +362 -0
- package/_site/js/main.js.LICENSE.txt +38 -0
- package/_site/js/vue.cjs.js +89 -0
- package/_site/js/vue.cjs.prod.js +75 -0
- package/_site/js/vue.d.mts +7 -0
- package/_site/js/vue.d.ts +7 -0
- package/_site/js/vue.esm-browser.js +16740 -0
- package/_site/js/vue.esm-browser.prod.js +12 -0
- package/_site/js/vue.esm-bundler.js +80 -0
- package/_site/js/vue.global.js +16725 -0
- package/_site/js/vue.global.prod.js +12 -0
- package/_site/js/vue.runtime.esm-browser.js +11155 -0
- package/_site/js/vue.runtime.esm-browser.prod.js +12 -0
- package/_site/js/vue.runtime.esm-bundler.js +26 -0
- package/_site/js/vue.runtime.global.js +11302 -0
- package/_site/js/vue.runtime.global.prod.js +12 -0
- package/collections/connectors/en.md +70 -0
- package/collections/connectors/fr.md +72 -0
- package/collections/home/en.md +57 -0
- package/{pages/fr/index.md → collections/home/fr.md} +20 -21
- package/collections/languages/en.json +5 -0
- package/collections/languages/fr.json +5 -0
- package/collections/settings/en.json +127 -0
- package/collections/settings/fr.json +131 -0
- package/package.json +17 -8
- package/silex/client-config.js +24 -0
- package/{.silex.js → silex/server-config.js} +8 -18
- package/templates/connectors-en.11tydata.mjs +56 -0
- package/templates/connectors-en.html +440 -0
- package/templates/connectors-fr.11tydata.mjs +56 -0
- package/templates/connectors-fr.html +440 -0
- package/templates/css/connectors-61bd21c2345101e48cc530cacf3afc0156ce7e089fcef3a34f853a537f0c55f2.css +1 -0
- package/templates/css/websites-4b9b2b0a0a907b33eca109d50c2a3eee97f1955c742cef487110d21a0bbf8f50.css +1 -0
- package/templates/websites-en.11tydata.mjs +108 -0
- package/templates/websites-en.html +478 -0
- package/templates/websites-fr.11tydata.mjs +108 -0
- package/templates/websites-fr.html +478 -0
- package/tina/config.ts +258 -0
- package/tina/tina-lock.json +1 -0
- package/.eleventy.js +0 -11
- package/.silex-client.js +0 -22
- package/_data/languages.json +0 -7
- package/_includes/api-connectors.js.html +0 -96
- package/_includes/api-websites.js.html +0 -189
- package/_includes/connectors.html +0 -253
- package/_includes/websites.html +0 -548
- package/_silex/old/assets/alex-hoyau.jpg +0 -0
- package/_silex/old/assets/alex-small.jpg +0 -0
- package/_silex/old/assets/empty-projects.gif +0 -0
- package/_silex/old/assets/gitlab.svg +0 -13
- package/_silex/old/assets/picto-silex.png +0 -0
- package/_silex/old/assets/silex-icon-2018@200px.png +0 -0
- package/_silex/old/meta.json +0 -1
- package/_silex/old/website.json +0 -1
- package/_site/assets/alex-small.jpg +0 -0
- package/_site/assets/gitlab.svg +0 -13
- package/_site/assets/silex-dashboard.png +0 -0
- package/_site/assets/silex-icon-2018@200px.png +0 -0
- package/_site/css/connectors.css +0 -1
- package/_site/css/websites.css +0 -1
- package/assets/alex-small.jpg +0 -0
- package/assets/bg-purpel-silex.webp +0 -0
- package/assets/bg-silex-purpel.webp +0 -0
- package/assets/empty-projects-sos.gif +0 -0
- package/assets/gitlab.svg +0 -13
- package/assets/logo-silex.svg +0 -1
- package/assets/picto-silex@3x.png +0 -0
- package/assets/silex-dashboard.png +0 -0
- package/assets/silex-icon-2018@200px.png +0 -0
- package/pages/connectors.css.liquid +0 -4
- package/pages/en/connectors.md +0 -4
- package/pages/en/en.json +0 -72
- package/pages/en/index.md +0 -28
- package/pages/fr/connectors.md +0 -5
- package/pages/fr/fr.json +0 -72
- package/pages/pages.11tydata.js +0 -5
- package/pages/websites.css.liquid +0 -4
- /package/{_data → 11ty/_data}/api-translations.json +0 -0
- /package/{_data → 11ty/_data}/site.js +0 -0
- /package/{_includes → 11ty/_includes}/alternate.liquid +0 -0
- /package/{_silex/old → templates}/assets/bg-purpel-silex.webp +0 -0
- /package/{_silex/old → templates}/assets/bg-silex-purpel.webp +0 -0
- /package/{_silex/old → templates}/assets/empty-projects-sos.gif +0 -0
- /package/{assets → templates/assets}/favicon-32x32.png +0 -0
- /package/{_silex/old → templates}/assets/logo-silex.svg +0 -0
- /package/{_silex/old → templates}/assets/picto-silex@3x.png +0 -0
package/.gitmodules
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
[submodule "
|
|
2
|
-
path =
|
|
1
|
+
[submodule "silex/websites/dashboard"]
|
|
2
|
+
path = silex/websites/dashboard
|
|
3
3
|
url = git@gitlab.com:ceubri/dashboard-silexv3.git
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { EleventyI18nPlugin } from '@11ty/eleventy'
|
|
2
|
+
import nodeModules from 'node_modules-path'
|
|
3
|
+
import fs from 'fs/promises'
|
|
4
|
+
|
|
5
|
+
export default async function (eleventyConfig) {
|
|
6
|
+
// Silex CMS
|
|
7
|
+
eleventyConfig.addPassthroughCopy({"templates/css/*.css": "css"});
|
|
8
|
+
eleventyConfig.addPassthroughCopy({"templates/assets": "assets"});
|
|
9
|
+
|
|
10
|
+
// For the fetch plugin
|
|
11
|
+
eleventyConfig.watchIgnores.add('**/.cache/**')
|
|
12
|
+
|
|
13
|
+
// Delete _site before eleventy starts
|
|
14
|
+
eleventyConfig.on(
|
|
15
|
+
"eleventy.before",
|
|
16
|
+
async ({dir, runMode, outputMode}) => {
|
|
17
|
+
try {
|
|
18
|
+
return await fs.rm(dir.output, { recursive: true })
|
|
19
|
+
} catch(e) {
|
|
20
|
+
if(e.code === 'ENOENT') {
|
|
21
|
+
return
|
|
22
|
+
}
|
|
23
|
+
throw e
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
)
|
|
27
|
+
// Serve node_modules
|
|
28
|
+
eleventyConfig.on(
|
|
29
|
+
"eleventy.after",
|
|
30
|
+
async ({ dir, results, runMode, outputMode }) => {
|
|
31
|
+
await fs.mkdir(`${dir.output}/js`, { recursive: true })
|
|
32
|
+
for(const file of await fs.readdir(`${nodeModules('vue')}/vue/dist/`)) {
|
|
33
|
+
await fs.copyFile(`${nodeModules('vue')}/vue/dist/${file}`, `${dir.output}/js/${file}`)
|
|
34
|
+
}
|
|
35
|
+
for(const file of await fs.readdir(`${nodeModules('@silexlabs/silex')}/@silexlabs/silex/dist/client/js/`)) {
|
|
36
|
+
await fs.copyFile(`${nodeModules('@silexlabs/silex')}/@silexlabs/silex/dist/client/js/${file}`, `${dir.output}/js/${file}`)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
// // Ignore all files from ../.gitignore
|
|
41
|
+
// eleventyConfig.setUseGitIgnore(false)
|
|
42
|
+
// const content = await fs.readFile('.gitignore', 'utf8')
|
|
43
|
+
// const files = content.split('\n')
|
|
44
|
+
// for (const file of files) {
|
|
45
|
+
// if (file.trim() !== '') {
|
|
46
|
+
// eleventyConfig.ignores.add(file.trim())
|
|
47
|
+
// }
|
|
48
|
+
// }
|
|
49
|
+
eleventyConfig.addPlugin(EleventyI18nPlugin, {
|
|
50
|
+
defaultLanguage: "en",
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
// Return the configuration object
|
|
54
|
+
return {
|
|
55
|
+
dir: {
|
|
56
|
+
input: 'templates',
|
|
57
|
+
includes: '../11ty/_includes',
|
|
58
|
+
layouts: '../11ty/_includes',
|
|
59
|
+
data: '../11ty/_data',
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
package/README.md
CHANGED
|
@@ -10,14 +10,20 @@ For discussions and bug report please go to [Silex main project](https://github.
|
|
|
10
10
|
|
|
11
11
|
## Contribute
|
|
12
12
|
|
|
13
|
-
Start 11ty
|
|
13
|
+
Start 11ty
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
16
|
$ npm run serve
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
Start Silex
|
|
19
|
+
Start Silex
|
|
20
20
|
|
|
21
21
|
```sh
|
|
22
22
|
$ npm start
|
|
23
23
|
```
|
|
24
|
+
|
|
25
|
+
Use these links
|
|
26
|
+
|
|
27
|
+
* Silex editor: http://localhost:6805
|
|
28
|
+
* Silex dashboard: http://localhost:6805/en/
|
|
29
|
+
* Silex connectors: http://localhost:6805/en/connectors/
|
package/_site/css/connectors-61bd21c2345101e48cc530cacf3afc0156ce7e089fcef3a34f853a537f0c55f2.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* { box-sizing: border-box; } body {margin: 0;}.body{font-family:"Ubuntu", sans-serif;background-color:#f0f0f0;color:#2b1b63;}.subtitle-16{font-size:1rem;margin:0px 0px 20px 0px;}.subtitle-16.color--light{color:#636363;font-weight:700;}.button{font-size:0.8rem;padding:10px 20px 10px 20px;display:inline-block;border:2px solid #8873fe;transition:all 0.18s ease-out;font-weight:700;line-height:1.2rem;}.button.button--primary{background-color:#8873fe;color:white;}.button-bar{margin:20px 0px 20px 0px;display:flex;padding:30px 30px 30px 30px;align-items:center;justify-content:space-between;border-radius:4px 4px 4px 4px;background-color:#ffffff;}.button-bar.button-bar--full-width{justify-content:space-between;align-items:center;}.button-bar_item.button-bar__item--secondary{font-size:0.8rem;}.button.button--secondary{font-weight:400;color:#8873fe;border:2px solid #8873fe;}.box{border-radius:4px 4px 4px 4px;background-color:#ffffff;}.box.flex-between{align-items:center;}.button--tertiary{background-color:transparent;font-weight:400;}.button:hover{color:#8873fe;border:2px solid #8873fe;}.button.button--secondary:hover{background-color:white;border:2px solid rgba(136,115,254,0.5);}#imgx81{min-height:100vh;display:flex;justify-content:center;align-items:center;flex-direction:column;}#in62y2{justify-content:center;}.big-button{border-radius:5px 5px 5px 5px;font-size:15px;margin:10px 10px 10px 10px;padding:15px 30px 15px 30px;font-weight:700;background-color:#ffffff;}#i9msnk{padding:10px;display:inline;}#i6akll{padding:10px;display:inline;}#ixzhcr{padding:10px;position:absolute;display:none;}.bg-silex-purpel{background-repeat:repeat-y;background-position:center top;background-attachment:scroll;background-size:contain;background-image:url(/assets/../assets/bg-purpel-silex.webp);}.text-centered{text-align:center;}.text-white{color:#ffffff;}.box.box_transp{background-color:rgba(255,255,255,0.5);}.top-space-20{margin:20px 0 0 0;}.button.button--tertiary{border:2px solid transparent;background-color:rgba(221,221,221,0.5);}.box_login{max-width:450px;width:100%;padding:30px 30px 30px 30px;}.button-bar__item--link.text-white{color:#ffffff;}.button.big-button{border:2px solid transparent;}.button.button--tertiary:hover{border:2px solid #8873fe;color:#8873fe;background-color:white;}.button-bar__item__icon{float:left;height:40px;margin:5px 5px 5px 5px;width:40px;}.button-bar__item--secondary{font-size:0.8rem;}.connector__card{align-items:center;margin:5px auto 5px auto;border:1px solid;border-radius:5px 5px 5px 5px;max-width:100%;display:flex;color:black;}#i3cney{width:100%;display:none;justify-content:center;}.connector__description{padding:5px 15px 5px 15px;}#ie0dxn{min-height:100px;}#ior0hl{color:black;}#igp4xl{justify-content:center;display:inline-block;}#isqe61{display:inline-block;}.margin-top{margin:80px 0px 30px 0px;}.margin-30{margin:30px 0px 30px 0px;}.connector__card:link{text-decoration:none;color:black;border:1px solid;}.connector__card:hover{background-color:#8873fe;color:white;}
|
package/_site/css/websites-4b9b2b0a0a907b33eca109d50c2a3eee97f1955c742cef487110d21a0bbf8f50.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* { box-sizing: border-box; } body {margin: 0;}.nav__item{margin:0px 10px 0px 10px;font-size:0.8rem;padding:24px 0px 24px 0px;color:#4a4a4a;}.body{font-family:"Ubuntu", sans-serif;background-color:#f0f0f0;color:#2b1b63;}.menu-bar{display:flex;align-items:center;justify-content:space-between;background-color:#ffffff;height:94px;padding:0px 100px 0px 100px;width:100%;}.padding-normal{padding:0px 24px 0px 24px;}#i9jq{display:flex;}.nav{width:100%;margin:0px 20px 0px 20px;}.subtitle-16{font-size:1rem;margin:0px 0px 20px 0px;}.subtitle-16.color--light{color:#636363;font-weight:700;}.button{font-size:0.8rem;padding:10px 20px 10px 20px;display:inline-block;border:2px solid #8873fe;transition:all 0.18s ease-out;font-weight:700;line-height:1.2rem;}.button.button--primary{background-color:#8873fe;color:white;}.button-bar{margin:20px 0px 20px 0px;display:flex;padding:30px 30px 30px 30px;align-items:center;justify-content:space-between;border-radius:4px 4px 4px 4px;background-color:#ffffff;}#ibsgw{position:relative;top:3px;}.button-bar.button-bar--full-width{justify-content:space-between;align-items:center;}.button-bar_item.button-bar__item--secondary{font-size:0.8rem;}.button.button--secondary{font-weight:400;color:#8873fe;border:2px solid #8873fe;}.rounded{border-radius:4px 4px 4px 4px;}.footer{display:flex;margin:50px 0px 0px 0px;background-color:#ffffff;justify-content:space-evenly;padding:30px 30px 60px 30px;}.skeleton-text.skeleton{background-color:#dddddd;color:transparent;opacity:0.31;border-radius:5px 5px 5px 5px;}.skeleton.skeleton-button{color:transparent;opacity:0.31;background-color:#dddddd;border-radius:5px 5px 5px 5px;width:140px;}.skeleton-anim{position:relative;}.nav__item.active{color:black;}.margin-20{margin:20px 0px 20px 0px;}#i0ro3{display:none;}.loading__item.loaded-true{display:none;}.flex-no-shrink{flex-shrink:0;}.form{padding:10px 0px 10px 0px;border-radius:5px 5px 5px 5px;}#i1nmbc{flex-shrink:0;}.input{padding:10px 10px 10px 10px;background-color:transparent;border:2px solid #8873fe;margin:10px 0px 10px 0px;border-radius:4px 4px 4px 4px;}.full-width{width:100%;}.v-space{margin:10px 0px 10px 0px;}.box{border-radius:4px 4px 4px 4px;background-color:#ffffff;}.box__header{margin:0px 0px 0px 0px;padding:10px 0px 10px 0px;font-weight:700;font-size:1.625rem;color:rgba(43,27,99,0.5);}.box.flex-between{align-items:center;}.flex-between{display:flex;align-items:center;justify-content:space-between;}.button--tertiary{background-color:transparent;font-weight:400;}.icon-font{font-size:1.5rem;line-height:1px;margin:0px 2px 0px 2px;}.lang__item{margin:0px 5px 0px 5px;}.top-space-40{margin:40px 0 0 0;}.nav__logo{height:50px;}.user-icon__image{width:100%;height:100%;}.user__wrapper{border:1px solid white;display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0 0 0 20px;}.right-space-20{margin:0px 20px 0px 0px;}#iksw4d{padding:10px;}.button:hover{color:#8873fe;border:2px solid #8873fe;}.button.button--secondary:hover{background-color:white;border:2px solid rgba(136,115,254,0.5);}.user-icon__wrapper{border:1px solid #f0f0f0;background-color:#f0f0f0;border-radius:50% 50% 50% 50%;width:40px;height:40px;overflow:hidden hidden;}.title-40{margin:0 0 10px 0;font-size:2.5rem;font-weight:700;}.bg-silex-purpel{background-repeat:repeat-y;background-position:center top;background-attachment:scroll;background-size:contain;background-image:url(/assets/../assets/bg-purpel-silex.webp);}.section-top{max-width:1200px;padding:40px 30px 40px 30px;height:226px;display:flex;flex-direction:column;justify-content:center;margin:0px auto 0px auto;}.text-centered{text-align:center;}.box-message{background-color:rgba(43,27,99,0.3);border-radius:4px 4px 4px 4px;padding:20px 30px 20px 30px;margin:10px 0px 10px 0px;}.text-white{color:#ffffff;}.bold{font-weight:800;}.button-bar__item--link{background-color:transparent;border:0px solid black;font-size:0.8rem;color:#8873fe;}.padding-30{padding:30px 30px 30px 30px;}.right-space-40{margin:0 40px 0 0;}.title-26{font-size:1.625rem;margin:10px 0px 10px 0px;}.empty-image{min-height:500px;background-image:url(/assets/../assets/empty-projects-sos.gif);background-repeat:no-repeat;background-position:center center;background-attachment:scroll;background-size:contain;}.padding-50-30{padding:50px 30px 50px 30px;}.box.box_transp{background-color:rgba(255,255,255,0.5);}.button.button--tertiary{border:2px solid transparent;background-color:rgba(221,221,221,0.5);}.button-bar__item--link.text-white{color:#ffffff;}.button.big-button{border:2px solid transparent;}.color-2B1B63-80{color:rgba(43,27,99,0.8);}.button.button--tertiary:hover{border:2px solid #8873fe;color:#8873fe;background-color:white;}.box-message-text{margin:0px 0 0 0;font-weight:300;}.website-max-width{max-width:1200px;}.margin-80{margin:80px auto 80px auto;}.button-bar__item--secondary{font-size:0.8rem;}.skeleton{line-height:1.1rem;}#isucae{min-height:100px;}.footer__column{display:flex;flex-direction:column;flex-grow:1;text-align:center;}.footer__item{padding:10px 10px 10px 10px;}#igsxoc{position:relative;top:3px;}.box--centered{display:flex;flex-direction:column;align-items:center;}.button-bar__title:hover{color:#8873fe;}.button-bar__item--icon{margin:0px 0 0 0;padding:5px 5px 5px 5px;}.nav__item:hover{text-decoration:none;color:#8873fe;}.nav_item--active:first-child{color:#8873fe;}
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="">
|
|
3
3
|
<head>
|
|
4
|
-
<
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<link rel="stylesheet" href="/css/connectors-61bd21c2345101e48cc530cacf3afc0156ce7e089fcef3a34f853a537f0c55f2.css" />
|
|
5
6
|
<!-- font google -->
|
|
6
7
|
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
|
7
8
|
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;700&display=swap" rel="stylesheet">
|
|
8
9
|
|
|
9
|
-
<link
|
|
10
|
-
rel="alternate"
|
|
11
|
-
hreflang="fr"
|
|
12
|
-
href="/fr/connectors" />
|
|
13
10
|
<style>
|
|
14
11
|
.before-js > * {
|
|
15
12
|
visibility: hidden;
|
|
16
13
|
opacity: 0;
|
|
17
14
|
transition: opacity .5s ease;
|
|
18
15
|
}
|
|
16
|
+
.before-js[data-gjs-type] > *, /* This is only inside the editor, .before-js needs to be on the body */
|
|
19
17
|
.after-js > * {
|
|
20
18
|
visibility: visible;
|
|
21
19
|
opacity: 1;
|
|
@@ -26,6 +24,7 @@
|
|
|
26
24
|
top: 49%;
|
|
27
25
|
left: 49%;
|
|
28
26
|
}
|
|
27
|
+
.before-js[data-gjs-type]:before, /* This is only inside the editor, .before-js needs to be on the body */
|
|
29
28
|
.after-js:before {
|
|
30
29
|
content: none;
|
|
31
30
|
}
|
|
@@ -61,7 +60,7 @@
|
|
|
61
60
|
color: #8873FE;
|
|
62
61
|
}
|
|
63
62
|
input:focus {
|
|
64
|
-
border: 2px solid
|
|
63
|
+
border: 2px solid #9977FE;
|
|
65
64
|
background-color:#ffffff;
|
|
66
65
|
}
|
|
67
66
|
:focus {
|
|
@@ -129,12 +128,12 @@
|
|
|
129
128
|
}
|
|
130
129
|
/*flash*/
|
|
131
130
|
.fx-flash:hover {
|
|
132
|
-
animation: flash-in .
|
|
131
|
+
animation: flash-in .25s ;
|
|
133
132
|
}
|
|
134
133
|
/*flash-in animation*/
|
|
135
134
|
@keyframes flash-in{
|
|
136
135
|
0% {
|
|
137
|
-
opacity
|
|
136
|
+
opacity:.25;
|
|
138
137
|
}
|
|
139
138
|
100% {
|
|
140
139
|
opacity:1;
|
|
@@ -143,10 +142,13 @@
|
|
|
143
142
|
/*flash-in animation*/
|
|
144
143
|
/*FX ANIMATIONS*/
|
|
145
144
|
</style>
|
|
146
|
-
<script src="/js/vue.global.js"></script>
|
|
145
|
+
<script src="/js/vue.global.prod.js"></script>
|
|
147
146
|
<script src="/js/main.js"></script>
|
|
148
147
|
<script type="module">
|
|
148
|
+
console.log('xxxxxx')
|
|
149
|
+
const CONNECTORS_PATH = '/connectors/'
|
|
149
150
|
window.addEventListener('load', function() {
|
|
151
|
+
console.log('xxxxxx')
|
|
150
152
|
const { createApp } = Vue;
|
|
151
153
|
const { api, constants, types } = silex;
|
|
152
154
|
const {
|
|
@@ -154,84 +156,190 @@ window.addEventListener('load', function() {
|
|
|
154
156
|
} = types
|
|
155
157
|
const {
|
|
156
158
|
setServerUrl,
|
|
157
|
-
|
|
159
|
+
getUser,
|
|
158
160
|
logout,
|
|
161
|
+
websiteDelete,
|
|
162
|
+
websiteDuplicate,
|
|
163
|
+
websiteList,
|
|
164
|
+
websiteCreate,
|
|
165
|
+
websiteMetaWrite,
|
|
159
166
|
} = api
|
|
167
|
+
function toSafeId(name) {
|
|
168
|
+
return name.replace(/[/\\?%*:|"<>]/g, '_')
|
|
169
|
+
}
|
|
160
170
|
|
|
161
171
|
const App = {
|
|
162
172
|
data() {
|
|
163
173
|
return {
|
|
164
|
-
|
|
174
|
+
websites: [],
|
|
175
|
+
newWebsiteName: '',
|
|
176
|
+
showCreationForm: false,
|
|
165
177
|
error: null,
|
|
166
178
|
message: null,
|
|
179
|
+
loggedIn: false,
|
|
167
180
|
loading: true,
|
|
168
|
-
|
|
181
|
+
storage: null,
|
|
182
|
+
user: null,
|
|
183
|
+
showMenu: false,
|
|
184
|
+
empty: false,
|
|
169
185
|
}
|
|
170
186
|
},
|
|
171
187
|
mounted() {
|
|
172
188
|
this.init()
|
|
173
|
-
window.addEventListener('message', (event) => {
|
|
174
|
-
if(event.data && event.data.type === 'login') {
|
|
175
|
-
this.loginResult(event.data)
|
|
176
|
-
}
|
|
177
|
-
})
|
|
178
189
|
},
|
|
179
190
|
|
|
180
191
|
methods: {
|
|
181
192
|
async init() {
|
|
182
193
|
try {
|
|
183
194
|
// Init Silex server path
|
|
184
|
-
// Go up
|
|
185
|
-
setServerUrl(
|
|
195
|
+
// Go up one level because of the language prefix
|
|
196
|
+
setServerUrl(window.location.origin)
|
|
186
197
|
// Start
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
198
|
+
const user = await getUser({type: ConnectorType.STORAGE})
|
|
199
|
+
// Escape single quotes in the picture URL and decode the picture URL
|
|
200
|
+
user.picture = decodeURIComponent(user.picture).replace(/'/g, "\\'")
|
|
201
|
+
if(user) {
|
|
202
|
+
this.user = user
|
|
203
|
+
this.loggedIn = true
|
|
204
|
+
this.websites = await websiteList({connectorId: this.user.storage.connectorId})
|
|
205
|
+
this.empty = this.websites.length === 0
|
|
206
|
+
this.loading = false
|
|
207
|
+
} else {
|
|
208
|
+
this.openLogin()
|
|
209
|
+
}
|
|
192
210
|
} catch (error) {
|
|
193
211
|
console.error(error)
|
|
194
|
-
this.error = error
|
|
195
212
|
this.loading = false
|
|
213
|
+
if(error.code === 401 || error.httpStatusCode === 401) {
|
|
214
|
+
this.loggedIn = false
|
|
215
|
+
this.openLogin()
|
|
216
|
+
} else {
|
|
217
|
+
this.error = `Failed to start dashboard - ${error.message}`
|
|
218
|
+
this.message = ''
|
|
219
|
+
}
|
|
196
220
|
}
|
|
197
221
|
},
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
222
|
+
|
|
223
|
+
openLogin(id, lang) {
|
|
224
|
+
//throw new Error('debug')
|
|
225
|
+
const path = `/en${CONNECTORS_PATH}`
|
|
226
|
+
console.log(window.location.pathname, window.location.path, path)
|
|
227
|
+
if(window.location.pathname === path) return
|
|
228
|
+
window.open(path, '_self')
|
|
203
229
|
},
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
this.error = data.error
|
|
208
|
-
this.message = `Error, login failed. ${data.message}`
|
|
209
|
-
} else {
|
|
210
|
-
window.location.href = '/'
|
|
211
|
-
}
|
|
230
|
+
|
|
231
|
+
openEditor(id, lang) {
|
|
232
|
+
window.open(`/?id=${id}&lang=${lang}&connectorId=${this.user.storage.connectorId}`, '_self')
|
|
212
233
|
},
|
|
234
|
+
|
|
213
235
|
async logout() {
|
|
236
|
+
await logout({
|
|
237
|
+
type: ConnectorType.STORAGE,
|
|
238
|
+
connectorId: this.user.storage.connectorId,
|
|
239
|
+
})
|
|
240
|
+
window.location.reload()
|
|
241
|
+
},
|
|
242
|
+
|
|
243
|
+
async createWebsite() {
|
|
214
244
|
try {
|
|
215
|
-
this.
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
245
|
+
if (!this.newWebsiteName) throw new Error('You need to provide a website name')
|
|
246
|
+
this.loading = true
|
|
247
|
+
const websiteId = toSafeId(this.newWebsiteName)
|
|
248
|
+
const result = await websiteCreate({
|
|
249
|
+
websiteId,
|
|
250
|
+
data: {
|
|
251
|
+
name: this.newWebsiteName,
|
|
252
|
+
imageUrl: null,
|
|
253
|
+
},
|
|
254
|
+
connectorId: this.user.storage.connectorId
|
|
255
|
+
})
|
|
256
|
+
this.message = 'Website created successfully'
|
|
257
|
+
this.error = ''
|
|
258
|
+
this.newWebsiteName = ''
|
|
259
|
+
this.showCreationForm = false;
|
|
260
|
+
this.websites = await websiteList({connectorId: this.user.storage.connectorId})
|
|
261
|
+
this.empty = this.websites.length === 0
|
|
220
262
|
this.loading = false
|
|
221
|
-
|
|
222
|
-
this.error = false
|
|
263
|
+
return result
|
|
223
264
|
} catch (error) {
|
|
265
|
+
this.loading = false
|
|
224
266
|
console.error(error)
|
|
225
|
-
this.error = error
|
|
226
|
-
this.message =
|
|
267
|
+
this.error = `Failed to create website - ${error.message}`
|
|
268
|
+
this.message = ''
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
|
|
272
|
+
async deleteWebsite(websiteId) {
|
|
273
|
+
const ok = confirm('Deleting a website? Are your sure? Really?')
|
|
274
|
+
if (!ok) return
|
|
275
|
+
this.loading = true
|
|
276
|
+
try {
|
|
277
|
+
const result = await websiteDelete({websiteId, connectorId: this.user.storage.connectorId})
|
|
278
|
+
this.message = 'Website deleted successfully'
|
|
279
|
+
this.error = ''
|
|
280
|
+
this.websites = await websiteList({connectorId: this.user.storage.connectorId})
|
|
281
|
+
this.empty = this.websites.length === 0
|
|
227
282
|
this.loading = false
|
|
283
|
+
return result
|
|
284
|
+
} catch (error) {
|
|
285
|
+
this.loading = false
|
|
286
|
+
this.error = `Failed to delete website - ${error.message}`
|
|
287
|
+
this.message = ''
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
|
|
291
|
+
async duplicateWebsite(websiteId) {
|
|
292
|
+
this.loading = true
|
|
293
|
+
try {
|
|
294
|
+
await websiteDuplicate({websiteId, connectorId: this.user.storage.connectorId, data: { name }})
|
|
295
|
+
this.error = ''
|
|
296
|
+
this.websites = await websiteList({connectorId: this.user.storage.connectorId})
|
|
297
|
+
this.message = 'Website duplicated successfully'
|
|
298
|
+
this.empty = this.websites.length === 0
|
|
299
|
+
this.loading = false
|
|
300
|
+
} catch (error) {
|
|
301
|
+
this.loading = false
|
|
302
|
+
this.error = `Failed to duplicate website - ${error.message}`
|
|
303
|
+
this.message = ''
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
|
|
307
|
+
async renameWebsite(websiteId) {
|
|
308
|
+
const website = this.websites.find(w => w.websiteId === websiteId)
|
|
309
|
+
const name = prompt('New name for this website', website.name)
|
|
310
|
+
if (!name) return
|
|
311
|
+
this.loading = true
|
|
312
|
+
try {
|
|
313
|
+
const result = await websiteMetaWrite({websiteId, connectorId: this.user.storage.connectorId, data: { name }})
|
|
314
|
+
this.message = 'Website renamed successfully'
|
|
315
|
+
this.error = ''
|
|
316
|
+
this.websites = await websiteList({connectorId: this.user.storage.connectorId})
|
|
317
|
+
this.empty = this.websites.length === 0
|
|
318
|
+
this.loading = false
|
|
319
|
+
return result
|
|
320
|
+
} catch (error) {
|
|
321
|
+
this.loading = false
|
|
322
|
+
this.error = `Failed to rename website - ${error.message}`
|
|
323
|
+
this.message = ''
|
|
228
324
|
}
|
|
229
325
|
},
|
|
230
326
|
},
|
|
231
327
|
};
|
|
328
|
+
// Prepare elements for vue
|
|
329
|
+
document.querySelectorAll('[v-text], [v-html]')
|
|
330
|
+
.forEach(el => el.innerText = '')
|
|
331
|
+
|
|
332
|
+
// Create the app
|
|
333
|
+
const app = createApp(App);
|
|
334
|
+
|
|
335
|
+
// Suppress "v-text will override element children" warning
|
|
336
|
+
app.config.compilerOptions.directiveTransforms = {
|
|
337
|
+
text: false,
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// Mount the app
|
|
341
|
+
app.mount('.app');
|
|
232
342
|
|
|
233
|
-
// Start vue app
|
|
234
|
-
createApp(App).mount('.app');
|
|
235
343
|
|
|
236
344
|
// Remove loading
|
|
237
345
|
setTimeout(() => {
|
|
@@ -240,137 +348,24 @@ window.addEventListener('load', function() {
|
|
|
240
348
|
})
|
|
241
349
|
</script>
|
|
242
350
|
|
|
243
|
-
<title
|
|
351
|
+
<title>Silex Dashboard</title>
|
|
244
352
|
<link rel="icon" href="/assets/favicon-32x32.png" />
|
|
245
|
-
<meta name="
|
|
246
|
-
<
|
|
247
|
-
<
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
><img
|
|
266
|
-
src="/assets/picto-silex@3x.png"
|
|
267
|
-
class="nav__logo "
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
></img></A><NAV
|
|
271
|
-
id="in5jeq"
|
|
272
|
-
class="nav "
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
><A
|
|
276
|
-
href="/" id="i0g3ac"
|
|
277
|
-
class="nav__item uppercase active"
|
|
278
|
-
target=""
|
|
279
|
-
|
|
280
|
-
>Sites</A><A
|
|
281
|
-
href="http://docs.silex.me/" id="i0g3ac"
|
|
282
|
-
class="nav__item uppercase "
|
|
283
|
-
target="_blank"
|
|
284
|
-
|
|
285
|
-
>Docs</A><A
|
|
286
|
-
href="https://www.silex.me/" id="i0g3ac"
|
|
287
|
-
class="nav__item uppercase "
|
|
288
|
-
target="_blank"
|
|
289
|
-
|
|
290
|
-
>About</A><A
|
|
291
|
-
href="https://community.silex.me/" id="i0g3ac"
|
|
292
|
-
class="nav__item uppercase "
|
|
293
|
-
target="_blank"
|
|
294
|
-
|
|
295
|
-
>Community</A><A
|
|
296
|
-
href="https://mail-list.silexlabs.org/subscription/cemnfkaVrK?locale=en-US&source=silex-dashboard" id="i0g3ac"
|
|
297
|
-
class="nav__item uppercase "
|
|
298
|
-
target="_blank"
|
|
299
|
-
|
|
300
|
-
>News</A></NAV><div
|
|
301
|
-
|
|
302
|
-
class="lang h-space uppercase "
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
><A
|
|
306
|
-
href="/en"
|
|
307
|
-
class="lang__item nav__item active"
|
|
308
|
-
hreflang="en"
|
|
309
|
-
|
|
310
|
-
>en</A><A
|
|
311
|
-
href="/fr"
|
|
312
|
-
class="lang__item nav__item "
|
|
313
|
-
hreflang="fr"
|
|
314
|
-
|
|
315
|
-
>fr</A></div></HEADER><A
|
|
316
|
-
id="ixzhcr" href="/"
|
|
317
|
-
class="button button-bar__item--secondary "
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
>< Back</A><div
|
|
321
|
-
id="imawg3"
|
|
322
|
-
class="bg-silex-purpel "
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
><div
|
|
326
|
-
id="imgx81"
|
|
327
|
-
class=" before-js"
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
><div
|
|
331
|
-
id="iikf0s"
|
|
332
|
-
class="box text-centered padding-100-30 box_login "
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
><H1
|
|
336
|
-
id="ighycb"
|
|
337
|
-
class="title-40 "
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
>Welcome to Silex</H1><div
|
|
341
|
-
id="it2175"
|
|
342
|
-
class="subtitle-16 "
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
>Please login to continue</div><div
|
|
346
|
-
id="in62y2"
|
|
347
|
-
class="button-bar "
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
><A
|
|
351
|
-
id="isqe61"
|
|
352
|
-
class="button big-button "
|
|
353
|
-
v-if="!loading" v-for="(connector, index) in connectors" :key="index" :style="{ backgroundColor: connector.background, color: connector.color }" @click="openLogin(connector)"
|
|
354
|
-
|
|
355
|
-
><div
|
|
356
|
-
id="io3lid"
|
|
357
|
-
class="button-bar__item__icon "
|
|
358
|
-
:style='`background: url("${connector.icon}"); background-repeat: no-repeat; background-size: contain;`'
|
|
359
|
-
|
|
360
|
-
></div><div
|
|
361
|
-
id="i87asw"
|
|
362
|
-
|
|
363
|
-
v-text="connector.displayName"
|
|
364
|
-
|
|
365
|
-
>Insert your text here</div></A></div></div><div
|
|
366
|
-
id="i9msnk"
|
|
367
|
-
class="text-white top-space-20 "
|
|
368
|
-
v-if="error" v-html="message"
|
|
369
|
-
|
|
370
|
-
>Insert your text here</div><div
|
|
371
|
-
id="i6akll"
|
|
372
|
-
class="button button--tertiary text-centered "
|
|
373
|
-
v-if="error" @click="logout()"
|
|
374
|
-
|
|
375
|
-
>Logout</div></div></div></body>
|
|
353
|
+
<meta name="og:title" property="og:title" content="Silex Dashboard"/>
|
|
354
|
+
<link href="https://www.googleapis.com" rel="preconnect" ><link href="https://fonts.gstatic.com" rel="preconnect" crossorigin ><link href="https://www.googleapis.com/css?family=Ubuntu&display=swap" rel="stylesheet" ></head>
|
|
355
|
+
<body id="i2hcfw" class="body app before-js"><A id="ixzhcr" href="/" class="button button-bar__item--secondary">< Back</A><div id="imawg3" class="bg-silex-purpel"><div id="imgx81" class=""><div id="iikf0s" class="box box_login"><div id="ie0dxn" class="text-centered"><img id="ior0hl" src="/assets/logo-silex.svg"/><p id="it2175" class="subtitle-16">Please login to continue</p><div id="ilq8ui" class="text-centered">Do you need help? Check <a href="https://docs.silex.me/en/user/login" target="_blank">the documentation</a>.</div></div><h3 id="iqc1xf" class="margin-top">Recommended and free</h3><div id="in62y2">
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
<div id="isqe61" class="">
|
|
360
|
+
<a id="i0vhjr" href="/api/connector/login?connectorId=gitlab&type=STORAGE" class="connector__card" data-style="background: rgba(252, 109, 38, 0.2); color: #2B1B63;" title="Gitlab.com is the service we recommend to host your Silex website. We trust the company behind the service, go check them out."><div id="io3lid" class="button-bar__item__icon"><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="100%" height="100%" viewBox="0 0 1000 963.197" version="1.1" id="svg85"> <sodipodi:namedview id="namedview87" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageshadow="2" inkscape:pageopacity="0.0" inkscape:pagecheckerboard="0" showgrid="false" inkscape:zoom="1" inkscape:cx="991.5" inkscape:cy="964.5" inkscape:window-width="1126" inkscape:window-height="895" inkscape:window-x="774" inkscape:window-y="12" inkscape:window-maximized="0" inkscape:current-layer="svg85" /> <defs id="defs74"> <style id="style72"> .cls-1{fill:#e24329;} .cls-2{fill:#fc6d26;} .cls-3{fill:#fca326;} </style> </defs> <g id="LOGO" transform="matrix(5.2068817,0,0,5.2068817,-489.30756,-507.76085)"> <path class="cls-1" d="m 282.83,170.73 -0.27,-0.69 -26.14,-68.22 a 6.81,6.81 0 0 0 -2.69,-3.24 7,7 0 0 0 -8,0.43 7,7 0 0 0 -2.32,3.52 l -17.65,54 h -71.47 l -17.65,-54 a 6.86,6.86 0 0 0 -2.32,-3.53 7,7 0 0 0 -8,-0.43 6.87,6.87 0 0 0 -2.69,3.24 L 97.44,170 l -0.26,0.69 a 48.54,48.54 0 0 0 16.1,56.1 l 0.09,0.07 0.24,0.17 39.82,29.82 19.7,14.91 12,9.06 a 8.07,8.07 0 0 0 9.76,0 l 12,-9.06 19.7,-14.91 40.06,-30 0.1,-0.08 a 48.56,48.56 0 0 0 16.08,-56.04 z" id="path76" /> <path class="cls-2" d="m 282.83,170.73 -0.27,-0.69 a 88.3,88.3 0 0 0 -35.15,15.8 L 190,229.25 c 19.55,14.79 36.57,27.64 36.57,27.64 l 40.06,-30 0.1,-0.08 a 48.56,48.56 0 0 0 16.1,-56.08 z" id="path78" /> <path class="cls-3" d="m 153.43,256.89 19.7,14.91 12,9.06 a 8.07,8.07 0 0 0 9.76,0 l 12,-9.06 19.7,-14.91 c 0,0 -17.04,-12.89 -36.59,-27.64 -19.55,14.75 -36.57,27.64 -36.57,27.64 z" id="path80" /> <path class="cls-2" d="M 132.58,185.84 A 88.19,88.19 0 0 0 97.44,170 l -0.26,0.69 a 48.54,48.54 0 0 0 16.1,56.1 l 0.09,0.07 0.24,0.17 39.82,29.82 c 0,0 17,-12.85 36.57,-27.64 z" id="path82" /> </g> </svg></div><div id="i87asw" class="connector__description">Connect with GitLab.com</div></a></div>
|
|
361
|
+
|
|
362
|
+
</div><h3 id="i8w75b" class="margin-30">Advanced users</h3><div id="igp4xl">
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
<div id="id9k25" href="" class="">
|
|
369
|
+
<a href="/api/connector/login?connectorId=ftp&type=STORAGE" id="irgt6z" class="connector__card" data-style="background: #0066CC; color: #ffffff;" title="FTP is for professional users who want to host their websites with a hosting company of their choice
|
|
370
|
+
"><div class="button-bar__item__icon"><svg xmlns='http://www.w3.org/2000/svg' height='100%' viewBox='0 0 512 512'> <path d='M64 32C28.7 32 0 60.7 0 96v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V352c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z' /> </svg></div><div class="connector__description">Connect with FTP</div></a></div></div><div id="i3cney" class="button-bar"><a id="iacshy" class="button big-button connector__card" v-if="!loading" :key="index" :style="{ backgroundColor: connector.background, color: connector.color }" v-for="(connector, index) in connectors" v-on-click="openLogin(connector)"><div id="iiwn36"><div class="button-bar__item__icon" :style="`background: url('${connector.icon}'); background-repeat: no-repeat; background-size: contain;`"></div><div id="if4gvb" class="" v-text="connector.displayName">Name<br/></div></div><div id="isndui">This connector is about blablabla<br/></div></a></div></div><div id="i9msnk" class="text-white top-space-20" v-if="error" v-text="message" :test="message">Insert your text here</div><div id="i6akll" class="button button--tertiary text-centered" v-if="error" v-on:click="logout()">Logout</div></div></div></body>
|
|
376
371
|
</html>
|