diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 242cc2b65c..fd22f66aad 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -63,7 +63,7 @@ See [docs/](docs/README.md) for how to edit these documents. Code is a small aspect of community, and the ways mentioned above are more important in helping us. But if you'd _really_ like to contribute code, it is best to start small. Consider some well-scoped changes, say like adding more -[custom icons to auth](auth/docs/adding-icons.md). +[custom icons to auth](mobile/apps/auth/docs/adding-icons.md). Each of the individual product/platform specific directories in this repository have instructions on setting up a dev environment. diff --git a/mobile/apps/auth/assets/custom-icons/_data/custom-icons.json b/mobile/apps/auth/assets/custom-icons/_data/custom-icons.json index 589db8113c..f4c2a1b95e 100644 --- a/mobile/apps/auth/assets/custom-icons/_data/custom-icons.json +++ b/mobile/apps/auth/assets/custom-icons/_data/custom-icons.json @@ -35,6 +35,20 @@ { "title": "Amazon" }, + { + "title": "Amtrak", + "slug": "amtrak", + "hex": "003A5D" + }, + { + "title": "Animal Crossing", + "slug:": "animal_crossing", + "altNames": [ + "AnimalCrossing", + "Bell Tree Forums", + "BellTree Forums" + ] + }, { "title": "Ankama", "slug": "ankama" @@ -56,6 +70,13 @@ "Docaposte AR24" ] }, + { + "title": "Art Fight", + "slug": "art_fight", + "altNames": [ + "ArtFight" + ] + }, { "title": "Aruba", "slug": "aruba", @@ -277,6 +298,19 @@ "slug": "cih", "hex": "D14633" }, + { + "title": "Chucklefish" + }, + { + "title": "Clipper", + "slug": "clippercard", + "altNames": [ + "ClipperCard", + "clipper-card", + "Clipper Card" + ], + "hex": "006298" + }, { "title": "CloudAMQP" }, @@ -1207,6 +1241,9 @@ { "title": "Skinport" }, + { + "title": "Smogon" + }, { "title": "SMSPool", "slug": "sms_pool_net", @@ -1315,6 +1352,12 @@ { "title": "TorGuard" }, + { + "title": "Toyhouse", + "altNames": [ + "Toyhou.se" + ] + }, { "title": "Trading 212" }, @@ -1350,6 +1393,12 @@ "Twitch tv" ] }, + { + "title": "Twitter", + "altNames": [ + "X", + ] + }, { "title": "Ubiquiti", "slug": "ubiquiti", diff --git a/mobile/apps/auth/assets/custom-icons/icons/animal_crossing.svg b/mobile/apps/auth/assets/custom-icons/icons/animal_crossing.svg new file mode 100644 index 0000000000..6800a4d8f7 --- /dev/null +++ b/mobile/apps/auth/assets/custom-icons/icons/animal_crossing.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile/apps/auth/assets/custom-icons/icons/art_fight.svg b/mobile/apps/auth/assets/custom-icons/icons/art_fight.svg new file mode 100644 index 0000000000..51c4274bd4 --- /dev/null +++ b/mobile/apps/auth/assets/custom-icons/icons/art_fight.svg @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mobile/apps/auth/assets/custom-icons/icons/best_buy.svg b/mobile/apps/auth/assets/custom-icons/icons/best_buy.svg new file mode 100644 index 0000000000..86717212e2 --- /dev/null +++ b/mobile/apps/auth/assets/custom-icons/icons/best_buy.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/mobile/apps/auth/assets/custom-icons/icons/chucklefish.svg b/mobile/apps/auth/assets/custom-icons/icons/chucklefish.svg new file mode 100644 index 0000000000..76be26a658 --- /dev/null +++ b/mobile/apps/auth/assets/custom-icons/icons/chucklefish.svg @@ -0,0 +1,75 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/mobile/apps/auth/assets/custom-icons/icons/smogon.svg b/mobile/apps/auth/assets/custom-icons/icons/smogon.svg new file mode 100644 index 0000000000..6d4d656c88 --- /dev/null +++ b/mobile/apps/auth/assets/custom-icons/icons/smogon.svg @@ -0,0 +1,170 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mobile/apps/auth/assets/custom-icons/icons/toyhouse.svg b/mobile/apps/auth/assets/custom-icons/icons/toyhouse.svg new file mode 100644 index 0000000000..f385ffbb27 --- /dev/null +++ b/mobile/apps/auth/assets/custom-icons/icons/toyhouse.svg @@ -0,0 +1,49 @@ + + + + diff --git a/mobile/apps/auth/assets/custom-icons/icons/twitter.svg b/mobile/apps/auth/assets/custom-icons/icons/twitter.svg new file mode 100644 index 0000000000..d60af2b8c5 --- /dev/null +++ b/mobile/apps/auth/assets/custom-icons/icons/twitter.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/mobile/apps/photos/lib/db/upload_locks_db.dart b/mobile/apps/photos/lib/db/upload_locks_db.dart index ab786d5c78..dc2bfab079 100644 --- a/mobile/apps/photos/lib/db/upload_locks_db.dart +++ b/mobile/apps/photos/lib/db/upload_locks_db.dart @@ -157,6 +157,23 @@ class UploadLocksDB { ); } + Future getLockData(String id) async { + final db = await instance.database; + final rows = await db.query( + _uploadLocksTable.table, + where: '${_uploadLocksTable.columnID} = ?', + whereArgs: [id], + ); + if (rows.isEmpty) { + return "No lock found for $id"; + } + final row = rows.first; + final time = row[_uploadLocksTable.columnTime] as int; + final owner = row[_uploadLocksTable.columnOwner] as String; + final duration = DateTime.now().millisecondsSinceEpoch - time; + return "Lock for $id acquired by $owner since ${Duration(milliseconds: duration)}"; + } + Future isLocked(String id, String owner) async { final db = await instance.database; final rows = await db.query( diff --git a/mobile/apps/photos/lib/utils/file_uploader.dart b/mobile/apps/photos/lib/utils/file_uploader.dart index 9bb28eeee4..890b167fea 100644 --- a/mobile/apps/photos/lib/utils/file_uploader.dart +++ b/mobile/apps/photos/lib/utils/file_uploader.dart @@ -519,7 +519,8 @@ class FileUploader { DateTime.now().microsecondsSinceEpoch, ); } catch (e) { - _logger.warning("Lock was already taken for " + file.toString()); + final lockInfo = await _uploadLocks.getLockData(lockKey); + _logger.warning("Lock was already taken ($lockInfo) for " + file.tag); throw LockAlreadyAcquiredError(); }