Commit Graph

448 Commits

Author SHA1 Message Date
Angelo Stavrow
0bde76c7d8
Check for http OR https on login when logging in 2020-09-25 10:55:42 -04:00
Angelo Stavrow
f686b6fb76
Add secure protocol to server string if it's missing 2020-09-24 16:49:09 -04:00
Angelo Stavrow
8e4957a389
Delete blank/untouched local draft from store when leaving editor 2020-09-24 16:17:56 -04:00
Angelo Stavrow
a0dfe880a6
Merge branch 'set-default-font' into local-posts-present-remote-deletion-prompt 2020-09-24 15:15:32 -04:00
Angelo Stavrow
ce409486d4
Move lastDraft-setting logic to ContentView.onAppear handler 2020-09-24 14:14:35 -04:00
Angelo Stavrow
44fd09aa33
Clear lastDraft if selectedPost has published status 2020-09-24 14:13:32 -04:00
Angelo Stavrow
5bcd3185bf
Dispatch setting of selectedPost to the main thread 2020-09-23 16:40:07 -04:00
Angelo Stavrow
bc77fa14af
On launch, either restore lastDraft or go to new blank post 2020-09-23 16:15:08 -04:00
Angelo Stavrow
9daf553391
Set and unset lastDraft based on selectedPost 2020-09-23 15:36:54 -04:00
Angelo Stavrow
903ea78a27
Add PostEditorModel struct 2020-09-23 14:39:43 -04:00
Angelo Stavrow
10fc24d66a
Split PostEditorView into iOS and macOS counterparts 2020-09-22 16:18:00 -04:00
Angelo Stavrow
386a732548
Add placeholder text to post editor 2020-09-22 11:53:54 -04:00
Angelo Stavrow
70b6064641
Hide the iOS keyboard when the publish button is tapped 2020-09-22 10:37:31 -04:00
Angelo Stavrow
a76e70276a
Move View+Keyboard extension to /iOS/Extensions 2020-09-22 10:26:59 -04:00
Angelo Stavrow
9de53d828f
Use inline navigationBarTitleDisplayMode with transparent appearance 2020-09-21 16:15:16 -04:00
Angelo Stavrow
65edd393d3
Change title edit control from TextEditor to TextField 2020-09-21 16:02:43 -04:00
Angelo Stavrow
0dbd47537c
Move PostEditorStatusToolbarView from .status to .principal placement 2020-09-21 14:17:56 -04:00
Angelo Stavrow
148deaf911
Filter out local posts from postsToDelete array 2020-09-21 11:51:32 -04:00
Angelo Stavrow
4c9f5d3348
Exclude local posts from showing remote-copy-deleted prompt 2020-09-21 11:45:36 -04:00
Angelo Stavrow
c0c61f311f
Add OS acknowledgements to iOS app 2020-09-18 15:33:04 -04:00
Angelo Stavrow
05709ee31a
Add font licenses to project 2020-09-18 14:01:22 -04:00
Angelo Stavrow
58e2aff6d7
Set custom font based on post's appearance property 2020-09-18 12:10:01 -04:00
Angelo Stavrow
c4c36eeed7
Set default new-post font from preferences view 2020-09-18 11:40:06 -04:00
Angelo Stavrow
2f4d4b8e73
Save and load default font in UserDefaults 2020-09-18 11:01:04 -04:00
Angelo Stavrow
41eba71e39
Add font files to project 2020-09-18 10:59:59 -04:00
Angelo Stavrow
8addc1fc5d
Show message if remote copy was delete from server 2020-09-17 14:33:21 -04:00
Angelo Stavrow
2caa1e80b0
Add wasDeletedFromServer flag to WFAPost entity 2020-09-17 14:31:45 -04:00
Angelo Stavrow
5af1d38a2d
Present alert on macOS if using Edit > Delete as confirmation 2020-09-17 13:23:44 -04:00
Angelo Stavrow
3b4f50c601
Add Edit > Delete menu command on macOS 2020-09-17 11:42:21 -04:00
Angelo Stavrow
77262c9cd6
Disable swipe-to-delete for non-local posts 2020-09-17 11:29:24 -04:00
Angelo Stavrow
edec5e9087
Delete local post via swipe 2020-09-17 11:29:24 -04:00
Angelo Stavrow
d7a6668917
Disable publish and reload buttons based on network connection status 2020-09-16 16:40:17 -04:00
Angelo Stavrow
52335d5d48
Add hasNetworkConnection published property to WriteFreelyMonitor 2020-09-16 16:39:01 -04:00
Angelo Stavrow
f555d96bcd
Disable publish button on published posts or if logged out 2020-09-16 16:07:47 -04:00
Angelo Stavrow
8695a8fe4a
Hide everything but "All Posts" in CollectionListView if logged out 2020-09-16 14:45:11 -04:00
Angelo Stavrow
83acb6e832
Show server host or "WriteFreely" in CollectionListView per login state 2020-09-16 14:44:39 -04:00
Angelo Stavrow
7ae7c57442
Double-check that post language and rtl property are set on publishing 2020-09-16 13:47:30 -04:00
Angelo Stavrow
c9df320ddd
Set language and rtl based on current system Locale 2020-09-16 13:44:52 -04:00
Angelo Stavrow
2e4079b29b
Add Bundle extension for fetch Info.plist values 2020-09-16 12:45:49 -04:00
Angelo Stavrow
0cbac1bdb5
Add help URL constant to WriteFreelyModel 2020-09-16 11:34:11 -04:00
Angelo Stavrow
7fd7b43755
Set new local post as selectedPost in WriteFreelyModel 2020-09-15 12:03:34 -04:00
Angelo Stavrow
669990d532
Update Mac app icon 2020-09-14 15:30:10 -04:00
Angelo Stavrow
43c3a47dfd
Update asset catalog for TestFlight requirements 2020-09-14 09:27:07 -04:00
Angelo Stavrow
855aff2eb9
Add app icons 2020-09-11 16:30:58 -04:00
Angelo Stavrow
6ea10fb434
Move sheet modifier outside of NavigationView 2020-09-11 13:55:29 -04:00
Angelo Stavrow
322e9e9af5
Add isPresentingSettingsView flag to WriteFreelyModel for iOS 2020-09-11 13:54:41 -04:00
Angelo Stavrow
bc7ac18a7e
Extend NSManagedObjectContext to update context after batch delete 2020-09-10 14:08:29 -04:00
Angelo Stavrow
089a12dcb2
Ensure we don't nil out the collection alias on updating from server 2020-09-10 12:30:02 -04:00
Angelo Stavrow
a20b2911b7
Save managed object context before publishing a local post 2020-09-10 12:29:24 -04:00
Angelo Stavrow
614d5fa72c
Set collection alias for new local drafts if it exists 2020-09-10 10:12:52 -04:00
Angelo Stavrow
c6f108c172
Clean up imports on PostListModel 2020-09-10 10:10:46 -04:00
Angelo Stavrow
18b6d0729f
Move UserCollection persistence handling to LocalStorageManager 2020-09-10 10:07:59 -04:00
Angelo Stavrow
dad0fef7f1
Rename PersistenceManager to LocalStorageManager 2020-09-09 14:19:40 -04:00
Angelo Stavrow
bb3a7c3c74
Remove unused models for posts and collections 2020-09-09 13:52:23 -04:00
Angelo Stavrow
562e3c6a8a
Make sure we persist changes to edited AND local posts 2020-09-09 12:40:31 -04:00
Angelo Stavrow
1baede6cdb
Save managed object context when going into background 2020-09-09 12:39:23 -04:00
Angelo Stavrow
e8d52b4b69
Update SwiftUI previews 2020-09-09 12:12:19 -04:00
Angelo Stavrow
d7167bc72a
Fix clearUserCollections bug 2020-09-09 10:59:44 -04:00
Angelo Stavrow
300d4f30b4
Use FetchedResults<WFAPost> for filtering the post list 2020-09-09 10:56:23 -04:00
Angelo Stavrow
3f21ff7e4a
Don't set post status to edited if we're just replacing the local copy 2020-09-09 10:02:55 -04:00
Angelo Stavrow
12723fbaea
Restore updateFromServer functionality when remote copy is newer 2020-09-08 17:29:55 -04:00
Angelo Stavrow
ca8e74b2dc
Replace Post type with WFAPost managed object 2020-09-08 16:17:58 -04:00
Angelo Stavrow
6728e20821
Rename PostStore to PostListModel and move to PostList group 2020-09-08 11:29:13 -04:00
Angelo Stavrow
169e3684a6
Extract PostStatus enum to own file and add raw Int32 values 2020-09-08 11:27:57 -04:00
Angelo Stavrow
5436764e4f
Add new local draft to local store 2020-09-08 10:34:20 -04:00
Angelo Stavrow
b2c503497d
Fix rebasing errors 2020-09-08 10:12:55 -04:00
Angelo Stavrow
9dd149c59d
Fetch user posts into CoreData on launch, purge from database on logout 2020-09-08 09:57:05 -04:00
Angelo Stavrow
3bdc08f067
Add WFAPost NSManagedObject class for local storage 2020-09-08 09:57:05 -04:00
Angelo Stavrow
e8301b7eb4
Add "All Posts" grouping back to CollectionListView 2020-09-08 09:57:05 -04:00
Angelo Stavrow
0887638841
Load user collections from cache on launch, wipe from database on logout 2020-09-08 09:57:05 -04:00
Angelo Stavrow
8e035a43cb
Fetch user collections into CoreData and list from ManagedObjectContext 2020-09-08 09:55:43 -04:00
Angelo Stavrow
bac7d9bfb0
Add preprocessor for macOS vs iOS import 2020-09-08 09:54:58 -04:00
Angelo Stavrow
f235a0c2d0
Add uniqueness constraint on alias, remove views attribute 2020-09-08 09:54:58 -04:00
Angelo Stavrow
09d1d76d47
Add saveContext method to PersistenceManager, clean up warnings 2020-09-08 09:54:58 -04:00
Angelo Stavrow
2bb47845a5
Add WFACollection NSManagedObject class for local storage 2020-09-08 09:54:58 -04:00
Angelo Stavrow
4c626e33ea
Add PersistenceManager for loading CoreData container 2020-09-08 09:54:58 -04:00
Angelo Stavrow
9b733279a7
Add CoreData model file for local storage 2020-09-08 09:54:58 -04:00
Angelo Stavrow
3751118f6e
Merge pull request #32 from writeas/reload-from-server
Implement reload-from-server
2020-09-08 09:15:37 -04:00
Angelo Stavrow
82056733cb
Refactor status toolbar out of PostEditorView and fix macOS build error 2020-09-01 15:00:20 -04:00
Angelo Stavrow
bc8ae19dab
Update "drafts" references in code to "local drafts" 2020-09-01 09:59:36 -04:00
Angelo Stavrow
3c26829407
Rename "draft" status to "local" 2020-09-01 09:54:43 -04:00
Angelo Stavrow
afa026dc57
Show outdated-content message in editor and prompt to replace local copy 2020-08-31 16:39:13 -04:00
Angelo Stavrow
16b16dbd52
Add single-post updateFromServer API to WriteFreelyModel 2020-08-31 16:38:35 -04:00
Angelo Stavrow
b21cef6a54
Update user content on launch if logged in 2020-08-31 16:37:55 -04:00
Angelo Stavrow
4ae66e1585
Add PostStore method to update post's WFPost property 2020-08-31 16:36:41 -04:00
Angelo Stavrow
30b527daa4
Add selectedPost published property to WF model 2020-08-31 16:35:45 -04:00
Angelo Stavrow
45b6fb533c
Restore the WFClient when the WriteFreely model initializes 2020-08-31 11:24:38 -04:00
Angelo Stavrow
07d306a196
Show message in editor if post hasNewerRemoteCopy 2020-08-28 09:07:33 -04:00
Angelo Stavrow
a3fe7630e8
Remove unnecessary alert because we don't clobber data anymore 2020-08-27 17:41:41 -04:00
Angelo Stavrow
5c08a9e723
Update store with fetched posts by setting hasNewerRemoteCopy flag 2020-08-27 17:41:13 -04:00
Angelo Stavrow
201cc27162
Update post in store async to avoid bad access error 2020-08-27 17:40:05 -04:00
Angelo Stavrow
00373e5a80
Don't purge local posts indiscriminately 2020-08-27 15:43:54 -04:00
Angelo Stavrow
66790e7933
Add hasNewerRemoteCopy flag to the Post type 2020-08-27 15:32:40 -04:00
Angelo Stavrow
4a7b1a5355
Write Post's updatedDate when the PostEditorView is deallocated 2020-08-27 15:27:30 -04:00
Angelo Stavrow
68607478a3
Clean up some rebase mixups 2020-08-27 12:17:42 -04:00
Angelo Stavrow
ee0f72b5ef
Implement reload from server on iOS 2020-08-27 12:02:35 -04:00
Angelo Stavrow
978192201d
Implement reload from server on Mac 2020-08-27 12:02:35 -04:00
Angelo Stavrow
e3ed0831e6
Rename store purge method to purgeAllPosts and add purgeRemotePosts 2020-08-27 12:02:35 -04:00
Angelo Stavrow
cb791d137c
Remove redundant Post properties 2020-08-27 12:02:12 -04:00
Angelo Stavrow
67d78bfc8d
Set the wfPost property when creating a Post from a fetched WFPost 2020-08-27 12:00:16 -04:00
Angelo Stavrow
ff99c352d8
Add convenience initializer to create Post type from WFPost 2020-08-27 11:58:47 -04:00
Angelo Stavrow
ccd73a517e
Add WFPost property to Post type 2020-08-27 11:58:26 -04:00
Angelo Stavrow
d651776322
Use Post.wfPost properties instead of redundant Post properties 2020-08-27 11:47:30 -04:00
Angelo Stavrow
a97bd5abb7
Use optional unwrapping and wfPost properties in publish API/handler 2020-08-27 11:47:30 -04:00
Angelo Stavrow
072e60c918
Remove redundant Post properties 2020-08-27 11:47:30 -04:00
Angelo Stavrow
05456ad501
Set the wfPost property when creating a Post from a fetched WFPost 2020-08-27 11:46:20 -04:00
Angelo Stavrow
ed8c2dc105
Add convenience initializer to create Post type from WFPost 2020-08-27 11:42:25 -04:00
Angelo Stavrow
cc6fb776b6
Enhance publish method on API for updating published posts 2020-08-27 11:39:48 -04:00
Angelo Stavrow
62a2de6cad
Add publish to API with handler for new local drafts 2020-08-27 11:39:48 -04:00
Angelo Stavrow
904bd0f0f5
Set the wfPost property when creating a Post from a fetched WFPost 2020-08-27 11:39:48 -04:00
Angelo Stavrow
3dca0335dd
Remove unused published property from WriteFreelyModel object 2020-08-27 11:39:48 -04:00
Angelo Stavrow
beda0d711a
Do not pre-populate app with debug post data 2020-08-27 11:29:54 -04:00
Angelo Stavrow
49d8b35bb6
Get SwiftUI previews working with debug data 2020-08-27 11:29:54 -04:00
Angelo Stavrow
ecef8672e3
Fetch user posts on login, purge from store on logout 2020-08-27 11:29:54 -04:00
Angelo Stavrow
0dcbcc602d
Add fetchUserPosts to API with handler 2020-08-27 10:41:26 -04:00
Angelo Stavrow
d371f5104b
Add convenience initializer to create Post type from WFPost 2020-08-27 10:41:26 -04:00
Angelo Stavrow
e2e38b22cd
Add WFPost property to Post type 2020-08-27 10:41:26 -04:00
Angelo Stavrow
fe188695a3
Merge branch 'main' into fetch-collections-on-login 2020-08-27 10:08:42 -04:00
Angelo Stavrow
e4a21361ae
Merge branch 'main' into persist-token-to-keychain 2020-08-27 09:25:36 -04:00
Angelo Stavrow
c14a03a332
Get SwiftUI previews working with debug data 2020-08-25 11:40:30 -04:00
Angelo Stavrow
21e8a4ca35
Clear user collections on logout 2020-08-25 11:29:17 -04:00
Angelo Stavrow
18ce54bd89
Use WriteFreelyModel EnvironmentObject in CollectionListView 2020-08-25 11:28:52 -04:00
Angelo Stavrow
72319b1d6f
Fetch user collections on login 2020-08-25 11:28:06 -04:00
Angelo Stavrow
eebbf1a909
Convert CollectionListModel to ObservableObject 2020-08-25 11:27:15 -04:00
Angelo Stavrow
f118d58d5c
Add WFCollection property to PostCollection type 2020-08-25 11:25:56 -04:00
Angelo Stavrow
20d8ecc80f
Persist logged-in settings for account and server in UserDefaults 2020-08-24 16:53:01 -04:00
Angelo Stavrow
2652eceb12
Persist logged-in state in UserDefaults between app launches 2020-08-24 15:21:46 -04:00
Angelo Stavrow
b478cc9805
Save to Keychain on login, purge from Keychain on logout 2020-08-24 14:47:27 -04:00
Angelo Stavrow
f254c04a61
Add helper functions for adding to/fetching and deleting from Keychain 2020-08-24 14:45:52 -04:00
Angelo Stavrow
1cc9ae8c44
Restore colorScheme on launch based on UserDefaults 2020-08-24 10:12:48 -04:00
Angelo Stavrow
a28947aaa4
Store chosen colorScheme in UserDefaults 2020-08-24 10:11:58 -04:00
Angelo Stavrow
7c649b6947
Clean up function signatures 2020-08-24 09:32:09 -04:00
Angelo Stavrow
169a1e91de
Catch WFError directly in login/logout handlers 2020-08-20 11:41:09 -04:00
Angelo Stavrow
970f4ae3e1
Implement login/logout functionality 2020-08-19 16:36:07 -04:00
Angelo Stavrow
2a9bd66fa2
Present login-error alert on AccountModel.hasError 2020-08-19 16:35:20 -04:00
Angelo Stavrow
229dbbb37d
Use AccountError localizedDescriptions in login-error alert messages 2020-08-19 16:34:36 -04:00
Angelo Stavrow
1bdd918931
Add localizedError description to AccountError cases 2020-08-19 16:33:16 -04:00
Angelo Stavrow
0a14421122
Disable login button if AccountLoginView fields are empty 2020-08-19 10:10:36 -04:00
Angelo Stavrow
0c20fea0e6
Refactor login/logout to implement WriteFreely package 2020-08-18 17:21:00 -04:00
Angelo Stavrow
d402ccd472
Add WriteFreelyModel to publish PostStore and Account/Preference models 2020-08-18 17:21:00 -04:00
Angelo Stavrow
49ea70e0a6
Clean up unnecessary AccountLoginView previews 2020-08-17 16:45:02 -04:00
Angelo Stavrow
cff4d02ef4
Make isPresentingSettings State property private, iOS-only 2020-08-17 15:51:07 -04:00
Angelo Stavrow
84e854b4ab
Refactor viewmodel code from PostCollection into CollectionListModel 2020-08-17 15:24:44 -04:00
Angelo Stavrow
ae8fd973c1
Move Post, PostCollection, and PostStore models to Models group 2020-08-17 14:45:47 -04:00
Angelo Stavrow
6e39c92071
Rename PostEditor to PostEditorView 2020-08-17 14:19:22 -04:00
Angelo Stavrow
ff82bbff77
Rename Post group to PostList 2020-08-17 14:19:22 -04:00
Angelo Stavrow
6d1f18e9d9
Move PostEditor out of Post group and into PostEditor group 2020-08-17 14:19:22 -04:00
Angelo Stavrow
8c0865b518
Rename PostList to PostListView 2020-08-17 14:19:22 -04:00
Angelo Stavrow
a88b58e624
Rename PostStatusBadge to PostStatusBadgeView 2020-08-17 14:19:22 -04:00
Angelo Stavrow
746ba954ec
Rename PostCell to PostCellView 2020-08-17 14:19:22 -04:00
Angelo Stavrow
3384a972b0
Change Result/Failure logic to match new AccountError cases 2020-08-17 13:31:20 -04:00
Angelo Stavrow
a56da3c07b
Fit test data to real-world username format 2020-08-17 13:30:29 -04:00
Angelo Stavrow
0c208fb063
Show alert if the username is not found 2020-08-17 13:30:03 -04:00
Angelo Stavrow
582cab7efb
Fix indentation for server alert message 2020-08-17 13:29:28 -04:00
Angelo Stavrow
216641029d
Catch both invalidPassword and usernameNotFound AccountErrors 2020-08-17 13:20:21 -04:00
Angelo Stavrow
8f6e5b9a0a
Add more specific AccountError cases per API 2020-08-17 13:16:58 -04:00
Angelo Stavrow
c5b18a2440
Use standard keyboard for username entry 2020-08-17 13:10:56 -04:00
Angelo Stavrow
454b7bf09b
Drop into AppKit/UIKit to reliably set/unset preferred color scheme 2020-08-13 14:54:56 -04:00
Angelo Stavrow
e2efecb210
Refactor macOS/SettingsView tab view into MacAccountView 2020-08-12 10:36:49 -04:00
Angelo Stavrow
dfbbed12f8
Refactor preferences tab into MacPreferencesView 2020-08-12 10:36:10 -04:00
Angelo Stavrow
779e864829
Conditionally create selectedTab State property if we're on macOS 2020-08-12 10:34:12 -04:00
Angelo Stavrow
0460ca73ca
Move TabView into Settings block of app entrypoint to resolve Mac crash 2020-08-12 10:21:15 -04:00
Angelo Stavrow
e06025c654
Clean up some properties 2020-08-11 17:03:30 -04:00
Angelo Stavrow
264298160b
Implement color scheme switching on Mac app 2020-08-11 17:03:17 -04:00
Angelo Stavrow
6dba087295
Refactor account views and AccountModel 2020-08-11 16:27:14 -04:00
Angelo Stavrow
54d1d64e0e
Use preferredColorScheme modifier instead of environment key 2020-08-11 14:44:34 -04:00
Angelo Stavrow
c339124703
Use "Dark"/"Light" instead of "Dark mode"/"Light mode" in preferences UI 2020-08-11 14:33:35 -04:00
Angelo Stavrow
b787e34012
Adopt PreferencesModel for implementing light/dark mode switch (in iOS) 2020-08-11 14:32:45 -04:00
Angelo Stavrow
fceadda878
Add PreferencesModel for setting app preferences 2020-08-11 14:06:10 -04:00
Angelo Stavrow
4fe7d2fee9
Remove unnecessary State property 2020-08-11 14:00:44 -04:00
Angelo Stavrow
f646cf9eae
PostList count should be text, not a button, in iOS bottom toolbar 2020-08-11 10:51:50 -04:00
Angelo Stavrow
275dd91e9c
Move Settings button to PostList 2020-08-10 16:50:24 -04:00
Angelo Stavrow
94322a0424
Add header to SettingsView for dismissing sheet on iOS 2020-08-10 16:21:26 -04:00
Angelo Stavrow
35f4762b35
Improve appearance of settings views between platforms 2020-08-10 14:30:23 -04:00
Angelo Stavrow
8f9d1746fb
Refactor PreferenceView to punt Form/Section up to SettingsView 2020-08-10 13:51:07 -04:00
Angelo Stavrow
a7b918c14b
Refactor login view out of AccountView 2020-08-10 13:31:46 -04:00
Angelo Stavrow
4de5293345
Refactor logout view out of AccountView 2020-08-10 13:20:53 -04:00
Angelo Stavrow
0d37f9f3c2
Improve frame of macOS Preferences pane 2020-08-10 12:54:29 -04:00
Angelo Stavrow
afac74a7c9
Add Button to present SettingsView in SidebarView 2020-08-10 12:38:54 -04:00
Angelo Stavrow
4d4e4be162
Adapt PreferencesView to embed in iOS SettingsView form 2020-08-10 12:38:30 -04:00
Angelo Stavrow
4b914891b7
Adapt AccountView to embed in iOS SettingsView form 2020-08-10 12:38:06 -04:00
Angelo Stavrow
93a10e27dd
Rename Account and Settings views and move to Shared code 2020-08-10 10:39:44 -04:00
Angelo Stavrow
14e8a5b4b8
Add SidebarView to navigate collections, rename CollectionSidebar 2020-08-10 10:25:35 -04:00
Angelo Stavrow
fb7c188ca0
Create a two-tab settings view for macOS 2020-08-07 16:30:09 -04:00
Angelo Stavrow
ea6e9491c2
Add simple account model for testing login screen 2020-08-07 16:27:23 -04:00
Angelo Stavrow
822d7310dc
Add Sidebar title for iOS and set SidebarListStyle 2020-08-07 10:29:22 -04:00
Angelo Stavrow
9e87bff6a5
Use selectedCollection, NavLinks in PostList, split view for iOS/macOS 2020-08-07 10:13:36 -04:00
Angelo Stavrow
d4e3cf5f95
Remove unnecessary selectedCollection binding in CollectionSidebar 2020-08-07 10:05:33 -04:00
Angelo Stavrow
78df0628f1
Remove unnecessary EnvironmentObject 2020-08-07 10:03:04 -04:00
Angelo Stavrow
51275bc747
Move showPosts function from ContentView to PostList 2020-08-07 09:54:22 -04:00
Angelo Stavrow
fce0c380d2
Fix CollectionSidebar preview and remove dead showPosts code 2020-08-07 09:53:16 -04:00
Angelo Stavrow
1dc8b4c7ce
Update PostBadge font weight 2020-08-07 09:44:34 -04:00
Angelo Stavrow
bb6a9f3af5
Remove foregroundColor from PostCell's createdDate 2020-08-07 09:39:05 -04:00
Angelo Stavrow
5c448e47d8
Add some padding to PostCell 2020-08-07 09:34:16 -04:00
Angelo Stavrow
fc01bde49b
Add new post to PostStore when new-draft button is clicked/tapped 2020-08-07 09:33:02 -04:00
Angelo Stavrow
a063a10119
Fix test data for Post to match new PostCollection setup 2020-08-04 13:39:03 -04:00
Angelo Stavrow
1e179a1fd8
Reorganize the PostCollection 2020-08-04 13:37:43 -04:00
Angelo Stavrow
f42318d423
Change new-draft NavigationLink to stubbed Button and move to PostList 2020-08-04 11:02:30 -04:00
Angelo Stavrow
ae490b1ad5
Remove unnecessary frame-height modifier on PostList 2020-08-04 10:54:07 -04:00
Angelo Stavrow
eb4dbcb0cf
Change selectedCollection to optional, defaulting to all posts 2020-08-04 10:52:03 -04:00
Angelo Stavrow
6f875e74c0
Add pluralization to PostList's post count 2020-08-04 10:49:23 -04:00
Angelo Stavrow
9552e0371f
Replace CollectionPicker with CollectionSidebar in ContentView 2020-08-04 10:47:33 -04:00
Angelo Stavrow
ae1f82e776
Change collection selection UI from picker to sidebar 2020-08-04 10:45:46 -04:00
Angelo Stavrow
9de057a2d3
Provide a testPostStore for debugging purposes 2020-08-03 12:16:41 -04:00
Angelo Stavrow
88a80a0629
Clean up indentation in ContentView 2020-08-03 11:54:13 -04:00
Angelo Stavrow
a6c452df3c
Update post counter in post list 2020-08-03 11:09:22 -04:00
Angelo Stavrow
a0552c6605
Update new-draft button to the typical "square and pencil" symbol 2020-07-31 16:59:04 -04:00
Angelo Stavrow
ca103e565e
Set PostList's posts property based on selectedCollection in ContentView 2020-07-31 16:58:30 -04:00
Angelo Stavrow
c67d149e03
Create function for returning posts based on selectedCollection property 2020-07-31 16:57:33 -04:00
Angelo Stavrow
272d749596
Set selectedCollection property default value to "all posts" collection 2020-07-31 16:56:36 -04:00
Angelo Stavrow
9bc1431442
Default to testPostData in the PostList preview 2020-07-31 16:55:57 -04:00
Angelo Stavrow
bc75e20f97
Add [Post] property to PostList for choosing which posts to show 2020-07-31 16:55:21 -04:00
Angelo Stavrow
031c42c3ec
Add "all posts" collection to CollectionPicker test data 2020-07-31 16:54:21 -04:00
Angelo Stavrow
ab0a89ba07
Add an "all posts" collection 2020-07-31 16:53:48 -04:00
Angelo Stavrow
cc47028bb4
Add CollectionPicker below PostList and make it set PostList Title 2020-07-31 16:29:11 -04:00
Angelo Stavrow
32dba3e3ee
Add selectedCollection property to ContentView for selecting collection 2020-07-31 16:28:38 -04:00
Angelo Stavrow
97a02b8530
Add CollectionPicker view for testing collection-selection functionality 2020-07-31 16:26:37 -04:00
Angelo Stavrow
f8de848400
Make PostCollection type conform to Hashable 2020-07-31 16:25:31 -04:00
Angelo Stavrow
54d494ccef
Make PostList title mutable 2020-07-31 16:23:33 -04:00
Angelo Stavrow
235b36bd61
Move navigationTitle for list of posts from ContentView to PostList 2020-07-31 15:46:57 -04:00
Angelo Stavrow
1299754019
Add test data for use in SwiftUI previews 2020-07-31 15:40:23 -04:00
Angelo Stavrow
3c35e3e816
Add PostCollection type to Post type 2020-07-31 15:34:42 -04:00
Angelo Stavrow
64c62e6375
Remove package import until we're ready to use it 2020-07-31 15:16:02 -04:00
Angelo Stavrow
1ff66af2b3
Add basic PostCollection type 2020-07-31 15:14:53 -04:00
Angelo Stavrow
7e530dba57
Clean up SwiftLint warning 2020-07-31 13:59:10 -04:00
Angelo Stavrow
6cc144e210
Create new-draft and existing-post previews for PostEditor 2020-07-31 13:49:53 -04:00
Angelo Stavrow
260e61a4ed
Add new posts to the PostStore once the PostEditor appears 2020-07-31 13:49:19 -04:00
Angelo Stavrow
6f458ec5f3
Simplify new-post check in PostEditor 2020-07-31 13:46:03 -04:00
Angelo Stavrow
6fb33fd651
Set PostStatus to .published if Publish button is tapped in PostEditor 2020-07-31 13:44:30 -04:00
Angelo Stavrow
dd5a543e19
Add space between properties and body in App file 2020-07-31 13:40:40 -04:00
Angelo Stavrow
b8b0732be3
Don't pass PostStore into PostList, use EnvironmentObject instead 2020-07-31 13:35:15 -04:00
Angelo Stavrow
a20f82cfa1
Add publish button to PostEditor 2020-07-30 16:25:30 -04:00
Angelo Stavrow
1c7e2128d6
Move post status badge to ToolbarItemPlacement.status position 2020-07-30 15:41:20 -04:00
Angelo Stavrow
932f3eee90
Move environmentObject to NavigationView so it passes to children 2020-07-30 11:08:59 -04:00
Angelo Stavrow
9f63191e91
Make testPostStore mutable so we can append new drafts 2020-07-29 10:31:06 -04:00
Angelo Stavrow
641d022206
Add new posts to post store via EnvironmentObject 2020-07-28 17:11:01 -04:00
Angelo Stavrow
9a207528a7
Use ObservedObject property wrapper to sync changes to Post in editor 2020-07-28 14:12:24 -04:00
Angelo Stavrow
62d00d07b8
Move PostStatus enum to Post/Post.swift 2020-07-28 13:57:30 -04:00
Angelo Stavrow
f4d7790a23
Clean up excessive linebreaks 2020-07-28 13:46:20 -04:00
Angelo Stavrow
1c027c98dc
Remove borders around TextEditors for testing 2020-07-28 13:37:29 -04:00
Angelo Stavrow
85e99c720c
Use TextEditor views for both title and body of PostEditor 2020-07-28 13:36:33 -04:00
Angelo Stavrow
4b4608709e
Make Post object conform to ObservableObject 2020-07-28 12:45:11 -04:00
Angelo Stavrow
81581a7c02
Remove boilerplate file header comments 2020-07-28 11:20:21 -04:00
Angelo Stavrow
ca52aa9cef
Add default parameters for post title, body, and creation date 2020-07-28 11:19:18 -04:00
Angelo Stavrow
7f920e54dc
Pass Post into PostEditor, split title/body into TextField/TextEditor 2020-07-28 11:17:05 -04:00
Angelo Stavrow
896b5f73f7
Implement basic post store and list / editor UI components 2020-07-25 07:02:11 -04:00
Angelo Stavrow
e08be286b1
Add WriteFreely package and remove boilerplate comments from files 2020-07-22 10:07:14 -04:00
Angelo Stavrow
b9dced1da0
Initial Commit 2020-07-22 09:57:10 -04:00