feat: полный ребрендинг интерфейса, User-Agent и системных служб в Prisma (v3.4.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:
@@ -52,13 +52,13 @@ class BackupService {
|
||||
Future<bool> exportBackup() async {
|
||||
final json = await createBackupJson();
|
||||
final fileName =
|
||||
'lunaris_backup_${DateTime.now().millisecondsSinceEpoch}.json';
|
||||
'prisma_backup_${DateTime.now().millisecondsSinceEpoch}.json';
|
||||
|
||||
if (Platform.isAndroid) {
|
||||
final tempDir = await getTemporaryDirectory();
|
||||
final file = File('${tempDir.path}/$fileName');
|
||||
await file.writeAsString(json);
|
||||
await Share.shareXFiles([XFile(file.path)], text: 'Lunaris Backup');
|
||||
await Share.shareXFiles([XFile(file.path)], text: 'Prisma Backup');
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ class DownloadService {
|
||||
return {
|
||||
'User-Agent': lower.contains('realbooru') || lower.contains('paheal')
|
||||
? 'Mozilla/5.0 (Linux; Android 14) AppleWebKit/537.36 Chrome/125 Mobile Safari/537.36'
|
||||
: 'Lunaris/2.0.1 Flutter local booru browser',
|
||||
: 'Prisma/2.0.1 Flutter local booru browser',
|
||||
'Accept': lower.contains('realbooru') || lower.contains('paheal')
|
||||
? 'video/webm,video/mp4,image/avif,image/webp,image/apng,image/*,*/*;q=0.8'
|
||||
: '*/*',
|
||||
|
||||
@@ -94,7 +94,7 @@ class PawchiveSyncService {
|
||||
followRedirects: false,
|
||||
validateStatus: (status) => status != null && status < 500,
|
||||
headers: const {
|
||||
'User-Agent': 'Lunaris/2.0.1 Flutter local booru browser',
|
||||
'User-Agent': 'Prisma/2.0.1 Flutter local booru browser',
|
||||
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
||||
},
|
||||
),
|
||||
@@ -231,7 +231,7 @@ class PawchiveSyncService {
|
||||
headers: {
|
||||
'Cookie': 'session=$cleanCookie',
|
||||
'Accept': 'application/json',
|
||||
'User-Agent': 'Lunaris/2.0.1 Flutter local booru browser',
|
||||
'User-Agent': 'Prisma/2.0.1 Flutter local booru browser',
|
||||
},
|
||||
validateStatus: (status) => status != null && status < 500,
|
||||
),
|
||||
@@ -509,7 +509,7 @@ class PawchiveSyncService {
|
||||
final options = Options(
|
||||
headers: {
|
||||
'Cookie': 'session=$cleanCookie',
|
||||
'User-Agent': 'Lunaris/2.0.1 Flutter local booru browser',
|
||||
'User-Agent': 'Prisma/2.0.1 Flutter local booru browser',
|
||||
},
|
||||
validateStatus: (status) =>
|
||||
status != null && (status == 200 || status == 201 || status == 204),
|
||||
|
||||
@@ -674,7 +674,7 @@ class SettingsService {
|
||||
return Success(
|
||||
const JsonEncoder.withIndent(' ').convert({
|
||||
'app': {
|
||||
'name': 'Lunaris',
|
||||
'name': 'Prisma',
|
||||
'version': appVersion,
|
||||
'build': buildNumber,
|
||||
'generatedAt': DateTime.now().toIso8601String(),
|
||||
|
||||
@@ -25,7 +25,14 @@ class TagCacheService {
|
||||
return _resolvedPath!;
|
||||
}
|
||||
final dir = await getApplicationDocumentsDirectory();
|
||||
_resolvedPath = '${dir.path}/lunaris_tag_cache.json';
|
||||
final newFile = File('${dir.path}/prisma_tag_cache.json');
|
||||
final oldFile = File('${dir.path}/lunaris_tag_cache.json');
|
||||
if (!newFile.existsSync() && oldFile.existsSync()) {
|
||||
try {
|
||||
oldFile.copySync(newFile.path);
|
||||
} catch (_) {}
|
||||
}
|
||||
_resolvedPath = newFile.path;
|
||||
return _resolvedPath!;
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ class UpdateService {
|
||||
'Authorization': 'token 1c744d6044d756759d7b1f693c94c80cf70d75fa',
|
||||
}
|
||||
: {
|
||||
'User-Agent': 'Lunaris-App',
|
||||
'User-Agent': 'Prisma-App',
|
||||
'Accept': 'application/vnd.github+json',
|
||||
},
|
||||
);
|
||||
@@ -239,10 +239,10 @@ class UpdateService {
|
||||
final fromUrl =
|
||||
parsed?.pathSegments.isEmpty ?? true ? '' : parsed!.pathSegments.last;
|
||||
if (fromUrl.contains('.')) return fromUrl;
|
||||
if (Platform.isAndroid) return 'Lunaris-v${info.version}.apk';
|
||||
if (Platform.isLinux) return 'Lunaris-v${info.version}-linux-x64.tar.gz';
|
||||
if (Platform.isWindows) return 'LunarisSetup-v${info.version}.exe';
|
||||
return 'LunarisPortable-v${info.version}.zip';
|
||||
if (Platform.isAndroid) return 'Prisma-v${info.version}.apk';
|
||||
if (Platform.isLinux) return 'Prisma-v${info.version}-linux-x64.tar.gz';
|
||||
if (Platform.isWindows) return 'PrismaSetup-v${info.version}.exe';
|
||||
return 'PrismaPortable-v${info.version}.zip';
|
||||
}
|
||||
|
||||
static String _versionFromTag(String tag) {
|
||||
|
||||
Reference in New Issue
Block a user