Skip to content

Commit 743a4ae

Browse files
authored
chore: Changes logseq.App.showMsg to logseq.UI.showMsg (#38)
logseq.App.showMsg is deprecated in the logseq API.
1 parent 4b9e011 commit 743a4ae

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/helper/git.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ export const status = async (showRes = true): Promise<IGitResult> => {
2727
console.log('[faiz:] === git status', res)
2828
if (showRes) {
2929
if (res.exitCode === 0) {
30-
logseq.App.showMsg('Git status success')
30+
logseq.UI.showMsg('Git status success')
3131
} else {
32-
logseq.App.showMsg(`Git status failed\n${res.stderr}`, 'error')
32+
logseq.UI.showMsg(`Git status failed\n${res.stderr}`, 'error')
3333
}
3434
}
3535
/**
@@ -60,9 +60,9 @@ export const log = async (showRes = true): Promise<IGitResult> => {
6060
console.log('[faiz:] === git log', res)
6161
if (showRes) {
6262
if (res.exitCode === 0) {
63-
logseq.App.showMsg('Git log success')
63+
logseq.UI.showMsg('Git log success')
6464
} else {
65-
logseq.App.showMsg(`Git log failed\n${res.stderr}`, 'error')
65+
logseq.UI.showMsg(`Git log failed\n${res.stderr}`, 'error')
6666
}
6767
}
6868
return res
@@ -74,9 +74,9 @@ export const pull = async (showRes = true): Promise<IGitResult> => {
7474
console.log('[faiz:] === git pull', res)
7575
if (showRes) {
7676
if (res.exitCode === 0) {
77-
logseq.App.showMsg('Git pull success')
77+
logseq.UI.showMsg('Git pull success')
7878
} else {
79-
logseq.App.showMsg(`Git pull failed\n${res.stderr}`, 'error')
79+
logseq.UI.showMsg(`Git pull failed\n${res.stderr}`, 'error')
8080
}
8181
}
8282
return res
@@ -88,9 +88,9 @@ export const pullRebase = async (showRes = true): Promise<IGitResult> => {
8888
console.log('[faiz:] === git pull --rebase', res)
8989
if (showRes) {
9090
if (res.exitCode === 0) {
91-
logseq.App.showMsg('Git pull --rebase success')
91+
logseq.UI.showMsg('Git pull --rebase success')
9292
} else {
93-
logseq.App.showMsg(`Git pull --rebase failed\n${res.stderr}`, 'error')
93+
logseq.UI.showMsg(`Git pull --rebase failed\n${res.stderr}`, 'error')
9494
}
9595
}
9696
return res
@@ -102,9 +102,9 @@ export const checkout = async (showRes = true): Promise<IGitResult> => {
102102
console.log('[faiz:] === git checkout .', res)
103103
if (showRes) {
104104
if (res.exitCode === 0) {
105-
logseq.App.showMsg('Git checkout success')
105+
logseq.UI.showMsg('Git checkout success')
106106
} else {
107-
logseq.App.showMsg(`Git checkout failed\n${res.stderr}`, 'error')
107+
logseq.UI.showMsg(`Git checkout failed\n${res.stderr}`, 'error')
108108
}
109109
}
110110
return res
@@ -118,9 +118,9 @@ export const commit = async (showRes = true, message: string): Promise<IGitResul
118118
console.log('[faiz:] === git commit', res)
119119
if (showRes) {
120120
if (res.exitCode === 0) {
121-
logseq.App.showMsg('Git commit success')
121+
logseq.UI.showMsg('Git commit success')
122122
} else {
123-
logseq.App.showMsg(`Git commit failed\n${res.stdout || res.stderr}`, 'error')
123+
logseq.UI.showMsg(`Git commit failed\n${res.stdout || res.stderr}`, 'error')
124124
}
125125
}
126126
return res
@@ -133,9 +133,9 @@ export const push = async (showRes = true): Promise<IGitResult> => {
133133
console.log('[faiz:] === git push', res)
134134
if (showRes) {
135135
if (res.exitCode === 0) {
136-
logseq.App.showMsg('Git push success')
136+
logseq.UI.showMsg('Git push success')
137137
} else {
138-
logseq.App.showMsg(`Git push failed\n${res.stderr}`, 'error')
138+
logseq.UI.showMsg(`Git push failed\n${res.stderr}`, 'error')
139139
}
140140
}
141141
return res

0 commit comments

Comments
 (0)