diff options
-rw-r--r-- | compiler/win_build.cmd | 4 | ||||
-rw-r--r-- | compiler/win_compile_example.cmd | 10 | ||||
-rw-r--r-- | viewer/.env | 4 | ||||
-rw-r--r-- | viewer/src/views/Gallery.vue | 1 | ||||
-rw-r--r-- | viewer/vue.config.js | 4 |
5 files changed, 19 insertions, 4 deletions
diff --git a/compiler/win_build.cmd b/compiler/win_build.cmd new file mode 100644 index 0000000..33559fa --- /dev/null +++ b/compiler/win_build.cmd | |||
@@ -0,0 +1,4 @@ | |||
1 | @echo off | ||
2 | stack setup | ||
3 | stack build | ||
4 | pause \ No newline at end of file | ||
diff --git a/compiler/win_compile_example.cmd b/compiler/win_compile_example.cmd new file mode 100644 index 0000000..f5ef2e2 --- /dev/null +++ b/compiler/win_compile_example.cmd | |||
@@ -0,0 +1,10 @@ | |||
1 | @echo off | ||
2 | SET rebuild=--rebuild | ||
3 | CHOICE /M "Rebuild all?" | ||
4 | IF ERRORLEVEL 2 SET rebuild= | ||
5 | echo. | ||
6 | echo stack exec ldgallery-compiler-exe -- %rebuild% -i=../example/ -o=../example/out/ | ||
7 | echo. | ||
8 | stack exec ldgallery-compiler-exe -- %rebuild% -i=../example/ -o=../example/out/ | ||
9 | echo. | ||
10 | pause | ||
diff --git a/viewer/.env b/viewer/.env index d06d633..59b220a 100644 --- a/viewer/.env +++ b/viewer/.env | |||
@@ -1,4 +1,4 @@ | |||
1 | VUE_APP_I18N_LOCALE=en | 1 | VUE_APP_I18N_LOCALE=en |
2 | VUE_APP_I18N_FALLBACK_LOCALE=en | 2 | VUE_APP_I18N_FALLBACK_LOCALE=en |
3 | VUE_APP_DATA_URL=/gallery | 3 | VUE_APP_DATA_URL=/gallery/ |
4 | VUE_APP_EXAMPLE_PROJECT=example | 4 | VUE_APP_EXAMPLE_PROJECT=../example/out/ |
diff --git a/viewer/src/views/Gallery.vue b/viewer/src/views/Gallery.vue index f04b276..4deb937 100644 --- a/viewer/src/views/Gallery.vue +++ b/viewer/src/views/Gallery.vue | |||
@@ -3,6 +3,7 @@ | |||
3 | <gallery-search v-if="$uiStore.isModeSearch" :items="currentSearch" /> | 3 | <gallery-search v-if="$uiStore.isModeSearch" :items="currentSearch" /> |
4 | <gallery-directory v-else-if="isDirectory" :directory="currentItem" /> | 4 | <gallery-directory v-else-if="isDirectory" :directory="currentItem" /> |
5 | <gallery-image v-else-if="isImage" :image="currentItem" /> | 5 | <gallery-image v-else-if="isImage" :image="currentItem" /> |
6 | <div v-else>Unknown type</div> | ||
6 | </div> | 7 | </div> |
7 | </template> | 8 | </template> |
8 | 9 | ||
diff --git a/viewer/vue.config.js b/viewer/vue.config.js index dbf1551..0f84d44 100644 --- a/viewer/vue.config.js +++ b/viewer/vue.config.js | |||
@@ -12,9 +12,9 @@ module.exports = { | |||
12 | port: 8085, | 12 | port: 8085, |
13 | serveIndex: true, | 13 | serveIndex: true, |
14 | before: (app, server, compiler) => { | 14 | before: (app, server, compiler) => { |
15 | app.get(`${process.env.VUE_APP_DATA_URL}/*`, (req, res) => { | 15 | app.get(`${process.env.VUE_APP_DATA_URL}*`, (req, res) => { |
16 | const fs = require("fs"); | 16 | const fs = require("fs"); |
17 | const fileName = `../${process.env.VUE_APP_EXAMPLE_PROJECT}${req.url.slice(process.env.VUE_APP_DATA_URL.length)}`; | 17 | const fileName = `${process.env.VUE_APP_EXAMPLE_PROJECT}${req.url.slice(process.env.VUE_APP_DATA_URL.length)}`; |
18 | const file = fs.readFileSync(decodeURIComponent(fileName)); | 18 | const file = fs.readFileSync(decodeURIComponent(fileName)); |
19 | res.end(file); | 19 | res.end(file); |
20 | }); | 20 | }); |