Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F14175015
AccountLogoutView.swift
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
700 B
Subscribers
None
AccountLogoutView.swift
View Options
import
SwiftUI
struct
AccountLogoutView
:
View
{
@
EnvironmentObject
var
model
:
WriteFreelyModel
var
body
:
some
View
{
VStack
{
Spacer
()
VStack
{
Text
(
"Logged in as
\(
model
.
account
.
username
??
"Anonymous"
)
"
)
Text
(
"on
\(
model
.
account
.
server
)
"
)
}
Spacer
()
Button
(
action
:
logoutHandler
,
label
:
{
Text
(
"Logout"
)
})
}
}
func
logoutHandler
()
{
model
.
logout
()
}
}
struct
AccountLogoutView_Previews
:
PreviewProvider
{
static
var
previews
:
some
View
{
AccountLogoutView
()
.
environmentObject
(
WriteFreelyModel
())
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Thu, Apr 2, 4:35 AM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3678951
Attached To
rWFSUI WriteFreely SwiftUI
Event Timeline
Log In to Comment