mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00

* feat: add build dart script for windows * feat: add android build support * feat: add linux build support * feat: add macos build support * feat: add ios build support * feat: add deps install command and workflow file * cd: what? * cd: what? * cd: what? * cd: update workflow inputs * cd: replace release binary * cd: run flutter pub get * cd: use dpkg zstd instead of xz, windows disable innoInstall, fix channel enum.name and reset pubspec after changing build no for nightly * cd: fix tar copy path * cd: fix copy linux command * cd: fix windows inno depend and fix android aab path * cd: idk * cd: linux why??? * cd: windows choco copy failed * cd: use dart tar archive for creating tar file * cd: fix linux file copy error * cd: use tar command directly * feat: add linux_arm platform * cd: add linux_arm platform * cd: don't know what? * feat: notification about nightly channel update * chore: fix some errors parsing nightly version info
239 lines
8.9 KiB
Dart
239 lines
8.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:spotube/collections/assets.gen.dart';
|
|
import 'package:spotube/collections/env.dart';
|
|
import 'package:spotube/components/shared/image/universal_image.dart';
|
|
import 'package:spotube/components/shared/links/hyper_link.dart';
|
|
import 'package:spotube/components/shared/page_window_title_bar.dart';
|
|
import 'package:spotube/extensions/context.dart';
|
|
import 'package:spotube/hooks/controllers/use_package_info.dart';
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
final _licenseProvider = FutureProvider<String>((ref) async {
|
|
return await rootBundle.loadString("LICENSE");
|
|
});
|
|
|
|
class AboutSpotube extends HookConsumerWidget {
|
|
const AboutSpotube({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context, ref) {
|
|
final packageInfo = usePackageInfo();
|
|
final license = ref.watch(_licenseProvider);
|
|
final theme = Theme.of(context);
|
|
|
|
const colon = Text(":");
|
|
|
|
return Scaffold(
|
|
appBar: PageWindowTitleBar(
|
|
leading: const BackButton(),
|
|
title: Text(context.l10n.about_spotube),
|
|
),
|
|
body: SingleChildScrollView(
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
|
child: Column(
|
|
children: [
|
|
Assets.spotubeLogoPng.image(
|
|
height: 200,
|
|
width: 200,
|
|
),
|
|
Center(
|
|
child: Column(
|
|
children: [
|
|
Text(
|
|
context.l10n.spotube_description,
|
|
style: theme.textTheme.titleLarge,
|
|
),
|
|
const SizedBox(height: 20),
|
|
Table(
|
|
columnWidths: const {
|
|
0: FixedColumnWidth(95),
|
|
1: FixedColumnWidth(10),
|
|
2: IntrinsicColumnWidth(),
|
|
},
|
|
children: [
|
|
TableRow(
|
|
children: [
|
|
Text(context.l10n.founder),
|
|
colon,
|
|
Hyperlink(
|
|
context.l10n.kingkor_roy_tirtho,
|
|
"https://github.com/KRTirtho",
|
|
)
|
|
],
|
|
),
|
|
TableRow(
|
|
children: [
|
|
Text(context.l10n.version),
|
|
colon,
|
|
Text("v${packageInfo.version}")
|
|
],
|
|
),
|
|
TableRow(
|
|
children: [
|
|
Text(context.l10n.channel),
|
|
colon,
|
|
Text(Env.releaseChannel.name)
|
|
],
|
|
),
|
|
TableRow(
|
|
children: [
|
|
Text(context.l10n.build_number),
|
|
colon,
|
|
Text(packageInfo.buildNumber.replaceAll(".", " "))
|
|
],
|
|
),
|
|
TableRow(
|
|
children: [
|
|
Text(context.l10n.repository),
|
|
colon,
|
|
const Hyperlink(
|
|
"github.com/KRTirtho/spotube",
|
|
"https://github.com/KRTirtho/spotube",
|
|
),
|
|
],
|
|
),
|
|
TableRow(
|
|
children: [
|
|
Text(context.l10n.license),
|
|
colon,
|
|
const Hyperlink(
|
|
"BSD-4-Clause",
|
|
"https://raw.githubusercontent.com/KRTirtho/spotube/master/LICENSE",
|
|
),
|
|
],
|
|
),
|
|
TableRow(
|
|
children: [
|
|
Text(context.l10n.bug_issues),
|
|
colon,
|
|
const Hyperlink(
|
|
"github.com/KRTirtho/spotube/issues",
|
|
"https://github.com/KRTirtho/spotube/issues",
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
const SizedBox(height: 20),
|
|
MouseRegion(
|
|
cursor: SystemMouseCursors.click,
|
|
child: GestureDetector(
|
|
onTap: () => launchUrl(
|
|
Uri.parse("https://discord.gg/uJ94vxB6vg"),
|
|
mode: LaunchMode.externalApplication,
|
|
),
|
|
child: const UniversalImage(
|
|
path:
|
|
"https://discord.com/api/guilds/1012234096237350943/widget.png?style=banner2",
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 20),
|
|
Wrap(
|
|
runSpacing: 20,
|
|
spacing: 20,
|
|
alignment: WrapAlignment.center,
|
|
crossAxisAlignment: WrapCrossAlignment.center,
|
|
runAlignment: WrapAlignment.center,
|
|
children: [
|
|
MouseRegion(
|
|
cursor: SystemMouseCursors.click,
|
|
child: GestureDetector(
|
|
onTap: () {
|
|
launchUrl(
|
|
Uri.parse("https://www.buymeacoffee.com/krtirtho"),
|
|
mode: LaunchMode.externalApplication,
|
|
);
|
|
},
|
|
child: SvgPicture.network(
|
|
"https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=krtirtho&button_colour=FF5F5F&font_colour=ffffff&font_family=Inter&outline_colour=000000&coffee_colour=FFDD00",
|
|
height: 45,
|
|
),
|
|
),
|
|
),
|
|
MouseRegion(
|
|
cursor: SystemMouseCursors.click,
|
|
child: GestureDetector(
|
|
onTap: () {
|
|
launchUrl(
|
|
Uri.parse(
|
|
"https://opencollective.com/spotube",
|
|
),
|
|
mode: LaunchMode.externalApplication,
|
|
);
|
|
},
|
|
child: Image.network(
|
|
"https://opencollective.com/spotube/donate/button.png?color=blue",
|
|
height: 45,
|
|
),
|
|
),
|
|
),
|
|
MouseRegion(
|
|
cursor: SystemMouseCursors.click,
|
|
child: GestureDetector(
|
|
onTap: () {
|
|
launchUrl(
|
|
Uri.parse("https://patreon.com/krtirtho"),
|
|
mode: LaunchMode.externalApplication,
|
|
);
|
|
},
|
|
child: Image.network(
|
|
"https://user-images.githubusercontent.com/61944859/180249027-678b01b8-c336-451e-b147-6d84a5b9d0e7.png",
|
|
height: 45,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(height: 20),
|
|
Text(
|
|
context.l10n.made_with,
|
|
textAlign: TextAlign.center,
|
|
style: theme.textTheme.bodySmall,
|
|
),
|
|
Text(
|
|
context.l10n.copyright(DateTime.now().year),
|
|
textAlign: TextAlign.center,
|
|
style: theme.textTheme.bodySmall,
|
|
),
|
|
const SizedBox(height: 20),
|
|
ConstrainedBox(
|
|
constraints: const BoxConstraints(maxWidth: 750),
|
|
child: SafeArea(
|
|
child: license.when(
|
|
data: (data) {
|
|
return Text(
|
|
data,
|
|
style: theme.textTheme.bodySmall,
|
|
);
|
|
},
|
|
loading: () {
|
|
return const Center(
|
|
child: CircularProgressIndicator(),
|
|
);
|
|
},
|
|
error: (e, s) {
|
|
return Text(
|
|
e.toString(),
|
|
style: theme.textTheme.bodySmall,
|
|
);
|
|
},
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|