-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bump version * Clean code (#393) * Mac os version (#395) * wip mac os version * Build on macos * WIP Webview * Update app icon Refacto routing * Move folder * Image list * Change badge update * Arrange entry view menu * Add refresh command * Add app Sandbox for macos + first build on macos * Fix #397 * Fix macos build * Try fix app icon * Rework toolbar entry * Fix logo * Add test on serverViewModel * Update refresh button * Clean file + clean Picker * Fix progress view * Fix delete entry on ipad fix #389 * Swiftformat * Add swipe to back fix #356 * enhance bottom button tap fix #400 * Add dismiss action in entry view fix #338 * Add sorting options only on id fix #71 * Add progress
- Loading branch information
Showing
219 changed files
with
2,023 additions
and
4,412 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5.5 | ||
5.8 |
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,25 @@ | ||
#if os(iOS) | ||
import UIKit | ||
|
||
final class AppDelegate: UIResponder, UIApplicationDelegate { | ||
var window: UIWindow? | ||
|
||
func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | ||
#if DEBUG | ||
let args = ProcessInfo.processInfo.arguments | ||
|
||
if args.contains("POPULATE_APPLICATION") { | ||
populateApplication() | ||
} | ||
#endif | ||
|
||
return true | ||
} | ||
|
||
func applicationDidFinishLaunching(_: UIApplication) { | ||
UIApplication.shared.beginReceivingRemoteControlEvents() | ||
} | ||
|
||
func applicationWillTerminate(_: UIApplication) {} | ||
} | ||
#endif |
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,74 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "logo-icon-bg-white-lg.jpg", | ||
"idiom" : "universal", | ||
"platform" : "ios", | ||
"size" : "1024x1024" | ||
}, | ||
{ | ||
"filename" : "mac16.png", | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "16x16" | ||
}, | ||
{ | ||
"filename" : "mac32.png", | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "16x16" | ||
}, | ||
{ | ||
"filename" : "mac32.png", | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "32x32" | ||
}, | ||
{ | ||
"filename" : "mac64.png", | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "32x32" | ||
}, | ||
{ | ||
"filename" : "mac128.png", | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "128x128" | ||
}, | ||
{ | ||
"filename" : "mac256.png", | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "128x128" | ||
}, | ||
{ | ||
"filename" : "mac256.png", | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "256x256" | ||
}, | ||
{ | ||
"filename" : "mac512.png", | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "256x256" | ||
}, | ||
{ | ||
"filename" : "mac512.png", | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "512x512" | ||
}, | ||
{ | ||
"filename" : "mac1024.png", | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "512x512" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
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.
File renamed without changes.
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" : [ | ||
{ | ||
"filename" : "logo-icon-black-no-bg-lg.png", | ||
"idiom" : "universal" | ||
}, | ||
{ | ||
"appearances" : [ | ||
{ | ||
"appearance" : "luminosity", | ||
"value" : "dark" | ||
} | ||
], | ||
"filename" : "logo-icon-white-no-bg-lg.png", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,58 @@ | ||
#if os(iOS) | ||
import CoreData | ||
import Factory | ||
import Foundation | ||
import SharedLib | ||
import UIKit | ||
|
||
#if DEBUG | ||
// swiftlint:disable line_length | ||
extension AppDelegate { | ||
func populateApplication() { | ||
resetApplication() | ||
|
||
let appState = Container.shared.appState() | ||
appState.registred = true | ||
WallabagUserDefaults.defaultMode = "allArticles" | ||
WallabagUserDefaults.badgeEnabled = false | ||
|
||
let context = Container.shared.coreData().viewContext | ||
|
||
let entry = Entry(context: context) | ||
entry.title = "Marc Zuckerberg devrait être passible d'une peine de prison pour mensonges répétés au sujet de la protection de la vie privée des utilisateurs Facebook, d'après le sénateur américain Ron Wyden" | ||
entry.url = "https://www.developpez.com/actu/275880/Marc-Zuckerberg-devrait-etre-passible-d-une-peine-de-prison-pour-mensonges-repetes-au-sujet-de-la-protection-de-la-vie-privee-des-utilisateurs-Facebook-d-apres-le-senateur-americain-Ron-Wyden/" | ||
entry.previewPicture = "https://www.developpez.com/images/logos/mark-zuckerberg.png" | ||
entry.content = """ | ||
<img src="https://www.developpez.com/images/logos/mark-zuckerberg.png" class="c13" referrerpolicy="no-referrer" alt="image" /> La société Facebook est depuis quelque temps très critiquée sur la manière avec laquelle elle manipule les données de ses utilisateurs et les nombreux scandales comme celui de cambridge analytica, n’améliorent pas l’image de l’entreprise. D’ailleurs, après l'épisode de Cambridge Analytica, la société a reconnu plusieurs autres cas de manquements à la vie privée, dont celui d'admettre qu'elle avait mal géré les mots de passe d'utilisateurs sur Instagram. Bien que l’entreprise Facebook soit déjà sous le coup d’une <a href="https://www.developpez.com/actu/271222/La-FTC-inflige-une-amende-de-5-milliards-de-dollars-a-Facebook-et-apporte-des-clauses-qui-reduisent-considerablement-le-pouvoir-de-Mark-Zuckerberg/" target="_blank">amende de 5 milliards de dollars</a>, cela semble ne pas être suffisant pour certains qui estiment que les dirigeants devraient eux aussi être poursuivis en justice. | ||
<p>En effet, un projet de loi présenté en 2018 par le sénateur Ron Wyden, donne à la FTC le pouvoir de sévir plus sévèrement contre les entreprises qui violent la vie privée des consommateurs. Selon le projet de loi, les dirigeants pourraient être condamnés à 20 ans de prison et à une amende de 5 millions de dollars. Et c’est dans ce sens que le sénateur Ron Wyden s’est exprimé lors d’une récente Interview qui portait sur l'article 230 de ce projet de loi, sur l'impact de cette législation et sur les conséquences néfastes, notamment le fait que Facebook utilisait cette législation à son avantage.</p><p>Au cours de cette interview, il a déclaré : « Mark Zuckerberg a menti à plusieurs reprises au peuple américain au sujet de la vie privée. Je pense qu'il devrait être tenu personnellement pour responsable, ce qui devrait entraîner des amendes financières et laissez-moi souligner également la possibilité d'une peine de prison parce qu'il a blessé beaucoup de gens ». Wyden a aussi mentionné le fait qu’il existait un précédent dans ce genre de cas : dans les services financiers, si le PDG et les dirigeants mentent au sujet des données financières, ils peuvent être tenus personnellement pour responsables.</p> | ||
<div class="c14"><img src="https://www.developpez.net/forums/attachments/p501331d1/a/a/a" referrerpolicy="no-referrer" alt="image" /></div> | ||
<br />Wyden n'est pas le premier législateur à proposer d'envoyer des cadres d’entreprises en prison. La sénatrice du Massachusetts, Elizabeth Warren, une candidate à la présidence de 2020 a dévoilé au début de cette année la loi sur la responsabilité des dirigeants d'entreprise, qui étend la responsabilité pénale aux dirigeants de toute société générant un chiffre d'affaires annuel supérieur à 1 milliard de dollars si cette société était reconnue coupable d'un crime ou d'une autre infraction civile. Malgré les souhaits de Wyden de voir Zuckerberg finir en prison, cela ne se produira probablement pas. C’est l’avis de Tim Gleason, un professeur de l’Université de l’Oregon, qui estime que les chances de Zuckerberg de faire face à une action criminelle sont plutôt minces. | ||
<p>Pendant ce temps, plusieurs personnes pensent qu’emprisonner Zuckerberg ne réglera pas le problème, car il sera juste remplacé par quelqu'un d'autre qui fera pareil que lui. Ces personnes estiment qu’il serait peut-être plus judicieux de lui imposer une très grosse amende, qui servira à financer des œuvres sociales. Pour ces personnes, il est inutile de combattre ces milliardaires de cette façon, il faudrait plutôt utiliser leur cupidité contre eux.</p> | ||
<p>Source : <a href="https://www.wweek.com/news/2019/08/28/ron-wyden-doesnt-apologize-for-helping-build-the-internet-but-hes-interested-in-sending-mark-zuckerberg-to-prison/" target="_blank">Willamette Week</a></p> | ||
<p><strong>Et vous ?</strong></p> | ||
<p><img src="https://www.developpez.net/forums/images/smilies/fleche.gif" border="0" alt="" title=":fleche:" class="inlineimg" referrerpolicy="no-referrer" /> Qu’en pensez-vous ?<br /><img src="https://www.developpez.net/forums/images/smilies/fleche.gif" border="0" alt="" title=":fleche:" class="inlineimg" referrerpolicy="no-referrer" /> Pensez-vous que Zuckerberg sera finalement inquiété ?<br /><img src="https://www.developpez.net/forums/images/smilies/fleche.gif" border="0" alt="" title=":fleche:" class="inlineimg" referrerpolicy="no-referrer" /> Quelles mesures proposeriez-vous pour contraindre les entreprises à respecter la vie privée des utilisateurs ?</p> | ||
<p><strong>Voir aussi :</strong></p> | ||
<p><img src="https://www.developpez.net/forums/images/smilies/fleche.gif" border="0" alt="" title=":fleche:" class="inlineimg" referrerpolicy="no-referrer" /><a href="https://www.developpez.com/actu/256658/Les-actionnaires-de-Facebook-en-ont-assez-de-Marc-Zuckerberg-mais-ne-peuvent-rien-faire-contre-lui-en-voici-les-raisons/" target="_blank">Les actionnaires de Facebook en ont assez de Marc Zuckerberg, mais ne peuvent rien faire contre lui, En voici les raisons</a><br /><img src="https://www.developpez.net/forums/images/smilies/fleche.gif" border="0" alt="" title=":fleche:" class="inlineimg" referrerpolicy="no-referrer" /><a href="https://www.developpez.com/actu/258769/Mark-Zuckerberg-ainsi-que-d-autres-cadres-dirigeants-de-Facebook-sont-poursuivis-en-justice-pour-les-scandales-lies-a-la-vie-privee/" target="_blank">Mark Zuckerberg ainsi que d'autres cadres dirigeants de Facebook sont poursuivis en justice Pour les scandales liés à la vie privée</a><br /><img src="https://www.developpez.net/forums/images/smilies/fleche.gif" border="0" alt="" title=":fleche:" class="inlineimg" referrerpolicy="no-referrer" /><a href="https://www.developpez.com/actu/224572/Mark-Zuckerberg-devrait-vendre-jusqu-a-13-Md-d-actions-Facebook-d-ici-mars-2019-pour-financer-les-actions-philanthropiques-de-sa-fondation-CZI/" target="_blank">Mark Zuckerberg devrait vendre jusqu'à 13 Md$ d'actions Facebook d'ici mars 2019 Pour financer les actions philanthropiques de sa fondation CZI</a></p> | ||
""" | ||
} | ||
|
||
private func resetApplication() { | ||
do { | ||
// MARK: CoreData | ||
|
||
let context = Container.shared.coreData().viewContext | ||
let operations = NSBatchDeleteRequest(fetchRequest: Entry.fetchRequest()) | ||
try context.execute(operations) | ||
|
||
let accounts = NSBatchDeleteRequest(fetchRequest: Tag.fetchRequest()) | ||
try context.execute(accounts) | ||
|
||
try context.save() | ||
} catch { | ||
print("error resetting app") | ||
} | ||
} | ||
} | ||
#endif | ||
|
||
#endif |
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,14 @@ | ||
import SwiftUI | ||
|
||
extension View { | ||
func addSwipeToBack(action: @escaping () -> Void) -> some View { | ||
gesture( | ||
DragGesture() | ||
.onEnded { gesture in | ||
if gesture.startLocation.x < 50, gesture.translation.width > 80 { | ||
action() | ||
} | ||
} | ||
) | ||
} | ||
} |
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
File renamed without changes.
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,43 @@ | ||
import CoreData | ||
import Foundation | ||
import SwiftUI | ||
|
||
struct EntriesListView: View { | ||
@Environment(\.managedObjectContext) var context: NSManagedObjectContext | ||
@EnvironmentObject var appSync: AppSync | ||
@FetchRequest var entries: FetchedResults<Entry> | ||
|
||
init(predicate: NSPredicate, entriesSortAscending: Bool) { | ||
_entries = FetchRequest( | ||
entity: Entry.entity(), | ||
sortDescriptors: [NSSortDescriptor(key: "id", ascending: entriesSortAscending)], | ||
predicate: predicate, animation: nil | ||
) | ||
} | ||
|
||
var body: some View { | ||
List { | ||
ForEach(entries) { entry in | ||
NavigationLink(value: RoutePath.entry(entry)) { | ||
EntryRowView(entry: entry) | ||
.contentShape(Rectangle()) | ||
.contextMenu { | ||
ArchiveEntryButton(entry: entry) | ||
StarEntryButton(entry: entry) | ||
} | ||
} | ||
.buttonStyle(.plain) | ||
.swipeActions(allowsFullSwipe: false, content: { | ||
ArchiveEntryButton(entry: entry) | ||
.tint(.blue) | ||
.labelStyle(.iconOnly) | ||
StarEntryButton(entry: entry) | ||
.tint(.orange) | ||
.labelStyle(.iconOnly) | ||
}) | ||
} | ||
} | ||
.refreshable { appSync.requestSync() } | ||
.listStyle(.inset) | ||
} | ||
} |
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,78 @@ | ||
import Combine | ||
import CoreData | ||
import SwiftUI | ||
|
||
struct EntriesView: View { | ||
@EnvironmentObject var router: Router | ||
@EnvironmentObject var appState: AppState | ||
@StateObject var searchViewModel = SearchViewModel() | ||
@State var entriesSortAscending = false | ||
|
||
var body: some View { | ||
VStack { | ||
#if os(iOS) | ||
PasteBoardView() | ||
#endif | ||
SearchView(searchViewModel: searchViewModel) | ||
EntriesListView(predicate: searchViewModel.predicate, entriesSortAscending: entriesSortAscending) | ||
} | ||
.toolbar { | ||
ToolbarItem(placement: .navigationBarTrailing) { | ||
HStack { | ||
Button(action: { | ||
entriesSortAscending.toggle() | ||
}, label: { | ||
Image(systemName: "line.3.horizontal.decrease.circle") | ||
.rotationEffect(.degrees(entriesSortAscending ? 180 : 0)) | ||
}) | ||
RefreshButton() | ||
} | ||
} | ||
ToolbarItem(placement: .navigationBarLeading) { | ||
Menu(content: { | ||
Button(action: { | ||
router.path.append(RoutePath.addEntry) | ||
}, label: { | ||
Label("Add entry", systemImage: "tray.and.arrow.down") | ||
}) | ||
Button(action: { | ||
router.path.append(RoutePath.about) | ||
}, label: { | ||
Label("About", systemImage: "questionmark") | ||
}) | ||
Button(action: { | ||
router.path.append(RoutePath.tips) | ||
}, label: { | ||
Label("Don", systemImage: "heart") | ||
}) | ||
Divider() | ||
Button(action: { | ||
router.path.append(RoutePath.setting) | ||
}, label: { | ||
Label("Setting", systemImage: "gear") | ||
}) | ||
Divider() | ||
Button(role: .destructive, action: { | ||
appState.logout() | ||
}, label: { | ||
Label("Logout", systemImage: "person") | ||
}).foregroundColor(.red) | ||
}, label: { | ||
Label("Menu", systemImage: "list.bullet") | ||
}) | ||
} | ||
} | ||
.navigationTitle("Entries") | ||
} | ||
} | ||
|
||
#if DEBUG | ||
struct ArticleListView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
EntriesView() | ||
#if os(iOS) | ||
.environmentObject(PasteBoardViewModel()) | ||
#endif | ||
} | ||
} | ||
#endif |
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
Oops, something went wrong.