Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 23e894c06d | |||
| 38f71ed9e4 | |||
| 97bc119355 | |||
| d8d6e3b6db |
@@ -132,3 +132,53 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: dist/YAMD-linux-x86_64.AppImage
|
files: dist/YAMD-linux-x86_64.AppImage
|
||||||
|
|
||||||
|
macos:
|
||||||
|
runs-on: macos-14
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v6
|
||||||
|
with:
|
||||||
|
go-version-file: go.mod
|
||||||
|
|
||||||
|
- uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
channel: stable
|
||||||
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Core
|
||||||
|
run: |
|
||||||
|
go test ./...
|
||||||
|
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -trimpath -ldflags "-s -w" -o dist-core/ymcore-arm64 ./cmd/ymcore
|
||||||
|
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -trimpath -ldflags "-s -w" -o dist-core/ymcore-amd64 ./cmd/ymcore
|
||||||
|
lipo -create -output dist-core/ymcore dist-core/ymcore-arm64 dist-core/ymcore-amd64
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
working-directory: app
|
||||||
|
run: |
|
||||||
|
flutter pub get
|
||||||
|
flutter build macos --release
|
||||||
|
|
||||||
|
- name: DMG
|
||||||
|
run: |
|
||||||
|
app=app/build/macos/Build/Products/Release/YAMD.app
|
||||||
|
cp dist-core/ymcore "$app/Contents/MacOS/ymcore"
|
||||||
|
codesign --force --sign - "$app/Contents/MacOS/ymcore"
|
||||||
|
codesign --force --deep --sign - "$app"
|
||||||
|
mkdir -p dist/dmg
|
||||||
|
cp -R "$app" dist/dmg/
|
||||||
|
ln -s /Applications dist/dmg/Applications
|
||||||
|
hdiutil create -volname YAMD -srcfolder dist/dmg -ov -format UDZO dist/YAMD-macos.dmg
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: YAMD-macos
|
||||||
|
path: dist/YAMD-macos.dmg
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
files: dist/YAMD-macos.dmg
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ YAMD сохраняет треки, альбомы, плейлисты и цел
|
|||||||
можно убрать, а остальное скачать одной кнопкой.
|
можно убрать, а остальное скачать одной кнопкой.
|
||||||
|
|
||||||
**Быстро.** До восьми треков качаются одновременно, задания идут параллельно.
|
**Быстро.** До восьми треков качаются одновременно, задания идут параллельно.
|
||||||
Скорость и прогресс каждого трека видны в реальном времени.
|
Загрузки идут в фоне: общий прогресс виден на кнопке сверху, а по клику
|
||||||
|
открывается панель с каждым треком.
|
||||||
|
|
||||||
**Лёгкий.** Большие hi-res файлы обрабатываются на лету и не занимают память.
|
**Лёгкий.** Большие hi-res файлы обрабатываются на лету и не занимают память.
|
||||||
Ни ffmpeg, ни других программ ставить не нужно.
|
Ни ffmpeg, ни других программ ставить не нужно.
|
||||||
@@ -52,8 +53,8 @@ YAMD сохраняет треки, альбомы, плейлисты и цел
|
|||||||
|
|
||||||
- **Токен под замком.** Он хранится только на вашем компьютере. На Windows он
|
- **Токен под замком.** Он хранится только на вашем компьютере. На Windows он
|
||||||
зашифрован системой (DPAPI): расшифровать его может лишь ваша учётная запись на
|
зашифрован системой (DPAPI): расшифровать его может лишь ваша учётная запись на
|
||||||
этом же компьютере. На Linux он лежит в файле настроек, доступном только вашему
|
этом же компьютере. На Linux и macOS он лежит в файле настроек, доступном только
|
||||||
пользователю.
|
вашему пользователю.
|
||||||
- **Никаких посредников.** YAMD общается напрямую с серверами Яндекса. Токен
|
- **Никаких посредников.** YAMD общается напрямую с серверами Яндекса. Токен
|
||||||
уходит только в официальный API Яндекс Музыки и никуда больше: ни на
|
уходит только в официальный API Яндекс Музыки и никуда больше: ни на
|
||||||
сторонние серверы, ни в аналитику, ни даже на серверы раздачи файлов.
|
сторонние серверы, ни в аналитику, ни даже на серверы раздачи файлов.
|
||||||
@@ -67,7 +68,12 @@ YAMD сохраняет треки, альбомы, плейлисты и цел
|
|||||||
1. Скачайте программу из [релизов](../../releases):
|
1. Скачайте программу из [релизов](../../releases):
|
||||||
- **Windows:** `YAMD-windows.zip`, распакуйте и запустите `yamd.exe`;
|
- **Windows:** `YAMD-windows.zip`, распакуйте и запустите `yamd.exe`;
|
||||||
- **Linux:** `YAMD-linux-x86_64.AppImage`, разрешите запуск (`chmod +x`) и
|
- **Linux:** `YAMD-linux-x86_64.AppImage`, разрешите запуск (`chmod +x`) и
|
||||||
откройте.
|
откройте;
|
||||||
|
- **macOS:** `YAMD-macos.dmg`, перетащите YAMD в «Программы». Приложение не
|
||||||
|
подписано сертификатом Apple, поэтому при первом запуске macOS его
|
||||||
|
заблокирует: откройте «Системные настройки» → «Конфиденциальность и
|
||||||
|
безопасность» и нажмите «Всё равно открыть». Или выполните в Терминале
|
||||||
|
`xattr -dr com.apple.quarantine /Applications/YAMD.app`.
|
||||||
2. Нажмите **«Получить токен»** и войдите в аккаунт Яндекса.
|
2. Нажмите **«Получить токен»** и войдите в аккаунт Яндекса.
|
||||||
3. Скопируйте адрес страницы, на которую вас перенаправит браузер, и вставьте
|
3. Скопируйте адрес страницы, на которую вас перенаправит браузер, и вставьте
|
||||||
его в поле входа. Токен извлечётся сам.
|
его в поле входа. Токен извлечётся сам.
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class FakeCore implements Core {
|
|||||||
'theme': _theme,
|
'theme': _theme,
|
||||||
'quality': _quality,
|
'quality': _quality,
|
||||||
'concurrency': _concurrency,
|
'concurrency': _concurrency,
|
||||||
'version': '2.0.0',
|
'version': '2.0.2',
|
||||||
};
|
};
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ class Desktop {
|
|||||||
void reveal(String file) {
|
void reveal(String file) {
|
||||||
if (Platform.isWindows) {
|
if (Platform.isWindows) {
|
||||||
Process.run('explorer.exe', ['/select,', file]);
|
Process.run('explorer.exe', ['/select,', file]);
|
||||||
|
} else if (Platform.isMacOS) {
|
||||||
|
Process.run('open', ['-R', file]);
|
||||||
} else {
|
} else {
|
||||||
open(File(file).parent.path);
|
open(File(file).parent.path);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ class Controller extends ChangeNotifier {
|
|||||||
var version = '';
|
var version = '';
|
||||||
|
|
||||||
final drafts = ValueNotifier<List<Draft>>(const []);
|
final drafts = ValueNotifier<List<Draft>>(const []);
|
||||||
|
final selected = ValueNotifier<Draft?>(null);
|
||||||
|
final downloadsOpen = ValueNotifier(false);
|
||||||
|
|
||||||
final _jobs = <int, Job>{};
|
final _jobs = <int, Job>{};
|
||||||
List<Job> get jobs => _jobs.values.toList().reversed.toList();
|
List<Job> get jobs => _jobs.values.toList().reversed.toList();
|
||||||
@@ -57,14 +59,18 @@ class Controller extends ChangeNotifier {
|
|||||||
int addLinks(String text) {
|
int addLinks(String text) {
|
||||||
final list = List.of(drafts.value);
|
final list = List.of(drafts.value);
|
||||||
var added = 0;
|
var added = 0;
|
||||||
|
Draft? first;
|
||||||
for (final link in splitLinks(text)) {
|
for (final link in splitLinks(text)) {
|
||||||
if (list.any((d) => d.link == link)) continue;
|
if (list.any((d) => d.link == link)) continue;
|
||||||
list.add(Draft(link));
|
final d = Draft(link);
|
||||||
|
first ??= d;
|
||||||
|
list.add(d);
|
||||||
added++;
|
added++;
|
||||||
send({'cmd': 'preview', 'link': link});
|
send({'cmd': 'preview', 'link': link});
|
||||||
}
|
}
|
||||||
if (added > 0) {
|
if (added > 0) {
|
||||||
drafts.value = list;
|
drafts.value = list;
|
||||||
|
selected.value = first;
|
||||||
} else if (text.trim().isNotEmpty) {
|
} else if (text.trim().isNotEmpty) {
|
||||||
_notices.add(const Notice('Эти ссылки уже в подборке'));
|
_notices.add(const Notice('Эти ссылки уже в подборке'));
|
||||||
}
|
}
|
||||||
@@ -72,16 +78,23 @@ class Controller extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void removeDraft(Draft d) {
|
void removeDraft(Draft d) {
|
||||||
drafts.value = [
|
final old = drafts.value;
|
||||||
for (final x in drafts.value)
|
final i = old.indexOf(d);
|
||||||
|
final next = [
|
||||||
|
for (final x in old)
|
||||||
if (x != d) x,
|
if (x != d) x,
|
||||||
];
|
];
|
||||||
|
drafts.value = next;
|
||||||
|
if (selected.value == d) {
|
||||||
|
selected.value = next.isEmpty ? null : next[i.clamp(0, next.length - 1)];
|
||||||
|
}
|
||||||
d.dispose();
|
d.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearDrafts() {
|
void clearDrafts() {
|
||||||
final old = drafts.value;
|
final old = drafts.value;
|
||||||
drafts.value = const [];
|
drafts.value = const [];
|
||||||
|
selected.value = null;
|
||||||
for (final d in old) {
|
for (final d in old) {
|
||||||
d.dispose();
|
d.dispose();
|
||||||
}
|
}
|
||||||
@@ -95,9 +108,13 @@ class Controller extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void downloadAll() {
|
void downloadAll() {
|
||||||
|
var sent = false;
|
||||||
for (final d in List.of(drafts.value)) {
|
for (final d in List.of(drafts.value)) {
|
||||||
|
if (!d.ready) continue;
|
||||||
downloadDraft(d);
|
downloadDraft(d);
|
||||||
|
sent = true;
|
||||||
}
|
}
|
||||||
|
if (sent) downloadsOpen.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _loadAlbum(String id) => send({'cmd': 'album', 'album': id});
|
void _loadAlbum(String id) => send({'cmd': 'album', 'album': id});
|
||||||
@@ -240,6 +257,8 @@ class Controller extends ChangeNotifier {
|
|||||||
d.dispose();
|
d.dispose();
|
||||||
}
|
}
|
||||||
drafts.dispose();
|
drafts.dispose();
|
||||||
|
selected.dispose();
|
||||||
|
downloadsOpen.dispose();
|
||||||
stats.dispose();
|
stats.dispose();
|
||||||
log.dispose();
|
log.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ class Draft extends ChangeNotifier {
|
|||||||
picker = p.status == PreviewStatus.ok && p.albums.isNotEmpty
|
picker = p.status == PreviewStatus.ok && p.albums.isNotEmpty
|
||||||
? (ArtistPicker(p.albums, load: load)..addListener(notifyListeners))
|
? (ArtistPicker(p.albums, load: load)..addListener(notifyListeners))
|
||||||
: null;
|
: null;
|
||||||
|
final pk = picker;
|
||||||
|
if (pk != null && p.kind == ReleaseKind.album) pk.toggleExpanded(pk.albums.first.id);
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -240,6 +240,8 @@ String formatBytes(num n) {
|
|||||||
return '${(n / g).toStringAsFixed(2)} ГБ';
|
return '${(n / g).toStringAsFixed(2)} ГБ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String ofTracks(int n) => '$n ${n % 10 == 1 && n % 100 != 11 ? 'трека' : 'треков'}';
|
||||||
|
|
||||||
String tracksLabel(int n) {
|
String tracksLabel(int n) {
|
||||||
final mod10 = n % 10, mod100 = n % 100;
|
final mod10 = n % 10, mod100 = n % 100;
|
||||||
final word = (mod10 == 1 && mod100 != 11)
|
final word = (mod10 == 1 && mod100 != 11)
|
||||||
|
|||||||
@@ -152,6 +152,18 @@ class ArtistPicker extends ChangeNotifier {
|
|||||||
|
|
||||||
int get albumCount => _selected.length;
|
int get albumCount => _selected.length;
|
||||||
|
|
||||||
|
int pickedCount(String id) {
|
||||||
|
if (!_selected.contains(id)) return 0;
|
||||||
|
final album = albums.firstWhere((a) => a.id == id);
|
||||||
|
return _partial[id]?.length ?? album.count;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setAlbum(String id, bool on) {
|
||||||
|
on ? _selected.add(id) : _selected.remove(id);
|
||||||
|
_partial.remove(id);
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
int get trackCount {
|
int get trackCount {
|
||||||
var n = 0;
|
var n = 0;
|
||||||
for (final a in albums) {
|
for (final a in albums) {
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../state/models.dart';
|
|
||||||
import '../state/picker.dart';
|
import '../state/picker.dart';
|
||||||
import 'widgets.dart';
|
import 'widgets.dart';
|
||||||
|
|
||||||
|
String ofReleases(int n) => '$n ${n % 10 == 1 && n % 100 != 11 ? 'релиза' : 'релизов'}';
|
||||||
|
|
||||||
String releasesLabel(int n) {
|
String releasesLabel(int n) {
|
||||||
final mod10 = n % 10, mod100 = n % 100;
|
final mod10 = n % 10, mod100 = n % 100;
|
||||||
final word = (mod10 == 1 && mod100 != 11)
|
final word = (mod10 == 1 && mod100 != 11)
|
||||||
@@ -14,123 +15,6 @@ String releasesLabel(int n) {
|
|||||||
return '$n $word';
|
return '$n $word';
|
||||||
}
|
}
|
||||||
|
|
||||||
class AlbumList extends StatelessWidget {
|
|
||||||
const AlbumList({super.key, required this.picker});
|
|
||||||
|
|
||||||
final ArtistPicker picker;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final scheme = Theme.of(context).colorScheme;
|
|
||||||
return Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
for (final type in picker.types) ...[
|
|
||||||
InkWell(
|
|
||||||
borderRadius: BorderRadius.circular(10),
|
|
||||||
onTap: () => picker.toggleType(type),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 2),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Checkbox(
|
|
||||||
tristate: true,
|
|
||||||
value: picker.typeState(type),
|
|
||||||
onChanged: (_) => picker.toggleType(type),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
type.label,
|
|
||||||
style: TextStyle(fontWeight: FontWeight.w700, color: scheme.onSurface),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 8),
|
|
||||||
Tag('${picker.ofType(type).length}'),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
for (final a in picker.ofType(type)) _AlbumTile(picker: picker, album: a),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
],
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class _AlbumTile extends StatelessWidget {
|
|
||||||
const _AlbumTile({required this.picker, required this.album});
|
|
||||||
|
|
||||||
final ArtistPicker picker;
|
|
||||||
final AlbumOption album;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final scheme = Theme.of(context).colorScheme;
|
|
||||||
final expanded = picker.isExpanded(album.id);
|
|
||||||
final meta =
|
|
||||||
[if (album.year > 0) '${album.year}', if (album.count > 0) tracksLabel(album.count)].join(' · ');
|
|
||||||
final error = picker.error(album.id);
|
|
||||||
return Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
InkWell(
|
|
||||||
borderRadius: BorderRadius.circular(12),
|
|
||||||
onTap: () => picker.toggleAlbum(album.id),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Checkbox(
|
|
||||||
tristate: true,
|
|
||||||
value: picker.albumState(album.id),
|
|
||||||
onChanged: (_) => picker.toggleAlbum(album.id),
|
|
||||||
),
|
|
||||||
Cover(url: album.cover, size: 40, kind: ReleaseKind.album, radius: 8),
|
|
||||||
const SizedBox(width: 12),
|
|
||||||
Expanded(
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
TitleWithBadge(
|
|
||||||
album.title,
|
|
||||||
explicit: album.explicit,
|
|
||||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
error ?? meta,
|
|
||||||
maxLines: 1,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12, color: error != null ? scheme.error : scheme.onSurfaceVariant),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
IconButton(
|
|
||||||
tooltip: expanded ? 'Свернуть' : 'Выбрать треки',
|
|
||||||
onPressed: () => picker.toggleExpanded(album.id),
|
|
||||||
icon: AnimatedRotation(
|
|
||||||
turns: expanded ? 0.5 : 0,
|
|
||||||
duration: const Duration(milliseconds: 200),
|
|
||||||
child: const Icon(Icons.expand_more_rounded),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
AnimatedSize(
|
|
||||||
duration: const Duration(milliseconds: 220),
|
|
||||||
curve: Curves.easeOutCubic,
|
|
||||||
alignment: Alignment.topCenter,
|
|
||||||
child: expanded
|
|
||||||
? TrackChecklist(picker: picker, albumId: album.id)
|
|
||||||
: const SizedBox(width: double.infinity),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class TrackChecklist extends StatelessWidget {
|
class TrackChecklist extends StatelessWidget {
|
||||||
const TrackChecklist({super.key, required this.picker, required this.albumId, this.indent = 40});
|
const TrackChecklist({super.key, required this.picker, required this.albumId, this.indent = 40});
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,195 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../state/controller.dart';
|
||||||
|
import '../state/models.dart';
|
||||||
|
import 'queue.dart';
|
||||||
|
|
||||||
|
class DownloadsButton extends StatelessWidget {
|
||||||
|
const DownloadsButton({super.key, required this.c});
|
||||||
|
|
||||||
|
final Controller c;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final scheme = Theme.of(context).colorScheme;
|
||||||
|
return ListenableBuilder(
|
||||||
|
listenable: Listenable.merge([c, c.stats, c.downloadsOpen, ...c.jobs]),
|
||||||
|
builder: (context, _) {
|
||||||
|
final running = c.jobs.where((j) => !j.finished).toList();
|
||||||
|
final open = c.downloadsOpen.value;
|
||||||
|
void toggle() => c.downloadsOpen.value = !open;
|
||||||
|
if (running.isEmpty) {
|
||||||
|
return IconButton(
|
||||||
|
tooltip: 'Загрузки',
|
||||||
|
isSelected: open,
|
||||||
|
style: IconButton.styleFrom(
|
||||||
|
shape: const CircleBorder(),
|
||||||
|
side: BorderSide(color: open ? scheme.primary : scheme.outlineVariant),
|
||||||
|
),
|
||||||
|
icon: const Icon(Icons.download_rounded),
|
||||||
|
onPressed: toggle,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
final fractions = running.map((j) => j.fraction ?? 0);
|
||||||
|
final progress = fractions.fold(0.0, (a, b) => a + b) / running.length;
|
||||||
|
final speed = c.stats.value.speed;
|
||||||
|
return Tooltip(
|
||||||
|
message: 'Загрузки',
|
||||||
|
child: Material(
|
||||||
|
color: scheme.primary.withValues(alpha: open ? 0.22 : 0.12),
|
||||||
|
shape: StadiumBorder(side: BorderSide(color: scheme.primary.withValues(alpha: 0.35))),
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: toggle,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(5, 5, 10, 5),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
SizedBox.square(
|
||||||
|
dimension: 30,
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
SizedBox.square(
|
||||||
|
dimension: 28,
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
value: progress.clamp(0.02, 1.0),
|
||||||
|
strokeWidth: 3,
|
||||||
|
color: scheme.primary,
|
||||||
|
backgroundColor: scheme.primary.withValues(alpha: 0.2),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Icon(Icons.arrow_downward_rounded, size: 15, color: scheme.primary),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
if (speed > 0)
|
||||||
|
Text(
|
||||||
|
'${formatBytes(speed)}/с',
|
||||||
|
style: const TextStyle(
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
fontFeatures: [FontFeature.tabularFigures()],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Container(
|
||||||
|
constraints: const BoxConstraints(minWidth: 20),
|
||||||
|
height: 20,
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 6),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
decoration:
|
||||||
|
BoxDecoration(color: scheme.primary, borderRadius: BorderRadius.circular(10)),
|
||||||
|
child: Text(
|
||||||
|
'${running.length}',
|
||||||
|
style: TextStyle(color: scheme.onPrimary, fontSize: 12, fontWeight: FontWeight.w800),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DownloadsPanel extends StatelessWidget {
|
||||||
|
const DownloadsPanel({super.key, required this.c});
|
||||||
|
|
||||||
|
final Controller c;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final scheme = Theme.of(context).colorScheme;
|
||||||
|
final text = Theme.of(context).textTheme;
|
||||||
|
return Material(
|
||||||
|
color: scheme.surfaceContainerLow,
|
||||||
|
elevation: 16,
|
||||||
|
shadowColor: Colors.black,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(18),
|
||||||
|
side: BorderSide(color: scheme.outlineVariant),
|
||||||
|
),
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
child: ListenableBuilder(
|
||||||
|
listenable: Listenable.merge([c, c.stats]),
|
||||||
|
builder: (context, _) {
|
||||||
|
final jobs = c.jobs;
|
||||||
|
final s = c.stats.value;
|
||||||
|
final anyRunning = jobs.any((j) => !j.finished);
|
||||||
|
final anyFinished = jobs.any((j) => j.finished);
|
||||||
|
final line = s.busy
|
||||||
|
? '${formatBytes(s.speed)}/с · ${s.active} в работе'
|
||||||
|
'${s.queued > 0 ? ' · ${s.queued} в очереди' : ''}'
|
||||||
|
: (jobs.isEmpty ? 'Пока ничего не качается' : 'Всё скачано');
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(18, 16, 8, 10),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text('Загрузки', style: text.titleMedium?.copyWith(fontWeight: FontWeight.w800)),
|
||||||
|
const SizedBox(height: 2),
|
||||||
|
Text(
|
||||||
|
line,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 13,
|
||||||
|
color: scheme.onSurfaceVariant,
|
||||||
|
fontFeatures: const [FontFeature.tabularFigures()],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (anyRunning)
|
||||||
|
OutlinedButton(onPressed: c.cancelAll, child: const Text('Остановить всё')),
|
||||||
|
IconButton(
|
||||||
|
tooltip: 'Закрыть',
|
||||||
|
icon: const Icon(Icons.close_rounded),
|
||||||
|
onPressed: () => c.downloadsOpen.value = false,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: jobs.isEmpty
|
||||||
|
? Center(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Icon(Icons.download_done_rounded, size: 40, color: scheme.onSurfaceVariant),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text('Здесь появятся загрузки', style: TextStyle(color: scheme.onSurfaceVariant)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: ListView.separated(
|
||||||
|
padding: const EdgeInsets.fromLTRB(12, 0, 12, 12),
|
||||||
|
itemCount: jobs.length,
|
||||||
|
separatorBuilder: (_, _) => const SizedBox(height: 10),
|
||||||
|
itemBuilder: (_, i) => JobCard(key: ValueKey(jobs[i].id), job: jobs[i], c: c),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (anyFinished)
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(border: Border(top: BorderSide(color: scheme.outlineVariant))),
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6),
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: TextButton(onPressed: c.clearFinished, child: const Text('Убрать завершённые')),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
|
import '../state/controller.dart';
|
||||||
|
import '../state/draft.dart';
|
||||||
|
|
||||||
|
class LinkInput extends StatefulWidget {
|
||||||
|
const LinkInput({super.key, required this.c, this.hero = false});
|
||||||
|
|
||||||
|
final Controller c;
|
||||||
|
final bool hero;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<LinkInput> createState() => _LinkInputState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LinkInputState extends State<LinkInput> {
|
||||||
|
final _input = TextEditingController();
|
||||||
|
final _focus = FocusNode();
|
||||||
|
|
||||||
|
Controller get c => widget.c;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_input.dispose();
|
||||||
|
_focus.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _submit() {
|
||||||
|
final text = _input.text;
|
||||||
|
_input.clear();
|
||||||
|
if (text.trim().isEmpty) return;
|
||||||
|
c.addLinks(text);
|
||||||
|
_focus.requestFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _paste() async {
|
||||||
|
final data = await Clipboard.getData(Clipboard.kTextPlain);
|
||||||
|
final text = data?.text ?? '';
|
||||||
|
if (text.trim().isNotEmpty) c.addLinks(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _pasteInline() async {
|
||||||
|
final data = await Clipboard.getData(Clipboard.kTextPlain);
|
||||||
|
final text = (data?.text ?? '').trim();
|
||||||
|
if (text.isEmpty) return;
|
||||||
|
if (text.contains('\n') || splitLinks(text).length > 1) {
|
||||||
|
c.addLinks(text);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final v = _input.value;
|
||||||
|
final sel = v.selection.isValid ? v.selection : TextSelection.collapsed(offset: v.text.length);
|
||||||
|
_input.value = TextEditingValue(
|
||||||
|
text: v.text.replaceRange(sel.start, sel.end, text),
|
||||||
|
selection: TextSelection.collapsed(offset: sel.start + text.length),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final scheme = Theme.of(context).colorScheme;
|
||||||
|
final hero = widget.hero;
|
||||||
|
return ListenableBuilder(
|
||||||
|
listenable: _input,
|
||||||
|
builder: (context, _) {
|
||||||
|
final empty = _input.text.trim().isEmpty;
|
||||||
|
final Widget action = hero
|
||||||
|
? Padding(
|
||||||
|
padding: const EdgeInsets.only(right: 8),
|
||||||
|
child: FilledButton.icon(
|
||||||
|
style: FilledButton.styleFrom(minimumSize: const Size(0, 44)),
|
||||||
|
onPressed: empty ? _paste : _submit,
|
||||||
|
icon: Icon(empty ? Icons.content_paste_rounded : Icons.add_rounded, size: 18),
|
||||||
|
label: Text(empty ? 'Вставить' : 'Добавить'),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Padding(
|
||||||
|
padding: const EdgeInsets.only(right: 6),
|
||||||
|
child: empty
|
||||||
|
? IconButton(
|
||||||
|
tooltip: 'Вставить',
|
||||||
|
icon: const Icon(Icons.content_paste_rounded, size: 20),
|
||||||
|
onPressed: _paste,
|
||||||
|
)
|
||||||
|
: IconButton.filled(
|
||||||
|
tooltip: 'Добавить',
|
||||||
|
style: IconButton.styleFrom(
|
||||||
|
backgroundColor: scheme.primary,
|
||||||
|
foregroundColor: scheme.onPrimary,
|
||||||
|
shape: const CircleBorder(),
|
||||||
|
fixedSize: const Size(32, 32),
|
||||||
|
minimumSize: const Size(32, 32),
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
),
|
||||||
|
iconSize: 20,
|
||||||
|
icon: const Icon(Icons.add_rounded),
|
||||||
|
onPressed: _submit,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
final radius = BorderRadius.circular(hero ? 16 : 12);
|
||||||
|
return Actions(
|
||||||
|
actions: {
|
||||||
|
PasteTextIntent: CallbackAction<PasteTextIntent>(
|
||||||
|
onInvoke: (_) {
|
||||||
|
_pasteInline();
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
},
|
||||||
|
child: TextField(
|
||||||
|
controller: _input,
|
||||||
|
focusNode: _focus,
|
||||||
|
autofocus: true,
|
||||||
|
textInputAction: TextInputAction.done,
|
||||||
|
onSubmitted: (_) => _submit(),
|
||||||
|
style: TextStyle(fontSize: hero ? 16 : 14),
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText:
|
||||||
|
hero ? 'music.yandex.ru/album/…' : 'Ссылки на треки, альбомы, плейлисты, исполнителей',
|
||||||
|
prefixIcon: Padding(
|
||||||
|
padding: EdgeInsets.only(left: hero ? 8 : 0),
|
||||||
|
child: const Icon(Icons.link_rounded),
|
||||||
|
),
|
||||||
|
suffixIcon: action,
|
||||||
|
contentPadding: EdgeInsets.symmetric(horizontal: 16, vertical: hero ? 22 : 12),
|
||||||
|
isDense: !hero,
|
||||||
|
fillColor: hero ? scheme.surfaceContainerHigh : scheme.surfaceContainer,
|
||||||
|
border: OutlineInputBorder(borderRadius: radius, borderSide: BorderSide.none),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderRadius: radius,
|
||||||
|
borderSide:
|
||||||
|
BorderSide(color: hero ? scheme.primary : scheme.outlineVariant, width: hero ? 1.5 : 1),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderRadius: radius,
|
||||||
|
borderSide: BorderSide(color: scheme.primary, width: 1.5),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,452 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
|
|
||||||
import '../state/controller.dart';
|
|
||||||
import '../state/draft.dart';
|
|
||||||
import '../state/models.dart';
|
|
||||||
import '../state/picker.dart';
|
|
||||||
import '../theme.dart';
|
|
||||||
import 'artist_picker.dart';
|
|
||||||
import 'widgets.dart';
|
|
||||||
|
|
||||||
class LinkPanel extends StatefulWidget {
|
|
||||||
const LinkPanel({super.key, required this.c});
|
|
||||||
|
|
||||||
final Controller c;
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<LinkPanel> createState() => _LinkPanelState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _LinkPanelState extends State<LinkPanel> {
|
|
||||||
final _input = TextEditingController();
|
|
||||||
final _focus = FocusNode();
|
|
||||||
|
|
||||||
Controller get c => widget.c;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
_input.dispose();
|
|
||||||
_focus.dispose();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _pasteInline() async {
|
|
||||||
final data = await Clipboard.getData(Clipboard.kTextPlain);
|
|
||||||
final text = (data?.text ?? '').trim();
|
|
||||||
if (text.isEmpty) return;
|
|
||||||
if (text.contains('\n') || splitLinks(text).length > 1) {
|
|
||||||
c.addLinks(text);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final v = _input.value;
|
|
||||||
final sel = v.selection.isValid ? v.selection : TextSelection.collapsed(offset: v.text.length);
|
|
||||||
_input.value = TextEditingValue(
|
|
||||||
text: v.text.replaceRange(sel.start, sel.end, text),
|
|
||||||
selection: TextSelection.collapsed(offset: sel.start + text.length),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _submit() {
|
|
||||||
final text = _input.text;
|
|
||||||
if (text.trim().isEmpty) {
|
|
||||||
_input.clear();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
c.addLinks(text);
|
|
||||||
_input.clear();
|
|
||||||
_focus.requestFocus();
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _paste() async {
|
|
||||||
final data = await Clipboard.getData(Clipboard.kTextPlain);
|
|
||||||
final text = data?.text ?? '';
|
|
||||||
if (text.trim().isNotEmpty) c.addLinks(text);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final text = Theme.of(context).textTheme;
|
|
||||||
return Panel(
|
|
||||||
padding: const EdgeInsets.fromLTRB(20, 16, 20, 16),
|
|
||||||
child: ValueListenableBuilder(
|
|
||||||
valueListenable: c.drafts,
|
|
||||||
builder: (context, drafts, _) => Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
height: 40,
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Text('Подборка', style: text.titleMedium),
|
|
||||||
if (drafts.isNotEmpty) ...[const SizedBox(width: 8), Tag('${drafts.length}')],
|
|
||||||
const Spacer(),
|
|
||||||
if (drafts.isNotEmpty)
|
|
||||||
TextButton.icon(
|
|
||||||
onPressed: c.clearDrafts,
|
|
||||||
icon: const Icon(Icons.clear_all_rounded, size: 18),
|
|
||||||
label: const Text('Очистить'),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
ListenableBuilder(
|
|
||||||
listenable: _input,
|
|
||||||
builder: (context, _) => Actions(
|
|
||||||
actions: {
|
|
||||||
PasteTextIntent: CallbackAction<PasteTextIntent>(
|
|
||||||
onInvoke: (_) {
|
|
||||||
_pasteInline();
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
},
|
|
||||||
child: TextField(
|
|
||||||
controller: _input,
|
|
||||||
focusNode: _focus,
|
|
||||||
autofocus: true,
|
|
||||||
textInputAction: TextInputAction.done,
|
|
||||||
onSubmitted: (_) => _submit(),
|
|
||||||
decoration: InputDecoration(
|
|
||||||
hintText: 'Ссылки с music.yandex.ru',
|
|
||||||
prefixIcon: const Icon(Icons.link_rounded),
|
|
||||||
suffixIcon: Padding(
|
|
||||||
padding: const EdgeInsets.only(right: 8),
|
|
||||||
child: _input.text.trim().isEmpty
|
|
||||||
? IconButton(
|
|
||||||
tooltip: 'Вставить',
|
|
||||||
icon: const Icon(Icons.content_paste_rounded),
|
|
||||||
onPressed: _paste,
|
|
||||||
)
|
|
||||||
: IconButton.filled(
|
|
||||||
tooltip: 'Добавить',
|
|
||||||
style: IconButton.styleFrom(
|
|
||||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
|
||||||
foregroundColor: Theme.of(context).colorScheme.onPrimary,
|
|
||||||
shape: const CircleBorder(),
|
|
||||||
fixedSize: const Size(34, 34),
|
|
||||||
minimumSize: const Size(34, 34),
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
),
|
|
||||||
iconSize: 20,
|
|
||||||
icon: const Icon(Icons.add_rounded),
|
|
||||||
onPressed: _submit,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 12),
|
|
||||||
Expanded(
|
|
||||||
child: drafts.isEmpty
|
|
||||||
? const _Hint()
|
|
||||||
: ListView.separated(
|
|
||||||
itemCount: drafts.length,
|
|
||||||
separatorBuilder: (_, _) => const SizedBox(height: 8),
|
|
||||||
itemBuilder: (_, i) => DraftCard(key: ObjectKey(drafts[i]), draft: drafts[i], c: c),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (drafts.isNotEmpty) _Footer(c: c, drafts: drafts),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class _Hint extends StatelessWidget {
|
|
||||||
const _Hint();
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final scheme = Theme.of(context).colorScheme;
|
|
||||||
return SingleChildScrollView(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 4),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'Вставьте одну ссылку или сразу пачку: треки, альбомы, плейлисты, исполнители. '
|
|
||||||
'Каждая станет карточкой с названием и обложкой, а скачать можно всё разом.',
|
|
||||||
style: TextStyle(color: scheme.onSurfaceVariant, height: 1.45),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 12),
|
|
||||||
const Wrap(
|
|
||||||
spacing: 6,
|
|
||||||
runSpacing: 6,
|
|
||||||
children: [
|
|
||||||
Tag('Трек', icon: Icons.music_note_rounded),
|
|
||||||
Tag('Альбом', icon: Icons.album_rounded),
|
|
||||||
Tag('Плейлист', icon: Icons.queue_music_rounded),
|
|
||||||
Tag('Исполнитель', icon: Icons.person_rounded),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class _Footer extends StatelessWidget {
|
|
||||||
const _Footer({required this.c, required this.drafts});
|
|
||||||
|
|
||||||
final Controller c;
|
|
||||||
final List<Draft> drafts;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final scheme = Theme.of(context).colorScheme;
|
|
||||||
return ListenableBuilder(
|
|
||||||
listenable: Listenable.merge(drafts),
|
|
||||||
builder: (context, _) {
|
|
||||||
final ready = drafts.where((d) => d.ready).toList();
|
|
||||||
final tracks = ready.fold(0, (n, d) => n + d.trackCount);
|
|
||||||
final loading = drafts.where((d) => d.loading).length;
|
|
||||||
final parts = [
|
|
||||||
if (ready.isNotEmpty) '${ready.length} ${_links(ready.length)} · ${tracksLabel(tracks)}',
|
|
||||||
if (loading > 0) 'загружается $loading',
|
|
||||||
];
|
|
||||||
return Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 12),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Text(
|
|
||||||
parts.isEmpty ? 'Нечего скачивать' : parts.join(' · '),
|
|
||||||
style: TextStyle(color: scheme.onSurfaceVariant, fontSize: 13),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Tag(
|
|
||||||
c.quality == Quality.lossless ? 'FLAC' : 'MP3 320',
|
|
||||||
icon: Icons.graphic_eq_rounded,
|
|
||||||
color: context.status.accent,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
FilledButton.icon(
|
|
||||||
onPressed: ready.isEmpty ? null : c.downloadAll,
|
|
||||||
icon: const Icon(Icons.download_rounded),
|
|
||||||
label: Text(ready.length > 1 ? 'Скачать всё' : 'Скачать'),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static String _links(int n) {
|
|
||||||
final mod10 = n % 10, mod100 = n % 100;
|
|
||||||
if (mod10 == 1 && mod100 != 11) return 'ссылка';
|
|
||||||
if (mod10 >= 2 && mod10 <= 4 && (mod100 < 12 || mod100 > 14)) return 'ссылки';
|
|
||||||
return 'ссылок';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class DraftCard extends StatelessWidget {
|
|
||||||
const DraftCard({super.key, required this.draft, required this.c});
|
|
||||||
|
|
||||||
final Draft draft;
|
|
||||||
final Controller c;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final scheme = Theme.of(context).colorScheme;
|
|
||||||
final text = Theme.of(context).textTheme;
|
|
||||||
return ListenableBuilder(
|
|
||||||
listenable: draft,
|
|
||||||
builder: (context, _) {
|
|
||||||
final p = draft.preview;
|
|
||||||
final picker = draft.picker;
|
|
||||||
final isAlbum = p.kind == ReleaseKind.album;
|
|
||||||
return Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: scheme.surfaceContainer,
|
|
||||||
borderRadius: BorderRadius.circular(16),
|
|
||||||
border: draft.failed ? Border.all(color: scheme.error.withValues(alpha: 0.4)) : null,
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(10, 10, 4, 10),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
_leading(context),
|
|
||||||
const SizedBox(width: 12),
|
|
||||||
Expanded(child: _info(context, text, scheme)),
|
|
||||||
if (p.status == PreviewStatus.ok)
|
|
||||||
IconButton(
|
|
||||||
tooltip: 'Скачать',
|
|
||||||
icon: const Icon(Icons.download_rounded),
|
|
||||||
onPressed: draft.ready ? () => c.downloadDraft(draft) : null,
|
|
||||||
),
|
|
||||||
IconButton(
|
|
||||||
tooltip: 'Убрать',
|
|
||||||
icon: const Icon(Icons.close_rounded),
|
|
||||||
onPressed: () => c.removeDraft(draft),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (picker != null) ...[
|
|
||||||
Divider(height: 1, indent: 12, endIndent: 12, color: scheme.outlineVariant),
|
|
||||||
InkWell(
|
|
||||||
onTap: draft.togglePicker,
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(14, 8, 10, 8),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Icon(Icons.checklist_rounded, size: 18, color: context.status.accent),
|
|
||||||
const SizedBox(width: 10),
|
|
||||||
Expanded(
|
|
||||||
child: Text(
|
|
||||||
_summary(picker, isAlbum),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 13,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
color: picker.nothing ? scheme.error : scheme.onSurface,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
draft.pickerOpen ? 'Свернуть' : (isAlbum ? 'Выбрать треки' : 'Выбрать релизы'),
|
|
||||||
style: TextStyle(fontSize: 12.5, color: context.status.accent),
|
|
||||||
),
|
|
||||||
AnimatedRotation(
|
|
||||||
turns: draft.pickerOpen ? 0.5 : 0,
|
|
||||||
duration: const Duration(milliseconds: 200),
|
|
||||||
child: Icon(Icons.expand_more_rounded, color: context.status.accent),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
AnimatedSize(
|
|
||||||
duration: const Duration(milliseconds: 240),
|
|
||||||
curve: Curves.easeOutCubic,
|
|
||||||
alignment: Alignment.topCenter,
|
|
||||||
child: draft.pickerOpen
|
|
||||||
? Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(4, 0, 8, 8),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
Align(
|
|
||||||
alignment: Alignment.centerRight,
|
|
||||||
child: TextButton(
|
|
||||||
onPressed: () => picker.selectAll(!picker.everything),
|
|
||||||
child: Text(picker.everything ? 'Снять всё' : 'Выбрать всё'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
isAlbum
|
|
||||||
? TrackChecklist(picker: picker, albumId: picker.albums.first.id, indent: 0)
|
|
||||||
: AlbumList(picker: picker),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: const SizedBox(width: double.infinity),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static String _summary(ArtistPicker picker, bool isAlbum) {
|
|
||||||
if (picker.nothing) return 'Ничего не выбрано';
|
|
||||||
if (isAlbum) {
|
|
||||||
final total = picker.albums.first.count;
|
|
||||||
return picker.everything
|
|
||||||
? 'Все треки · ${tracksLabel(total)}'
|
|
||||||
: 'Выбрано ${picker.trackCount} из ${tracksLabel(total)}';
|
|
||||||
}
|
|
||||||
return picker.everything
|
|
||||||
? 'Вся дискография · ${tracksLabel(picker.trackCount)}'
|
|
||||||
: 'Выбрано ${releasesLabel(picker.albumCount)} · ${tracksLabel(picker.trackCount)}';
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _leading(BuildContext context) {
|
|
||||||
final scheme = Theme.of(context).colorScheme;
|
|
||||||
final p = draft.preview;
|
|
||||||
if (p.status == PreviewStatus.ok) return Cover(url: p.cover, size: 52, kind: p.kind);
|
|
||||||
return Container(
|
|
||||||
width: 52,
|
|
||||||
height: 52,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: scheme.surfaceContainerHighest,
|
|
||||||
borderRadius: BorderRadius.circular(10),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: draft.failed
|
|
||||||
? Icon(Icons.link_off_rounded, color: scheme.error)
|
|
||||||
: const SizedBox.square(dimension: 20, child: CircularProgressIndicator(strokeWidth: 2.2)),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _info(BuildContext context, TextTheme text, ColorScheme scheme) {
|
|
||||||
final p = draft.preview;
|
|
||||||
if (p.status != PreviewStatus.ok) {
|
|
||||||
return Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(draft.link, maxLines: 1, overflow: TextOverflow.ellipsis, style: text.bodyMedium),
|
|
||||||
const SizedBox(height: 2),
|
|
||||||
Text(
|
|
||||||
draft.failed
|
|
||||||
? (p.message.isEmpty ? 'Не удалось открыть ссылку' : p.message)
|
|
||||||
: 'Узнаю, что по ссылке…',
|
|
||||||
maxLines: 2,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
style: TextStyle(fontSize: 12.5, color: draft.failed ? scheme.error : scheme.onSurfaceVariant),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
final overline = [p.kind.label.toUpperCase(), if (p.year > 0) '${p.year}'].join(' · ');
|
|
||||||
final sub = [
|
|
||||||
if (p.artist.isNotEmpty && p.kind != ReleaseKind.artist) p.artist,
|
|
||||||
if (p.kind == ReleaseKind.artist && draft.picker != null)
|
|
||||||
releasesLabel(draft.picker!.albums.length)
|
|
||||||
else if (p.count > 0)
|
|
||||||
tracksLabel(p.count),
|
|
||||||
].join(' · ');
|
|
||||||
return Tooltip(
|
|
||||||
message: p.folder,
|
|
||||||
waitDuration: const Duration(milliseconds: 700),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
overline,
|
|
||||||
style: text.labelSmall?.copyWith(
|
|
||||||
color: context.status.accent,
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
letterSpacing: 1.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 2),
|
|
||||||
TitleWithBadge(p.title, explicit: p.explicit, style: text.titleMedium),
|
|
||||||
if (sub.isNotEmpty)
|
|
||||||
Text(
|
|
||||||
sub,
|
|
||||||
maxLines: 1,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
style: TextStyle(fontSize: 12.5, color: scheme.onSurfaceVariant),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,12 +1,15 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../state/controller.dart';
|
import '../state/controller.dart';
|
||||||
|
import '../state/draft.dart';
|
||||||
import '../state/models.dart';
|
import '../state/models.dart';
|
||||||
import '../theme.dart';
|
import '../theme.dart';
|
||||||
import 'link_panel.dart';
|
import 'downloads.dart';
|
||||||
|
import 'link_input.dart';
|
||||||
import 'log_dialog.dart';
|
import 'log_dialog.dart';
|
||||||
import 'queue.dart';
|
|
||||||
import 'settings_dialog.dart';
|
import 'settings_dialog.dart';
|
||||||
|
import 'source_detail.dart';
|
||||||
|
import 'sources.dart';
|
||||||
import 'widgets.dart';
|
import 'widgets.dart';
|
||||||
|
|
||||||
class MainPage extends StatelessWidget {
|
class MainPage extends StatelessWidget {
|
||||||
@@ -16,39 +19,178 @@ class MainPage extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final scheme = Theme.of(context).colorScheme;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Column(
|
child: ListenableBuilder(
|
||||||
children: [
|
listenable: Listenable.merge([c.drafts, c.downloadsOpen]),
|
||||||
_Header(c: c),
|
builder: (context, _) {
|
||||||
Expanded(
|
final empty = c.drafts.value.isEmpty;
|
||||||
child: LayoutBuilder(
|
final open = c.downloadsOpen.value;
|
||||||
builder: (context, box) {
|
return Stack(
|
||||||
if (box.maxWidth >= 920) {
|
children: [
|
||||||
return Padding(
|
Column(
|
||||||
padding: const EdgeInsets.fromLTRB(20, 4, 20, 20),
|
children: [
|
||||||
child: Row(
|
_Header(c: c, withInput: !empty),
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
Divider(height: 1, color: scheme.outlineVariant),
|
||||||
children: [
|
Expanded(
|
||||||
SizedBox(width: 430, child: LinkPanel(c: c)),
|
child: empty
|
||||||
const SizedBox(width: 20),
|
? _Hero(c: c)
|
||||||
Expanded(child: QueuePanel(c: c)),
|
: LayoutBuilder(
|
||||||
],
|
builder: (context, box) => Row(
|
||||||
),
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
);
|
children: [
|
||||||
}
|
SizedBox(width: box.maxWidth >= 1100 ? 340 : 280, child: SourceList(c: c)),
|
||||||
return Padding(
|
VerticalDivider(width: 1, color: scheme.outlineVariant),
|
||||||
padding: const EdgeInsets.fromLTRB(16, 4, 16, 16),
|
Expanded(child: SourceDetail(c: c)),
|
||||||
child: Column(
|
],
|
||||||
children: [
|
),
|
||||||
SizedBox(height: (box.maxHeight * 0.5).clamp(280.0, 460.0), child: LinkPanel(c: c)),
|
),
|
||||||
const SizedBox(height: 16),
|
|
||||||
Expanded(child: QueuePanel(c: c)),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
if (!empty) _ActionBar(c: c),
|
||||||
},
|
],
|
||||||
),
|
),
|
||||||
|
if (open) ...[
|
||||||
|
Positioned.fill(
|
||||||
|
top: 73,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () => c.downloadsOpen.value = false,
|
||||||
|
child: ColoredBox(color: Colors.black.withValues(alpha: 0.5)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 80,
|
||||||
|
right: 12,
|
||||||
|
bottom: 12,
|
||||||
|
width: 440,
|
||||||
|
child: DownloadsPanel(c: c),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _Header extends StatelessWidget {
|
||||||
|
const _Header({required this.c, required this.withInput});
|
||||||
|
|
||||||
|
final Controller c;
|
||||||
|
final bool withInput;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SizedBox(
|
||||||
|
height: 72,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
const BrandMark(size: 34),
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
Text('YAMD',
|
||||||
|
style: Theme.of(context).textTheme.titleLarge?.copyWith(fontWeight: FontWeight.w800)),
|
||||||
|
const SizedBox(width: 24),
|
||||||
|
Expanded(
|
||||||
|
child: withInput
|
||||||
|
? Center(
|
||||||
|
child: ConstrainedBox(
|
||||||
|
constraints: const BoxConstraints(maxWidth: 560),
|
||||||
|
child: LinkInput(c: c),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: const SizedBox.shrink(),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 24),
|
||||||
|
DownloadsButton(c: c),
|
||||||
|
const SizedBox(width: 6),
|
||||||
|
IconButton(
|
||||||
|
tooltip: 'Журнал',
|
||||||
|
icon: const Icon(Icons.receipt_long_rounded),
|
||||||
|
onPressed: () => showLogDialog(context, c),
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
tooltip: 'Настройки',
|
||||||
|
icon: const Icon(Icons.tune_rounded),
|
||||||
|
onPressed: () => showSettingsDialog(context, c),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 6),
|
||||||
|
_AccountPill(c: c),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _Hero extends StatelessWidget {
|
||||||
|
const _Hero({required this.c});
|
||||||
|
|
||||||
|
final Controller c;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final scheme = Theme.of(context).colorScheme;
|
||||||
|
Widget point(String text) => Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 6,
|
||||||
|
height: 6,
|
||||||
|
decoration: BoxDecoration(color: context.status.accent, shape: BoxShape.circle),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Text(text, style: TextStyle(color: scheme.onSurfaceVariant, fontSize: 13)),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
return Center(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
padding: const EdgeInsets.fromLTRB(24, 24, 24, 72),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
const Text(
|
||||||
|
'Что скачаем?',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(fontSize: 44, fontWeight: FontWeight.w800, letterSpacing: -1.2),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
Text(
|
||||||
|
'Вставьте одну ссылку или сразу пачку. Название, исполнитель и обложка '
|
||||||
|
'определятся сами, а нужное можно отметить галочками.',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(color: scheme.onSurfaceVariant, fontSize: 16, height: 1.5),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 26),
|
||||||
|
ConstrainedBox(
|
||||||
|
constraints: const BoxConstraints(maxWidth: 640),
|
||||||
|
child: LinkInput(c: c, hero: true),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
const Wrap(
|
||||||
|
spacing: 8,
|
||||||
|
runSpacing: 8,
|
||||||
|
alignment: WrapAlignment.center,
|
||||||
|
children: [
|
||||||
|
Tag('Трек', icon: Icons.music_note_rounded),
|
||||||
|
Tag('Альбом', icon: Icons.album_rounded),
|
||||||
|
Tag('Плейлист', icon: Icons.queue_music_rounded),
|
||||||
|
Tag('Исполнитель', icon: Icons.person_rounded),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 36),
|
||||||
|
Wrap(
|
||||||
|
spacing: 32,
|
||||||
|
runSpacing: 10,
|
||||||
|
alignment: WrapAlignment.center,
|
||||||
|
children: [
|
||||||
|
point(c.quality == Quality.lossless ? 'FLAC до 24 бит / 192 кГц' : 'MP3 320'),
|
||||||
|
point('До ${c.concurrency} треков одновременно'),
|
||||||
|
point('Теги и обложки сами'),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -57,43 +199,72 @@ class MainPage extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _Header extends StatelessWidget {
|
class _ActionBar extends StatelessWidget {
|
||||||
const _Header({required this.c});
|
const _ActionBar({required this.c});
|
||||||
|
|
||||||
final Controller c;
|
final Controller c;
|
||||||
|
|
||||||
|
static String _sources(int n) {
|
||||||
|
final mod10 = n % 10, mod100 = n % 100;
|
||||||
|
if (mod10 == 1 && mod100 != 11) return '$n источник';
|
||||||
|
if (mod10 >= 2 && mod10 <= 4 && (mod100 < 12 || mod100 > 14)) return '$n источника';
|
||||||
|
return '$n источников';
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final text = Theme.of(context).textTheme;
|
final scheme = Theme.of(context).colorScheme;
|
||||||
return Padding(
|
final drafts = c.drafts.value;
|
||||||
padding: const EdgeInsets.fromLTRB(20, 14, 14, 14),
|
return ListenableBuilder(
|
||||||
child: Row(
|
listenable: Listenable.merge([c, ...drafts]),
|
||||||
children: [
|
builder: (context, _) {
|
||||||
const BrandMark(size: 36),
|
final ready = drafts.where((Draft d) => d.ready).toList();
|
||||||
const SizedBox(width: 12),
|
final tracks = ready.fold(0, (n, d) => n + d.trackCount);
|
||||||
Text('YAMD', style: text.titleLarge),
|
final loading = drafts.where((d) => d.loading).length;
|
||||||
const SizedBox(width: 16),
|
final summary = [
|
||||||
Expanded(
|
if (ready.isNotEmpty) '${_sources(ready.length)} · ${tracksLabel(tracks)}' else 'Нечего скачивать',
|
||||||
child: Align(
|
if (loading > 0) 'загружается $loading',
|
||||||
alignment: Alignment.centerLeft,
|
].join(' · ');
|
||||||
child: ValueListenableBuilder(
|
return Container(
|
||||||
valueListenable: c.stats, builder: (_, s, _) => _StatsPill(stats: s)),
|
height: 76,
|
||||||
),
|
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: scheme.surfaceContainerLowest,
|
||||||
|
border: Border(top: BorderSide(color: scheme.outlineVariant)),
|
||||||
),
|
),
|
||||||
IconButton(
|
child: Row(
|
||||||
tooltip: 'Журнал',
|
children: [
|
||||||
icon: const Icon(Icons.receipt_long_rounded),
|
Text(summary, style: const TextStyle(fontWeight: FontWeight.w700, fontSize: 15)),
|
||||||
onPressed: () => showLogDialog(context, c),
|
const SizedBox(width: 14),
|
||||||
|
Tag(
|
||||||
|
c.quality == Quality.lossless ? 'FLAC' : 'MP3 320',
|
||||||
|
icon: Icons.graphic_eq_rounded,
|
||||||
|
color: context.status.accent,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 14),
|
||||||
|
Icon(Icons.folder_rounded, size: 16, color: scheme.onSurfaceVariant),
|
||||||
|
const SizedBox(width: 6),
|
||||||
|
Expanded(
|
||||||
|
child: Tooltip(
|
||||||
|
message: c.dir,
|
||||||
|
child: Text(
|
||||||
|
c.dir,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: TextStyle(color: scheme.onSurfaceVariant, fontSize: 13),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 16),
|
||||||
|
FilledButton.icon(
|
||||||
|
onPressed: ready.isEmpty ? null : c.downloadAll,
|
||||||
|
icon: const Icon(Icons.download_rounded),
|
||||||
|
label: Text(ready.length > 1 ? 'Скачать всё' : 'Скачать'),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
IconButton(
|
);
|
||||||
tooltip: 'Настройки',
|
},
|
||||||
icon: const Icon(Icons.tune_rounded),
|
|
||||||
onPressed: () => showSettingsDialog(context, c),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 6),
|
|
||||||
_AccountPill(c: c),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -168,52 +339,3 @@ class _AccountPill extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _StatsPill extends StatelessWidget {
|
|
||||||
const _StatsPill({required this.stats});
|
|
||||||
|
|
||||||
final Stats stats;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final scheme = Theme.of(context).colorScheme;
|
|
||||||
return AnimatedSwitcher(
|
|
||||||
duration: const Duration(milliseconds: 200),
|
|
||||||
child: !stats.busy
|
|
||||||
? const SizedBox.shrink()
|
|
||||||
: Container(
|
|
||||||
key: const ValueKey('stats'),
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: scheme.primary.withValues(alpha: 0.12),
|
|
||||||
borderRadius: BorderRadius.circular(20),
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(Icons.south_rounded, size: 15, color: context.status.accent),
|
|
||||||
const SizedBox(width: 6),
|
|
||||||
Text(
|
|
||||||
'${formatBytes(stats.speed)}/с',
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
color: context.status.accent,
|
|
||||||
fontFeatures: const [FontFeature.tabularFigures()],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Flexible(
|
|
||||||
child: Text(
|
|
||||||
' · ${stats.active} в работе'
|
|
||||||
'${stats.queued > 0 ? ' · ${stats.queued} в очереди' : ''}',
|
|
||||||
maxLines: 1,
|
|
||||||
softWrap: false,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
style: TextStyle(color: scheme.onSurfaceVariant, fontSize: 13),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -5,95 +5,6 @@ import '../state/models.dart';
|
|||||||
import '../theme.dart';
|
import '../theme.dart';
|
||||||
import 'widgets.dart';
|
import 'widgets.dart';
|
||||||
|
|
||||||
class QueuePanel extends StatelessWidget {
|
|
||||||
const QueuePanel({super.key, required this.c});
|
|
||||||
|
|
||||||
final Controller c;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final text = Theme.of(context).textTheme;
|
|
||||||
final jobs = c.jobs;
|
|
||||||
final anyFinished = jobs.any((j) => j.finished);
|
|
||||||
final anyRunning = jobs.any((j) => !j.finished);
|
|
||||||
|
|
||||||
return Panel(
|
|
||||||
padding: const EdgeInsets.fromLTRB(20, 16, 12, 12),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Text('Загрузки', style: text.titleMedium),
|
|
||||||
if (jobs.isNotEmpty) ...[
|
|
||||||
const SizedBox(width: 8),
|
|
||||||
Tag('${jobs.length}'),
|
|
||||||
],
|
|
||||||
const Spacer(),
|
|
||||||
if (anyRunning)
|
|
||||||
TextButton.icon(
|
|
||||||
onPressed: c.cancelAll,
|
|
||||||
icon: const Icon(Icons.stop_rounded, size: 18),
|
|
||||||
label: const Text('Остановить всё'),
|
|
||||||
),
|
|
||||||
if (anyFinished)
|
|
||||||
TextButton.icon(
|
|
||||||
onPressed: c.clearFinished,
|
|
||||||
icon: const Icon(Icons.clear_all_rounded, size: 18),
|
|
||||||
label: const Text('Убрать завершённые'),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
Expanded(
|
|
||||||
child: jobs.isEmpty
|
|
||||||
? const _Empty()
|
|
||||||
: ListView.separated(
|
|
||||||
padding: const EdgeInsets.only(right: 8, bottom: 4),
|
|
||||||
itemCount: jobs.length,
|
|
||||||
separatorBuilder: (_, _) => const SizedBox(height: 10),
|
|
||||||
itemBuilder: (_, i) => JobCard(key: ValueKey(jobs[i].id), job: jobs[i], c: c),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class _Empty extends StatelessWidget {
|
|
||||||
const _Empty();
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final scheme = Theme.of(context).colorScheme;
|
|
||||||
return Center(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 84,
|
|
||||||
height: 84,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: scheme.surfaceContainerHigh,
|
|
||||||
borderRadius: BorderRadius.circular(26),
|
|
||||||
),
|
|
||||||
child: Icon(Icons.library_music_rounded, size: 40, color: scheme.onSurfaceVariant),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 16),
|
|
||||||
Text('Здесь появятся загрузки', style: Theme.of(context).textTheme.titleMedium),
|
|
||||||
const SizedBox(height: 6),
|
|
||||||
Text(
|
|
||||||
'Соберите подборку и нажмите «Скачать всё»',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(color: scheme.onSurfaceVariant, height: 1.4),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class JobCard extends StatefulWidget {
|
class JobCard extends StatefulWidget {
|
||||||
const JobCard({super.key, required this.job, required this.c});
|
const JobCard({super.key, required this.job, required this.c});
|
||||||
|
|
||||||
@@ -205,7 +116,7 @@ class _JobCardState extends State<JobCard> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
for (final f in job.formats.take(2)) ...[
|
for (final f in job.formats.take(1)) ...[
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
Tag(f, color: f.startsWith('FLAC') ? context.status.accent : null),
|
Tag(f, color: f.startsWith('FLAC') ? context.status.accent : null),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -0,0 +1,478 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../state/controller.dart';
|
||||||
|
import '../state/draft.dart';
|
||||||
|
import '../state/models.dart';
|
||||||
|
import '../state/picker.dart';
|
||||||
|
import '../theme.dart';
|
||||||
|
import 'artist_picker.dart';
|
||||||
|
import 'widgets.dart';
|
||||||
|
|
||||||
|
class SourceDetail extends StatelessWidget {
|
||||||
|
const SourceDetail({super.key, required this.c});
|
||||||
|
|
||||||
|
final Controller c;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return ValueListenableBuilder(
|
||||||
|
valueListenable: c.selected,
|
||||||
|
builder: (context, draft, _) {
|
||||||
|
if (draft == null) return const SizedBox.shrink();
|
||||||
|
return ListenableBuilder(
|
||||||
|
key: ObjectKey(draft),
|
||||||
|
listenable: draft,
|
||||||
|
builder: (context, _) {
|
||||||
|
final p = draft.preview;
|
||||||
|
final pk = draft.picker;
|
||||||
|
if (draft.loading) return const _Loading();
|
||||||
|
if (draft.failed) return _Failed(draft: draft, c: c);
|
||||||
|
if (p.kind == ReleaseKind.artist && pk != null) return _ArtistView(preview: p, picker: pk);
|
||||||
|
if (p.kind == ReleaseKind.album && pk != null) return _AlbumView(preview: p, picker: pk);
|
||||||
|
return _SimpleView(preview: p);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _Header extends StatelessWidget {
|
||||||
|
const _Header({
|
||||||
|
required this.cover,
|
||||||
|
required this.over,
|
||||||
|
required this.title,
|
||||||
|
required this.explicit,
|
||||||
|
required this.lines,
|
||||||
|
this.action,
|
||||||
|
this.end = 0,
|
||||||
|
});
|
||||||
|
|
||||||
|
final Widget cover;
|
||||||
|
final String over, title;
|
||||||
|
final bool explicit;
|
||||||
|
final List<String> lines;
|
||||||
|
final Widget? action;
|
||||||
|
final double end;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final scheme = Theme.of(context).colorScheme;
|
||||||
|
final row = Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
cover,
|
||||||
|
const SizedBox(width: 20),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
over,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 11.5,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
letterSpacing: 1.1,
|
||||||
|
color: context.status.accent,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Flexible(
|
||||||
|
child: Text(
|
||||||
|
title,
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 30, fontWeight: FontWeight.w800, letterSpacing: -0.6, height: 1.15),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (explicit) ...[const SizedBox(width: 10), const ExplicitBadge(size: 18)],
|
||||||
|
],
|
||||||
|
),
|
||||||
|
for (final l in lines)
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 3),
|
||||||
|
child: Text(l, style: TextStyle(color: scheme.onSurfaceVariant, fontSize: 14)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (action != null) action!,
|
||||||
|
],
|
||||||
|
);
|
||||||
|
return Padding(padding: EdgeInsets.only(right: end), child: row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ArtistView extends StatefulWidget {
|
||||||
|
const _ArtistView({required this.preview, required this.picker});
|
||||||
|
|
||||||
|
final Preview preview;
|
||||||
|
final ArtistPicker picker;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<_ArtistView> createState() => _ArtistViewState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ArtistViewState extends State<_ArtistView> {
|
||||||
|
AlbumType? _filter;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final p = widget.preview;
|
||||||
|
final pk = widget.picker;
|
||||||
|
final shown = _filter == null ? pk.albums : pk.ofType(_filter!).toList();
|
||||||
|
final scheme = Theme.of(context).colorScheme;
|
||||||
|
Widget chip(String label, AlbumType? type) {
|
||||||
|
final on = _filter == type;
|
||||||
|
return ChoiceChip(
|
||||||
|
label: Text(label),
|
||||||
|
selected: on,
|
||||||
|
showCheckmark: false,
|
||||||
|
onSelected: (_) => setState(() => _filter = type),
|
||||||
|
selectedColor: scheme.onSurface,
|
||||||
|
labelStyle: TextStyle(fontWeight: FontWeight.w600, color: on ? scheme.surface : scheme.onSurface),
|
||||||
|
shape: StadiumBorder(side: BorderSide(color: on ? scheme.onSurface : scheme.outlineVariant)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(28, 24, 0, 0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
_Header(
|
||||||
|
end: 28,
|
||||||
|
cover: Cover(url: p.cover, size: 84, kind: ReleaseKind.artist),
|
||||||
|
over: 'ИСПОЛНИТЕЛЬ',
|
||||||
|
title: p.title,
|
||||||
|
explicit: false,
|
||||||
|
lines: [
|
||||||
|
'${releasesLabel(pk.albums.length)} · выбрано ${pk.albumCount} · ${tracksLabel(pk.trackCount)}',
|
||||||
|
],
|
||||||
|
action: OutlinedButton(
|
||||||
|
onPressed: () => pk.selectAll(!pk.everything),
|
||||||
|
child: Text(pk.everything ? 'Снять всё' : 'Выбрать всё'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 18),
|
||||||
|
Wrap(
|
||||||
|
spacing: 8,
|
||||||
|
runSpacing: 8,
|
||||||
|
children: [
|
||||||
|
chip('Все · ${pk.albums.length}', null),
|
||||||
|
for (final t in pk.types) chip('${t.label} · ${pk.ofType(t).length}', t),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 18),
|
||||||
|
Expanded(
|
||||||
|
child: GridView.builder(
|
||||||
|
padding: const EdgeInsets.only(right: 28, bottom: 24),
|
||||||
|
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||||
|
maxCrossAxisExtent: 220,
|
||||||
|
mainAxisSpacing: 22,
|
||||||
|
crossAxisSpacing: 20,
|
||||||
|
childAspectRatio: 0.74,
|
||||||
|
),
|
||||||
|
itemCount: shown.length,
|
||||||
|
itemBuilder: (_, i) => _ReleaseTile(picker: pk, album: shown[i]),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ReleaseTile extends StatelessWidget {
|
||||||
|
const _ReleaseTile({required this.picker, required this.album});
|
||||||
|
|
||||||
|
final ArtistPicker picker;
|
||||||
|
final AlbumOption album;
|
||||||
|
|
||||||
|
String get _kind => switch (album.type) {
|
||||||
|
AlbumType.album => 'Альбом',
|
||||||
|
AlbumType.single => 'Сингл',
|
||||||
|
AlbumType.compilation => 'Сборник',
|
||||||
|
};
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final scheme = Theme.of(context).colorScheme;
|
||||||
|
final state = picker.albumState(album.id);
|
||||||
|
final picked = picker.pickedCount(album.id);
|
||||||
|
final pickLabel = state == true
|
||||||
|
? 'все треки'
|
||||||
|
: state == null
|
||||||
|
? '$picked из ${album.count}'
|
||||||
|
: 'не выбран';
|
||||||
|
final meta = [_kind, if (album.year > 0) '${album.year}', if (album.count > 0) tracksLabel(album.count)];
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
AspectRatio(
|
||||||
|
aspectRatio: 1,
|
||||||
|
child: LayoutBuilder(
|
||||||
|
builder: (context, box) => Stack(
|
||||||
|
children: [
|
||||||
|
Positioned.fill(
|
||||||
|
child: AnimatedOpacity(
|
||||||
|
duration: const Duration(milliseconds: 160),
|
||||||
|
opacity: state == false ? 0.45 : 1,
|
||||||
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => picker.toggleAlbum(album.id),
|
||||||
|
child:
|
||||||
|
Cover(url: album.cover, size: box.maxWidth, kind: ReleaseKind.album, radius: 14),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 8,
|
||||||
|
left: 8,
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.black.withValues(alpha: 0.6),
|
||||||
|
borderRadius: BorderRadius.circular(9),
|
||||||
|
),
|
||||||
|
child: Checkbox(
|
||||||
|
tristate: true,
|
||||||
|
value: state,
|
||||||
|
onChanged: (_) => picker.toggleAlbum(album.id),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
right: 8,
|
||||||
|
bottom: 8,
|
||||||
|
child: Material(
|
||||||
|
color: Colors.black.withValues(alpha: 0.66),
|
||||||
|
borderRadius: BorderRadius.circular(9),
|
||||||
|
child: InkWell(
|
||||||
|
borderRadius: BorderRadius.circular(9),
|
||||||
|
onTap: () => showTracksDialog(context, picker, album),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(10, 5, 6, 5),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
pickLabel,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: Colors.white, fontSize: 12, fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
const Icon(Icons.chevron_right_rounded, size: 16, color: Colors.white),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
TitleWithBadge(album.title,
|
||||||
|
explicit: album.explicit, style: const TextStyle(fontWeight: FontWeight.w700)),
|
||||||
|
const SizedBox(height: 2),
|
||||||
|
Text(
|
||||||
|
meta.join(' · '),
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: TextStyle(fontSize: 12.5, color: scheme.onSurfaceVariant),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> showTracksDialog(BuildContext context, ArtistPicker picker, AlbumOption album) {
|
||||||
|
if (!picker.isExpanded(album.id)) picker.toggleExpanded(album.id);
|
||||||
|
return showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => Dialog(
|
||||||
|
child: ConstrainedBox(
|
||||||
|
constraints: const BoxConstraints(maxWidth: 520, maxHeight: 620),
|
||||||
|
child: ListenableBuilder(
|
||||||
|
listenable: picker,
|
||||||
|
builder: (context, _) {
|
||||||
|
final state = picker.albumState(album.id);
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(20, 16, 12, 16),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Cover(url: album.cover, size: 48, kind: ReleaseKind.album, radius: 10),
|
||||||
|
const SizedBox(width: 14),
|
||||||
|
Expanded(
|
||||||
|
child: TitleWithBadge(
|
||||||
|
album.title,
|
||||||
|
explicit: album.explicit,
|
||||||
|
style: Theme.of(context).textTheme.titleMedium,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => picker.setAlbum(album.id, state != true),
|
||||||
|
child: Text(state == true ? 'Снять всё' : 'Выбрать всё'),
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
tooltip: 'Готово',
|
||||||
|
icon: const Icon(Icons.close_rounded),
|
||||||
|
onPressed: () => Navigator.pop(context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
Flexible(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: TrackChecklist(picker: picker, albumId: album.id, indent: 0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AlbumView extends StatelessWidget {
|
||||||
|
const _AlbumView({required this.preview, required this.picker});
|
||||||
|
|
||||||
|
final Preview preview;
|
||||||
|
final ArtistPicker picker;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final p = preview;
|
||||||
|
final album = picker.albums.first;
|
||||||
|
final state = picker.albumState(album.id);
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(28, 24, 0, 0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
_Header(
|
||||||
|
end: 28,
|
||||||
|
cover: Cover(url: p.cover, size: 150, kind: ReleaseKind.album, radius: 16),
|
||||||
|
over: ['АЛЬБОМ', if (p.year > 0) '${p.year}'].join(' · '),
|
||||||
|
title: p.title,
|
||||||
|
explicit: p.explicit,
|
||||||
|
lines: [
|
||||||
|
if (p.artist.isNotEmpty) p.artist,
|
||||||
|
'${tracksLabel(album.count)} · выбрано ${picker.pickedCount(album.id)}',
|
||||||
|
],
|
||||||
|
action: OutlinedButton(
|
||||||
|
onPressed: () => picker.setAlbum(album.id, state != true),
|
||||||
|
child: Text(state == true ? 'Снять всё' : 'Выбрать всё'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 18),
|
||||||
|
Expanded(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
padding: const EdgeInsets.only(right: 28, bottom: 24),
|
||||||
|
child: TrackChecklist(picker: picker, albumId: album.id, indent: 0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SimpleView extends StatelessWidget {
|
||||||
|
const _SimpleView({required this.preview});
|
||||||
|
|
||||||
|
final Preview preview;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final p = preview;
|
||||||
|
final scheme = Theme.of(context).colorScheme;
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(28, 24, 28, 0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
_Header(
|
||||||
|
cover: Cover(url: p.cover, size: 150, kind: p.kind, radius: 16),
|
||||||
|
over: [p.kind.label.toUpperCase(), if (p.year > 0) '${p.year}'].join(' · '),
|
||||||
|
title: p.title,
|
||||||
|
explicit: p.explicit,
|
||||||
|
lines: [
|
||||||
|
if (p.artist.isNotEmpty) p.artist,
|
||||||
|
if (p.kind != ReleaseKind.track && p.count > 0) tracksLabel(p.count),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 24),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Icon(Icons.info_outline_rounded, size: 18, color: scheme.onSurfaceVariant),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Text(
|
||||||
|
p.kind == ReleaseKind.playlist ? 'Плейлист скачается целиком' : 'Трек скачается как есть',
|
||||||
|
style: TextStyle(color: scheme.onSurfaceVariant),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _Loading extends StatelessWidget {
|
||||||
|
const _Loading();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return const Center(
|
||||||
|
child: SizedBox.square(dimension: 28, child: CircularProgressIndicator(strokeWidth: 2.6)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _Failed extends StatelessWidget {
|
||||||
|
const _Failed({required this.draft, required this.c});
|
||||||
|
|
||||||
|
final Draft draft;
|
||||||
|
final Controller c;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final scheme = Theme.of(context).colorScheme;
|
||||||
|
final message = draft.preview.message;
|
||||||
|
return Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(32),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Icon(Icons.link_off_rounded, size: 44, color: scheme.error),
|
||||||
|
const SizedBox(height: 14),
|
||||||
|
Text(draft.link, textAlign: TextAlign.center, style: Theme.of(context).textTheme.titleMedium),
|
||||||
|
const SizedBox(height: 6),
|
||||||
|
Text(
|
||||||
|
message.isEmpty ? 'Не удалось открыть ссылку' : message,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(color: scheme.onSurfaceVariant),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 18),
|
||||||
|
OutlinedButton(onPressed: () => c.removeDraft(draft), child: const Text('Убрать из подборки')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,188 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../state/controller.dart';
|
||||||
|
import '../state/draft.dart';
|
||||||
|
import '../state/models.dart';
|
||||||
|
import '../theme.dart';
|
||||||
|
import 'artist_picker.dart';
|
||||||
|
import 'widgets.dart';
|
||||||
|
|
||||||
|
String draftSummary(Draft d) {
|
||||||
|
final p = d.preview;
|
||||||
|
if (d.loading) return 'Узнаю, что по ссылке…';
|
||||||
|
if (d.failed) return p.message.isEmpty ? 'Не удалось открыть ссылку' : p.message;
|
||||||
|
final pk = d.picker;
|
||||||
|
if (p.kind == ReleaseKind.artist && pk != null) {
|
||||||
|
if (pk.nothing) return 'ничего не выбрано';
|
||||||
|
if (pk.everything) return 'вся дискография · ${tracksLabel(pk.trackCount)}';
|
||||||
|
return '${pk.albumCount} из ${ofReleases(pk.albums.length)} · ${tracksLabel(pk.trackCount)}';
|
||||||
|
}
|
||||||
|
if (p.kind == ReleaseKind.album && pk != null) {
|
||||||
|
final total = pk.albums.first.count;
|
||||||
|
final picked = pk.nothing
|
||||||
|
? 'ничего не выбрано'
|
||||||
|
: pk.everything
|
||||||
|
? tracksLabel(total)
|
||||||
|
: '${pk.trackCount} из ${ofTracks(total)}';
|
||||||
|
return [if (p.artist.isNotEmpty) p.artist, picked].join(' · ');
|
||||||
|
}
|
||||||
|
return [
|
||||||
|
if (p.artist.isNotEmpty) p.artist,
|
||||||
|
if (p.kind != ReleaseKind.track && p.count > 0) tracksLabel(p.count),
|
||||||
|
].join(' · ');
|
||||||
|
}
|
||||||
|
|
||||||
|
class SourceList extends StatelessWidget {
|
||||||
|
const SourceList({super.key, required this.c});
|
||||||
|
|
||||||
|
final Controller c;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final scheme = Theme.of(context).colorScheme;
|
||||||
|
return ListenableBuilder(
|
||||||
|
listenable: Listenable.merge([c.drafts, c.selected]),
|
||||||
|
builder: (context, _) {
|
||||||
|
final drafts = c.drafts.value;
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(20, 14, 12, 6),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Flexible(
|
||||||
|
child: Text(
|
||||||
|
'Подборка',
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: Theme.of(context).textTheme.titleMedium,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
' · ${drafts.length}',
|
||||||
|
style: TextStyle(color: scheme.onSurfaceVariant, fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
const Spacer(),
|
||||||
|
TextButton(onPressed: c.clearDrafts, child: const Text('Очистить')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: ListView.separated(
|
||||||
|
padding: const EdgeInsets.fromLTRB(10, 0, 10, 12),
|
||||||
|
itemCount: drafts.length,
|
||||||
|
separatorBuilder: (_, _) => const SizedBox(height: 4),
|
||||||
|
itemBuilder: (_, i) => SourceRow(
|
||||||
|
key: ObjectKey(drafts[i]),
|
||||||
|
draft: drafts[i],
|
||||||
|
selected: drafts[i] == c.selected.value,
|
||||||
|
c: c,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SourceRow extends StatelessWidget {
|
||||||
|
const SourceRow({super.key, required this.draft, required this.selected, required this.c});
|
||||||
|
|
||||||
|
final Draft draft;
|
||||||
|
final bool selected;
|
||||||
|
final Controller c;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final scheme = Theme.of(context).colorScheme;
|
||||||
|
return ListenableBuilder(
|
||||||
|
listenable: draft,
|
||||||
|
builder: (context, _) {
|
||||||
|
final p = draft.preview;
|
||||||
|
final over = draft.failed
|
||||||
|
? 'ОШИБКА'
|
||||||
|
: draft.loading
|
||||||
|
? 'ЗАГРУЗКА'
|
||||||
|
: [p.kind.label.toUpperCase(), if (p.year > 0) '${p.year}'].join(' · ');
|
||||||
|
final title = p.status == PreviewStatus.ok ? p.title : draft.link;
|
||||||
|
return Material(
|
||||||
|
color: selected ? scheme.surfaceContainerHigh : Colors.transparent,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
side: BorderSide(color: selected ? scheme.outlineVariant : Colors.transparent),
|
||||||
|
),
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => c.selected.value = draft,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(10, 10, 4, 10),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
_leading(context),
|
||||||
|
const SizedBox(width: 12),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
over,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 11,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
letterSpacing: 0.8,
|
||||||
|
color: draft.failed ? scheme.error : context.status.accent,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 2),
|
||||||
|
TitleWithBadge(
|
||||||
|
title,
|
||||||
|
explicit: p.explicit,
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
draftSummary(draft),
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12.5,
|
||||||
|
color: draft.failed ? scheme.error : scheme.onSurfaceVariant,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
tooltip: 'Убрать',
|
||||||
|
visualDensity: VisualDensity.compact,
|
||||||
|
icon: Icon(Icons.close_rounded, size: 18, color: scheme.onSurfaceVariant),
|
||||||
|
onPressed: () => c.removeDraft(draft),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _leading(BuildContext context) {
|
||||||
|
final scheme = Theme.of(context).colorScheme;
|
||||||
|
final p = draft.preview;
|
||||||
|
if (p.status == PreviewStatus.ok) return Cover(url: p.cover, size: 48, kind: p.kind, radius: 10);
|
||||||
|
return Container(
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
decoration:
|
||||||
|
BoxDecoration(color: scheme.surfaceContainerHighest, borderRadius: BorderRadius.circular(10)),
|
||||||
|
child: Center(
|
||||||
|
child: draft.failed
|
||||||
|
? Icon(Icons.link_off_rounded, color: scheme.error, size: 22)
|
||||||
|
: const SizedBox.square(dimension: 18, child: CircularProgressIndicator(strokeWidth: 2.2)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# Flutter-related
|
||||||
|
**/Flutter/ephemeral/
|
||||||
|
**/Pods/
|
||||||
|
|
||||||
|
# Xcode-related
|
||||||
|
**/dgph
|
||||||
|
**/xcuserdata/
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "ephemeral/Flutter-Generated.xcconfig"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "ephemeral/Flutter-Generated.xcconfig"
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
//
|
||||||
|
// Generated file. Do not edit.
|
||||||
|
//
|
||||||
|
|
||||||
|
import FlutterMacOS
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
import file_selector_macos
|
||||||
|
|
||||||
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
|
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
|
||||||
|
}
|
||||||
@@ -0,0 +1,729 @@
|
|||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 54;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXAggregateTarget section */
|
||||||
|
33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {
|
||||||
|
isa = PBXAggregateTarget;
|
||||||
|
buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */;
|
||||||
|
buildPhases = (
|
||||||
|
33CC111E2044C6BF0003C045 /* ShellScript */,
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = "Flutter Assemble";
|
||||||
|
productName = FLX;
|
||||||
|
};
|
||||||
|
/* End PBXAggregateTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; };
|
||||||
|
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
|
||||||
|
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
|
||||||
|
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
|
||||||
|
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
|
||||||
|
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
|
||||||
|
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 33CC10EC2044A3C60003C045;
|
||||||
|
remoteInfo = Runner;
|
||||||
|
};
|
||||||
|
33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 33CC111A2044C6BA0003C045;
|
||||||
|
remoteInfo = FLX;
|
||||||
|
};
|
||||||
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
|
33CC110E2044A8840003C045 /* Bundle Framework */ = {
|
||||||
|
isa = PBXCopyFilesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
dstPath = "";
|
||||||
|
dstSubfolderSpec = 10;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
name = "Bundle Framework";
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||||
|
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
|
||||||
|
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
|
||||||
|
33CC10ED2044A3C60003C045 /* ymd.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ymd.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
|
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
|
||||||
|
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||||
|
33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = "<group>"; };
|
||||||
|
33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = "<group>"; };
|
||||||
|
33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
|
||||||
|
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
|
||||||
|
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
|
||||||
|
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
|
||||||
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
|
||||||
|
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
331C80D2294CF70F00263BE5 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
33CC10EA2044A3C60003C045 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
331C80D6294CF71000263BE5 /* RunnerTests */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
331C80D7294CF71000263BE5 /* RunnerTests.swift */,
|
||||||
|
);
|
||||||
|
path = RunnerTests;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33BA886A226E78AF003329D5 /* Configs */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
33E5194F232828860026EE4D /* AppInfo.xcconfig */,
|
||||||
|
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||||
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||||
|
333000ED22D3DE5D00554162 /* Warnings.xcconfig */,
|
||||||
|
);
|
||||||
|
path = Configs;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33CC10E42044A3C60003C045 = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
33FAB671232836740065AC1E /* Runner */,
|
||||||
|
33CEB47122A05771004F2AC0 /* Flutter */,
|
||||||
|
331C80D6294CF71000263BE5 /* RunnerTests */,
|
||||||
|
33CC10EE2044A3C60003C045 /* Products */,
|
||||||
|
D73912EC22F37F3D000D13A0 /* Frameworks */,
|
||||||
|
);
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33CC10EE2044A3C60003C045 /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
33CC10ED2044A3C60003C045 /* ymd.app */,
|
||||||
|
331C80D5294CF71000263BE5 /* RunnerTests.xctest */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33CC11242044D66E0003C045 /* Resources */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
33CC10F22044A3C60003C045 /* Assets.xcassets */,
|
||||||
|
33CC10F42044A3C60003C045 /* MainMenu.xib */,
|
||||||
|
33CC10F72044A3C60003C045 /* Info.plist */,
|
||||||
|
);
|
||||||
|
name = Resources;
|
||||||
|
path = ..;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33CEB47122A05771004F2AC0 /* Flutter */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
|
||||||
|
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,
|
||||||
|
33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
|
||||||
|
33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
|
||||||
|
33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,
|
||||||
|
);
|
||||||
|
path = Flutter;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33FAB671232836740065AC1E /* Runner */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
33CC10F02044A3C60003C045 /* AppDelegate.swift */,
|
||||||
|
33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
|
||||||
|
33E51913231747F40026EE4D /* DebugProfile.entitlements */,
|
||||||
|
33E51914231749380026EE4D /* Release.entitlements */,
|
||||||
|
33CC11242044D66E0003C045 /* Resources */,
|
||||||
|
33BA886A226E78AF003329D5 /* Configs */,
|
||||||
|
);
|
||||||
|
path = Runner;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
);
|
||||||
|
name = Frameworks;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
331C80D4294CF70F00263BE5 /* RunnerTests */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
||||||
|
buildPhases = (
|
||||||
|
331C80D1294CF70F00263BE5 /* Sources */,
|
||||||
|
331C80D2294CF70F00263BE5 /* Frameworks */,
|
||||||
|
331C80D3294CF70F00263BE5 /* Resources */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
331C80DA294CF71000263BE5 /* PBXTargetDependency */,
|
||||||
|
);
|
||||||
|
name = RunnerTests;
|
||||||
|
productName = RunnerTests;
|
||||||
|
productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */;
|
||||||
|
productType = "com.apple.product-type.bundle.unit-test";
|
||||||
|
};
|
||||||
|
33CC10EC2044A3C60003C045 /* Runner */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||||
|
buildPhases = (
|
||||||
|
33CC10E92044A3C60003C045 /* Sources */,
|
||||||
|
33CC10EA2044A3C60003C045 /* Frameworks */,
|
||||||
|
33CC10EB2044A3C60003C045 /* Resources */,
|
||||||
|
33CC110E2044A8840003C045 /* Bundle Framework */,
|
||||||
|
3399D490228B24CF009A79C7 /* ShellScript */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
33CC11202044C79F0003C045 /* PBXTargetDependency */,
|
||||||
|
);
|
||||||
|
name = Runner;
|
||||||
|
packageProductDependencies = (
|
||||||
|
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
|
||||||
|
);
|
||||||
|
productName = Runner;
|
||||||
|
productReference = 33CC10ED2044A3C60003C045 /* ymd.app */;
|
||||||
|
productType = "com.apple.product-type.application";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
33CC10E52044A3C60003C045 /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
attributes = {
|
||||||
|
BuildIndependentTargetsInParallel = YES;
|
||||||
|
LastSwiftUpdateCheck = 0920;
|
||||||
|
LastUpgradeCheck = 1510;
|
||||||
|
ORGANIZATIONNAME = "";
|
||||||
|
TargetAttributes = {
|
||||||
|
331C80D4294CF70F00263BE5 = {
|
||||||
|
CreatedOnToolsVersion = 14.0;
|
||||||
|
TestTargetID = 33CC10EC2044A3C60003C045;
|
||||||
|
};
|
||||||
|
33CC10EC2044A3C60003C045 = {
|
||||||
|
CreatedOnToolsVersion = 9.2;
|
||||||
|
LastSwiftMigration = 1100;
|
||||||
|
ProvisioningStyle = Automatic;
|
||||||
|
SystemCapabilities = {
|
||||||
|
com.apple.Sandbox = {
|
||||||
|
enabled = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
33CC111A2044C6BA0003C045 = {
|
||||||
|
CreatedOnToolsVersion = 9.2;
|
||||||
|
ProvisioningStyle = Manual;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */;
|
||||||
|
compatibilityVersion = "Xcode 9.3";
|
||||||
|
developmentRegion = en;
|
||||||
|
hasScannedForEncodings = 0;
|
||||||
|
knownRegions = (
|
||||||
|
en,
|
||||||
|
Base,
|
||||||
|
);
|
||||||
|
mainGroup = 33CC10E42044A3C60003C045;
|
||||||
|
packageReferences = (
|
||||||
|
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
|
||||||
|
);
|
||||||
|
productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectRoot = "";
|
||||||
|
targets = (
|
||||||
|
33CC10EC2044A3C60003C045 /* Runner */,
|
||||||
|
331C80D4294CF70F00263BE5 /* RunnerTests */,
|
||||||
|
33CC111A2044C6BA0003C045 /* Flutter Assemble */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
331C80D3294CF70F00263BE5 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
33CC10EB2044A3C60003C045 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
|
||||||
|
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
3399D490228B24CF009A79C7 /* ShellScript */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
|
||||||
|
};
|
||||||
|
33CC111E2044C6BF0003C045 /* ShellScript */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
Flutter/ephemeral/FlutterInputs.xcfilelist,
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
Flutter/ephemeral/tripwire,
|
||||||
|
);
|
||||||
|
outputFileListPaths = (
|
||||||
|
Flutter/ephemeral/FlutterOutputs.xcfilelist,
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
|
||||||
|
};
|
||||||
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
331C80D1294CF70F00263BE5 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
33CC10E92044A3C60003C045 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
|
||||||
|
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
|
||||||
|
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXTargetDependency section */
|
||||||
|
331C80DA294CF71000263BE5 /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 33CC10EC2044A3C60003C045 /* Runner */;
|
||||||
|
targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
33CC11202044C79F0003C045 /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
|
||||||
|
targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
/* End PBXTargetDependency section */
|
||||||
|
|
||||||
|
/* Begin PBXVariantGroup section */
|
||||||
|
33CC10F42044A3C60003C045 /* MainMenu.xib */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
33CC10F52044A3C60003C045 /* Base */,
|
||||||
|
);
|
||||||
|
name = MainMenu.xib;
|
||||||
|
path = Runner;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXVariantGroup section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
331C80DB294CF71000263BE5 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = ru.yamd.app.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ymd.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/ymd";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
331C80DC294CF71000263BE5 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = ru.yamd.app.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ymd.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/ymd";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
331C80DD294CF71000263BE5 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = ru.yamd.app.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ymd.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/ymd";
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
338D0CE9231458BD00FA5F75 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "-";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEAD_CODE_STRIPPING = YES;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 12.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
SDKROOT = macosx;
|
||||||
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
338D0CEA231458BD00FA5F75 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/../Frameworks",
|
||||||
|
);
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
338D0CEB231458BD00FA5F75 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
CODE_SIGN_STYLE = Manual;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
33CC10F92044A3C60003C045 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "-";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEAD_CODE_STRIPPING = YES;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"DEBUG=1",
|
||||||
|
"$(inherited)",
|
||||||
|
);
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 12.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
SDKROOT = macosx;
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
33CC10FA2044A3C60003C045 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "-";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEAD_CODE_STRIPPING = YES;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 12.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
SDKROOT = macosx;
|
||||||
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
33CC10FC2044A3C60003C045 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/../Frameworks",
|
||||||
|
);
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
33CC10FD2044A3C60003C045 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/../Frameworks",
|
||||||
|
);
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
33CC111C2044C6BA0003C045 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
CODE_SIGN_STYLE = Manual;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
33CC111D2044C6BA0003C045 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */
|
||||||
|
331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
331C80DB294CF71000263BE5 /* Debug */,
|
||||||
|
331C80DC294CF71000263BE5 /* Release */,
|
||||||
|
331C80DD294CF71000263BE5 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
33CC10F92044A3C60003C045 /* Debug */,
|
||||||
|
33CC10FA2044A3C60003C045 /* Release */,
|
||||||
|
338D0CE9231458BD00FA5F75 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
33CC10FC2044A3C60003C045 /* Debug */,
|
||||||
|
33CC10FD2044A3C60003C045 /* Release */,
|
||||||
|
338D0CEA231458BD00FA5F75 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
33CC111C2044C6BA0003C045 /* Debug */,
|
||||||
|
33CC111D2044C6BA0003C045 /* Release */,
|
||||||
|
338D0CEB231458BD00FA5F75 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
|
||||||
|
/* Begin XCLocalSwiftPackageReference section */
|
||||||
|
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
|
||||||
|
isa = XCLocalSwiftPackageReference;
|
||||||
|
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
|
||||||
|
};
|
||||||
|
/* End XCLocalSwiftPackageReference section */
|
||||||
|
|
||||||
|
/* Begin XCSwiftPackageProductDependency section */
|
||||||
|
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
|
||||||
|
isa = XCSwiftPackageProductDependency;
|
||||||
|
productName = FlutterGeneratedPluginSwiftPackage;
|
||||||
|
};
|
||||||
|
/* End XCSwiftPackageProductDependency section */
|
||||||
|
};
|
||||||
|
rootObject = 33CC10E52044A3C60003C045 /* Project object */;
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "1510"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<PreActions>
|
||||||
|
<ExecutionAction
|
||||||
|
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
|
||||||
|
<ActionContent
|
||||||
|
title = "Run Prepare Flutter Framework Script"
|
||||||
|
scriptText = ""$FLUTTER_ROOT"/packages/flutter_tools/bin/macos_assemble.sh prepare ">
|
||||||
|
<EnvironmentBuildable>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
|
BuildableName = "ymd.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</EnvironmentBuildable>
|
||||||
|
</ActionContent>
|
||||||
|
</ExecutionAction>
|
||||||
|
</PreActions>
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
|
BuildableName = "ymd.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
|
BuildableName = "ymd.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
<Testables>
|
||||||
|
<TestableReference
|
||||||
|
skipped = "NO"
|
||||||
|
parallelizable = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "331C80D4294CF70F00263BE5"
|
||||||
|
BuildableName = "RunnerTests.xctest"
|
||||||
|
BlueprintName = "RunnerTests"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</TestableReference>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
enableGPUValidationMode = "1"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
|
BuildableName = "ymd.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Profile"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
|
BuildableName = "ymd.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "group:Runner.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import Cocoa
|
||||||
|
import FlutterMacOS
|
||||||
|
|
||||||
|
@main
|
||||||
|
class AppDelegate: FlutterAppDelegate {
|
||||||
|
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"size" : "16x16",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_16.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "16x16",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_32.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "32x32",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_32.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "32x32",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_64.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "128x128",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_128.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "128x128",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_256.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "256x256",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_256.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "256x256",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_512.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "512x512",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_512.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "512x512",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_1024.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 738 B |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
@@ -0,0 +1,343 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="macosx"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
</dependencies>
|
||||||
|
<objects>
|
||||||
|
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
||||||
|
<connections>
|
||||||
|
<outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/>
|
||||||
|
</connections>
|
||||||
|
</customObject>
|
||||||
|
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||||
|
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||||
|
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="Runner" customModuleProvider="target">
|
||||||
|
<connections>
|
||||||
|
<outlet property="applicationMenu" destination="uQy-DD-JDr" id="XBo-yE-nKs"/>
|
||||||
|
<outlet property="mainFlutterWindow" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/>
|
||||||
|
</connections>
|
||||||
|
</customObject>
|
||||||
|
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
|
||||||
|
<menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
||||||
|
<items>
|
||||||
|
<menuItem title="APP_NAME" id="1Xt-HY-uBw">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="APP_NAME" systemMenu="apple" id="uQy-DD-JDr">
|
||||||
|
<items>
|
||||||
|
<menuItem title="About APP_NAME" id="5kV-Vb-QxS">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
|
||||||
|
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
|
||||||
|
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
|
||||||
|
<menuItem title="Services" id="NMo-om-nkz">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
|
||||||
|
<menuItem title="Hide APP_NAME" keyEquivalent="h" id="Olw-nP-bQN">
|
||||||
|
<connections>
|
||||||
|
<action selector="hide:" target="-1" id="PnN-Uc-m68"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Show All" id="Kd2-mp-pUS">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
|
||||||
|
<menuItem title="Quit APP_NAME" keyEquivalent="q" id="4sb-4s-VLi">
|
||||||
|
<connections>
|
||||||
|
<action selector="terminate:" target="-1" id="Te7-pn-YzF"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Edit" id="5QF-Oa-p0T">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
|
||||||
|
<connections>
|
||||||
|
<action selector="undo:" target="-1" id="M6e-cu-g7V"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
|
||||||
|
<connections>
|
||||||
|
<action selector="redo:" target="-1" id="oIA-Rs-6OD"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
|
||||||
|
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
|
||||||
|
<connections>
|
||||||
|
<action selector="cut:" target="-1" id="YJe-68-I9s"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
|
||||||
|
<connections>
|
||||||
|
<action selector="copy:" target="-1" id="G1f-GL-Joy"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
|
||||||
|
<connections>
|
||||||
|
<action selector="paste:" target="-1" id="UvS-8e-Qdg"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Delete" id="pa3-QI-u2k">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="delete:" target="-1" id="0Mk-Ml-PaM"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
|
||||||
|
<connections>
|
||||||
|
<action selector="selectAll:" target="-1" id="VNm-Mi-diN"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
|
||||||
|
<menuItem title="Find" id="4EN-yA-p0u">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Find" id="1b7-l0-nxx">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
|
||||||
|
<connections>
|
||||||
|
<action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
|
||||||
|
<connections>
|
||||||
|
<action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
|
||||||
|
<connections>
|
||||||
|
<action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
|
||||||
|
<connections>
|
||||||
|
<action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
|
||||||
|
<connections>
|
||||||
|
<action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
|
||||||
|
<connections>
|
||||||
|
<action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
|
||||||
|
<connections>
|
||||||
|
<action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
|
||||||
|
<menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Substitutions" id="9ic-FL-obx">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Show Substitutions" id="z6F-FW-3nz">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
|
||||||
|
<menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Smart Quotes" id="hQb-2v-fYv">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Smart Dashes" id="rgM-f4-ycn">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Smart Links" id="cwL-P1-jid">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Data Detectors" id="tRr-pd-1PS">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Text Replacement" id="HFQ-gK-NFA">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Transformations" id="2oI-Rn-ZJC">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Transformations" id="c8a-y6-VQd">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Make Upper Case" id="vmV-6d-7jI">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Make Lower Case" id="d9M-CD-aMd">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Capitalize" id="UEZ-Bs-lqG">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Speech" id="xrE-MZ-jX0">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Speech" id="3rS-ZA-NoH">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Start Speaking" id="Ynk-f8-cLZ">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Stop Speaking" id="Oyz-dy-DGm">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="View" id="H8h-7b-M4v">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="View" id="HyV-fh-RgO">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleFullScreen:" target="-1" id="dU3-MA-1Rq"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Window" id="aUF-d1-5bR">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
|
||||||
|
<connections>
|
||||||
|
<action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Zoom" id="R4o-n2-Eq4">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
|
||||||
|
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Help" id="EPT-qC-fAb">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Help" systemMenu="help" id="rJ0-wn-3NY"/>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
<point key="canvasLocation" x="142" y="-258"/>
|
||||||
|
</menu>
|
||||||
|
<window title="APP_NAME" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="MainFlutterWindow" customModule="Runner" customModuleProvider="target">
|
||||||
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||||
|
<rect key="contentRect" x="335" y="390" width="800" height="600"/>
|
||||||
|
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1577"/>
|
||||||
|
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="800" height="600"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
</view>
|
||||||
|
</window>
|
||||||
|
</objects>
|
||||||
|
</document>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// Application-level settings for the Runner target.
|
||||||
|
//
|
||||||
|
// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
|
||||||
|
// future. If not, the values below would default to using the project name when this becomes a
|
||||||
|
// 'flutter create' template.
|
||||||
|
|
||||||
|
// The application's name. By default this is also the title of the Flutter window.
|
||||||
|
PRODUCT_NAME = YAMD
|
||||||
|
|
||||||
|
// The application's bundle identifier
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = ru.yamd.app
|
||||||
|
|
||||||
|
// The copyright displayed in application information
|
||||||
|
PRODUCT_COPYRIGHT = Copyright © 2026 TheGreatPepix
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#include "../../Flutter/Flutter-Debug.xcconfig"
|
||||||
|
#include "Warnings.xcconfig"
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#include "../../Flutter/Flutter-Release.xcconfig"
|
||||||
|
#include "Warnings.xcconfig"
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES
|
||||||
|
CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
|
||||||
|
CLANG_WARN_PRAGMA_PACK = YES
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES
|
||||||
|
CLANG_WARN_COMMA = YES
|
||||||
|
GCC_WARN_STRICT_SELECTOR_MATCH = YES
|
||||||
|
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
|
||||||
|
GCC_WARN_SHADOW = YES
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>com.apple.security.app-sandbox</key>
|
||||||
|
<false/>
|
||||||
|
<key>com.apple.security.cs.allow-jit</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.network.server</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>$(PRODUCT_NAME)</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>$(PRODUCT_COPYRIGHT)</string>
|
||||||
|
<key>NSMainNibFile</key>
|
||||||
|
<string>MainMenu</string>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>NSApplication</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import Cocoa
|
||||||
|
import FlutterMacOS
|
||||||
|
|
||||||
|
class MainFlutterWindow: NSWindow {
|
||||||
|
override func awakeFromNib() {
|
||||||
|
let flutterViewController = FlutterViewController()
|
||||||
|
self.contentViewController = flutterViewController
|
||||||
|
self.title = "YAMD"
|
||||||
|
self.minSize = NSSize(width: 900, height: 600)
|
||||||
|
self.setContentSize(NSSize(width: 1240, height: 820))
|
||||||
|
self.center()
|
||||||
|
|
||||||
|
RegisterGeneratedPlugins(registry: flutterViewController)
|
||||||
|
|
||||||
|
super.awakeFromNib()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>com.apple.security.app-sandbox</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import Cocoa
|
||||||
|
import FlutterMacOS
|
||||||
|
import XCTest
|
||||||
|
|
||||||
|
class RunnerTests: XCTestCase {
|
||||||
|
|
||||||
|
func testExample() {
|
||||||
|
// If you add code to the Runner application, consider adding tests here.
|
||||||
|
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
name: ymd
|
name: ymd
|
||||||
description: "YAMD, Yet Another Music Downloader: окно на Flutter поверх ядра ymcore."
|
description: "YAMD, Yet Another Music Downloader: окно на Flutter поверх ядра ymcore."
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 2.0.0+1
|
version: 2.0.2+3
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.8.0
|
sdk: ^3.8.0
|
||||||
|
|||||||
@@ -33,14 +33,20 @@ Future<void> _add(WidgetTester tester, String links) async {
|
|||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> _downloadAll(WidgetTester tester) async {
|
||||||
|
await tester.tap(find.byWidgetPredicate((w) => w is FilledButton).last);
|
||||||
|
await tester.pump(const Duration(milliseconds: 400));
|
||||||
|
await tester.pump();
|
||||||
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('без входа виден только экран входа', (tester) async {
|
testWidgets('без входа виден только экран входа', (tester) async {
|
||||||
final (core, c) = await _open(tester);
|
final (core, c) = await _open(tester);
|
||||||
|
|
||||||
expect(c.ready, isTrue);
|
expect(c.ready, isTrue);
|
||||||
expect(c.version, '2.0.0');
|
expect(c.version, '2.0.2');
|
||||||
expect(find.text('Войти'), findsOneWidget);
|
expect(find.text('Войти'), findsOneWidget);
|
||||||
expect(find.text('Подборка'), findsNothing);
|
expect(find.text('Что скачаем?'), findsNothing);
|
||||||
|
|
||||||
await core.close();
|
await core.close();
|
||||||
});
|
});
|
||||||
@@ -52,7 +58,7 @@ void main() {
|
|||||||
expect(c.account.status, AccountStatus.noplus);
|
expect(c.account.status, AccountStatus.noplus);
|
||||||
expect(c.canDownload, isFalse);
|
expect(c.canDownload, isFalse);
|
||||||
expect(find.text('Оформить Плюс'), findsOneWidget);
|
expect(find.text('Оформить Плюс'), findsOneWidget);
|
||||||
expect(find.text('Подборка'), findsNothing);
|
expect(find.text('Что скачаем?'), findsNothing);
|
||||||
|
|
||||||
await core.close();
|
await core.close();
|
||||||
});
|
});
|
||||||
@@ -67,24 +73,25 @@ void main() {
|
|||||||
await core.close();
|
await core.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('с Плюсом: ссылка определяется и альбом качается', (tester) async {
|
testWidgets('альбом определяется по ссылке и качается, загрузки открываются сами', (tester) async {
|
||||||
final (core, c) = await _open(tester);
|
final (core, c) = await _open(tester);
|
||||||
await _login(tester, 'good-token');
|
await _login(tester, 'good-token');
|
||||||
|
|
||||||
expect(c.canDownload, isTrue);
|
expect(c.canDownload, isTrue);
|
||||||
expect(find.text('Подборка'), findsOneWidget);
|
expect(find.text('Что скачаем?'), findsOneWidget);
|
||||||
expect(find.text('Плюс'), findsOneWidget);
|
expect(find.text('Плюс'), findsOneWidget);
|
||||||
|
|
||||||
await _add(tester, 'https://music.yandex.ru/album/123');
|
await _add(tester, 'https://music.yandex.ru/album/123');
|
||||||
|
|
||||||
expect(find.text('Группа крови'), findsOneWidget);
|
expect(find.text('Что скачаем?'), findsNothing);
|
||||||
|
expect(find.text('Группа крови'), findsWidgets);
|
||||||
expect(find.text('Кино · 8 треков'), findsOneWidget);
|
expect(find.text('Кино · 8 треков'), findsOneWidget);
|
||||||
expect(find.text('1 ссылка · 8 треков'), findsOneWidget);
|
expect(find.text('1 источник · 8 треков'), findsOneWidget);
|
||||||
|
|
||||||
await tester.tap(find.widgetWithText(FilledButton, 'Скачать'));
|
await _downloadAll(tester);
|
||||||
await tester.pump(const Duration(milliseconds: 400));
|
|
||||||
await tester.pump();
|
|
||||||
expect(c.drafts.value, isEmpty);
|
expect(c.drafts.value, isEmpty);
|
||||||
|
expect(c.downloadsOpen.value, isTrue);
|
||||||
|
expect(find.text('Загрузки'), findsOneWidget);
|
||||||
expect(c.jobs, hasLength(1));
|
expect(c.jobs, hasLength(1));
|
||||||
expect(c.jobs.first.tracks, hasLength(8));
|
expect(c.jobs.first.tracks, hasLength(8));
|
||||||
|
|
||||||
@@ -97,6 +104,10 @@ void main() {
|
|||||||
expect(c.jobs.first.status, JobStatus.done);
|
expect(c.jobs.first.status, JobStatus.done);
|
||||||
expect(c.jobs.first.formats, containsAll(['FLAC 24/96', 'FLAC 16/44.1']));
|
expect(c.jobs.first.formats, containsAll(['FLAC 24/96', 'FLAC 16/44.1']));
|
||||||
|
|
||||||
|
await tester.tap(find.byTooltip('Закрыть'));
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
expect(c.downloadsOpen.value, isFalse);
|
||||||
|
|
||||||
await core.close();
|
await core.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -111,17 +122,20 @@ void main() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
expect(c.drafts.value, hasLength(4));
|
expect(c.drafts.value, hasLength(4));
|
||||||
expect(find.text('Кукушка'), findsOneWidget);
|
expect(c.selected.value, c.drafts.value.first);
|
||||||
|
expect(find.text('Кукушка'), findsWidgets);
|
||||||
expect(find.text('Плейлист дня'), findsOneWidget);
|
expect(find.text('Плейлист дня'), findsOneWidget);
|
||||||
expect(find.text('Не удалось распознать ссылку.'), findsOneWidget);
|
expect(find.text('Не удалось распознать ссылку.'), findsOneWidget);
|
||||||
expect(find.text('3 ссылки · 15 треков'), findsOneWidget);
|
expect(find.text('3 источника · 15 треков'), findsOneWidget);
|
||||||
|
|
||||||
|
await tester.tap(find.text('Плейлист дня'));
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
expect(find.text('Плейлист скачается целиком'), findsOneWidget);
|
||||||
|
|
||||||
await _add(tester, 'https://music.yandex.ru/album/123');
|
await _add(tester, 'https://music.yandex.ru/album/123');
|
||||||
expect(c.drafts.value, hasLength(4));
|
expect(c.drafts.value, hasLength(4));
|
||||||
|
|
||||||
await tester.tap(find.text('Скачать всё'));
|
await _downloadAll(tester);
|
||||||
await tester.pump(const Duration(milliseconds: 400));
|
|
||||||
await tester.pump();
|
|
||||||
expect(c.jobs, hasLength(3));
|
expect(c.jobs, hasLength(3));
|
||||||
expect(c.drafts.value, hasLength(1));
|
expect(c.drafts.value, hasLength(1));
|
||||||
|
|
||||||
@@ -137,52 +151,49 @@ void main() {
|
|||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
await tester.tap(find.text('Проверить подписку'));
|
await tester.tap(find.text('Проверить подписку'));
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
expect(find.text('Подборка'), findsOneWidget);
|
expect(find.text('Что скачаем?'), findsOneWidget);
|
||||||
|
|
||||||
await tester.pump(const Duration(milliseconds: 400));
|
await tester.pump(const Duration(milliseconds: 400));
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
expect(c.canDownload, isTrue);
|
expect(c.canDownload, isTrue);
|
||||||
expect(find.text('Подборка'), findsOneWidget);
|
expect(find.text('Что скачаем?'), findsOneWidget);
|
||||||
expect(find.text('Подписка Плюс активна'), findsOneWidget);
|
expect(find.text('Подписка Плюс активна'), findsOneWidget);
|
||||||
|
|
||||||
await tester.pumpAndSettle(const Duration(seconds: 5));
|
await tester.pumpAndSettle(const Duration(seconds: 5));
|
||||||
await core.close();
|
await core.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('у исполнителя можно выбрать альбомы и треки', (tester) async {
|
testWidgets('у исполнителя выбираются релизы и треки', (tester) async {
|
||||||
final (core, c) = await _open(tester);
|
final (core, c) = await _open(tester);
|
||||||
await _login(tester, 'good-token');
|
await _login(tester, 'good-token');
|
||||||
|
|
||||||
await _add(tester, 'https://music.yandex.ru/artist/1');
|
await _add(tester, 'https://music.yandex.ru/artist/1');
|
||||||
expect(find.text('Вся дискография · 33 трека'), findsOneWidget);
|
expect(find.text('вся дискография · 33 трека'), findsOneWidget);
|
||||||
|
expect(find.text('Альбомы · 2'), findsOneWidget);
|
||||||
|
expect(find.text('Синглы и EP · 1'), findsOneWidget);
|
||||||
|
expect(find.text('Сборники · 1'), findsOneWidget);
|
||||||
|
|
||||||
await tester.tap(find.text('Выбрать релизы'));
|
await tester.tap(find.byType(Checkbox).at(3));
|
||||||
await tester.pumpAndSettle();
|
await tester.pump();
|
||||||
expect(find.text('Альбомы'), findsOneWidget);
|
expect(find.text('не выбран'), findsOneWidget);
|
||||||
expect(find.text('Синглы и EP'), findsOneWidget);
|
|
||||||
expect(find.text('Сборники'), findsOneWidget);
|
|
||||||
|
|
||||||
await tester.ensureVisible(find.text('Последний герой'));
|
await tester.tap(find.text('все треки').first);
|
||||||
await tester.pump();
|
|
||||||
await tester.tap(find.text('Последний герой'));
|
|
||||||
await tester.pump();
|
|
||||||
|
|
||||||
await tester.ensureVisible(find.byTooltip('Выбрать треки').first);
|
|
||||||
await tester.pump();
|
|
||||||
await tester.tap(find.byTooltip('Выбрать треки').first);
|
|
||||||
await tester.pump(const Duration(milliseconds: 300));
|
await tester.pump(const Duration(milliseconds: 300));
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
await tester.ensureVisible(find.text('Война'));
|
|
||||||
await tester.pump();
|
|
||||||
await tester.tap(find.text('Война'));
|
await tester.tap(find.text('Война'));
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
|
await tester.tap(find.byTooltip('Готово'));
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
expect(c.drafts.value.single.trackCount, 10 + 10 + 1);
|
expect(find.text('10 из 11'), findsOneWidget);
|
||||||
expect(find.text('Выбрано 3 релиза · 21 трек'), findsOneWidget);
|
expect(find.text('3 из 4 релизов · 21 трек'), findsOneWidget);
|
||||||
await tester.tap(find.widgetWithText(FilledButton, 'Скачать'));
|
|
||||||
await tester.pump(const Duration(milliseconds: 400));
|
|
||||||
await tester.pump();
|
|
||||||
|
|
||||||
|
await tester.tap(find.text('Сборники · 1'));
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
expect(find.text('Последний герой'), findsOneWidget);
|
||||||
|
expect(find.text('Группа крови'), findsNothing);
|
||||||
|
|
||||||
|
await _downloadAll(tester);
|
||||||
final select = core.lastDownload!['select'] as List;
|
final select = core.lastDownload!['select'] as List;
|
||||||
expect(select, hasLength(3));
|
expect(select, hasLength(3));
|
||||||
expect((select[0] as Map)['album'], '10');
|
expect((select[0] as Map)['album'], '10');
|
||||||
@@ -196,33 +207,20 @@ void main() {
|
|||||||
await core.close();
|
await core.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('у альбома можно выбрать треки, 18+ помечено', (tester) async {
|
testWidgets('в альбоме выбираются треки, 18+ помечено', (tester) async {
|
||||||
final (core, c) = await _open(tester);
|
final (core, c) = await _open(tester);
|
||||||
await _login(tester, 'good-token');
|
await _login(tester, 'good-token');
|
||||||
|
|
||||||
await _add(tester, 'https://music.yandex.ru/album/123');
|
await _add(tester, 'https://music.yandex.ru/album/123');
|
||||||
expect(find.text('E'), findsOneWidget);
|
expect(find.text('E'), findsNWidgets(2 + 4));
|
||||||
expect(find.text('Все треки · 8 треков'), findsOneWidget);
|
|
||||||
|
|
||||||
await tester.tap(find.text('Выбрать треки'));
|
|
||||||
await tester.pump(const Duration(milliseconds: 300));
|
|
||||||
await tester.pumpAndSettle();
|
|
||||||
expect(find.text('E'), findsNWidgets(1 + 4));
|
|
||||||
|
|
||||||
await tester.ensureVisible(find.text('Война'));
|
|
||||||
await tester.pump();
|
|
||||||
await tester.tap(find.text('Война'));
|
await tester.tap(find.text('Война'));
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
await tester.ensureVisible(find.text('Кукушка'));
|
|
||||||
await tester.pump();
|
|
||||||
await tester.tap(find.text('Кукушка'));
|
await tester.tap(find.text('Кукушка'));
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
expect(find.text('Выбрано 6 из 8 треков'), findsOneWidget);
|
expect(find.text('Кино · 6 из 8 треков'), findsOneWidget);
|
||||||
|
|
||||||
await tester.tap(find.widgetWithText(FilledButton, 'Скачать'));
|
|
||||||
await tester.pump(const Duration(milliseconds: 400));
|
|
||||||
await tester.pump();
|
|
||||||
|
|
||||||
|
await _downloadAll(tester);
|
||||||
final select = core.lastDownload!['select'] as List;
|
final select = core.lastDownload!['select'] as List;
|
||||||
expect(select, hasLength(1));
|
expect(select, hasLength(1));
|
||||||
expect((select.single as Map)['album'], '123');
|
expect((select.single as Map)['album'], '123');
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"ymd/internal/yam"
|
"ymd/internal/yam"
|
||||||
)
|
)
|
||||||
|
|
||||||
const Version = "2.0.0"
|
const Version = "2.0.2"
|
||||||
|
|
||||||
const (
|
const (
|
||||||
accNone = "none"
|
accNone = "none"
|
||||||
|
|||||||