ondras / my-mind

Online Mindmapping Software
https://my-mind.github.io
MIT License
3.3k stars 653 forks source link

Feature: An electron build #98

Open chmac opened 5 years ago

chmac commented 5 years ago

Firstly, this is an incredibly fantastic package. I've searched every so often for years for a web based mind mapping tool, that's open source, and this rocks. It totally lives up to the SLC motto. So huge thanks to the authors. 👍 👍 👍

Any interest in an electron build?

I'd love to have this running on my machine so it could auto save. I figure that's probably reasonably achievable with electron. I don't have much experience with electron, but I'm interested to experiment. Before going too far down this road, I wanted to check if you'd be interested in maintaining the electron build if I can get it to work? That might require a mac, as I think building for macOS is only possible on mac, not 100% sure though.

No worries if not. Maybe there's also other ways to package that don't require upkeep / maintenance. Or maybe an electron package could be auto updating, just wanted to solicit feedback from y'all before investigating too far...

ondras commented 5 years ago

Hi @chmac,

an Electron-based build with local save/load sounds very nice! It should be doable right away; there is no reason to make this Mac-specific. It would work on every platform where Electron runs.

In my opinion, implementing this boils down to three distinct tasks:

  1. implementing the actual save/load operation using the existing MM.Backend API (using node's require("fs") to do the I/O stuff);

  2. creating an Electron app that loads the My Mind webpage;

  3. making the IO module (as per the first point) available in My Mind (only) when running inside Electron.

Ideally, the My Mind application shall be completely unaware that it runs under Electron; the only difference would be the availability of the "save to local filesystem" IO module.

I am, unfortunately, somewhat out of time these days. I will assign myself here, but please do not expect a swift resolution.

chmac commented 5 years ago

@ondras Fully agree. I think the usual electron approach is to bundle the web part inside the app so it works offline. That would potentially mean to build a new electron version would require a Mac. But I fully agree, it makes sense to have a cross platform build. I'll also see if I can find time to invest in this. :+1:

DanielFrugoni commented 5 years ago

Hope I can ask a question here about electron.

Have html like this:

(*NEVER GOES)

Now if I do: this.router.navigate(['/init']); (it goes to)

@Component({ selector: 'app-init', templateUrl: './init.component.html', styleUrls: ['./init.component.scss'] }) export class InitComponent implements OnInit { constructor() { } ngOnInit() { } }

@NgModule({ declarations: [AppComponent,InitComponent] ....

Trying to work like Angular, what I doing wrong ? Thx !

ondras commented 5 years ago

Hope I can ask a question here about electron.

Sorry, this is not a general Electron support thread. Only discussions related to the current project (cyp) are allowed.