Commit Graph

448 Commits

Author SHA1 Message Date
Angelo Stavrow
a1b3ece294
Move bottom bar back to PostListView
Fixes a bug where tapping the new-post button creates the new local draft, but doesn’t automatically load it in the post editor until you open, and then dismiss, the settings sheet.
2021-01-04 12:58:35 -05:00
Angelo Stavrow
cfd34e2021
Replace bottom toolbar with overlaid view 2021-01-04 10:04:27 -05:00
Angelo Stavrow
7d99c8afc4
Add “does.not.exist” 1x1 transparent image
This is to silence runtime warnings about missing images for the workaround used to add a11y labels/hints to toolbar buttons.
2020-12-30 10:03:53 -05:00
Angelo Stavrow
f9cce6c901
Fix button-image sizing and tap target/a11y frame 2020-12-30 09:24:04 -05:00
Angelo Stavrow
555b988282
Add a11y label/hint to remote-change prompt on macOS 2020-12-29 16:53:48 -05:00
Angelo Stavrow
03a568cfdc
Add a11y labels/hints to post list and settings 2020-12-29 16:52:26 -05:00
Angelo Stavrow
1d1d4927b3
Conditionally include PostCommands if macOS 2020-12-28 15:15:14 -05:00
Angelo Stavrow
70dfda7ea0
Improve layout of Updates/Preferences window 2020-12-23 14:38:53 -05:00
Angelo Stavrow
b05938b497
Create an updates view for the Preferences window 2020-12-23 11:53:01 -05:00
Angelo Stavrow
fb13b9e8ab
Add “Check For Updates” entry to app menu 2020-12-23 10:21:23 -05:00
Angelo Stavrow
03df62a48c
Add AppDelegate stub 2020-12-22 15:06:25 -05:00
Angelo Stavrow
725ff2eed9
Merge branch 'main' into add-help-tooltips 2020-12-18 11:54:22 -05:00
Angelo Stavrow
0b0fdd81a1
Move toolbar from ContentView to PostLIstView 2020-12-17 11:27:58 -05:00
Angelo Stavrow
96472c2604
Add copy-published-post-link to Post command menu 2020-12-16 14:25:56 -05:00
Angelo Stavrow
6164ceeb99
Add PostCommands menu to Mac app 2020-12-16 11:35:40 -05:00
Angelo Stavrow
09131d5873
Remove duplicate ToolbarItemGroup in Mac app 2020-12-16 11:35:04 -05:00
Angelo Stavrow
4ec81ccfbf
Add help tooltips to the toolbar buttons. 2020-12-11 16:16:43 -05:00
Angelo Stavrow
0365874ed1
Merge branch 'main' into show-progressview-during-network-request 2020-12-11 09:47:33 -05:00
Angelo Stavrow
c826806bc1
Ensure we’re setting the model object’s properties 2020-12-08 15:08:49 -05:00
Angelo Stavrow
246d3948a9
Show blog name badge in All Posts list 2020-12-08 11:55:32 -05:00
Angelo Stavrow
a5ab2182eb
Overlay ProgressView on post list while processing network requests 2020-12-07 15:15:49 -05:00
Angelo Stavrow
709a654528
Reset selectedCollection/showAllPosts when dismissing PostListView 2020-12-07 12:03:45 -05:00
Angelo Stavrow
a0b1218473
Use published properties for selectedCollection and showAllPosts 2020-12-04 17:08:32 -05:00
Angelo Stavrow
c87309d6b0
Merge pull request #145 from writeas/fix-ui-for-log-out-alert
Show alert instead of sheet on logout
2020-12-03 12:14:15 -05:00
Angelo Stavrow
5dc5108354
Add "Visit Support Forum" item to Help menu 2020-12-03 08:21:50 -05:00
Angelo Stavrow
fb5255cb04
Clean up SwiftLint warning with multiline string literal 2020-12-01 16:23:15 -05:00
Angelo Stavrow
bcf496e15d
Listen for shift-key on launch to run debug code 2020-12-01 16:17:53 -05:00
Angelo Stavrow
eff423f79e
Change "Reload From Server" File menu item to read "Refresh Posts" 2020-12-01 11:24:55 -05:00
Angelo Stavrow
68fd0c91e7
Make cancel the default action in the delete-confirmation alert 2020-12-01 09:58:04 -05:00
Angelo Stavrow
c1be327694
Use native SwiftUI SidebarCommands() for toggle-sidebar menu item 2020-12-01 09:55:11 -05:00
Angelo Stavrow
7902bff33d
Remove reload button from toolbar 2020-12-01 09:53:09 -05:00
Angelo Stavrow
24897aae93
Update menu item from "New Local Draft" to "New Post" 2020-12-01 09:38:46 -05:00
Angelo Stavrow
ccb342fbc5
Show alert instead of sheet on logout 2020-11-30 10:36:59 -05:00
Angelo Stavrow
1c9ca05527
Move clear-last-draft call to PostEditor.onDisappear 2020-11-27 16:25:49 -05:00
Angelo Stavrow
3114d037b3
Refactor active-post toolbar buttons into extracted view 2020-11-27 11:02:18 -05:00
Angelo Stavrow
28d3b6f831
Make sure to always clear the last draft when we unset the selectedPost 2020-11-26 17:01:33 -05:00
Angelo Stavrow
5dabe97db4
Restore alerts on Edit > Delete, no-network failure 2020-11-26 16:38:39 -05:00
Angelo Stavrow
8ff1de188b
Make adding and deleting posts more reliable/crashproof 2020-11-26 15:52:00 -05:00
Angelo Stavrow
5ca32ddcfc
Show prompt if there are server-side changes to post 2020-11-26 15:01:12 -05:00
Angelo Stavrow
7cb7fa3017
Use AppStorage dynamic property instead of direct UserDefaults update
Known issue: the menubar File > Reload From Server command will not update based on changes to model.account.isLoggedIn, but instead defaults to whatever the value was on app launch. Filed as FB8918303 with Apple.
2020-11-26 12:05:20 -05:00
Angelo Stavrow
7398c1d3cf
Implement basic publishing 2020-11-25 16:06:52 -05:00
Angelo Stavrow
acde0c8978
Add toolbar button logic, menu item, keyboard shortcut for server reload 2020-11-25 15:10:22 -05:00
Angelo Stavrow
735867a940
Add new-post logic to toolbar button and menu, fix broken iOS code 2020-11-25 14:41:53 -05:00
Angelo Stavrow
1e432c6adb
Fix spacing when collapsing sidebar, add other buttons to toolbar 2020-11-25 14:11:57 -05:00
Angelo Stavrow
39ae839052
Add toolbar button and menu entry to toggle sidebar 2020-11-24 15:35:26 -05:00
Angelo Stavrow
1215a1727a
Remove PostListView toolbar (new post and reload from server) 2020-11-24 15:24:08 -05:00
Angelo Stavrow
93e055d12f
Merge pull request #121 from writeas/use-content-if-post-has-no-title
Use content if post has no title
2020-11-11 09:34:49 -05:00
Angelo Stavrow
889faf9351
Don't extract lede if the incoming string is empty 2020-11-10 15:21:21 -05:00
Angelo Stavrow
76089ef759
Present error alert if token is invalid and ensure user is logged out 2020-11-10 11:21:28 -05:00
Angelo Stavrow
c32c67040f
Fix the lede extractor for edge cases 2020-11-09 14:56:03 -05:00
Angelo Stavrow
cd6f8adbbb
Don't return more than the first line on short titleless posts 2020-11-06 16:51:41 -05:00
Angelo Stavrow
d989709319
Include punctuation in first-sentence lede 2020-11-06 15:58:41 -05:00
Angelo Stavrow
62e3c9aa0e
Don't elide ledes that are shorter than 80 characters 2020-11-06 15:48:02 -05:00
Angelo Stavrow
01b5633cc2
Show lede in list if post has no title 2020-11-06 14:41:47 -05:00
Angelo Stavrow
2d911cf0d6
Update lede on new posts as user types 2020-11-06 14:39:46 -05:00
Angelo Stavrow
00bd18463e
Add function to strip Markdown-formatted images 2020-11-06 14:01:33 -05:00
Angelo Stavrow
60ce0868ca
Add function to strip Markdown formatting for headings 2020-11-06 10:20:33 -05:00
Angelo Stavrow
3799a0e792
Create extractLede function on PostListModel 2020-11-05 16:49:08 -05:00
Angelo Stavrow
55473f6a79
Fix indent issue affecting last draft fetching 2020-11-04 15:37:25 -05:00
Angelo Stavrow
444859b2fb
Load last draft or new post on launch 2020-11-04 15:23:03 -05:00
Angelo Stavrow
efae5202f8
Merge branch 'main' into fix-crash-on-launch 2020-11-04 14:18:44 -05:00
Angelo Stavrow
d09ddc35a2
Merge pull request #114 from writeas/implement-responder-chain-in-editor
Implement responder chain in editor
2020-11-02 16:20:41 -05:00
Angelo Stavrow
01bfe7e74a
Call PostListModel.remove() async on main queue 2020-11-02 13:09:38 -05:00
Angelo Stavrow
4ef40453d5
Add methods to save, clear, and retrieve last draft from UserDefaults 2020-10-30 15:26:32 -04:00
Angelo Stavrow
06510f181e
Fix post-count label to fetch info from managed object context 2020-10-29 17:20:20 -04:00
Angelo Stavrow
3c81b5cd68
Propagate login/logout fixes to Mac app target 2020-10-29 17:19:06 -04:00
Angelo Stavrow
518d793d5d
Fix SwiftLint error about function body length 2020-10-29 17:05:01 -04:00
Angelo Stavrow
e7408a47e9
Fix crash-on-load bug by cleaning up/thread-sanitizing CoreData calls 2020-10-29 16:09:35 -04:00
Angelo Stavrow
bd695b23e6
Remove anything that attempts to set selected post or last draft 2020-10-29 12:03:31 -04:00
Angelo Stavrow
dbf2ecda60
Show only drafts list if logged out 2020-10-29 10:37:16 -04:00
Angelo Stavrow
c2df4cab86
Default to all-posts list if logged in, drafts otherwise 2020-10-29 10:36:43 -04:00
Angelo Stavrow
3becfcbf73
Use PostBodyTitleView and PostBodyTextView for post editor 2020-10-27 16:02:28 -04:00
Angelo Stavrow
1170caaf4a
Merge pull request #110 from writeas/keep-local-posts-on-logout
Keep local posts on logging out
2020-10-27 13:12:56 -04:00
Angelo Stavrow
e7dff39905
Merge pull request #109 from writeas/ios-add-howto-link
Add link to how-to guide for iOS app
2020-10-27 13:12:05 -04:00
Angelo Stavrow
a542afa405
Refactor text-editing views out of PostEditorView [Mac] 2020-10-23 16:01:37 -04:00
Angelo Stavrow
5a2b999bcd
Present action sheet to confirm logout 2020-10-22 17:08:16 -04:00
Angelo Stavrow
735326891e
Hide the keyboard on tapping the log-in button 2020-10-22 16:09:18 -04:00
Angelo Stavrow
932da4ac48
Purge everything except local posts on logout 2020-10-22 12:40:07 -04:00
Angelo Stavrow
bb1c06f84d
Add how-to link URL to WriteFreelyModel 2020-10-21 16:54:25 -04:00
Angelo Stavrow
2e38bcc42e
Merge pull request #99 from writeas/fix-share-link-after-moving-post
Fix share link after moving post
2020-10-21 15:41:14 -04:00
Angelo Stavrow
945e748b98
Check for network connection before request, present alert on failure 2020-10-16 17:36:26 -04:00
Angelo Stavrow
a289e544b1
Do not disable networking buttons if hasNetworkConnection is false 2020-10-16 17:35:02 -04:00
Angelo Stavrow
3ebfa7a0d1
Set isProcessingRequest on network request start, unset on end 2020-10-16 16:24:35 -04:00
Angelo Stavrow
1feeed7354
Publish isProcessingRequest flag to switch ProgressView with Button 2020-10-16 16:19:38 -04:00
Angelo Stavrow
a2f9d23037
Always use /api/posts/{POST_ID} to avoid stale-post-slug logic
If the post used to have a post slug, it follows the post until it gets a new post slug. If the post was moved, we end up with a situation where the collection/slug combination is out of sync, and so the API sends back a 404 (FIXME: the Swift package silently fails here).
2020-10-16 14:01:44 -04:00
Angelo Stavrow
404d557cab
Call updateFromServer() after moving the post 2020-10-16 13:47:39 -04:00
Angelo Stavrow
9e48f75717
Merge branch 'main' into add-collection-setting-menu 2020-10-12 09:15:24 -04:00
Angelo Stavrow
5a488a2a70
Enable moving posts to Drafts 2020-10-08 16:17:57 -04:00
Angelo Stavrow
a3ffb5a470
Create new local posts as Drafts 2020-10-08 15:15:01 -04:00
Angelo Stavrow
44f03b59d5
Add move(post:from:to:) method to WriteFreelyModel 2020-10-08 12:05:10 -04:00
Angelo Stavrow
db5366b607
Store server string in Account model after removing path 2020-10-06 17:01:54 -04:00
Angelo Stavrow
5b0874f14f
Remove path from server URL if it exists 2020-10-06 16:49:19 -04:00
Angelo Stavrow
50c521ea8f
Keep cached post's collectionAlias from being set to nil by fetched post 2020-10-06 08:40:52 -04:00
Angelo Stavrow
6131f9e068
Fetch collection name for post list cell if showing all posts 2020-10-01 17:12:28 -04:00
Angelo Stavrow
c55636df89
Add collection name to post list cell if it exists 2020-10-01 17:00:27 -04:00
Angelo Stavrow
e736ebbb8c
Add descriptive text to login view 2020-09-29 14:40:15 -04:00
Angelo Stavrow
776f1ed3ed
Fix crashing bug on iPad and macOS when removing blank posts 2020-09-29 12:39:19 -04:00
Angelo Stavrow
bc4c43f40c
Move server-update warnings from toolbar on iOS 2020-09-29 12:35:51 -04:00
Angelo Stavrow
c56c3c898b
Merge pull request #75 from writeas/add-https-prefix-on-login-if-missing
Add secure protocol to server string if it's missing
2020-09-28 10:13:18 -04:00
Angelo Stavrow
be69225253
Simplify login error-handling process 2020-09-25 11:00:51 -04:00
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