mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-01 20:45:57 +03:00
Remove unnecessary console logging
- removing since nightly users have access to devtools
This commit is contained in:
parent
6528fb7400
commit
b2a9d2efcf
@ -74,10 +74,8 @@ const withRequestId: FetchMiddleware = (fetch) => async (url, options) => {
|
||||
};
|
||||
|
||||
const withLog: FetchMiddleware = (fetch) => async (url, options) => {
|
||||
console.log('fetch', url, options);
|
||||
try {
|
||||
const resp = await fetch(url, options);
|
||||
console.log(resp);
|
||||
return resp;
|
||||
} catch (e: any) {
|
||||
console.error('fetch', e);
|
||||
|
@ -36,9 +36,6 @@
|
||||
}
|
||||
}
|
||||
ranges = mergeTouchingRanges(ranges);
|
||||
if (ranges.length > 0) {
|
||||
console.log({ ranges, line });
|
||||
}
|
||||
return ranges;
|
||||
};
|
||||
|
||||
@ -91,14 +88,6 @@
|
||||
|
||||
const isHighlighted = mark.some(([from, to]) => {
|
||||
const is = isIntersecting([from, to], [tokenPos, tokenPos + text.length]);
|
||||
if (is) {
|
||||
console.log({
|
||||
pos: [from, to],
|
||||
tokenPos: [tokenPos, tokenPos + text.length],
|
||||
text,
|
||||
is
|
||||
});
|
||||
}
|
||||
return is;
|
||||
});
|
||||
tokenPos += text.length;
|
||||
|
@ -62,11 +62,5 @@ export async function invoke<T>(command: string, params: Record<string, unknown>
|
||||
|
||||
export function listen<T>(event: EventName, handle: EventCallback<T>) {
|
||||
const unlisten = listenTauri(event, handle);
|
||||
// console.log('listen', event);
|
||||
return () => {
|
||||
unlisten.then((unlisten) => {
|
||||
unlisten();
|
||||
// console.log('unlisten', event);
|
||||
});
|
||||
};
|
||||
return () => unlisten.then((unlistenFn) => unlistenFn());
|
||||
}
|
||||
|
@ -20,7 +20,6 @@ export default async function (): Promise<PostHogClient> {
|
||||
// noop
|
||||
},
|
||||
loaded: (instance) => {
|
||||
console.log('Posthog loaded');
|
||||
instance.register_for_session({
|
||||
appName,
|
||||
appVersion
|
||||
|
@ -36,7 +36,6 @@ export class Ownership {
|
||||
hunks.delete(hunkId);
|
||||
if (hunks.size === 0) this.files.delete(fileId);
|
||||
}
|
||||
console.log('after remove', this.toString());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
let installing = false;
|
||||
const onUpdateClicked = async () => {
|
||||
installing = true;
|
||||
console.log(await getVersion());
|
||||
await installUpdate()
|
||||
.finally(() => {
|
||||
installing = false;
|
||||
@ -18,7 +17,6 @@
|
||||
.catch((e) => {
|
||||
toasts.error(e.message);
|
||||
});
|
||||
console.log(await getVersion());
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -89,7 +89,6 @@
|
||||
}
|
||||
|
||||
function merge() {
|
||||
console.log(`merge ${branch.id}`);
|
||||
branchController.mergeUpstream(branch.id);
|
||||
}
|
||||
|
||||
@ -165,7 +164,6 @@
|
||||
|
||||
if ($user) {
|
||||
cloud.summarize.branch($user.access_token, { diff }).then((result) => {
|
||||
console.log(result);
|
||||
if (result.message && result.message !== branch.name) {
|
||||
branch.name = result.message;
|
||||
handleBranchNameChange();
|
||||
|
@ -15,11 +15,9 @@
|
||||
}>();
|
||||
|
||||
export function openByMouse(e: MouseEvent, item: any) {
|
||||
console.log(popupMenu);
|
||||
popupMenu.openByMouse(e, item);
|
||||
}
|
||||
export function openByElement(elt: HTMLElement, item: any) {
|
||||
console.log(popupMenu);
|
||||
popupMenu.openByElement(elt, item);
|
||||
}
|
||||
</script>
|
||||
|
@ -103,7 +103,6 @@
|
||||
class="z-30"
|
||||
on:height={(e) => {
|
||||
treeHeight = e.detail;
|
||||
console.log(branchId);
|
||||
lscache.set(treeHeightKey + branchId, e.detail, 7 * 1440); // 7 day ttl
|
||||
userSettings.update((s) => ({ ...s, defaultTreeHeight: e.detail }));
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user