fix various

This commit is contained in:
Andy Bunce 2018-02-15 22:51:08 +00:00
parent 2c64c78b8b
commit 37a81d74cd
6 changed files with 39 additions and 9 deletions

View File

@ -76,7 +76,7 @@
</v-list> </v-list>
</v-menu> </v-menu>
<qd-fullscreen></qd-fullscreen> <qd-fullscreen></qd-fullscreen>
<v-btn @click="showNotifications = ! showNotifications" icon flat title="Notifications"> <v-btn @click.stop="showNotifications = ! showNotifications" icon flat title="Notifications">
<v-badge overlap color="orange"> <v-badge overlap color="orange">
<span slot="badge" v-if=" $notification.unseen" >{{ $notification.unseen }}</span> <span slot="badge" v-if=" $notification.unseen" >{{ $notification.unseen }}</span>
<v-icon>notifications</v-icon> <v-icon>notifications</v-icon>

View File

@ -40,6 +40,9 @@
props: { props: {
showNotifications: Boolean showNotifications: Boolean
}, },
data:function(){
return {timer:null};
},
methods:{ methods:{
set(v){ set(v){
this.$emit('update:showNotifications', v) this.$emit('update:showNotifications', v)
@ -47,5 +50,17 @@
refresh(){ refresh(){
this.$forceUpdate(); this.$forceUpdate();
} }
},
watch:{showNotifications(v){
if(v){
this.refresh();
if(!this.timer) this.timer=setInterval(()=>{ this.refresh() }, 1000);
}
},
beforeDestroy(){
if(this.timer) clearTimeout(this.timer);
alert("notifi gone")
}
} }
}</script> }</script>

View File

@ -107,7 +107,7 @@ event fired cmd outline
this.applySettings(this.aceSettings) this.applySettings(this.aceSettings)
this.editor.$blockScrolling = Infinity this.editor.$blockScrolling = Infinity
console.log("setValue: ",this.content) console.log("setValue: ",this.content)
this.editor.setValue(this.content, 1) this.editor.setValue((this.content == null)?"NULL":this.content, 1);
this.editor.setOptions({ readOnly:this.readOnly }); this.editor.setOptions({ readOnly:this.readOnly });
if(this.minLines){ if(this.minLines){
this.editor.setOptions({ minLines: this.minLines}) this.editor.setOptions({ minLines: this.minLines})

View File

@ -169,7 +169,7 @@ let $name:=$vue-api:entity?access?name($image)
let $geo:=$vue-api:entity?json?geo($image) let $geo:=$vue-api:entity?json?geo($image)
let $keywords:=$vue-api:entity?json?keywords($image) let $keywords:=$vue-api:entity?json?keywords($image)
let $thumb:= $cfg:THUMBDIR || $path let $thumb:= $cfg:THUMBDIR || $path
let $thumb:=if(file:exists($thumb)) then $thumb else $cfg:THUMBDIR || "missing.jpg" let $thumb:=if(file:exists($thumb)) then $thumb else resolve-uri("missing.jpg")
return ( return (
<id>{$id}</id> <id>{$id}</id>
,<name>{$name}</name> ,<name>{$name}</name>

View File

@ -1,4 +1,4 @@
// generated 2018-02-13T22:26:57.352Z // generated 2018-02-15T22:49:15.318Z
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/qd-confirm.vue // src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/qd-confirm.vue
Vue.component('qd-confirm',{template:` Vue.component('qd-confirm',{template:`
@ -369,6 +369,9 @@ Vue.component('vp-notifications',{template:`
props: { props: {
showNotifications: Boolean showNotifications: Boolean
}, },
data:function(){
return {timer:null};
},
methods:{ methods:{
set(v){ set(v){
this.$emit('update:showNotifications', v) this.$emit('update:showNotifications', v)
@ -376,6 +379,18 @@ Vue.component('vp-notifications',{template:`
refresh(){ refresh(){
this.$forceUpdate(); this.$forceUpdate();
} }
},
watch:{showNotifications(v){
if(v){
this.refresh();
if(!this.timer) this.timer=setInterval(()=>{ this.refresh() }, 1000);
}
},
beforeDestroy(){
if(this.timer) clearTimeout(this.timer);
alert("notifi gone")
}
} }
} }
); );
@ -483,7 +498,7 @@ Vue.component('vue-ace',{template:`
this.applySettings(this.aceSettings) this.applySettings(this.aceSettings)
this.editor.$blockScrolling = Infinity this.editor.$blockScrolling = Infinity
console.log("setValue: ",this.content) console.log("setValue: ",this.content)
this.editor.setValue(this.content, 1) this.editor.setValue((this.content == null)?"NULL":this.content, 1);
this.editor.setOptions({ readOnly:this.readOnly }); this.editor.setOptions({ readOnly:this.readOnly });
if(this.minLines){ if(this.minLines){
this.editor.setOptions({ minLines: this.minLines}) this.editor.setOptions({ minLines: this.minLines})
@ -4289,7 +4304,7 @@ const Vuepoc=Vue.extend({template:`
</v-list> </v-list>
</v-menu> </v-menu>
<qd-fullscreen></qd-fullscreen> <qd-fullscreen></qd-fullscreen>
<v-btn @click="showNotifications = ! showNotifications" icon="" flat="" title="Notifications"> <v-btn @click.stop="showNotifications = ! showNotifications" icon="" flat="" title="Notifications">
<v-badge overlap="" color="orange"> <v-badge overlap="" color="orange">
<span slot="badge" v-if=" $notification.unseen">{{ $notification.unseen }}</span> <span slot="badge" v-if=" $notification.unseen">{{ $notification.unseen }}</span>
<v-icon>notifications</v-icon> <v-icon>notifications</v-icon>

View File

@ -21,7 +21,7 @@
</head> </head>
<body> <body>
<div id="app"> <div id="app">
<h3><code>vue-poc</code> <small>(v0.3.??)</small> </h3> <h3><code>vue-poc</code> <small>(v0.3.1)</small> </h3>
<div class="spinner"> <div class="spinner">
<div class="rect1"></div> <div class="rect1"></div>
@ -38,8 +38,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.17.1/axios.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.17.1/axios.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/qs/6.4.0/qs.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/qs/6.4.0/qs.js"></script>
<script src="https://unpkg.com/vuetify@1.0.0-beta.6/dist/vuetify.min.js"></script> <script src="https://unpkg.com/vuetify@1.0.0-beta.6/dist/vuetify.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.9/ace.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.3.1/ace.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.9/ext-language_tools.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.3.1/ext-language_tools.js"></script>
<script src="https://d3js.org/d3.v4.min.js"></script> <script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.12/beautify.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.12/beautify.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.12/beautify-css.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.12/beautify-css.js"></script>