1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-08-24 05:43:22 +02:00

Merge pull request #505 from chinchang/v5-fix-397

Add functionality of coming back from full preview in files mode
This commit is contained in:
Kushagra Gour
2022-03-21 10:08:54 +05:30
committed by GitHub
2 changed files with 5 additions and 2 deletions

View File

@@ -285,8 +285,8 @@ export default class Footer extends Component {
<button
onClick={this.layoutBtnClickhandler.bind(this, 4)}
id="layoutBtn4"
class="mode-btn hint--top-left hint--rounded hide-in-file-mode hide-on-mobile"
aria-label={i18n._(t`Switch to full screen preview`)}
class="mode-btn hint--top-left hint--rounded hide-on-mobile"
aria-label={i18n._(t`Toggle full screen preview`)}
>
<svg viewBox="0 0 100 100">
<rect x="0" y="0" width="100" height="100" />

View File

@@ -735,6 +735,9 @@ export default class App extends Component {
}
layoutBtnClickHandler(layoutId) {
if (layoutId === this.state.currentLayoutMode) {
layoutId = 2;
}
this.saveSetting('layoutMode', layoutId);
trackEvent('ui', 'toggleLayoutClick', layoutId);
this.toggleLayout(layoutId);