Compare commits

...
Author SHA1 Message Date
Stefan Dej ce09984983 chore: push version number to v2.1.0-beta3
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-12-02 00:15:03 +01:00
Stefan Dej 9bcbfa48de fix: escape urls also escape / in the url
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-12-01 23:39:14 +01:00
Stefan Dej 43674bf2d5 fix: iOS orientation changed didn't trigger resize event
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-11-30 23:16:41 +01:00
4 changed files with 11 additions and 8 deletions

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "mainsail",
"version": "2.1.0-beta2",
"version": "2.1.0-beta3",
"private": true,
"decription": "a klipper web interface",
"author": {
+5 -2
View File
@@ -275,14 +275,17 @@ export default class App extends Mixins(BaseMixin) {
}
appHeight() {
const doc = document.documentElement
doc.style.setProperty('--app-height', window.innerHeight+'px')
this.$nextTick(() => {
const doc = document.documentElement
doc.style.setProperty('--app-height', window.innerHeight+'px')
})
}
mounted(): void {
this.drawFavicon(this.print_percent)
this.appHeight()
window.addEventListener('resize', this.appHeight)
window.addEventListener('orientationchange', this.appHeight)
}
}
</script>
+3 -3
View File
@@ -900,7 +900,7 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
thumb.height >= thumbnailSmallMin && thumb.height <= thumbnailSmallMax
)
if (thumbnail && 'relative_path' in thumbnail) return this.apiUrl+'/server/files/'+this.currentPath+'/'+encodeURIComponent(thumbnail.relative_path)+'?timestamp='+item.modified.getTime()
if (thumbnail && 'relative_path' in thumbnail) return this.apiUrl+'/server/files/'+this.currentPath+'/'+encodeURI(thumbnail.relative_path)+'?timestamp='+item.modified.getTime()
}
return ''
@@ -910,7 +910,7 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
if (item.thumbnails?.length) {
const thumbnail = item.thumbnails.find(thumb => thumb.width >= thumbnailBigMin)
if (thumbnail && 'relative_path' in thumbnail) return this.apiUrl+'/server/files/'+this.currentPath+'/'+encodeURIComponent(thumbnail.relative_path)+'?timestamp='+item.modified.getTime()
if (thumbnail && 'relative_path' in thumbnail) return this.apiUrl+'/server/files/'+this.currentPath+'/'+encodeURI(thumbnail.relative_path)+'?timestamp='+item.modified.getTime()
}
return ''
@@ -1014,7 +1014,7 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
downloadFile() {
const filename = (this.currentPath+'/'+this.contextMenu.item.filename)
const href = this.apiUrl + '/server/files/' + encodeURIComponent(filename)
const href = this.apiUrl + '/server/files/' + encodeURI(filename)
window.open(href)
}
+2 -2
View File
@@ -206,7 +206,7 @@ export default class JobqueuePanel extends Mixins(BaseMixin) {
)
const path = item.filename.lastIndexOf('/') !== -1 ? 'gcodes/'+item.filename.slice(0, item.filename.lastIndexOf('/')) : 'gcodes'
if (thumbnail && 'relative_path' in thumbnail) return this.apiUrl+'/server/files/'+path+'/'+encodeURIComponent(thumbnail.relative_path)+'?timestamp='+item.metadata?.modified.getTime()
if (thumbnail && 'relative_path' in thumbnail) return this.apiUrl+'/server/files/'+path+'/'+encodeURI(thumbnail.relative_path)+'?timestamp='+item.metadata?.modified.getTime()
}
return ''
@@ -217,7 +217,7 @@ export default class JobqueuePanel extends Mixins(BaseMixin) {
const thumbnail = item?.metadata?.thumbnails.find((thumb: any) => thumb.width >= thumbnailBigMin)
const path = item.filename.lastIndexOf('/') !== -1 ? 'gcodes/'+item.filename.slice(0, item.filename.lastIndexOf('/')) : 'gcodes'
if (thumbnail && 'relative_path' in thumbnail) return this.apiUrl+'/server/files/'+path+'/'+encodeURIComponent(thumbnail.relative_path)+'?timestamp='+item.metadata?.modified.getTime()
if (thumbnail && 'relative_path' in thumbnail) return this.apiUrl+'/server/files/'+path+'/'+encodeURI(thumbnail.relative_path)+'?timestamp='+item.metadata?.modified.getTime()
}
return ''