Skip to content

Commit bc7ed80

Browse files
imp: Put explore menu item behind beta flag
1 parent 83a29a3 commit bc7ed80

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

locales/fr_FR/LC_MESSAGES/main.mo

0 Bytes
Binary file not shown.

locales/fr_FR/LC_MESSAGES/main.po

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
msgid ""
22
msgstr ""
33
"Project-Id-Version: Flus\n"
4-
"POT-Creation-Date: 2026-02-08 22:00+0100\n"
5-
"PO-Revision-Date: 2026-02-08 22:00+0100\n"
4+
"POT-Creation-Date: 2026-02-08 22:16+0100\n"
5+
"PO-Revision-Date: 2026-02-08 22:16+0100\n"
66
"Last-Translator: Marien Fressinaud <dev@marienfressinaud.fr>\n"
77
"Language-Team: \n"
88
"Language: fr_FR\n"
@@ -280,12 +280,12 @@ msgid "The name must be less than {max} characters."
280280
msgstr "Le nom ne doit pas faire plus de {max} caractères."
281281

282282
#: models/Collection.php:139 models/Collection.php:229
283-
#: navigations/ReadingNavigation.php:27
283+
#: navigations/ReadingNavigation.php:30
284284
msgid "Bookmarks"
285285
msgstr "Signets"
286286

287287
#: models/Collection.php:150 models/Collection.php:231
288-
#: navigations/ReadingNavigation.php:34
288+
#: navigations/ReadingNavigation.php:37
289289
msgid "Links read"
290290
msgstr "Liens lus"
291291

@@ -294,7 +294,7 @@ msgid "Links never to read"
294294
msgstr "Liens à ne jamais lire"
295295

296296
#: models/Collection.php:172 models/Collection.php:233
297-
#: navigations/ReadingNavigation.php:20
297+
#: navigations/ReadingNavigation.php:23
298298
msgid "News"
299299
msgstr "Journal"
300300

@@ -394,7 +394,7 @@ msgstr "Données"
394394
msgid "Security"
395395
msgstr "Sécurité"
396396

397-
#: navigations/ReadingNavigation.php:41
397+
#: navigations/ReadingNavigation.php:46
398398
msgid "Explore"
399399
msgstr "Explorer"
400400

src/navigations/AccountNavigation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace App\navigations;
44

5-
use App\auth\CurrentUser;
5+
use App\auth;
66
use Minz\Template\TwigExtension;
77

88
/**
@@ -13,7 +13,7 @@ class AccountNavigation extends BaseNavigation
1313
{
1414
public function elements(): array
1515
{
16-
$current_user = CurrentUser::require();
16+
$current_user = auth\CurrentUser::require();
1717

1818
$account_items = [];
1919
$data_items = [];

src/navigations/ReadingNavigation.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\navigations;
44

5+
use App\auth;
56
use Minz\Template\TwigExtension;
67

78
/**
@@ -12,7 +13,9 @@ class ReadingNavigation extends BaseNavigation
1213
{
1314
public function elements(): array
1415
{
15-
return [
16+
$current_user = auth\CurrentUser::require();
17+
18+
$elements = [
1619
new Item(
1720
'news',
1821
\Minz\Url::for('news'),
@@ -33,13 +36,17 @@ public function elements(): array
3336
'check',
3437
TwigExtension::translate('Links read'),
3538
),
39+
];
3640

37-
new Item(
41+
if ($current_user->isBetaEnabled()) {
42+
$elements[] = new Item(
3843
'explore',
3944
\Minz\Url::for('explore'),
4045
'compass',
4146
TwigExtension::translate('Explore'),
42-
),
43-
];
47+
);
48+
}
49+
50+
return $elements;
4451
}
4552
}

0 commit comments

Comments
 (0)