[fix] edit panel
This commit is contained in:
parent
d28c1b94aa
commit
482834b75c
@ -177,7 +177,7 @@
|
||||
methods:{
|
||||
file (val) {
|
||||
// with query, resulting in /register?plan=private
|
||||
router.push({ path: 'edit', query: { url: this.url+"/"+val,protocol:this.protocol }})
|
||||
router.push({ path: 'edit', query: { url: this.fullurl(val) }})
|
||||
},
|
||||
folder (item) {
|
||||
this.url=this.url+item.name+"/"
|
||||
@ -240,9 +240,13 @@
|
||||
},
|
||||
selectNone(){
|
||||
this.items.forEach(item=>{item.selected=false})
|
||||
}
|
||||
},
|
||||
fullurl(val){
|
||||
return this.protocol + ":" +this.url+"/"+val
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
|
||||
icon(){
|
||||
return (this.protocol=="xmldb")?"developer_mode":"folder"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<template id="edit">
|
||||
<v-container >
|
||||
<v-container fluid >
|
||||
<v-snackbar top color="error" v-model="snackbar">
|
||||
{{ message }}
|
||||
<v-btn text @click="snackbar = false"><v-icon>highlight_off</v-icon></v-btn>
|
||||
|
@ -23,12 +23,12 @@ declare
|
||||
%output:method("json")
|
||||
function vue-api:edit-get($url as xs:string)
|
||||
{
|
||||
let $u:=resolve:uri($url)
|
||||
let $u:=resolve:uri($url)=>trace("RESOLVE: ")
|
||||
return <json type="object">{
|
||||
element protocol{ $u?protocol},
|
||||
element uri { $u?uri },
|
||||
element mimetype { fetch:content-type($u?uri) },
|
||||
element data { $u?fnGet() }
|
||||
element mimetype { $u?fnMime() },
|
||||
element data { $u?fnGet() =>serialize()}
|
||||
}</json>
|
||||
};
|
||||
|
||||
|
@ -6,6 +6,14 @@
|
||||
<template v-slot:item.name="{ item }">
|
||||
<span>{{ item.name }} </span>
|
||||
</template>
|
||||
<template v-slot:item.icon="{ item }">
|
||||
<v-chip label>
|
||||
<v-icon left>
|
||||
{{item.icon }}
|
||||
</v-icon>
|
||||
{{item.icon }}
|
||||
</v-chip>
|
||||
</template>
|
||||
<template v-slot:actions>
|
||||
<v-list-item @click="remove">
|
||||
<v-list-item-avatar><v-icon>delete</v-icon></v-list-item-avatar>
|
||||
|
@ -43,19 +43,25 @@ as map(*){
|
||||
|
||||
default
|
||||
return $protocol
|
||||
|
||||
let $_:=trace($protocol,"protocol: ")
|
||||
let $getfn:= switch ($protocol)
|
||||
case "xmldb"
|
||||
return function(){ doc($uri)}
|
||||
return function(){ doc($uri)}
|
||||
|
||||
default
|
||||
return function(){ fetch:text($uri)}
|
||||
|
||||
return function(){ fetch:text($uri)}
|
||||
let $getct:= switch ($protocol)
|
||||
case "xmldb"
|
||||
return function(){ "text/xml" }
|
||||
|
||||
default
|
||||
return function(){ fetch:content-type($uri)}
|
||||
return map{
|
||||
"protocol": $protocol,
|
||||
"uri": $uri,
|
||||
"isDrive": $isDrive,
|
||||
"fnGet": $getfn
|
||||
"fnGet": $getfn,
|
||||
"fnMime": $getct
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// generated 2020-11-07T23:04:20.292Z
|
||||
// generated 2020-11-13T11:31:22.679Z
|
||||
|
||||
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/qd-autoheight.vue
|
||||
Vue.component('qd-autoheight',{template:`
|
||||
@ -2882,7 +2882,7 @@ const Files=Vue.extend({template:`
|
||||
methods:{
|
||||
file (val) {
|
||||
// with query, resulting in /register?plan=private
|
||||
router.push({ path: 'edit', query: { url: this.url+"/"+val,protocol:this.protocol }})
|
||||
router.push({ path: 'edit', query: { url: this.fullurl(val) }})
|
||||
},
|
||||
folder (item) {
|
||||
this.url=this.url+item.name+"/"
|
||||
@ -2945,9 +2945,13 @@ const Files=Vue.extend({template:`
|
||||
},
|
||||
selectNone(){
|
||||
this.items.forEach(item=>{item.selected=false})
|
||||
}
|
||||
},
|
||||
fullurl(val){
|
||||
return this.protocol + ":" +this.url+"/"+val
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
|
||||
icon(){
|
||||
return (this.protocol=="xmldb")?"developer_mode":"folder"
|
||||
},
|
||||
@ -3496,7 +3500,7 @@ created:function(){
|
||||
|
||||
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/edit/edit.vue
|
||||
const Edit=Vue.extend({template:`
|
||||
<v-container>
|
||||
<v-container fluid>
|
||||
<v-snackbar top color="error" v-model="snackbar">
|
||||
{{ message }}
|
||||
<v-btn text @click="snackbar = false"><v-icon>highlight_off</v-icon></v-btn>
|
||||
@ -6227,6 +6231,14 @@ const Mimetype=Vue.extend({template:`
|
||||
<template v-slot:item.name="{ item }">
|
||||
<span>{{ item.name }} </span>
|
||||
</template>
|
||||
<template v-slot:item.icon="{ item }">
|
||||
<v-chip label>
|
||||
<v-icon left>
|
||||
{{item.icon }}
|
||||
</v-icon>
|
||||
{{item.icon }}
|
||||
</v-chip>
|
||||
</template>
|
||||
<template v-slot:actions>
|
||||
<v-list-item @click="remove">
|
||||
<v-list-item-avatar><v-icon>delete</v-icon></v-list-item-avatar>
|
||||
|
Loading…
Reference in New Issue
Block a user