mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00

* feat: add playback history provider * feat: implement recently played section * refactor: use route names * feat: add stats summary and top tracks/artists/albums * feat: add top date based filtering * feat: add stream money calculation * refactor: place search in mobile navbar and settings in home appbar * feat: add individual minutes and streams page * feat(stats): add individual minutes and streams page * chore: default period to 1 month * feat: add text to explain user how hypothetical fees are calculated * chore: ensure usage of route names instead of direct paths * cd: add cache key * cd: remove media_kit_event_loop from git
83 lines
2.0 KiB
Dart
83 lines
2.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:spotube/collections/spotube_icons.dart';
|
|
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
|
import 'package:spotube/pages/home/home.dart';
|
|
import 'package:spotube/pages/library/library.dart';
|
|
import 'package:spotube/pages/lyrics/lyrics.dart';
|
|
import 'package:spotube/pages/search/search.dart';
|
|
import 'package:spotube/pages/stats/stats.dart';
|
|
|
|
class SideBarTiles {
|
|
final IconData icon;
|
|
final String title;
|
|
final String id;
|
|
final String name;
|
|
|
|
SideBarTiles({
|
|
required this.icon,
|
|
required this.title,
|
|
required this.id,
|
|
required this.name,
|
|
});
|
|
}
|
|
|
|
List<SideBarTiles> getSidebarTileList(AppLocalizations l10n) => [
|
|
SideBarTiles(
|
|
id: "browse",
|
|
name: HomePage.name,
|
|
icon: SpotubeIcons.home,
|
|
title: l10n.browse,
|
|
),
|
|
SideBarTiles(
|
|
id: "search",
|
|
name: SearchPage.name,
|
|
icon: SpotubeIcons.search,
|
|
title: l10n.search,
|
|
),
|
|
SideBarTiles(
|
|
id: "library",
|
|
name: LibraryPage.name,
|
|
icon: SpotubeIcons.library,
|
|
title: l10n.library,
|
|
),
|
|
SideBarTiles(
|
|
id: "lyrics",
|
|
name: LyricsPage.name,
|
|
icon: SpotubeIcons.music,
|
|
title: l10n.lyrics,
|
|
),
|
|
SideBarTiles(
|
|
id: "stats",
|
|
name: StatsPage.name,
|
|
icon: SpotubeIcons.chart,
|
|
title: l10n.stats,
|
|
),
|
|
];
|
|
|
|
List<SideBarTiles> getNavbarTileList(AppLocalizations l10n) => [
|
|
SideBarTiles(
|
|
id: "browse",
|
|
name: HomePage.name,
|
|
icon: SpotubeIcons.home,
|
|
title: l10n.browse,
|
|
),
|
|
SideBarTiles(
|
|
id: "search",
|
|
name: SearchPage.name,
|
|
icon: SpotubeIcons.search,
|
|
title: l10n.search,
|
|
),
|
|
SideBarTiles(
|
|
id: "library",
|
|
name: LibraryPage.name,
|
|
icon: SpotubeIcons.library,
|
|
title: l10n.library,
|
|
),
|
|
SideBarTiles(
|
|
id: "stats",
|
|
name: StatsPage.name,
|
|
icon: SpotubeIcons.chart,
|
|
title: l10n.stats,
|
|
),
|
|
];
|