loris/lib/global.dart

44 lines
1.1 KiB
Dart
Raw Normal View History

2022-09-03 20:41:39 +00:00
import 'package:flutter/foundation.dart';
2022-08-15 13:08:37 +00:00
import 'package:flutter/material.dart';
2022-08-12 17:00:09 +00:00
import 'package:loris/business_logic/settings.dart';
2022-09-26 14:30:02 +00:00
import 'themes/themes.dart' as themes;
2022-07-03 13:47:24 +00:00
2022-07-04 17:37:53 +00:00
const String name = "loris";
2022-09-11 20:42:11 +00:00
const String version = "v0.4 'the posts update'";
2022-06-28 20:05:24 +00:00
const String useragent = "$name/$version";
const String website = "https://git.kittycat.homes/zoe/loris";
2022-08-06 10:13:00 +00:00
2022-09-03 20:41:39 +00:00
final Map<String, String> defaultHeaders = {
if (!kIsWeb) "User-Agent": useragent,
2022-06-28 20:05:24 +00:00
"accept": "application/json",
"Content-Type": "application/json"
};
2022-08-06 10:13:00 +00:00
2022-08-12 22:28:00 +00:00
const List<String> bad = [
"gab.com",
"spinster.xyz",
"truthsocial.com",
"poa.st",
"gleasonator.com",
"shitposter.club",
2022-09-06 10:08:27 +00:00
"freespeechextremist.com",
2022-08-12 22:28:00 +00:00
];
2022-09-04 18:03:24 +00:00
double getWidth(context) {
2022-09-26 14:30:02 +00:00
return (MediaQuery.of(context).size.width * settings!.postWidth) -
(themes.defaultSeperatorHeight * 2);
2022-09-04 18:03:24 +00:00
}
BoxConstraints getConstraints(context) {
return BoxConstraints(
maxWidth: settings!.maxPostWidth,
);
}
2022-08-29 21:38:14 +00:00
const List<Locale> availableLocales = [Locale("en", "US"), Locale("de")];
2022-08-12 17:00:09 +00:00
Settings? settings;
2022-08-29 21:30:26 +00:00
const String legalese =
2022-09-02 21:19:25 +00:00
"loris is licensed under the CNPLv7+ to find out more go to https://thufie.lain.haus/NPL.html";