{
if (e.altKey) {
this.openHover = UtilityButtonState.OpenExternally;
} else if (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, isAnnotating: false, UseCors: false };
googleDoc = Docs.Create.WebDocument(googleDocUrl, options);
dataDoc.googleDoc = googleDoc;
}
CollectionDockingView.AddRightSplit(googleDoc);
} else if (e.altKey) {
e.preventDefault();
window.open(googleDocUrl);
} else {
this.clearPullColor();
PropertiesButtons.hasPulledHack = false;
targetDoc[Pulls] = NumCast(targetDoc[Pulls]) + 1;
dataDoc.unchanged && runInAction(() => this.isAnimatingFetch = true);
}
}}>
{
switch (this.openHover) {
default:
case UtilityButtonState.Default: return dataDoc.unchanged === false ? (this.pullIcon as any) : fetch;
case UtilityButtonState.OpenRight: return "arrow-alt-circle-right";
case UtilityButtonState.OpenExternally: return "share";
}
})()}
/>
Fetch