mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-28 12:11:53 +01:00
Error for http remotes
This commit is contained in:
@@ -214,12 +214,18 @@ function SyncDropdownWithSyncDir({ syncDir }: { syncDir: string }) {
|
||||
leftSlot: <Icon icon="arrow_up_from_line" />,
|
||||
waitForOnSelect: true,
|
||||
async onSelect() {
|
||||
const message = await push.mutateAsync();
|
||||
if (message === 'nothing_to_push') {
|
||||
showToast({ id: 'push-success', message: 'Nothing to push', color: 'info' });
|
||||
} else {
|
||||
showToast({ id: 'push-success', message: 'Push successful', color: 'success' });
|
||||
}
|
||||
push.mutate(undefined, {
|
||||
onSuccess(message) {
|
||||
if (message === 'nothing_to_push') {
|
||||
showToast({ id: 'push-success', message: 'Nothing to push', color: 'info' });
|
||||
} else {
|
||||
showToast({ id: 'push-success', message: 'Push successful', color: 'success' });
|
||||
}
|
||||
},
|
||||
onError(err) {
|
||||
showErrorToast('git-pull-error', String(err));
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user