Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F14753238
AccountLogoutView.swift
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
897 B
Subscribers
None
AccountLogoutView.swift
View Options
import
SwiftUI
struct
AccountLogoutView
:
View
{
@
Binding
var
accountModel
:
AccountModel
@
Binding
var
isLoggedIn
:
Bool
@
Binding
var
isLoggingIn
:
Bool
var
body
:
some
View
{
VStack
{
Spacer
()
VStack
{
Text
(
"Logged in as
\(
accountModel
.
username
??
"UNKNOWN"
)
"
)
Text
(
"on
\(
accountModel
.
server
??
"UNKNOWN"
)
"
)
}
Spacer
()
Button
(
action
:
logoutHandler
,
label
:
{
Text
(
"Logout"
)
})
}
}
func
logoutHandler
()
{
isLoggedIn
=
false
isLoggingIn
=
false
}
}
struct
AccountLogoutView_Previews
:
PreviewProvider
{
static
var
previews
:
some
View
{
AccountLogoutView
(
accountModel
:
.
constant
(
AccountModel
()),
isLoggedIn
:
.
constant
(
true
),
isLoggingIn
:
.
constant
(
false
)
)
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Fri, Apr 24, 12:30 PM (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3682541
Attached To
rWFSUI WriteFreely SwiftUI
Event Timeline
Log In to Comment