Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Briar Desktop
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
briar
Briar Desktop
Commits
74208a00
Commit
74208a00
authored
3 years ago
by
Sebastian
Browse files
Options
Downloads
Patches
Plain Diff
Move AboutDialog to BriarUi
parent
6cef5175
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!105
Implement basic about dialog
Pipeline
#9330
passed
3 years ago
Stage: test
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/kotlin/org/briarproject/briar/desktop/ui/BriarUi.kt
+6
-1
6 additions, 1 deletion
src/main/kotlin/org/briarproject/briar/desktop/ui/BriarUi.kt
src/main/kotlin/org/briarproject/briar/desktop/ui/MainScreen.kt
+2
-11
2 additions, 11 deletions
...in/kotlin/org/briarproject/briar/desktop/ui/MainScreen.kt
with
8 additions
and
12 deletions
src/main/kotlin/org/briarproject/briar/desktop/ui/BriarUi.kt
+
6
−
1
View file @
74208a00
...
...
@@ -24,6 +24,7 @@ import androidx.compose.runtime.Composable
import
androidx.compose.runtime.CompositionLocalProvider
import
androidx.compose.runtime.getValue
import
androidx.compose.runtime.mutableStateOf
import
androidx.compose.runtime.remember
import
androidx.compose.runtime.setValue
import
androidx.compose.runtime.staticCompositionLocalOf
import
androidx.compose.ui.Modifier
...
...
@@ -119,16 +120,20 @@ constructor(
LocalCoreFeatureFlags
provides
featureFlags
,
LocalDesktopFeatureFlags
provides
desktopFeatureFlags
)
{
var
showAbout
by
remember
{
mutableStateOf
(
false
)
}
val
settingsViewModel
:
SettingsViewModel
=
viewModel
()
BriarTheme
(
isDarkTheme
=
settingsViewModel
.
isDarkMode
.
value
)
{
Column
(
Modifier
.
fillMaxSize
())
{
ExpirationBanner
{
screenState
=
EXPIRED
;
stop
()
}
when
(
screenState
)
{
STARTUP
->
StartupScreen
()
MAIN
->
MainScreen
(
settingsViewModel
)
MAIN
->
MainScreen
(
settingsViewModel
,
showAbout
=
{
showAbout
=
true
}
)
EXPIRED
->
ErrorScreen
(
i18n
(
"startup.failed.expired"
))
}
}
if
(
showAbout
)
{
AboutDialog
(
onClose
=
{
showAbout
=
false
})
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/kotlin/org/briarproject/briar/desktop/ui/MainScreen.kt
+
2
−
11
View file @
74208a00
...
...
@@ -20,10 +20,6 @@ package org.briarproject.briar.desktop.ui
import
androidx.compose.foundation.layout.Row
import
androidx.compose.runtime.Composable
import
androidx.compose.runtime.getValue
import
androidx.compose.runtime.mutableStateOf
import
androidx.compose.runtime.remember
import
androidx.compose.runtime.setValue
import
org.briarproject.briar.desktop.conversation.PrivateMessageScreen
import
org.briarproject.briar.desktop.navigation.BriarSidebar
import
org.briarproject.briar.desktop.navigation.SidebarViewModel
...
...
@@ -41,15 +37,14 @@ import org.briarproject.briar.desktop.viewmodel.viewModel
fun
MainScreen
(
settingsViewModel
:
SettingsViewModel
,
viewModel
:
SidebarViewModel
=
viewModel
(),
showAbout
:
()
->
Unit
,
)
{
var
showAbout
by
remember
{
mutableStateOf
(
false
)
}
Row
{
BriarSidebar
(
viewModel
.
account
.
value
,
viewModel
.
uiMode
.
value
,
viewModel
::
setUiMode
,
{
showAbout
=
true
}
,
showAbout
=
showAbout
,
)
VerticalDivider
()
when
(
viewModel
.
uiMode
.
value
)
{
...
...
@@ -59,8 +54,4 @@ fun MainScreen(
else
->
UiPlaceholder
()
}
}
if
(
showAbout
)
{
AboutDialog
(
onClose
=
{
showAbout
=
false
})
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment