Merge branch 'develop' into bootstrap5

This commit is contained in:
Julian Lam
2022-10-24 14:13:18 -04:00
9 changed files with 21 additions and 19 deletions

View File

@@ -5,12 +5,12 @@ on:
branches:
- master
- develop
- bootstrap5
- bootstrap5
pull_request:
branches:
- master
- develop
- bootstrap5
- bootstrap5
defaults:
run:

View File

@@ -60,7 +60,7 @@
"csurf": "1.11.0",
"daemon": "1.1.0",
"diff": "5.1.0",
"esbuild": "0.15.11",
"esbuild": "0.15.12",
"express": "4.18.2",
"express-session": "1.17.3",
"express-useragent": "1.0.15",

View File

@@ -6,7 +6,7 @@
"from-help": "Le nom de lexpéditeur à afficher dans l'e-mail",
"confirmation-settings": "Confirmation",
"confirmation.expiry": "Hours to keep email confirmation link valid",
"confirmation.expiry": "Heures de validité du lien de confirmation par e-mail",
"smtp-transport": "Protocole SMTP",
"smtp-transport.enabled": "Activer l'envoi via SMTP",

View File

@@ -1,7 +1,7 @@
{
"authentication": "Authentification",
"email-confirm-interval": "Les utilisateurs ne peuvent pas demander un e-mail de vérification avant",
"email-confirm-interval2": "minutes have elapsed",
"email-confirm-interval2": "minutes se sont écoulées",
"allow-login-with": "Autoriser l'identification avec",
"allow-login-with.username-email": "Nom d'utilisateur ou e-mail",
"allow-login-with.username": "Nom d'utilisateur uniquement",

View File

@@ -5,8 +5,8 @@
"from": "Da Nome",
"from-help": "Il nome da visualizzare nell'email.",
"confirmation-settings": "Confirmation",
"confirmation.expiry": "Hours to keep email confirmation link valid",
"confirmation-settings": "Conferma",
"confirmation.expiry": "Ore per mantenere valido il link di conferma dell'email",
"smtp-transport": "Trasporto SMTP",
"smtp-transport.enabled": "Abilita trasporto SMTP",

View File

@@ -1,7 +1,7 @@
{
"authentication": "Autenticazione",
"email-confirm-interval": "L'utente non può mandare una nuova email di conferma fino a",
"email-confirm-interval2": "minutes have elapsed",
"email-confirm-interval2": "sono trascorsi minuti",
"allow-login-with": "Consenti l'accesso con",
"allow-login-with.username-email": "Username o Email",
"allow-login-with.username": "Solo Username",

View File

@@ -97,13 +97,13 @@ define('search', ['translator', 'storage', 'hooks', 'alerts'], function (transla
const filterCategoryEl = quickSearchResults.find('.filter-category');
function updateCategoryFilterName() {
if (ajaxify.data.template.category) {
if (ajaxify.data.template.category && ajaxify.data.cid) {
translator.translate('[[search:search-in-category, ' + ajaxify.data.name + ']]', function (translated) {
const name = $('<div></div>').html(translated).text();
filterCategoryEl.find('.name').text(name);
});
}
filterCategoryEl.toggleClass('hidden', !ajaxify.data.template.category);
filterCategoryEl.toggleClass('hidden', !(ajaxify.data.template.category && ajaxify.data.cid));
}
function doSearch() {
@@ -111,7 +111,7 @@ define('search', ['translator', 'storage', 'hooks', 'alerts'], function (transla
options.searchOptions.term = inputEl.val();
updateCategoryFilterName();
if (ajaxify.data.template.category) {
if (ajaxify.data.template.category && ajaxify.data.cid) {
if (filterCategoryEl.find('input[type="checkbox"]').is(':checked')) {
options.searchOptions.categories = [ajaxify.data.cid];
options.searchOptions.searchChildren = true;

View File

@@ -86,15 +86,16 @@ module.exports = function (middleware) {
}
return next();
}
if (parseInt(req.uid, 10) > 0 || !meta.config.autoDetectLang) {
return next();
if (meta.config.autoDetectLang && req.uid === 0) {
const langs = await listCodes();
const lang = req.acceptsLanguages(langs);
if (!lang) {
return next();
}
req.query.lang = lang;
}
const langs = await listCodes();
const lang = req.acceptsLanguages(langs);
if (!lang) {
return next();
}
req.query.lang = lang;
next();
});

View File

@@ -141,6 +141,7 @@
.notification-body img {
max-width: 100%;
height: auto;
}
</style>