Skip to content

Commit a82252b

Browse files
authored
Fix Screenshots (#9)
1 parent aadb0c2 commit a82252b

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
lines changed

genshots.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
const baseDir = './src/screenshots'
1+
const repoDir = './src/screenshots'
2+
const relPath = '/screenshots/'
23

34
const fs = require('fs')
45
const files = []
5-
fs.readdirSync(baseDir).forEach((file) => {
6+
fs.readdirSync(repoDir).forEach((file) => {
67
files.push(file)
78
})
89
console.log(files)
@@ -13,7 +14,7 @@ file.on('error', function (err) {
1314
})
1415
file.write('const screenShots = [\n')
1516
files.forEach(function (x) {
16-
file.write(` '${x}',\n`)
17+
file.write(` '${relPath}${x}',\n`)
1718
})
1819
file.write(']\n')
1920
file.end()

src/js/vars.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
const screenShots = [
2-
'01_Login.png',
3-
'02_Home.png',
4-
'05_Files-file-context-dropdown.png',
5-
'06_Files-delete-click.png',
6-
'08_Shorts-create.png',
7-
'09_Shorts-delete-click.png',
8-
'11_Stats.png',
9-
'13_Settings-User-save-settings.png',
10-
'14_Settings-delete-click.png',
11-
'15_Settings-delete-deleted.png',
12-
'18_Settings-Site-flush-cache.png',
13-
'20_Public-enabled.png',
14-
'21_Preview-gps2.jpg.png',
15-
'23_Preview-README.md.png',
16-
'27_Preview-an225.jpg.png',
17-
'29_Site Settings with Global Quota Near Full.png',
18-
'30_Upload Failed by Global Quota.png',
19-
'31_Logout.png',
20-
'33_File-password.png',
2+
'/screenshots/01_Login.png',
3+
'/screenshots/02_Home.png',
4+
'/screenshots/05_Files-file-context-dropdown.png',
5+
'/screenshots/06_Files-delete-click.png',
6+
'/screenshots/08_Shorts-create.png',
7+
'/screenshots/09_Shorts-delete-click.png',
8+
'/screenshots/11_Stats.png',
9+
'/screenshots/13_Settings-User-save-settings.png',
10+
'/screenshots/14_Settings-delete-click.png',
11+
'/screenshots/15_Settings-delete-deleted.png',
12+
'/screenshots/18_Settings-Site-flush-cache.png',
13+
'/screenshots/20_Public-enabled.png',
14+
'/screenshots/21_Preview-gps2.jpg.png',
15+
'/screenshots/23_Preview-README.md.png',
16+
'/screenshots/27_Preview-an225.jpg.png',
17+
'/screenshots/29_Site Settings with Global Quota Near Full.png',
18+
'/screenshots/30_Upload Failed by Global Quota.png',
19+
'/screenshots/31_Logout.png',
20+
'/screenshots/33_File-password.png',
2121
]

0 commit comments

Comments
 (0)