From 1a695db3335fbe64917490cf324046e86efc1caf Mon Sep 17 00:00:00 2001 From: Gautier P Date: Tue, 23 Feb 2021 18:27:08 +0100 Subject: [PATCH] Add What's new modal (#372) --- css/style.css | 6 ++++++ gulpfile.js | 11 ++++++++++- index.html | 46 ++++++++++++++++++++++++++++++++++++++++++- js/WhatsNew.js | 43 ++++++++++++++++++++++++++++++++++++++++ js/control/Message.js | 19 ++++++++++++++++-- js/index.js | 2 ++ locales/en.json | 4 ++++ package.json | 1 + yarn.lock | 5 +++++ 9 files changed, 133 insertions(+), 4 deletions(-) create mode 100644 js/WhatsNew.js diff --git a/css/style.css b/css/style.css index fb38eb7..cab75fb 100644 --- a/css/style.css +++ b/css/style.css @@ -764,3 +764,9 @@ table.dataTable.display tbody tr:hover.selected { #selectionText { display: none; } + +.version-new::after { + font-family: FontAwesome; + content: '\f06a'; /* fa-exclamation */ + margin-left: 3px; +} diff --git a/gulpfile.js b/gulpfile.js index 8f11480..6c50707 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -28,6 +28,8 @@ var rename = require('gulp-rename'); var browserSync = require('browser-sync'); var merge = require('merge-stream'); var babel = require('gulp-babel'); +var marked = require('marked'); +var fs = require('fs'); const server = browserSync.create(); @@ -63,6 +65,7 @@ var paths = { ) .concat([ 'js/Browser.js', + 'js/WhatsNew.js', 'js/Util.js', 'js/Map.js', 'js/LayersConfig.js', @@ -184,6 +187,11 @@ gulp.task('boundaries', function () { return gulp.src(paths.boundaries).pipe(gulp.dest(paths.dest + '/boundaries')); }); +gulp.task('changelog', function (cb) { + var content = 'BR.changelog = `' + marked(fs.readFileSync('./CHANGELOG.md', 'utf-8')) + '`'; + fs.writeFile(paths.dest + '/changelog.js', content, cb); +}); + gulp.task('reload', function (done) { server.reload(); done(); @@ -350,7 +358,8 @@ gulp.task( 'images', 'fonts', 'locales', - 'boundaries' + 'boundaries', + 'changelog' ) ); diff --git a/index.html b/index.html index f827a06..e8b885b 100644 --- a/index.html +++ b/index.html @@ -341,6 +341,49 @@ on the client.

+ + + + + + + @@ -695,7 +738,7 @@ - +