From c2b65b4cee2075825604b48cdd0926700a4ec050 Mon Sep 17 00:00:00 2001 From: andy Date: Sun, 18 Mar 2018 22:13:56 +0000 Subject: [PATCH] vuetify 1.0.8 --- src/vue-poc/app.vue | 12 +- src/vue-poc/components/qd-fullscreen.vue | 1 + src/vue-poc/components/vp-selectpath.vue | 93 ++++++ src/vue-poc/features/collection/files.vue | 11 +- src/vue-poc/features/collection/history.vue | 7 +- src/vue-poc/features/edit/tabs.vue | 131 ++++++++ src/vue-poc/features/eval/eval.vue | 17 +- src/vue-poc/features/tabs.vue | 84 ----- src/vue-poc/static/app-gen.js | 337 ++++++++++++++------ src/vue-poc/static/app.html | 6 +- src/vue-poc/static/serviceworker.js | 2 +- 11 files changed, 503 insertions(+), 198 deletions(-) create mode 100644 src/vue-poc/components/vp-selectpath.vue create mode 100644 src/vue-poc/features/edit/tabs.vue delete mode 100644 src/vue-poc/features/tabs.vue diff --git a/src/vue-poc/app.vue b/src/vue-poc/app.vue index ae381fe..3a788a3 100644 --- a/src/vue-poc/app.vue +++ b/src/vue-poc/app.vue @@ -10,7 +10,8 @@ width="500" > - + + @@ -75,7 +76,7 @@ - Full screen + Full screen @@ -120,6 +121,7 @@ children: [ {href: '/eval',text: 'Query',icon: 'play_circle_outline'}, {href: '/edit',text: 'Edit',icon: 'mode_edit'}, + {href: '/tabs',text: 'Tabs',icon: 'switch_camera'}, {href: '/validate',text: 'Validate',icon: 'playlist_add_check'}, {href: '/transform',text: 'XSLT Transform',icon: 'forward'}, {href: '/tasks',text: 'Tasks',icon: 'update'} @@ -150,7 +152,6 @@ children: [ {href: '/jobs',text: 'Running jobs',icon: 'dashboard'}, {href: '/logs',text: 'Server logs',icon: 'dns'}, - {href: '/timeline',text: 'Time line',icon: 'timelapse'}, {href: '/server/users',text: 'Users',icon: 'supervisor_account'}, {href: '/server/repo',text: 'Server code repository',icon: 'local_library'}, {href: '/ping',text: 'Ping',icon: 'update'} @@ -182,8 +183,9 @@ text: 'More' , model: false, children: [ - {href: '/tabs',text: 'Tabs',icon: 'switch_camera'}, - {href: '/session',text: 'Session',icon: 'person'}, + + {href: '/session',text: 'Session',icon: 'person'}, + {href: '/timeline',text: 'Time line',icon: 'timelapse'}, {href: '/select',text: 'Select',icon: 'extension'}, {href: '/puzzle',text: 'Puzzle',icon: 'extension'}, {href: '/svg',text: 'SVG',icon: 'extension'} diff --git a/src/vue-poc/components/qd-fullscreen.vue b/src/vue-poc/components/qd-fullscreen.vue index 44ab682..7d8bf03 100644 --- a/src/vue-poc/components/qd-fullscreen.vue +++ b/src/vue-poc/components/qd-fullscreen.vue @@ -5,6 +5,7 @@ diff --git a/src/vue-poc/components/vp-selectpath.vue b/src/vue-poc/components/vp-selectpath.vue new file mode 100644 index 0000000..db277df --- /dev/null +++ b/src/vue-poc/components/vp-selectpath.vue @@ -0,0 +1,93 @@ + + + + diff --git a/src/vue-poc/features/collection/files.vue b/src/vue-poc/features/collection/files.vue index 3887e16..7e3f08d 100644 --- a/src/vue-poc/features/collection/files.vue +++ b/src/vue-poc/features/collection/files.vue @@ -9,9 +9,7 @@ {{icon}} - - refresh - + @@ -21,6 +19,9 @@ + + refresh + content_paste S: {{selection.length}} @@ -124,6 +125,7 @@ + diff --git a/src/vue-poc/features/collection/history.vue b/src/vue-poc/features/collection/history.vue index 46f5b8b..13a55ee 100644 --- a/src/vue-poc/features/collection/history.vue +++ b/src/vue-poc/features/collection/history.vue @@ -1,6 +1,9 @@ diff --git a/src/vue-poc/features/edit/tabs.vue b/src/vue-poc/features/edit/tabs.vue new file mode 100644 index 0000000..bc5ab05 --- /dev/null +++ b/src/vue-poc/features/edit/tabs.vue @@ -0,0 +1,131 @@ + + + + diff --git a/src/vue-poc/features/eval/eval.vue b/src/vue-poc/features/eval/eval.vue index efdb0c7..b8f4cea 100644 --- a/src/vue-poc/features/eval/eval.vue +++ b/src/vue-poc/features/eval/eval.vue @@ -67,7 +67,7 @@ - + {{job.id}} {{job.job}} @@ -113,7 +113,7 @@ result: '', done: false, elapsed: null, - show: false, + showJob: false, showError: false, showResult: false, // job: {}, // {id:"12",job:"job13", dateTime:""} @@ -130,14 +130,16 @@ this.xq = val } }, - + // execute imediatly run(){ - this.awaitResult(false) + + this.showResult= true; this.start = performance.now(); HTTPNE.post("eval/execute",Qs.stringify({xq:this.xq})) .then(r=>{ + console.log("exec:",r); this.elapsed=Math.floor(performance.now() - this.start); - this.result=r.data.result + this.result=r.data.job this.jobId=null }) .catch(r=> { @@ -148,15 +150,16 @@ }); localforage.setItem('eval/xq', this.xq) }, + // submit(){ - this.showError=this.showResult=this.show=false + this.showError=this.showResult=this.showJob=false this.start = performance.now(); console.log("*****",Qs.stringify({xq:this.xq})); HTTP.post("eval/submit",Qs.stringify({xq:this.xq})) .then(r=>{ this.elapsed=Math.floor(performance.now() - this.start); this.job=r.data - this.show=true + this.showJob=true this.pollState() }); diff --git a/src/vue-poc/features/tabs.vue b/src/vue-poc/features/tabs.vue deleted file mode 100644 index dde2056..0000000 --- a/src/vue-poc/features/tabs.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - - diff --git a/src/vue-poc/static/app-gen.js b/src/vue-poc/static/app-gen.js index ac92961..3d8a88a 100644 --- a/src/vue-poc/static/app-gen.js +++ b/src/vue-poc/static/app-gen.js @@ -1,4 +1,4 @@ -// generated 2018-03-13T22:19:53.996Z +// generated 2018-03-18T22:12:38.816Z // src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/qd-confirm.vue Vue.component('qd-confirm',{template:` @@ -28,6 +28,7 @@ Vue.component('qd-confirm',{template:` Vue.component('qd-fullscreen',{template:` {{ fullscreenIcon }} + `, @@ -454,6 +455,92 @@ Vue.component('vp-notifications',{template:` } ); +// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/vp-selectpath.vue +Vue.component('vp-selectpath',{template:` + + + + add_circle + + + + + + Add a new tab + + + Cancel + + + + Content: + + + + Empty + fiber_new + + + XMLDB + favorite + + + Webfile + account_box + + + + empty + + + + + + + + + + + + + + + + + + + + + + + + Add tab + + + `, + + props: { + frmfav: Boolean + }, + data(){ + return { + type: 0, + xmldb: "", + webfile:"" + } + }, + methods:{ + set(v){ + this.$emit('update:frmfav', v) + }, + + favorite(){ + this.$emit('selectpath', {type:this.type}) + } + } +} + ); + // src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/vue-ace.vue Vue.component('vue-ace',{template:`
@@ -781,9 +868,7 @@ const Files=Vue.extend({template:` {{icon}} - - refresh - + @@ -792,6 +877,9 @@ const Files=Vue.extend({template:` + + refresh + content_paste S: {{selection.length}} @@ -892,19 +980,21 @@ const Files=Vue.extend({template:` - - - - {{ selection[0] && selection[0].name }} + `, @@ -1049,7 +1139,10 @@ const Files=Vue.extend({template:` // src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/collection/history.vue const History=Vue.extend({template:` - + + + + History @@ -1060,6 +1153,8 @@ const History=Vue.extend({template:` + + `, @@ -1395,6 +1490,126 @@ const Edit=Vue.extend({template:` ); +// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/edit/tabs.vue +const Tabs=Vue.extend({template:` +
+ + + {{ currentItem }} + add_circle + + + + + {{ items.length }} + arrow_drop_down + + + + + + + + + + + + + insert_drive_file + + {{ item.name }} + + + close + + + + + + + + + + + +
+ + + +
+
+
+
+
+ `, + + data () { + return { + showadd: false, + nextId:4, + a1:"", + currentItem: null, + items: [ + {name:"web.txt", id:"1", mode:"text", + text:"1 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."}, + + {name:"Shopping.xq", id:"2", mode: "xquery" , + text:"2 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."}, + + {name:"videos.xml", id:"3", mode:"xml", + text:"2 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."}, + + ], + wrap: true, + mode: "xquery", + aceSettings: {} + } + }, + + methods:{ + tabClose(item){ + alert("close:"+ item.id); + }, + setItem(v){ + //alert(v); + this.currentItem=v; + }, + + addItem(){ + var tab={name: "AA"+this.nextId, + id: ""+this.nextId, + mode: "xml", + text: "New text" +this.nextId + }; + this.items.push (tab); + this.currentItem="tab-" + this.nextId + this.nextId++; + }, + onResize(){ + var el=this.$refs["ace"]; + for (e of el){ + console.log("top",e.offsetTop) + var h=Math.max(1,window.innerHeight - e.offsetTop -200) + console.log("h",h) + e.style.height=h +"px"; + } + }, + }, + + computed:{ + sorted(){ + return this.items.slice(0).sort() + } + }, + beforeRouteEnter (to, from, next) { + settings.getItem('settings/ace') + .then( v =>{ + next(vm => {vm.aceSettings = v;}) + }) + }, +} + ); + // src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/eval/eval.vue const Eval=Vue.extend({template:` @@ -1461,7 +1676,7 @@ const Eval=Vue.extend({template:` - + {{job.id}} {{job.job}} @@ -1505,7 +1720,7 @@ const Eval=Vue.extend({template:` result: '', done: false, elapsed: null, - show: false, + showJob: false, showError: false, showResult: false, // job: {}, // {id:"12",job:"job13", dateTime:""} @@ -1522,14 +1737,16 @@ const Eval=Vue.extend({template:` this.xq = val } }, - + // execute imediatly run(){ - this.awaitResult(false) + + this.showResult= true; this.start = performance.now(); HTTPNE.post("eval/execute",Qs.stringify({xq:this.xq})) .then(r=>{ + console.log("exec:",r); this.elapsed=Math.floor(performance.now() - this.start); - this.result=r.data.result + this.result=r.data.job this.jobId=null }) .catch(r=> { @@ -1540,15 +1757,16 @@ const Eval=Vue.extend({template:` }); localforage.setItem('eval/xq', this.xq) }, + // submit(){ - this.showError=this.showResult=this.show=false + this.showError=this.showResult=this.showJob=false this.start = performance.now(); console.log("*****",Qs.stringify({xq:this.xq})); HTTP.post("eval/submit",Qs.stringify({xq:this.xq})) .then(r=>{ this.elapsed=Math.floor(performance.now() - this.start); this.job=r.data - this.show=true + this.showJob=true this.pollState() }); @@ -3705,75 +3923,6 @@ const Svg=Vue.extend({template:` ); -// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/tabs.vue -const Tabs=Vue.extend({template:` -
- - - {{ currentItem }} - - - - search - - - more_vert - - - - - - favorite - - {{ i }} - - - close - - - - - - More - arrow_drop_down - - - - - close - - - {{ item }} - - - - - - - - - - - {{ item }} - {{ text }} - - - -
- `, - - data () { - return { - currentItem: 'tab-News', - items: [ - 'Web', 'Shopping', 'Videos', 'Images', 'News', 'Maps', 'Books', 'Flights', 'Apps' - ], - - text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.' - } - } -} - ); - // src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/tasks/model.build/model.vue const Model=Vue.extend({template:` @@ -4656,7 +4805,8 @@ const Vuepoc=Vue.extend({template:` - +
+ @@ -4720,7 +4870,7 @@ const Vuepoc=Vue.extend({template:` - Full screen + Full screen @@ -4764,6 +4914,7 @@ const Vuepoc=Vue.extend({template:` children: [ {href: '/eval',text: 'Query',icon: 'play_circle_outline'}, {href: '/edit',text: 'Edit',icon: 'mode_edit'}, + {href: '/tabs',text: 'Tabs',icon: 'switch_camera'}, {href: '/validate',text: 'Validate',icon: 'playlist_add_check'}, {href: '/transform',text: 'XSLT Transform',icon: 'forward'}, {href: '/tasks',text: 'Tasks',icon: 'update'} @@ -4794,7 +4945,6 @@ const Vuepoc=Vue.extend({template:` children: [ {href: '/jobs',text: 'Running jobs',icon: 'dashboard'}, {href: '/logs',text: 'Server logs',icon: 'dns'}, - {href: '/timeline',text: 'Time line',icon: 'timelapse'}, {href: '/server/users',text: 'Users',icon: 'supervisor_account'}, {href: '/server/repo',text: 'Server code repository',icon: 'local_library'}, {href: '/ping',text: 'Ping',icon: 'update'} @@ -4826,8 +4976,9 @@ const Vuepoc=Vue.extend({template:` text: 'More' , model: false, children: [ - {href: '/tabs',text: 'Tabs',icon: 'switch_camera'}, - {href: '/session',text: 'Session',icon: 'person'}, + + {href: '/session',text: 'Session',icon: 'person'}, + {href: '/timeline',text: 'Time line',icon: 'timelapse'}, {href: '/select',text: 'Select',icon: 'extension'}, {href: '/puzzle',text: 'Puzzle',icon: 'extension'}, {href: '/svg',text: 'SVG',icon: 'extension'} diff --git a/src/vue-poc/static/app.html b/src/vue-poc/static/app.html index ba6e3ea..e173d51 100644 --- a/src/vue-poc/static/app.html +++ b/src/vue-poc/static/app.html @@ -10,7 +10,7 @@ - + @@ -21,7 +21,7 @@
-

vue-poc (v0.3.2)

+

vue-poc (v0.3.3)

@@ -37,7 +37,7 @@ - + diff --git a/src/vue-poc/static/serviceworker.js b/src/vue-poc/static/serviceworker.js index 8ebbd0b..2a48b9c 100644 --- a/src/vue-poc/static/serviceworker.js +++ b/src/vue-poc/static/serviceworker.js @@ -5,7 +5,7 @@ console.log('WORKER: executing.'); /* A version number is useful when updating the worker logic, allowing you to remove outdated cache entries during the update. */ -var version = 'v1::'; +var version = 'v1:1:'; /* These resources will be downloaded and cached by the service worker during the installation process. If any resource fails to be downloaded,