added text when nothing is chosen
This commit is contained in:
@@ -7,7 +7,21 @@ import { Component, Prop, Watch, Vue } from 'vue-property-decorator';
|
|||||||
import { StatefulVue, IApplicationState } from './StatefulVue';
|
import { StatefulVue, IApplicationState } from './StatefulVue';
|
||||||
import ace from 'ace-builds';
|
import ace from 'ace-builds';
|
||||||
import 'ace-builds/webpack-resolver';
|
import 'ace-builds/webpack-resolver';
|
||||||
|
import { CodeBuilder } from '../application/State/Code/CodeBuilder';
|
||||||
|
|
||||||
|
const NothingChosenCode =
|
||||||
|
new CodeBuilder()
|
||||||
|
.appendCommentLine('privacy.sexy — 🔐 Enforce privacy & security best-practices on Windows')
|
||||||
|
.appendCommentLineWithHyphensAround('🧐 Why privacy.sexy')
|
||||||
|
.appendCommentLine(' ✔️ Rich tweak pool to harden security & privacy of the OS and other softwares on it.')
|
||||||
|
.appendCommentLine(' ✔️ You don\'t need to run any compiled software on your system, just run the generated scripts.')
|
||||||
|
.appendCommentLine(' ✔️ Have full visibility into what the tweaks do as you enable them.')
|
||||||
|
.appendCommentLine(' ✔️ Free software, 100% transparency: both application & infrastructure code are open-sourced.')
|
||||||
|
.appendCommentLineWithHyphensAround('🤔 How to use')
|
||||||
|
.appendCommentLine(' 📙 Start by exploring different categories and choosing different tweaks.')
|
||||||
|
.appendCommentLine(' 📙 You can select "Recommended" on the top to select "safer" tweaks. Always double check!')
|
||||||
|
.appendCommentLine(' 📙 After you choose any tweak, you can download & copy to execute your script.')
|
||||||
|
.toString();
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
export default class TheCodeArea extends StatefulVue {
|
export default class TheCodeArea extends StatefulVue {
|
||||||
@@ -24,7 +38,7 @@ export default class TheCodeArea extends StatefulVue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private updateCode(code: string) {
|
private updateCode(code: string) {
|
||||||
this.editor.setValue(code || 'Something is bad 😢', 1);
|
this.editor.setValue(code || NothingChosenCode, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,6 +50,7 @@ function initializeEditor(theme: string, editorId: string): ace.Ace.Editor {
|
|||||||
editor.setTheme(`ace/theme/${theme}`);
|
editor.setTheme(`ace/theme/${theme}`);
|
||||||
editor.setReadOnly(true);
|
editor.setReadOnly(true);
|
||||||
editor.setAutoScrollEditorIntoView(true);
|
editor.setAutoScrollEditorIntoView(true);
|
||||||
|
editor.getSession().setUseWrapMode(true); // So code is readable on mobile
|
||||||
return editor;
|
return editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user