Skip to content

Commit

Permalink
Merge pull request #91 from DXS-SQUAD/InDev
Browse files Browse the repository at this point in the history
Merge
  • Loading branch information
Nighty3098 authored Jun 8, 2024
2 parents 54954c8 + 3848203 commit f5e4a79
Show file tree
Hide file tree
Showing 17 changed files with 230 additions and 139 deletions.
42 changes: 30 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<h1 align="center">CodeKeeper</h1>
<h3 align="center">Projects manager for developers</h3>
<img src="imgs/markdown.png" align="center"/>
<div class="header" align="center">
<h1 align="center">CodeKeeper</h1>
<h3 align="center">Notes and projects manager for developers</h3>
<br><br>
<img align="center" src="imgs/logo.png" align="center" width="50%" />
<br><br>
</div>

<br><br>
<div align="center">
Expand All @@ -21,9 +25,12 @@
<img src="https://img.shields.io/badge/markdown-%231c1c29.svg?style=for-the-badge&logo=markdown&logoColor=white" style="border-radius: 5px;"/>
<img src="https://img.shields.io/badge/github-%231c1c29.svg?style=for-the-badge&logo=github&logoColor=white" style="border-radius: 5px;"/>
<br><br>
<a href="https://discord.gg/KK4Xdcqb"><img src="https://img.shields.io/discord/1238858182403559505.svg?label=Discord&logo=Discord&style=for-the-badge&color=f5a7a0&logoColor=FFFFFF&labelColor=1c1c29" style="border-radius: 5px;"/></a>
</div>

<img src="https://repobeats.axiom.co/api/embed/84bb3c292d2256a4d52ec4cdfca3da36b9e981cb.svg" />

<br><br>

<details open>
<summary align="center">Install CodeKeeper:</summary>

Expand All @@ -47,9 +54,10 @@
<img src="imgs/5.png" />
<br>
<img src="imgs/6.png" />

</details>

<br>

<details align="center">
<summary align="center">Shortcuts:</summary>
<table align="center">
Expand Down Expand Up @@ -114,21 +122,22 @@
<td>Open settings</td>
</tr>
</table>

</details>

<br>

<details align="center">
<summary align="center">Tasks:</summary>

- [X] - Custom window decorations
- [X] - Update project editor window
- [X] - Update view mode for markdown
- [X] - Add threads
- [ ] - Context menu for notes
- [ ] - Context menu for tasks
- [ ] - Context menu for projects
- [ ] - Light theme
- [ ] - Theme swither
- [ ] - Add threads
******
- [X] - Saving notes to MD files
- [X] - Saving a list of tasks in the DB
Expand All @@ -143,20 +152,29 @@
- [X] - Note-taking functionality
- [X] - Task creation functionality
- [X] - Update markdown render ( migrate to QWebEngineView )
- [ ] - Functionality of moving notes
- [X] - Fix visual bugs
- [X] - Fix notes path bug
- [ ] - Using marked js
- [X] - Using marked js
- [X] - Markdown to HTML converter
- [X] - Markdown to PDF converter
- [ ] - Functionality of moving notes
- [ ] - Fix markdown rendering
******
- [X] - Update shortcuts
- [ ] - Multilang
- [ ] - Migrate to CMake
- [X] - Update shortcuts
******
- [ ] - Git Api
- [X] - Git Api
- [ ] - Git Sync
- [ ] - Add issues page
- [ ] - Add wiki page

</details>

<div align="center"><img src="https://wakatime.com/badge/user/018e8f78-65a7-4aa8-8c67-51796499853b/project/018e8f7e-5c5a-471e-ba73-04384fbc3cda.svg?&style=for-the-badge&color=f5a7a0&logoColor=FFFFFF&labelColor=1c1c29" style="border-radius: 5px;"/></div>
<br>

<div align="center">
<br><br><br>
<img src="https://wakatime.com/badge/user/018e8f78-65a7-4aa8-8c67-51796499853b/project/018e8f7e-5c5a-471e-ba73-04384fbc3cda.svg?&style=for-the-badge&color=f5a7a0&logoColor=FFFFFF&labelColor=1c1c29" style="border-radius: 5px;"/>
<br><br><br>
</div>
Binary file modified imgs/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/CodeKeeper/accountFunc/functional.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void AccountWindow::setImageFromUrl(const QString &url, QLabel *label)
QNetworkReply *reply = manager->get(QNetworkRequest(QUrl(url)));
QObject::connect(reply, &QNetworkReply::finished, [=]() {
if (reply->error()) {
qWarning() << "\033[0m\033[33mError:" << reply->errorString();
qWarning() << "Error:" << reply->errorString();
reply->deleteLater();
return;
}
Expand Down Expand Up @@ -94,7 +94,7 @@ void AccountWindow::setUserData(const QString &username, QLabel *label)
QNetworkReply *reply = manager->get(request);
QObject::connect(reply, &QNetworkReply::finished, [=]() {
if (reply->error()) {
qWarning() << "\033[0m\033[33mError:" << reply->errorString();
qWarning() << "Error:" << reply->errorString();
reply->deleteLater();
return;
}
Expand All @@ -116,7 +116,7 @@ void AccountWindow::setUserData(const QString &username, QLabel *label)
qDebug() << "Company:" << obj["company"].toString();
qDebug() << "Login:" << obj["login"].toString();

qDebug() << "\033[0m\033[32m" << doc;
qDebug() << "" << doc;

profileInfo->setText("Public repos: " + QString::number(obj["public_repos"].toInt())
+ "\n\nFollowing: " + QString::number(obj["following"].toInt())
Expand Down
4 changes: 2 additions & 2 deletions src/CodeKeeper/accountwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ AccountWindow::AccountWindow(QWidget *parent) : QMainWindow{ parent }
QObject::connect(styleThread, &QThread::started, this, [this]() {
setFontStyle();

qDebug() << "\033[0m\033[32mstyleThread started";
qDebug() << "styleThread started";
});
styleThread->start();

QThread *setUserDataThread = new QThread;
QObject::connect(setUserDataThread, &QThread::started, this, [this]() {
setUserData(git_user, profilePicture);

qDebug() << "\033[0m\033[32msetUserDataThread started";
qDebug() << "setUserDataThread started";
});
setUserDataThread->start();

Expand Down
18 changes: 9 additions & 9 deletions src/CodeKeeper/keeperFunc/functional.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ QString MainWindow::getKeeperStats()

bool MainWindow::createConnection(QString path)
{
qDebug() << "\033[0m\033[32mDB path: " << (path) + QStringLiteral("/data.db");
qDebug() << "DB path: " << (path) + QStringLiteral("/data.db");

QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
db.setDatabaseName((path) + QStringLiteral("/data.db"));
Expand All @@ -41,7 +41,7 @@ bool MainWindow::createConnection(QString path)
db.setPassword("password");

if (!db.open()) {
qCritical() << "\033[0m\033[31m" << db.lastError();
qCritical() << "" << db.lastError();
return false;
}

Expand Down Expand Up @@ -87,7 +87,7 @@ void MainWindow::getSettingsData()
isForks = globalSettings->value("isForks").value<bool>();
isRepoSize = globalSettings->value("isRepoSize").value<bool>();

qDebug() << "\033[0m\033[32m " << dir << selectedFont << font_size << theme << isCustomTitlebar
qDebug() << " " << dir << selectedFont << font_size << theme << isCustomTitlebar
<< sortNotesRole << isAutoSyncing << isVisibleNotesList << isVisibleFolders
<< isVisiblePreview << isViewMode << git_repo << git_user << git_token << isAutoSyncB;
}
Expand Down Expand Up @@ -211,7 +211,7 @@ void MainWindow::fOpenAccountWindow()

accountWindow->move(new_x, new_y);

qDebug() << "\033[0m\033[32maccountWindowThread started";
qDebug() << "accountWindowThread started";
});
accountWindowThread->start();
}
Expand Down Expand Up @@ -241,7 +241,7 @@ void MainWindow::openSettingsWindow()

settingsWindow->move(new_x, new_y);

qDebug() << "\033[0m\033[32msettingsWindowThread started";
qDebug() << "settingsWindowThread started";
});
settingsWindowThread->start();
}
Expand All @@ -263,7 +263,7 @@ bool MainWindow::checkConnection()
// qDebug() << "You are connected to the internet :)";
return true;
} else {
qWarning() << "\033[0m\033[31mYou have an net error:" << reply->errorString();
qWarning() << "You have an net error:" << reply->errorString();
return false;
}
}
Expand Down Expand Up @@ -293,7 +293,7 @@ void MainWindow::openSyncWindow()
syncWindow->show();
syncWindow->move(new_x, new_y);

qDebug() << "\033[0m\033[32msyncWindowThread started";
qDebug() << "syncWindowThread started";
});
syncWindowThread->start();
}
Expand All @@ -303,7 +303,7 @@ void MainWindow::openFolder()
QString str = QFileDialog::getExistingDirectory(0, "Select a directory");
if (!str.isEmpty()) {
globalSettings->setValue("path", str);
qDebug() << "\033[0m\033[32m" << str;
qDebug() << "" << str;
}
}

Expand All @@ -325,7 +325,7 @@ void MainWindow::on_listWidget_itemClicked(QListWidgetItem *item)

void MainWindow::setFontPr1(QFont *selectedFont, int *font_size_int)
{
qDebug() << "\033[0m\033[32mApplying preferences";
qDebug() << "Applying preferences";

QString font_size = QString::number(*font_size_int);

Expand Down
22 changes: 11 additions & 11 deletions src/CodeKeeper/keeperFunc/notesFunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ bool createFile(const QString &path)
QTextStream stream(&file);
stream << "Just start typing...";
file.close();
qDebug() << "\033[0m\033[32mFile created successfully at" << path;
qDebug() << File created successfully at" << path;
return true;
} else {
qWarning() << "\033[0m\033[33mFailed to create file at" << path << ": "
qWarning() << Failed to create file at" << path << ": "
<< file.errorString();
return false;
}
Expand All @@ -40,7 +40,7 @@ void MainWindow::exportNoteToPdf()
QModelIndex selectedIndex = notesList->currentIndex();
QFileSystemModel *fileSystemModel = static_cast<QFileSystemModel *>(notesList->model());
QString filePath = fileSystemModel->filePath(selectedIndex);
qDebug() << "\033[0m\033[32mFile Path: " << filePath;
qDebug() << File Path: " << filePath;
QString str = QFileDialog::getSaveFileName(0, "Enter filename");
QString pdf_file = str + ".pdf";
Expand All @@ -65,7 +65,7 @@ void MainWindow::exportNoteToHtml()
QModelIndex selectedIndex = notesList->currentIndex();
QFileSystemModel *fileSystemModel = static_cast<QFileSystemModel *>(notesList->model());
QString filePath = fileSystemModel->filePath(selectedIndex);
qDebug() << "\033[0m\033[32mFile Path: " << filePath;
qDebug() << File Path: " << filePath;

QString str = QFileDialog::getSaveFileName(0, "Enter filename");
QString html_file = str + ".html";
Expand All @@ -87,9 +87,9 @@ void MainWindow::exportNoteToHtml()
QTextStream stream(&file);
stream << html;
file.close();
qDebug() << "\033[0m\033[32mFile saved successfully at" << filePath;
qDebug() << File saved successfully at" << filePath;
} else {
qWarning() << "\033[0m\033[33mError, Failed to open file for writing.";
qWarning() << Error, Failed to open file for writing.";
}
}

Expand Down Expand Up @@ -141,10 +141,10 @@ void MainWindow::saveNote()
file.close();
// qDebug() << "Success", "Text written to file successfully.";
} else {
qWarning() << "\033[0m\033[33mError", "Failed to open file for writing.";
qWarning() << Error", "Failed to open file for writing.";
}
} else {
qWarning() << "\033[0m\033[33mError", "Please select a valid file.";
qWarning() << Error", "Please select a valid file.";
}
}

Expand All @@ -166,7 +166,7 @@ void MainWindow::onNoteDoubleClicked()
}
} else {
noteEdit->setPlainText("### File format not supported.");
qWarning() << "\033[0m\033[33mFile format not supported";
qWarning() << File format not supported";
}
}
}
Expand Down Expand Up @@ -255,10 +255,10 @@ void MainWindow::removeNote()
QModelIndex index = notesList->currentIndex();
if (index.isValid()) {
if (notesDirModel->fileInfo(index).isDir()) {
qDebug() << "\033[0m\033[32mFolder deleted successfully";
qDebug() << Folder deleted successfully";
notesDirModel->rmdir(index);
} else {
qDebug() << "\033[0m\033[32mNote deleted successfully";
qDebug() << Note deleted successfully";
notesDirModel->remove(index);
}
}
Expand Down
Loading

0 comments on commit f5e4a79

Please sign in to comment.