fix: UI fixes and changes on timelapse page (#430)

* fix: truncated settings menu

Signed-off-by: steadyjaw <martin.keilaus@gmail.com>

* refactor: change probe chips to label

Signed-off-by: steadyjaw <martin.keilaus@gmail.com>

* refactor(timelapse): change button color and make responsive

Signed-off-by: steadyjaw <martin.keilaus@gmail.com>

* refactor: change display helpers of some buttons

* fix(#390): encodeURI of thumbnails in files page

Signed-off-by: steadyjaw <martin.keilaus@gmail.com>

* fix: responsivity of timelapse-page

Signed-off-by: steadyjaw <martin.keilaus@gmail.com>

* refactor(timelapse): more responsiveness

Signed-off-by: steadyjaw <martin.keilaus@gmail.com>
This commit is contained in:
steadyjaw authored and GitHub committed 2021-11-23 00:14:08 +01:00
1 parent 5d94063973
commit ad52728131
9 files changed
+72 -66

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@
</v-tabs>
</overlay-scrollbars>
</v-col>
<v-col :class="isMobile ? '' : 'pl-0'" :style="isMobile ? '' : 'width: 700px;'">
<v-col :class="isMobile ? '' : 'pl-0'" :style="isMobile ? '' : 'min-width: 500px;'">
<overlay-scrollbars :class="'settings-tabs '+(isMobile ? '' : 'height500')" ref="settingsScroll" :options="{ overflowBehavior: { x: 'hidden' } }">
<component :is="'settings-'+activeTab+'-tab'" @scrollToTop="scrollToTop"></component>
</overlay-scrollbars>
+3 -3
View File
@@ -48,10 +48,10 @@
@click="reloadViewer"
color="info"
class="ml-3"
v-show="reloadRequired"
v-show="!reloadRequired"
>
<span v-show="$vuetify.breakpoint.smAndUp">{{$t("GCodeViewer.ReloadRequired")}}</span>
<v-icon v-show="$vuetify.breakpoint.xs">mdi-reload-alert</v-icon>
<span class="d-none d-sm-block">{{$t("GCodeViewer.ReloadRequired")}}</span>
<v-icon class="d-sm-none">mdi-reload-alert</v-icon>
</v-btn>
<v-btn icon tile @click="resetCamera"><v-icon>mdi-camera-retake</v-icon></v-btn>
</template>
@@ -19,7 +19,7 @@
<v-row v-if="existProbe">
<v-col class="py-1">
<label class="mt-1 d-inline-block">Probe</label>
<v-chip class="float-right" small :color="probe ? 'red' : 'green' " text-color="white">
<v-chip small label class="float-right" :color="probe ? 'red' : 'green' " text-color="white">
<template v-if="probe">
{{ $t('Machine.EndstopPanel.TRIGGERED')}}
</template>
@@ -31,8 +31,8 @@
style="max-width: 300px;"
></v-text-field>
<v-spacer></v-spacer>
<v-btn v-if="this.directoryPermissions.includes('w')" @click="createDirectory" :title="$t('Timelapse.CreateNewDirectory')" color="grey darken-3" class="px-2 minwidth-0 ml-3"><v-icon>mdi-folder-plus</v-icon></v-btn>
<v-btn @click="refreshFileList" :title="$t('Timelapse.RefreshCurrentDirectory')" color="grey darken-3" class="px-2 minwidth-0 ml-3"><v-icon>mdi-refresh</v-icon></v-btn>
<v-btn v-if="this.directoryPermissions.includes('w')" @click="createDirectory" :title="$t('Timelapse.CreateNewDirectory')" class="px-2 minwidth-0 ml-3"><v-icon>mdi-folder-plus</v-icon></v-btn>
<v-btn @click="refreshFileList" :title="$t('Timelapse.RefreshCurrentDirectory')" class="px-2 minwidth-0 ml-3"><v-icon>mdi-refresh</v-icon></v-btn>
</v-col>
</v-row>
</v-card-text>
@@ -10,58 +10,64 @@
<span class="subheading align-baseline"><v-icon left>mdi-information</v-icon>{{ $t("Timelapse.Status")}}</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text v-if="frameUrl" class="pb-0">
<v-row>
<v-col>
<vue-load-image>
<img slot="image" :src="frameUrl" :alt="$t('Timelapse.Preview')" class="w-100" />
<v-progress-circular slot="preloader" indeterminate color="primary"></v-progress-circular>
<v-icon slot="error">mdi-file</v-icon>
</vue-load-image>
</v-col>
</v-row>
</v-card-text>
<v-card-text :class="framesCount ? 'pt-0' : ''">
<v-row v-if="framesCount > 0">
<v-col>
<template v-if="framesCount > 0">
<settings-row :title="$t('Timelapse.Frames')">
{{ framesCount }}
</settings-row>
<v-divider class="my-2"></v-divider>
<settings-row :title="$t('Timelapse.EstimatedLength')" :dynamicSlotWidth="true">
{{ estimatedVideoLength }}
</settings-row>
</template>
<template v-if="['printing', 'paused'].includes(printer_state)">
<v-divider class="my-2"></v-divider>
<settings-row :title="$t('Timelapse.Enabled')" :dynamicSlotWidth="true">
<v-switch v-model="enabled" hide-details class="mt-0"></v-switch>
</settings-row>
<template v-if="enabled">
<v-divider class="my-2" v-if="framesCount > 0"></v-divider>
<settings-row :title="$t('Timelapse.Autorender')" :dynamicSlotWidth="true">
<v-switch v-model="autorender" hide-details class="mt-0"></v-switch>
</settings-row>
</template>
</template>
<template v-if="framesCount > 0 && !['printing', 'paused'].includes(printer_state)">
<v-divider class="mt-2 mb-4"></v-divider>
<v-row>
<v-col class="text-center">
<v-btn text color="primary" :disabled="disableRenderButton" @click="boolDialogRendersettings = true">{{ $t('Timelapse.Render') }}</v-btn>
<v-btn text color="primary" @click="saveFrames" :loading="loadings.includes('timelapse_saveframes')">{{ $t('Timelapse.SaveFrames') }}</v-btn>
</v-col>
</v-row>
</template>
</v-col>
</v-row>
<v-row v-else>
<v-col>
<p class="text-center my-0 font-italic">{{ $t('Timelapse.NoActiveTimelapse') }}</p>
</v-col>
</v-row>
</v-card-text>
<v-row no-gutters>
<v-col class="col-12 col-sm-6 col-md-12 pb-3 pb-md-0 text--secondary">
<v-card-text v-if="frameUrl" class="pb-0">
<v-row>
<v-col>
<vue-load-image>
<img slot="image" :src="frameUrl" :alt="$t('Timelapse.Preview')" class="w-100" />
<v-progress-circular slot="preloader" indeterminate color="primary"></v-progress-circular>
<v-icon slot="error">mdi-file</v-icon>
</vue-load-image>
</v-col>
</v-row>
</v-card-text>
</v-col>
<v-col class="col-12 col-sm-6 col-md-12 pt-3 pt-md-0 text--secondary" align-self="center">
<v-card-text :class="framesCount ? 'pt-0' : ''">
<v-row v-if="framesCount > 0">
<v-col>
<template v-if="framesCount > 0">
<settings-row :title="$t('Timelapse.Frames')">
{{ framesCount }}
</settings-row>
<v-divider class="my-2"></v-divider>
<settings-row :title="$t('Timelapse.EstimatedLength')" :dynamicSlotWidth="true">
{{ estimatedVideoLength }}
</settings-row>
</template>
<template v-if="['printing', 'paused'].includes(printer_state)">
<v-divider class="my-2"></v-divider>
<settings-row :title="$t('Timelapse.Enabled')" :dynamicSlotWidth="true">
<v-switch v-model="enabled" hide-details class="mt-0"></v-switch>
</settings-row>
<template v-if="enabled">
<v-divider class="my-2" v-if="framesCount > 0"></v-divider>
<settings-row :title="$t('Timelapse.Autorender')" :dynamicSlotWidth="true">
<v-switch v-model="autorender" hide-details class="mt-0"></v-switch>
</settings-row>
</template>
</template>
<template v-if="framesCount > 0 && !['printing', 'paused'].includes(printer_state)">
<v-divider class="mt-2 mb-4"></v-divider>
<v-row>
<v-col class="text-center">
<v-btn text color="primary" :disabled="disableRenderButton" @click="boolDialogRendersettings = true">{{ $t('Timelapse.Render') }}</v-btn>
<v-btn text color="primary" @click="saveFrames" :loading="loadings.includes('timelapse_saveframes')">{{ $t('Timelapse.SaveFrames') }}</v-btn>
</v-col>
</v-row>
</template>
</v-col>
</v-row>
<v-row v-else>
<v-col>
<p class="text-center my-0 font-italic">{{ $t('Timelapse.NoActiveTimelapse') }}</p>
</v-col>
</v-row>
</v-card-text>
</v-col>
</v-row>
</v-card>
<v-dialog v-model="boolDialogRendersettings" :max-width="700" :max-height="500" >
<panel :title="$t('Timelapse.RenderSettings')" icon="mdi-text-box-search-outline" card-class="timelapse-rendersettings-dialog" :margin-bottom="false">
+2 -2
View File
@@ -42,8 +42,8 @@
:disabled="['printing', 'paused'].includes(printer_state)"
class="pa-1"
>
<span class="d-none ml-1 d-md-inline">{{ $t("Panels.ToolsPanel.Presets") }}</span>
<v-icon v-show="$vuetify.breakpoint.smAndDown">mdi-fire</v-icon>
<span class="d-none ml-1 d-md-block">{{ $t("Panels.ToolsPanel.Presets") }}</span>
<v-icon class="d-md-none">mdi-fire</v-icon>
<v-icon>mdi-menu-down</v-icon>
</v-btn>
</template>
+1 -1
View File
@@ -15,7 +15,7 @@
<template v-slot:activator="{ on, attrs }">
<v-btn text tile v-bind="attrs" v-on="on">
<v-icon small v-if="'icon' in currentCam" class="mr-2">{{ currentCam.icon }}</v-icon>
<span v-show="$vuetify.breakpoint.mdAndUp">{{ 'name' in currentCam ? currentCam.name : "unknown" }}</span>
<span class="d-none d-md-block">{{ 'name' in currentCam ? currentCam.name : "unknown" }}</span>
<v-icon small>mdi-menu-down</v-icon>
</v-btn>
</template>
+2 -2
View File
@@ -921,7 +921,7 @@ export default class PageFiles extends Mixins(BaseMixin) {
thumb.height >= thumbnailSmallMin && thumb.height <= thumbnailSmallMax
)
if (thumbnail && 'relative_path' in thumbnail) return this.apiUrl+'/server/files/'+this.currentPath+'/'+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 ''
@@ -931,7 +931,7 @@ export default class PageFiles 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+'/'+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 ''
+2 -2
View File
@@ -4,10 +4,10 @@
<template>
<v-row>
<v-col class="col-8">
<v-col class="col-12 col-md-8 pt-0 pt-md-3" :order="$vuetify.breakpoint.mdAndUp ? '' : '2'">
<timelapse-files-panel></timelapse-files-panel>
</v-col>
<v-col class="col-4">
<v-col class="col-12 col-md-4" :order="$vuetify.breakpoint.mdAndUp ? '' : '1'">
<timelapse-status-panel></timelapse-status-panel>
</v-col>
</v-row>