mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
[win-nix] "noconnection" page added to app resources
This commit is contained in:
@ -327,6 +327,10 @@ build_xp {
|
|||||||
DESTDIR = $$DESTDIR/xp
|
DESTDIR = $$DESTDIR/xp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exists($$PWD/../common/loginpage/deploy/noconnect.html) {
|
||||||
|
RESOURCES += $$PWD/extras.qrc
|
||||||
|
}
|
||||||
|
|
||||||
OBJECTS_DIR = $$DESTDIR/obj
|
OBJECTS_DIR = $$DESTDIR/obj
|
||||||
MOC_DIR = $$DESTDIR/moc
|
MOC_DIR = $$DESTDIR/moc
|
||||||
RCC_DIR = $$DESTDIR/rcc
|
RCC_DIR = $$DESTDIR/rcc
|
||||||
|
|||||||
5
win-linux/extras.qrc
Normal file
5
win-linux/extras.qrc
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<RCC>
|
||||||
|
<qresource prefix="/">
|
||||||
|
<file alias="noconnect.html">../common/loginpage/deploy/noconnect.html</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
||||||
@ -1008,6 +1008,15 @@ void CAscApplicationManagerWrapper::startApp()
|
|||||||
_app.m_pMainWindow->show(_is_maximized);
|
_app.m_pMainWindow->show(_is_maximized);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( QFileInfo::exists(":/noconnect.html") ) {
|
||||||
|
QString _nc_path = Utils::getAppCommonPath() + "/noconnect.html";
|
||||||
|
bool _nc_exist = QFileInfo::exists(_nc_path) || QFile::copy(":/noconnect.html", _nc_path);
|
||||||
|
|
||||||
|
if ( _nc_exist ) {
|
||||||
|
_app.m_oSettings.connection_error_path = _nc_path;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QObject::connect(CExistanceController::getInstance(), &CExistanceController::checked, [] (const QString& name, int uid, bool exists) {
|
QObject::connect(CExistanceController::getInstance(), &CExistanceController::checked, [] (const QString& name, int uid, bool exists) {
|
||||||
if ( !exists ) {
|
if ( !exists ) {
|
||||||
QJsonObject _json_obj{{QString::number(uid), exists}};
|
QJsonObject _json_obj{{QString::number(uid), exists}};
|
||||||
|
|||||||
@ -96,7 +96,6 @@ int main( int argc, char *argv[] )
|
|||||||
manager->m_oSettings.recover_path = (user_data_path + "/recover").toStdWString();
|
manager->m_oSettings.recover_path = (user_data_path + "/recover").toStdWString();
|
||||||
manager->m_oSettings.user_plugins_path = (user_data_path + "/sdkjs-plugins").toStdWString();
|
manager->m_oSettings.user_plugins_path = (user_data_path + "/sdkjs-plugins").toStdWString();
|
||||||
manager->m_oSettings.local_editors_path = app_path + L"/editors/web-apps/apps/api/documents/index.html";
|
manager->m_oSettings.local_editors_path = app_path + L"/editors/web-apps/apps/api/documents/index.html";
|
||||||
manager->m_oSettings.connection_error_path = app_path + L"/converter/connection/index.html";
|
|
||||||
manager->m_oSettings.additional_fonts_folder.push_back(app_path + L"/fonts");
|
manager->m_oSettings.additional_fonts_folder.push_back(app_path + L"/fonts");
|
||||||
manager->m_oSettings.country = Utils::systemLocationCode().toStdString();
|
manager->m_oSettings.country = Utils::systemLocationCode().toStdString();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user