Add a configurable default tag for the dashboard

In tags mode the dashboard always opened showing every link. This adds a
"Default tag" setting (Advanced) that pre-selects one tag group on load, so
the dashboard opens filtered to it - the built-in equivalent of the custom
JavaScript workaround people have been sharing.

The setting is a select populated from the user's own tags, following the
same dynamic-option pattern already used for the search provider. When a tag
is chosen its slug is exposed on the tag list and the matching tab is
activated on load; when the setting is empty, behaviour is unchanged and all
links are shown.

Resolves #1556
This commit is contained in:
KodeStar
2026-07-08 17:10:19 +01:00
parent e2215fe42b
commit c0c202c5ff
9 changed files with 116 additions and 1 deletions
+15
View File
@@ -349,5 +349,20 @@ class SettingsSeeder extends Seeder
$setting->label = 'app.settings.treat_tags_as';
$setting->save();
}
if (! $setting = Setting::find(15)) {
$setting = new Setting;
$setting->id = 15;
$setting->group_id = 4;
$setting->key = 'default_tag';
$setting->type = 'select';
$setting->label = 'app.settings.default_tag';
$setting->value = '';
$setting->save();
} else {
$setting->group_id = 4;
$setting->label = 'app.settings.default_tag';
$setting->save();
}
}
}