FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
VSpaceCode/src/messages.ts at master · VSpaceCode/VSpaceCode · GitHub
VSpaceCode
/
VSpaceCode
Public
Notifications
You must be signed in to change notification settings
Fork
129
Star
1.5k
Code
Issues
66
Pull requests
13
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
VSpaceCode
/
src
/
messages.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
40 lines (37 loc) · 1.46 KB
Breadcrumbs
VSpaceCode
/
src
/
messages.ts
Copy path
File metadata and controls
40 lines (37 loc) · 1.46 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import
{
env
,
Uri
,
window
}
from
"vscode"
;
import
{
ComparisonResult
,
Version
}
from
"./version"
;
export
const
configSettingsConfirmTitle
=
"Configuring settings may change the format of your settings.json file. Are you sure?"
;
export
const
configKeybindingsConfirmTitle
=
"Configuring keybindings may change the format of your keybindings.json file. Are you sure?"
;
export
const
configConfirmTitle
=
"Configuration may change the format of your settings.json and keybindings.json file. Are you sure?"
;
export
function
confirmWrapper
(
title
:
string
,
fn
:
(
)
=>
Thenable
<
any
>
)
{
return
async
(
)
=>
{
const
confirmText
=
"Sure"
;
const
cancelText
=
"Cancel"
;
const
selection
=
await
window
.
showQuickPick
(
[
confirmText
,
cancelText
]
,
{
title
}
)
;
if
(
selection
===
confirmText
)
{
await
fn
(
)
;
}
}
;
}
export
async
function
showUpdateMessage
(
cur
:
string
,
prev
:
string
)
{
if
(
Version
.
compare
(
cur
,
prev
)
===
ComparisonResult
.
Newer
)
{
const
changeLog
=
"Changelog"
;
const
selection
=
await
window
.
showInformationMessage
(
`VspaceCode is updated to v
${
cur
}
. See what's new in the changelog.`
,
changeLog
)
;
if
(
selection
===
changeLog
)
{
await
env
.
openExternal
(
Uri
.
parse
(
"https://github.com/VSpaceCode/VSpaceCode/blob/master/CHANGELOG.md"
)
)
;
}
}
}
Back
|
FazBrowse Home
|
New Git URL