{
e.altKey && (this.openHover = UtilityButtonState.OpenExternally);
e.shiftKey && (this.openHover = UtilityButtonState.OpenRight);
})}
onPointerLeave={action(() => this.openHover = UtilityButtonState.Default)}
onClick={async e => {
const googleDocUrl = `https://docs.google.com/document/d/${dataDoc[GoogleRef]}/edit`;
if (e.shiftKey) {
e.preventDefault();
let googleDoc = await Cast(dataDoc.googleDoc, Doc);
if (!googleDoc) {
const options = { _width: 600, _nativeWidth: 960, _nativeHeight: 800, useCors: false };
googleDoc = Docs.Create.WebDocument(googleDocUrl, options);
dataDoc.googleDoc = googleDoc;
}
CollectionDockingView.AddSplit(googleDoc, "right");
} else if (e.altKey) {
e.preventDefault();
window.open(googleDocUrl);
} else {
this.clearPullColor();
PropertiesButtons.hasPulledHack = false;
targetDoc[Pulls] = NumCast(targetDoc[Pulls]) + 1;
dataDoc.googleDocUnchanged && runInAction(() => this.isAnimatingFetch = true);
}
}}>
{
switch (this.openHover) {
default:
case UtilityButtonState.Default: return dataDoc.googleDocUnchanged === false ? (this.pullIcon as any) : fetch;
case UtilityButtonState.OpenRight: return "arrow-alt-circle-right";
case UtilityButtonState.OpenExternally: return "share";
}
})()}
/>
Fetch