Фаза 7: правая панель — VaultIndex (теги/[[вики]]/md-ссылки, граф), MonthCalendar (заметки дня), RightPanel (ссылки+теги, чипы, попап файлов), GraphView (Canvas, drag, клик-открытие); dailyNotePath; тест vaultindex (16/16); self-contained Flora.app
This commit is contained in:
@@ -261,6 +261,27 @@ QString FileStore::createFile(const QString &parentPath, const QString &name)
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString FileStore::dailyNotePath(const QString &dateStr)
|
||||
{
|
||||
if (m_vault.isEmpty())
|
||||
return QString();
|
||||
if (!QDir().mkpath(m_vault + "/Журнал"))
|
||||
return QString();
|
||||
const QString path = m_vault + "/Журнал/" + dateStr + ".md";
|
||||
if (!QFileInfo::exists(path)) {
|
||||
QFile f(path);
|
||||
if (f.open(QIODevice::WriteOnly)) {
|
||||
f.write(QStringLiteral("# %1\n\n").arg(dateStr).toUtf8());
|
||||
f.close();
|
||||
} else {
|
||||
return QString();
|
||||
}
|
||||
m_expanded.insert(m_vault + "/Журнал");
|
||||
scheduleRebuild();
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
QString FileStore::createFolder(const QString &parentPath, const QString &name)
|
||||
{
|
||||
const QString dir = parentPath.isEmpty() ? m_vault : parentPath;
|
||||
|
||||
Reference in New Issue
Block a user