mirror of
https://github.com/standardnotes/app.git
synced 2026-01-16 23:01:30 +00:00
async load sampler
This commit is contained in:
parent
4890b2905f
commit
d527c8d34b
3 changed files with 30 additions and 25 deletions
|
|
@ -81,24 +81,27 @@ angular.module('app.frontend')
|
|||
{title: "MySQL list users", content: "SELECT User FROM mysql.user;"},
|
||||
];
|
||||
|
||||
this.showSampler = !this.user.uuid && modelManager.filteredNotes.length == 0;
|
||||
$timeout(function(){
|
||||
this.showSampler = !this.user.uuid && modelManager.filteredNotes.length == 0;
|
||||
|
||||
this.demoNoteNames = _.map(this.demoNotes, function(note){
|
||||
return note.title;
|
||||
});
|
||||
this.demoNoteNames = _.map(this.demoNotes, function(note){
|
||||
return note.title;
|
||||
});
|
||||
|
||||
this.currentDemoContent = {text: null};
|
||||
this.currentDemoContent = {text: null};
|
||||
|
||||
this.prebeginFn = function() {
|
||||
this.prebeginFn = function() {
|
||||
this.currentDemoContent.text = null;
|
||||
}.bind(this)
|
||||
}.bind(this)
|
||||
|
||||
this.callback = function(index) {
|
||||
this.currentDemoContent.text = this.demoNotes[index].text;
|
||||
}.bind(this)
|
||||
this.callback = function(index) {
|
||||
this.currentDemoContent.text = this.demoNotes[index].text;
|
||||
}.bind(this)
|
||||
|
||||
this.contentCallback = function(index) {
|
||||
}
|
||||
}.bind(this), 100)
|
||||
|
||||
this.contentCallback = function(index) {
|
||||
}
|
||||
|
||||
this.setNote = function(note, oldNote) {
|
||||
this.editorMode = 'edit';
|
||||
|
|
|
|||
26
vendor/assets/javascripts/transpiled.js
vendored
26
vendor/assets/javascripts/transpiled.js
vendored
|
|
@ -512,23 +512,25 @@ angular.module('app.frontend').controller('BaseCtrl', BaseCtrl);
|
|||
|
||||
this.demoNotes = [{ title: "Live print a file with tail", content: "tail -f log/production.log" }, { title: "Create SSH tunnel", content: "ssh -i .ssh/key.pem -N -L 3306:example.com:3306 ec2-user@example.com" }, { title: "List of processes running on port", content: "lsof -i:8080" }, { title: "Set ENV from file", content: "export $(cat .envfile | xargs)" }, { title: "Find process by name", content: "ps -ax | grep <application name>" }, { title: "NPM install without sudo", content: "sudo chown -R $(whoami) ~/.npm" }, { title: "Email validation regex", content: "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$" }, { title: "Ruby generate 256 bit key", content: "Digest::SHA256.hexdigest(SecureRandom.random_bytes(32))" }, { title: "Mac add user to user tag", content: "sudo dsedittag -o edit -a USERNAME -t user GROUPNAME" }, { title: "Kill Mac OS System Apache", content: "sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist" }, { title: "Docker run with mount binding and port", content: "docker run -v /home/vagrant/www/app:/var/www/app -p 8080:80 -d kpi/s3" }, { title: "MySQL grant privileges", content: "GRANT [type of permission] ON [database name].[table name] TO ‘[username]’@'%’;" }, { title: "MySQL list users", content: "SELECT User FROM mysql.user;" }];
|
||||
|
||||
this.showSampler = !this.user.uuid && modelManager.filteredNotes.length == 0;
|
||||
$timeout(function () {
|
||||
this.showSampler = !this.user.uuid && modelManager.filteredNotes.length == 0;
|
||||
|
||||
this.demoNoteNames = _.map(this.demoNotes, function (note) {
|
||||
return note.title;
|
||||
});
|
||||
this.demoNoteNames = _.map(this.demoNotes, function (note) {
|
||||
return note.title;
|
||||
});
|
||||
|
||||
this.currentDemoContent = { text: null };
|
||||
this.currentDemoContent = { text: null };
|
||||
|
||||
this.prebeginFn = function () {
|
||||
this.currentDemoContent.text = null;
|
||||
}.bind(this);
|
||||
this.prebeginFn = function () {
|
||||
this.currentDemoContent.text = null;
|
||||
}.bind(this);
|
||||
|
||||
this.callback = function (index) {
|
||||
this.currentDemoContent.text = this.demoNotes[index].text;
|
||||
}.bind(this);
|
||||
this.callback = function (index) {
|
||||
this.currentDemoContent.text = this.demoNotes[index].text;
|
||||
}.bind(this);
|
||||
|
||||
this.contentCallback = function (index) {};
|
||||
this.contentCallback = function (index) {};
|
||||
}.bind(this), 100);
|
||||
|
||||
this.setNote = function (note, oldNote) {
|
||||
this.editorMode = 'edit';
|
||||
|
|
|
|||
2
vendor/assets/javascripts/transpiled.js.map
vendored
2
vendor/assets/javascripts/transpiled.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue