Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
actual-vt-capstone
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
danieljk
actual-vt-capstone
Commits
bdf5c45c
Unverified
Commit
bdf5c45c
authored
1 year ago
by
Compositr
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Sync on ctrl+s (#1770)
parent
3dfe6334
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/desktop-client/src/components/Titlebar.tsx
+35
-24
35 additions, 24 deletions
packages/desktop-client/src/components/Titlebar.tsx
upcoming-release-notes/1770.md
+6
-0
6 additions, 0 deletions
upcoming-release-notes/1770.md
with
41 additions
and
24 deletions
packages/desktop-client/src/components/Titlebar.tsx
+
35
−
24
View file @
bdf5c45c
...
...
@@ -32,6 +32,7 @@ import Link from './common/Link';
import
Paragraph
from
'
./common/Paragraph
'
;
import
Text
from
'
./common/Text
'
;
import
View
from
'
./common/View
'
;
import
{
KeyHandlers
}
from
'
./KeyHandlers
'
;
import
LoggedInUser
from
'
./LoggedInUser
'
;
import
{
useServerURL
}
from
'
./ServerContext
'
;
import
{
useSidebar
}
from
'
./sidebar
'
;
...
...
@@ -173,30 +174,40 @@ export function SyncButton({ style, isMobile = false }: SyncButtonProps) {
:
{};
return
(
<
Button
type
=
"bare"
style
=
{
{
...
style
,
WebkitAppRegion
:
'
none
'
,
color
:
isMobile
?
mobileColor
:
desktopColor
,
}
}
hoveredStyle
=
{
activeStyle
}
activeStyle
=
{
activeStyle
}
onClick
=
{
sync
}
>
{
syncState
===
'
error
'
?
(
<
AlertTriangle
width
=
{
13
}
/>
)
:
(
<
AnimatedRefresh
animating
=
{
syncing
}
/>
)
}
<
Text
style
=
{
{
marginLeft
:
3
}
}
>
{
syncState
===
'
disabled
'
?
'
Disabled
'
:
syncState
===
'
offline
'
?
'
Offline
'
:
'
Sync
'
}
</
Text
>
</
Button
>
<>
<
KeyHandlers
keys
=
{
{
'
ctrl+s, cmd+s
'
:
()
=>
{
sync
();
},
}
}
/>
<
Button
type
=
"bare"
style
=
{
{
...
style
,
WebkitAppRegion
:
'
none
'
,
color
:
isMobile
?
mobileColor
:
desktopColor
,
}
}
hoveredStyle
=
{
activeStyle
}
activeStyle
=
{
activeStyle
}
onClick
=
{
sync
}
>
{
syncState
===
'
error
'
?
(
<
AlertTriangle
width
=
{
13
}
/>
)
:
(
<
AnimatedRefresh
animating
=
{
syncing
}
/>
)
}
<
Text
style
=
{
{
marginLeft
:
3
}
}
>
{
syncState
===
'
disabled
'
?
'
Disabled
'
:
syncState
===
'
offline
'
?
'
Offline
'
:
'
Sync
'
}
</
Text
>
</
Button
>
</>
);
}
...
...
This diff is collapsed.
Click to expand it.
upcoming-release-notes/1770.md
0 → 100644
+
6
−
0
View file @
bdf5c45c
---
category
:
Enhancements
authors
:
[
Compositr
,
shaankhosla
]
---
Sync on Ctrl+S
\ No newline at end of file
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