mirror of
https://github.com/chinchang/web-maker.git
synced 2025-05-12 13:25:22 +02:00
refactor code for light version mode. fixes #172
This commit is contained in:
parent
d5d37e06e4
commit
eb1cd50ebb
@ -460,7 +460,7 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ml-2">
|
||||
<div class="ml-2">
|
||||
<label class="line" title="Your Preview will refresh when you resize the preview split">
|
||||
<input type="checkbox" d-change="updateSetting" data-setting="refreshOnResize"> Refresh preview on resize
|
||||
</label>
|
||||
@ -482,9 +482,9 @@
|
||||
<label class="line" title="Preserves the console logs across your preview refreshes">
|
||||
<input type="checkbox" d-change="updateSetting" data-setting="preserveConsoleLogs"> Preserve console logs
|
||||
</label>
|
||||
<label class="line">
|
||||
<input type="checkbox" d-change="updateSetting" data-setting="lightVersion"> Toggle fast/light version (needs restart)
|
||||
</label>
|
||||
<label class="line" title="Switch to lighter version for better performance. Removes things like blur etc.">
|
||||
<input type="checkbox" d-change="updateSetting" data-setting="lightVersion"> Fast/light version (needs refresh)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1619,10 +1619,6 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea
|
||||
$('[data-setting=autoComplete]').checked = prefs.autoComplete;
|
||||
$('[data-setting=preserveConsoleLogs]').checked = prefs.preserveConsoleLogs;
|
||||
$('[data-setting=lightVersion]').checked = prefs.lightVersion;
|
||||
|
||||
if (!prefs.lightVersion) {
|
||||
document.body.classList.add('blur');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1707,6 +1703,10 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea
|
||||
clearInterval(autoSaveInterval);
|
||||
autoSaveInterval = null;
|
||||
}
|
||||
|
||||
document.body.classList[prefs.lightVersion ? 'add' : 'false'](
|
||||
'light-version'
|
||||
);
|
||||
};
|
||||
|
||||
scope.onNewBtnClick = function() {
|
||||
|
@ -118,10 +118,11 @@ select, input[type="text"], input[type="number"], textarea {
|
||||
will-change: -webkit-filter;
|
||||
transition: 0.10s ease 0.2s;
|
||||
}
|
||||
.blur.overlay-visible .main-container {
|
||||
body:not(.light-version).overlay-visible .main-container {
|
||||
transition-duration: 0.5s;
|
||||
transition-delay: 0.4s;
|
||||
-webkit-filter: blur(3px);
|
||||
filter: blur(3px);
|
||||
}
|
||||
.code-side,
|
||||
.demo-side {
|
||||
|
Loading…
x
Reference in New Issue
Block a user