agoalofalife / password-frog

Desktop application based on Electron.js for keep passwords on own computer
0 stars 0 forks source link

Создайте новый файл или откройте active в системном пути нашего приложения #8

Closed opjs105rogue closed 1 month ago

opjs105rogue commented 1 month ago

Hello, @agoalofalife! Add IIFE and now, when the user opens the application, a folder is created where the user's text document will be stored.

This is only the first step, interaction with the txt file through the application will be a little later

opjs105rogue commented 1 month ago

add a welcome message if the user opened the application for the first time (that is, he does not yet have a folder where the file will be stored) I connected it with a common logic

opjs105rogue commented 1 month ago

I merge my file with main rep.

opjs105rogue commented 1 month ago

@agoalofalife привет! В общем, я скопировал еще не замерженный код Гамзата, чтобы не терять время, все равно пришлось бы мержить, в нем Гамзат установил логики взаимодействия с трей иконкой для обоих окон = окна с паролем и основного, где вводится текст, но у меня оно работало некорректно, я добавил/подорректировал логику закрытия приложения через конекстное меню и взаимодействие через клики по иконке в трее, так как у меня вылетала ошибка, что переменная не определена (не могу вспомнить какая) Посмотри пожалуйста, работает ли все корректно, если все ок, нужно замержить этот файл, так как у всех он должен работать корректно в плане взаимодейтсвия с трей иконкой и он основан на последнем файле Гамзата. И уже с него снова стартану выполнять задачу

opjs105rogue commented 1 month ago

Hi, @agoalofalife ! Added the creation of a butt and a file to the new code. Now, if our application is delivered without a file, it will be created. And if it is already with the file, nothing will happen, but as soon as the user deletes the folder and launches the application, it will create a folder with the file for him and inform him about it before entering the password. You can test it, it should work

opjs105rogue commented 1 month ago

@agoalofalife @RGamz Hi! Renamed the folder without a space. Created an env variable and use it with function to create folder. Deleted unnecessary comments. Changed the location of the function with the creation of the file, now a folder with the file is created when the main window opens

opjs105rogue commented 1 month ago

Hi! @agoalofalife!

Fixed the mouse click issue on macOS (at least I think so). I also corrected the opening of the application through the tray icon (now it opens with a double click, and on Linux with one click due to the operation of the Linux system).

Added error output to the text editor console if the environment variable in .env is not set. The application will not start if it is not specified, and it is visible in the console.

Deleted an unnecessary unused variable and fixed conflicts with the main branch after a recent merge.

Take a look at this and if any errors occur, please let me know

!!!! I forgot to delete the folder that is created when opening the application, now you will not see a message about creating a file, but if you delete the folder in your project, the program will create a directory with the file itself and write about it in the notification!!!!!

opjs105rogue commented 1 month ago

@agoalofalife ,hi! I have made changes according to your comments.

Changed the function with opening/hiding the app and opening the tray. Now the function looks more simple. I also separated the left click separately (to open/hide the application) and the right click to open the context menu as it was before (I read that it would be more reliable this way).