This repository has been archived by the owner on May 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added playlist button to URL Bar and Playlist tooltips.
Remove PlaylistToast completely. Fixed Playlist URL Bar Icon display when switching tabs and when playlist items are detected. Add Playlist Menu. Dismiss menu properly. Fixing glitch where web-view is somehow not removed when the tab is killed. Integrated above readermode. Adding ability to detect media element's information based on tagId. Open playlist item at current time offset from page view offset. Fixed reader-mode button state and playlist url bar not updating when switching tabs (sometimes). Fixed onboarding bug to show automatically. Show popover after adding to playlist automatically. Added back toast! Fixing page detection for some iFrames. Addressed Feedback Fix when closing a blank tab it destroys playlist url bar button. Finished playback where left off fixes. Hide the menu badge when the item is in the playlist.
- Loading branch information
Showing
34 changed files
with
1,139 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright 2021 The Brave Authors. All rights reserved. | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
// A class for scaling font based on size category and accessibility | ||
// The font will scale depending on size of your view and accessibility settings | ||
struct ScaledFont: ViewModifier { | ||
@Environment(\.sizeCategory) | ||
var sizeCategory | ||
|
||
var size: CGFloat | ||
var weight: Font.Weight | ||
var design: Font.Design | ||
|
||
func body(content: Content) -> some View { | ||
let scaledSize = UIFontMetrics.default.scaledValue(for: size) | ||
return content.font(.system(size: scaledSize, weight: weight, design: design)) | ||
} | ||
} | ||
|
||
// Extension so font scaling can be used on `View` as a modifier. | ||
extension View { | ||
func scaledFont(size: CGFloat, weight: Font.Weight = .regular, design: Font.Design = .default) -> some View { | ||
return self.modifier(ScaledFont(size: size, weight: weight, design: design)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
Client/Assets/Images.xcassets/Playlist/playlist_toolbar_add_button.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+379 Bytes
...sets/Images.xcassets/Playlist/playlist_toolbar_add_button.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+375 Bytes
...sets/Images.xcassets/Playlist/playlist_toolbar_add_button.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.