moved cache into general page
This commit is contained in:
@@ -413,6 +413,29 @@ void GeneralPage::initLayout(SettingsLayout &layout)
|
||||
layout.addCheckbox("Load message history on connect",
|
||||
s.loadTwitchMessageHistoryOnConnect);
|
||||
|
||||
layout.addTitle("Cache");
|
||||
layout.addDescription(
|
||||
"Files that are used often (such as emotes) are saved to disk to "
|
||||
"reduce bandwidth usage and tho speed up loading.");
|
||||
|
||||
auto cachePathLabel = layout.addDescription("placeholder :D");
|
||||
getSettings()->cachePath.connect([cachePathLabel](const auto &,
|
||||
auto) mutable {
|
||||
QString newPath = getPaths()->cacheDirectory();
|
||||
|
||||
QString pathShortened = "Cache saved at <a href=\"file:///" + newPath +
|
||||
"\"><span style=\"color: white;\">" +
|
||||
shortenString(newPath, 50) + "</span></a>";
|
||||
cachePathLabel->setText(pathShortened);
|
||||
cachePathLabel->setToolTip(newPath);
|
||||
});
|
||||
|
||||
layout.addButton("Choose", [this]() {
|
||||
getSettings()->cachePath = QFileDialog::getExistingDirectory(this);
|
||||
});
|
||||
|
||||
layout.addButton("Reset", []() { getSettings()->cachePath = ""; });
|
||||
|
||||
layout.addTitle("AppData");
|
||||
layout.addDescription("All local files like settings and cache files are "
|
||||
"store in this directory.");
|
||||
|
||||
Reference in New Issue
Block a user