Rename "draft" status to "local"

This commit is contained in:
Angelo Stavrow 2020-09-01 09:54:43 -04:00
parent 0b6b0c395d
commit 3c26829407
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@ import Foundation
import WriteFreely
enum PostStatus {
case draft
case local
case edited
case published
}
@ -18,7 +18,7 @@ class Post: Identifiable, ObservableObject {
title: String = "Title",
body: String = "Write your post here...",
createdDate: Date = Date(),
status: PostStatus = .draft,
status: PostStatus = .local,
collection: PostCollection = draftsCollection
) {
self.wfPost = WFPost(body: body, title: title, createdDate: createdDate)

View File

@ -21,8 +21,8 @@ struct PostStatusBadgeView: View {
var badgeColor: Color
switch status {
case .draft:
badgeLabel = "draft"
case .local:
badgeLabel = "local"
badgeColor = Color(red: 0.75, green: 0.5, blue: 0.85, opacity: 1.0)
case .edited:
badgeLabel = "edited"