mirror of
https://github.com/linuxserver/Heimdall.git
synced 2026-08-07 07:16:13 +00:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user