Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 服务与支持按钮及首页UI问题修复 #462

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/controller/helpermanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void helperManager::getModuleInfo()
#endif
}

QFileInfo fileInfo(kVideoConfigPath); //配置文件也需要监控
QFileInfo fileInfo(kVideoConfigPath);
if (fileInfo.exists()) {
QString modifyTime = fileInfo.lastModified().toString("yyyy-MM-dd hh:mm:ss.zzz");
mapNow.insert(kVideoConfigPath, modifyTime);
Expand Down Expand Up @@ -179,7 +179,7 @@ void helperManager::handleDb(const QStringList &deleteList, const QStringList &a
QStringList tmpAddList = addList;
int videoIndex = tmpAddList.indexOf(kVideoConfigPath);
if (videoIndex >= 0) { //视频配置文件单独拿出来处理
tmpAddList.removeAt(videoIndex);
// tmpAddList.removeAt(videoIndex);
QFile file(kVideoConfigPath);
if (!file.open(QIODevice::ReadOnly)) {
qDebug() << "Failed to open video config file.";
Expand Down
36 changes: 35 additions & 1 deletion src/web/toManual/js/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,27 @@ class App extends React.Component {
if (toR.length == 1) toR = '0' + toR;
if (toG.length == 1) toG = '0' + toG;
if (toB.length == 1) toB = '0' + toB;

var toRGB = "#" + toR + toG + toB;
console.log('hover color:', toRGB);
document.documentElement.style.setProperty(`--nav-hash-hover-color`, toRGB);

var pR = parseInt(r, 16);
var pG = parseInt(g, 16);
var pB = parseInt(b, 16);
pR -= 16;
pG -= 16;
pB -= 16;
if (pR > 255) pR = 255;
if (pG > 255) pG = 255;
if (pB > 255) pB = 255;
toR = pR.toString(16);
toG = pG.toString(16);
toB = pB.toString(16);
if (toR.length == 1) toR = '0' + toR;
if (toG.length == 1) toG = '0' + toG;
if (toB.length == 1) toB = '0' + toB;
toRGB = "#" + toR + toG + toB;
document.documentElement.style.setProperty(`--nav-hash-press-color`, toRGB);
}

global.setWordFontfamily = (strFontFamily) => {
Expand Down Expand Up @@ -622,6 +639,13 @@ class App extends React.Component {
} else {
console.log('Null');
}

const windowWidth = window.innerWidth;
var leftDistance = windowWidth - 70 + 'px';
if (windowWidth > 1630 + 234) {
leftDistance = (windowWidth - 1630) / 2 + 1630 + 50 + 'px';
}
document.documentElement.style.setProperty(`--support-position`, leftDistance);
}

let Base64 = {
Expand Down Expand Up @@ -736,6 +760,16 @@ App.childContextTypes = {
mismatch: PropTypes.bool
};

window.addEventListener('resize', function () {
const windowWidth = window.innerWidth;
var leftDistance = windowWidth - 70 + 'px';

if (windowWidth > 1630 + 234) {
leftDistance = (windowWidth - 1630) / 2 + 1630 + 50 + 'px';
}
document.documentElement.style.setProperty(`--support-position`, leftDistance);
});

render(
<Router history={createMemoryHistory('/')} >
<App />
Expand Down
Loading
Loading