Merge branch 'master' into develop

isekai-main
Barış Soner Uşaklı 2 years ago
commit efea33d906

@ -47,6 +47,7 @@ jobs:
type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}.x type=semver,pattern={{major}}.x
type=raw,value=latest,enable={{is_default_branch}} type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch,enable=${{ github.event.repository.default_branch != github.ref }}
- name: Build and push Docker images - name: Build and push Docker images
uses: docker/build-push-action@v4 uses: docker/build-push-action@v4

@ -1,3 +1,17 @@
#### v3.1.2 (2023-05-12)
##### Chores
* incrementing version number - v3.1.1 (40250733)
* update changelog for v3.1.1 (ccd6f48c)
* incrementing version number - v3.1.0 (0cb386bd)
* incrementing version number - v3.0.1 (26f6ea49)
* incrementing version number - v3.0.0 (224e08cd)
##### Bug Fixes
* #11595, use default value (28740de7)
#### v3.1.1 (2023-05-11) #### v3.1.1 (2023-05-11)
##### Chores ##### Chores

@ -2,7 +2,7 @@
"name": "nodebb", "name": "nodebb",
"license": "GPL-3.0", "license": "GPL-3.0",
"description": "NodeBB Forum", "description": "NodeBB Forum",
"version": "3.1.1", "version": "3.1.2",
"homepage": "https://www.nodebb.org", "homepage": "https://www.nodebb.org",
"repository": { "repository": {
"type": "git", "type": "git",

@ -235,15 +235,14 @@ define('forum/chats', [
} }
}); });
mousetrap.bind('up', function (e) { mousetrap.bind('up', function (e) {
if (e.target === components.get('chat/input').get(0)) { const inputEl = components.get('chat/input');
if (e.target === inputEl.get(0) && !inputEl.val()) {
// Retrieve message id from messages list // Retrieve message id from messages list
const message = components.get('chat/messages').find('.chat-message[data-self="1"]').last(); const message = components.get('chat/messages').find('.chat-message[data-self="1"]').last();
if (!message.length) { if (!message.length) {
return; return;
} }
const lastMid = message.attr('data-mid'); const lastMid = message.attr('data-mid');
const inputEl = components.get('chat/input');
messages.prepEdit(inputEl, lastMid, ajaxify.data.roomId); messages.prepEdit(inputEl, lastMid, ajaxify.data.roomId);
} }
}); });

@ -176,6 +176,11 @@ define('forum/chats/messages', [
autoCompleteEl.destroy(); autoCompleteEl.destroy();
} }
} }
textarea.on('keyup', (e) => {
if (e.key === 'Escape') {
finishEdit();
}
});
editEl.find('[data-action="cancel"]').on('click', finishEdit); editEl.find('[data-action="cancel"]').on('click', finishEdit);
editEl.find('[data-action="save"]').on('click', function () { editEl.find('[data-action="save"]').on('click', function () {

@ -197,13 +197,17 @@ function setupHelmet(app) {
if (meta.config['hsts-enabled']) { if (meta.config['hsts-enabled']) {
options.hsts = { options.hsts = {
maxAge: meta.config['hsts-maxage'], maxAge: Math.max(0, meta.config['hsts-maxage']),
includeSubDomains: !!meta.config['hsts-subdomains'], includeSubDomains: !!meta.config['hsts-subdomains'],
preload: !!meta.config['hsts-preload'], preload: !!meta.config['hsts-preload'],
}; };
} }
try {
app.use(helmet(options)); app.use(helmet(options));
} catch (err) {
winston.error(`[startup] unable to initialize helmet \n${err.stack}`);
}
} }

Loading…
Cancel
Save