feat(updates): switch auto-updates to GitHub releases and remove Gitea references (v3.0.1)
Build and Release / Build Windows x64 (push) Has been cancelled
Build and Release / Build Windows x64 (push) Has been cancelled
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
const appDisplayVersion = '2.3.1';
|
||||
const appBuildNumber = 41;
|
||||
const appDisplayVersion = '3.0.1';
|
||||
const appBuildNumber = 52;
|
||||
const appReleaseChannel = 'Stable';
|
||||
|
||||
@@ -8,7 +8,7 @@ const lunarisChangelog = [
|
||||
'Новая архитектура поиска (OverlayPortal): подсказки тегов отображаются через нативный портал Flutter без блокировки кнопок панели, очистки и сброса фильтров.',
|
||||
'Pawchive 2.0 & Двусторонняя синхронизация: подключение аккаунтов через логин/пароль или Session Cookie, импорт избранного с сервера, экспорт локальных коллекций в аккаунт на сервере и сквозная синхронизация со всех поддерживаемых платформ.',
|
||||
'Ленивое автоопределение разрешения: фоновый декодер автоматически рассчитывает и выводит точные размеры медиа (например, 1920 × 1080) для постов Pawchive без серверных метаданных.',
|
||||
'Умные per-ABI обновления: автообновление через Gitea скачивает точный APK под архитектуру вашего процессора (arm64-v8a, armeabi-v7a, x86_64), сокращая вес загрузки.',
|
||||
'Умные per-ABI обновления: автообновление через GitHub скачивает точный APK под архитектуру вашего процессора (arm64-v8a, armeabi-v7a, x86_64), сокращая вес загрузки.',
|
||||
'Исправление вёрстки: устранены переносы текста в заголовке окна аккаунтов и карточках пользователей на экранах смартфонов.',
|
||||
],
|
||||
),
|
||||
@@ -36,7 +36,7 @@ const lunarisChangelog = [
|
||||
title: 'ABI-Aware Auto-Update — правильный APK для вашего процессора',
|
||||
bullets: [
|
||||
'Определение архитектуры Android: приложение читает Build.SUPPORTED_ABIS (arm64-v8a, armeabi-v7a, x86_64) через нативный канал.',
|
||||
'Точный APK из Gitea: при обновлении скачивается per-ABI APK (app-arm64-v8a-release.apk и т.д.), а не один общий файл.',
|
||||
'Точный APK из GitHub: при обновлении скачивается per-ABI APK (app-arm64-v8a-release.apk и т.д.), а не один общий файл.',
|
||||
'Fallback: нет per-ABI APK → универсальный APK → страница релиза в браузере.',
|
||||
'Кеш ABI: архитектура определяется один раз за сеанс.',
|
||||
],
|
||||
@@ -163,7 +163,7 @@ const lunarisChangelog = [
|
||||
'Instant Segmented Controls: replaced tedious dropdowns with fast 1-tap SegmentedButtons for Theme (Dark/Light/Auto), Language (RU/EN), and Media Quality (Auto/Data saver/HQ).',
|
||||
'Folder Structure Bottom Sheet: intuitive download directory template picker with preset chips and custom pattern editor.',
|
||||
'Interactive Stepper & Limit Controls: modernized desktop & mobile column steppers and disk cache limits with accent pill badges.',
|
||||
'Hero Brand Banner: polished app presentation card in About section with glowing icon, version build badge, update checker, and Gitea repository link.',
|
||||
'Hero Brand Banner: polished app presentation card in About section with glowing icon, version build badge, update checker, and GitHub repository link.',
|
||||
],
|
||||
),
|
||||
LunarisChange(
|
||||
@@ -301,7 +301,7 @@ const lunarisChangelog = [
|
||||
'Added favorite artists bar at the top of the Artists tab with quick access and recent photos/videos stream.',
|
||||
'Multi-image posts now feature an in-post navigation indicator with image switching.',
|
||||
'New Pawchive provider support and cleaned up deprecated providers.',
|
||||
'In-app update checks and downloads connected directly to RarDog Gitea releases.',
|
||||
'In-app update checks and downloads connected directly to RarDog GitHub releases.',
|
||||
],
|
||||
),
|
||||
LunarisChange(
|
||||
@@ -369,7 +369,7 @@ const lunarisChangelog = [
|
||||
version: '1.0.1',
|
||||
title: 'Mobile polish',
|
||||
bullets: [
|
||||
'Startup update checks now look for new Gitea releases every launch.',
|
||||
'Startup update checks now look for new GitHub releases every launch.',
|
||||
'Refresh-rate controls are Android-only; desktop keeps stable app motion.',
|
||||
'Tag chip input no longer jumps while typing.',
|
||||
],
|
||||
|
||||
@@ -13,9 +13,9 @@ class UpdateService {
|
||||
UpdateService(this._dio, this._settingsService);
|
||||
|
||||
static const latestReleaseUrl =
|
||||
'https://gitea.rardogsynapse.online/api/v1/repos/RarDog/Lunaris/releases/latest';
|
||||
'https://api.github.com/repos/RarDog/Lunaris/releases/latest';
|
||||
static const releasesUrl =
|
||||
'https://gitea.rardogsynapse.online/api/v1/repos/RarDog/Lunaris/releases';
|
||||
'https://api.github.com/repos/RarDog/Lunaris/releases';
|
||||
|
||||
static const _deviceChannel = MethodChannel('rulegel/device');
|
||||
|
||||
@@ -84,7 +84,13 @@ class UpdateService {
|
||||
Future<AppUpdateInfo> _latestAllowedRelease(AppSettings settings) async {
|
||||
final response = await _dio.get<dynamic>(
|
||||
releasesUrl,
|
||||
queryParameters: {'limit': 30},
|
||||
queryParameters: {'per_page': 30},
|
||||
options: Options(
|
||||
headers: {
|
||||
'User-Agent': 'Lunaris-App',
|
||||
'Accept': 'application/vnd.github+json',
|
||||
},
|
||||
),
|
||||
);
|
||||
final items = (response.data as List?) ?? const [];
|
||||
final releases = items
|
||||
@@ -95,7 +101,15 @@ class UpdateService {
|
||||
.map((item) => _releaseFromJson(Map<String, dynamic>.from(item)))
|
||||
.toList(growable: false);
|
||||
if (releases.isEmpty) {
|
||||
final latest = await _dio.get<dynamic>(latestReleaseUrl);
|
||||
final latest = await _dio.get<dynamic>(
|
||||
latestReleaseUrl,
|
||||
options: Options(
|
||||
headers: {
|
||||
'User-Agent': 'Lunaris-App',
|
||||
'Accept': 'application/vnd.github+json',
|
||||
},
|
||||
),
|
||||
);
|
||||
return _releaseFromJson(Map<String, dynamic>.from(latest.data as Map));
|
||||
}
|
||||
releases.sort((a, b) {
|
||||
|
||||
@@ -2183,12 +2183,12 @@ class _HeroBrandBanner extends StatelessWidget {
|
||||
OutlinedButton.icon(
|
||||
onPressed: () async {
|
||||
final url = Uri.parse(
|
||||
'https://gitea.rardogsynapse.online/RarDog/Lunaris',
|
||||
'https://github.com/RarDog/Lunaris',
|
||||
);
|
||||
await launchUrl(url, mode: LaunchMode.externalApplication);
|
||||
},
|
||||
icon: const Icon(Icons.code_rounded, size: 18),
|
||||
label: const Text('Gitea'),
|
||||
label: const Text('GitHub'),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user