Skip to content

Commit

Permalink
Merge pull request #412 from Piwigo/v2.5.2
Browse files Browse the repository at this point in the history
Merge final v2.5.2 into master
  • Loading branch information
EddyLB authored Dec 5, 2020
2 parents d86d8c5 + fbc60ea commit 0ffcfaa
Show file tree
Hide file tree
Showing 38 changed files with 4,633 additions and 4,410 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
atomos (0.1.3)
aws-eventstream (1.1.0)
aws-partitions (1.397.0)
aws-partitions (1.402.0)
aws-sdk-core (3.109.3)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
Expand All @@ -15,7 +15,7 @@ GEM
aws-sdk-kms (1.39.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.85.0)
aws-sdk-s3 (1.86.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
Expand Down Expand Up @@ -45,7 +45,7 @@ GEM
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.2.0)
fastlane (2.168.0)
fastlane (2.169.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
aws-sdk-s3 (~> 1.0)
Expand Down
6 changes: 3 additions & 3 deletions fastlane/Snapfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ devices([
# "iPhone 8", # 4.7-inch
# "iPhone 8 Plus", # 5.5-inch
# "iPhone 11 Pro", # 5.8-inch
# "iPhone 11 Pro Max", # 6.5-inch
"iPhone 11 Pro Max", # 6.5-inch
# "iPad Pro (9.7-inch)", # 9.7-inch
"iPad Pro (10.5-inch)", # 10.5-inch
# "iPad Pro (10.5-inch)", # 10.5-inch
# "iPad Pro (12.9-inch) (2nd generation)", # 12.9-inch
# "iPad Pro (11-inch) (2nd generation)", # 11-inch
# "iPad Pro (12.9-inch) (3rd generation)" # 12.9-inch
Expand All @@ -27,7 +27,7 @@ languages([
# "zh_Hans",
# "da",
# "nl_NL",
# "fr_FR",
"fr_FR",
# "de_DE",
# "id",
# "it",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/screenshots/fr-FR/iPhone 11 Pro Max-Image04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/screenshots/fr-FR/iPhone 11 Pro Max-Image05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/screenshots/id/iPad Pro (9.7-inch)-Image04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/screenshots/id/iPhone 11 Pro Max-Image04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/screenshots/id/iPhone 11 Pro Max-Image05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7,779 changes: 3,950 additions & 3,829 deletions fastlane/screenshots/screenshots.html

Large diffs are not rendered by default.

61 changes: 44 additions & 17 deletions piwigo/Albums/AlbumImagesViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ -(instancetype)initWithAlbumId:(NSInteger)albumId inCache:(BOOL)isCached
self.addButton.layer.masksToBounds = NO;
[self.addButton.layer setOpacity:0.0];
[self.addButton.layer setShadowOpacity:0.8];
[self.addButton.layer setShadowRadius:3.0];
[self.addButton.layer setShadowOffset:CGSizeMake(0.0, 0.5)];
self.addButton.backgroundColor = [UIColor piwigoColorOrange];
self.addButton.tintColor = [UIColor whiteColor];
self.addButton.showsTouchWhenHighlighted = YES;
Expand All @@ -192,8 +190,6 @@ -(instancetype)initWithAlbumId:(NSInteger)albumId inCache:(BOOL)isCached
self.uploadQueueButton.layer.cornerRadius = kRadius;
self.uploadQueueButton.layer.masksToBounds = NO;
[self.uploadQueueButton.layer setShadowOpacity:0.8];
[self.uploadQueueButton.layer setShadowRadius:3.0];
[self.uploadQueueButton.layer setShadowOffset:CGSizeMake(0.0, 0.5)];
self.uploadQueueButton.showsTouchWhenHighlighted = YES;
[self.uploadQueueButton addTarget:self action:@selector(didTapUploadQueueButton)
forControlEvents:UIControlEventTouchUpInside];
Expand Down Expand Up @@ -224,8 +220,6 @@ -(instancetype)initWithAlbumId:(NSInteger)albumId inCache:(BOOL)isCached
self.homeAlbumButton.layer.masksToBounds = NO;
[self.homeAlbumButton.layer setOpacity:0.0];
[self.homeAlbumButton.layer setShadowOpacity:0.8];
[self.homeAlbumButton.layer setShadowRadius:3.0];
[self.homeAlbumButton.layer setShadowOffset:CGSizeMake(0.0, 0.5)];
self.homeAlbumButton.showsTouchWhenHighlighted = YES;
[self.homeAlbumButton setImage:[UIImage imageNamed:@"rootAlbum"] forState:UIControlStateNormal];
[self.homeAlbumButton addTarget:self action:@selector(returnToDefaultCategory)
Expand All @@ -240,8 +234,6 @@ -(instancetype)initWithAlbumId:(NSInteger)albumId inCache:(BOOL)isCached
self.createAlbumButton.layer.masksToBounds = NO;
[self.createAlbumButton.layer setOpacity:0.0];
[self.createAlbumButton.layer setShadowOpacity:0.8];
[self.createAlbumButton.layer setShadowRadius:3.0];
[self.createAlbumButton.layer setShadowOffset:CGSizeMake(0.0, 0.5)];
self.createAlbumButton.backgroundColor = [UIColor piwigoColorOrange];
self.createAlbumButton.tintColor = [UIColor whiteColor];
self.createAlbumButton.showsTouchWhenHighlighted = YES;
Expand All @@ -259,8 +251,6 @@ -(instancetype)initWithAlbumId:(NSInteger)albumId inCache:(BOOL)isCached
self.uploadImagesButton.layer.masksToBounds = NO;
[self.uploadImagesButton.layer setOpacity:0.0];
[self.uploadImagesButton.layer setShadowOpacity:0.8];
[self.uploadImagesButton.layer setShadowRadius:3.0];
[self.uploadImagesButton.layer setShadowOffset:CGSizeMake(0.0, 0.5)];
self.uploadImagesButton.backgroundColor = [UIColor piwigoColorOrange];
self.uploadImagesButton.tintColor = [UIColor whiteColor];
self.uploadImagesButton.showsTouchWhenHighlighted = YES;
Expand Down Expand Up @@ -328,18 +318,50 @@ -(void)applyColorPalette
self.refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:NSLocalizedString(@"pullToRefresh", @"Reload Images") attributes:attributesRefresh];

// Buttons
[self.addButton.layer setShadowColor:[UIColor piwigoColorLeftLabel].CGColor];
[self.createAlbumButton.layer setShadowColor:[UIColor piwigoColorLeftLabel].CGColor];
[self.uploadImagesButton.layer setShadowColor:[UIColor piwigoColorLeftLabel].CGColor];
[self.homeAlbumButton.layer setShadowColor:[UIColor piwigoColorLeftLabel].CGColor];
[self.uploadQueueButton.layer setShadowColor:[UIColor piwigoColorLeftLabel].CGColor];
[self.addButton.layer setShadowColor:[UIColor piwigoColorShadow].CGColor];

[self.createAlbumButton.layer setShadowColor:[UIColor piwigoColorShadow].CGColor];
[self.uploadImagesButton.layer setShadowColor:[UIColor piwigoColorShadow].CGColor];

[self.uploadQueueButton.layer setShadowColor:[UIColor piwigoColorShadow].CGColor];
self.uploadQueueButton.backgroundColor = [UIColor piwigoColorRightLabel];
self.nberOfUploadsLabel.textColor = [UIColor piwigoColorBackground];
self.progressLayer.strokeColor = [[UIColor piwigoColorBackground] CGColor];

[self.homeAlbumButton.layer setShadowColor:[UIColor piwigoColorLeftLabel].CGColor];
self.homeAlbumButton.backgroundColor = [UIColor piwigoColorRightLabel];
self.homeAlbumButton.tintColor = [UIColor piwigoColorBackground];

if ([Model sharedInstance].isDarkPaletteActive) {
[self.addButton.layer setShadowRadius:1.0];
[self.addButton.layer setShadowOffset:CGSizeMake(0.0, 0.0)];

[self.createAlbumButton.layer setShadowRadius:1.0];
[self.createAlbumButton.layer setShadowOffset:CGSizeMake(0.0, 0.0)];
[self.uploadImagesButton.layer setShadowRadius:1.0];
[self.uploadImagesButton.layer setShadowOffset:CGSizeMake(0.0, 0.0)];

[self.uploadQueueButton.layer setShadowRadius:1.0];
[self.uploadQueueButton.layer setShadowOffset:CGSizeMake(0.0, 0.0)];

[self.homeAlbumButton.layer setShadowRadius:1.0];
[self.homeAlbumButton.layer setShadowOffset:CGSizeMake(0.0, 0.0)];
} else {
[self.addButton.layer setShadowRadius:3.0];
[self.addButton.layer setShadowOffset:CGSizeMake(0.0, 0.5)];

[self.createAlbumButton.layer setShadowRadius:3.0];
[self.createAlbumButton.layer setShadowOffset:CGSizeMake(0.0, 0.5)];
[self.uploadImagesButton.layer setShadowRadius:3.0];
[self.uploadImagesButton.layer setShadowOffset:CGSizeMake(0.0, 0.5)];

[self.uploadQueueButton.layer setShadowRadius:3.0];
[self.uploadQueueButton.layer setShadowOffset:CGSizeMake(0.0, 0.5)];

[self.homeAlbumButton.layer setShadowRadius:3.0];
[self.homeAlbumButton.layer setShadowOffset:CGSizeMake(0.0, 0.5)];
}

// Navigation bar appearence
NSDictionary *attributes = @{
NSForegroundColorAttributeName: [UIColor piwigoColorWhiteCream],
Expand Down Expand Up @@ -880,8 +902,12 @@ -(void)didCancelTapAddButton
-(void)showHomeAlbumButtonIfNeeded
{
// Present Home Album button if needed
if ((self.homeAlbumButton.isHidden) ||
CGRectContainsPoint(self.homeAlbumButton.frame, self.addButton.frame.origin))
if ((self.homeAlbumButton.isHidden ||
CGRectContainsPoint(self.homeAlbumButton.frame, self.addButton.frame.origin)) &&
(self.uploadImagesButton.isHidden ||
CGRectContainsPoint(self.uploadImagesButton.frame, self.addButton.frame.origin)) &&
(self.createAlbumButton.isHidden ||
CGRectContainsPoint(self.createAlbumButton.frame, self.addButton.frame.origin)))
{
// Unhide transparent Home Album button
[self.homeAlbumButton setHidden:NO];
Expand Down Expand Up @@ -942,6 +968,7 @@ -(void)updateNberOfUploads:(NSNotification *)notification
[path addLineToPoint:CGPointMake(kRadius, 2*kRadius-1.5f)];
[path addArcWithCenter:CGPointMake(kRadius, kRadius) radius:(kRadius-1.5f) startAngle:M_PI_2 endAngle:M_PI+M_PI_2 clockwise:YES];
[path addLineToPoint:CGPointMake(kRadius + extraWidth, 1.5f)];
[path setLineCapStyle:kCGLineCapRound];
self.progressLayer.path = [path CGPath];

// Show button if needed
Expand Down
1 change: 1 addition & 0 deletions piwigo/Data Cache/Locations Data/LocationsProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class LocationsProvider: NSObject {
override init() {
// Prepare list of operations
queue.maxConcurrentOperationCount = 1 // Make it a serial queue
queue.qualityOfService = .background // fetch location names in the background
// Initialise locations in queue
queuedLocations = []
}
Expand Down
28 changes: 2 additions & 26 deletions piwigo/Data Cache/Uploads Data/Upload.swift
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ struct UploadProperties
let localIdentifier: String // Unique PHAsset identifier
let category: Int // 8
let serverPath: String // URL path of Piwigo server
let serverFileTypes: String // File formats accepted by the server
var serverFileTypes: String // File formats accepted by the server
let requestDate: Date // "2020-08-22 19:18:43"
var requestState: kPiwigoUploadState // See enum above
var requestError: String?
Expand Down Expand Up @@ -422,31 +422,7 @@ extension UploadProperties {
defaultPrefix: Model.sharedInstance().defaultPrefix ?? "",
deleteImageAfterUpload: false)
}

// Update upload request state and error
func update(with state: kPiwigoUploadState, error: String?) -> UploadProperties {
return UploadProperties.init(localIdentifier: self.localIdentifier,
// Category ID of the album to upload to
category: self.category,
// Server parameters
serverPath: self.serverPath, serverFileTypes: self.serverFileTypes,
// Upload request date is now and state is waiting
requestDate: self.requestDate, requestState: state, requestError: error,
// Photo creation date and filename
creationDate: self.creationDate, fileName: self.fileName,
mimeType: self.mimeType, md5Sum: self.md5Sum, isVideo: self.isVideo,
// Photo parameters
author: self.author, privacyLevel: self.privacyLevel,
imageTitle: self.imageTitle, comment: self.comment,
tagIds: self.tagIds, imageId: self.imageId,
// Upload settings
stripGPSdataOnUpload: self.stripGPSdataOnUpload,
resizeImageOnUpload: self.resizeImageOnUpload, photoResize: self.photoResize,
compressImageOnUpload: self.compressImageOnUpload, photoQuality: self.photoQuality,
prefixFileNameBeforeUpload: self.prefixFileNameBeforeUpload, defaultPrefix: self.defaultPrefix,
deleteImageAfterUpload: self.deleteImageAfterUpload)
}


var stateLabel: String {
return requestState.stateInfo
}
Expand Down
Loading

0 comments on commit 0ffcfaa

Please sign in to comment.