mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 12:18:45 -05:00
completed migration of file view to generic model list
This commit is contained in:
16
vue/src/components/BetaWarning.vue
Normal file
16
vue/src/components/BetaWarning.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<b-alert show variant="warning">
|
||||
<b-badge>BETA</b-badge>
|
||||
{{ $t('warning_feature_beta') }}
|
||||
</b-alert>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "BetaWarning"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -28,7 +28,11 @@
|
||||
|
||||
<b-dropdown-item :href="resolveDjangoUrl('list_automation')">
|
||||
<i class="fas fa-robot fa-fw"></i> {{ Models['AUTOMATION'].name }}
|
||||
</b-dropdown-item>
|
||||
</b-dropdown-item>
|
||||
|
||||
<b-dropdown-item :href="resolveDjangoUrl('list_user_file')">
|
||||
<i class="fas fa-file fa-fw"></i> {{ Models['USERFILE'].name }}
|
||||
</b-dropdown-item>
|
||||
|
||||
</b-dropdown>
|
||||
</span>
|
||||
|
||||
51
vue/src/components/StorageQuota.vue
Normal file
51
vue/src/components/StorageQuota.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div v-if="max_file_size_mb === -1">
|
||||
<b-alert show variant="warning">
|
||||
{{ $t('file_upload_disabled') }}
|
||||
</b-alert>
|
||||
</div>
|
||||
|
||||
<b-progress :max="progress_max" v-else>
|
||||
<b-progress-bar :value="current_file_size_mb" style="text-align: center">
|
||||
<span><strong class="text-dark ">{{ current_file_size_mb.toFixed(2) }} / {{ display_max }} MB</strong></span>
|
||||
</b-progress-bar>
|
||||
</b-progress>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "StorageQuota",
|
||||
props: {},
|
||||
computed: {
|
||||
progress_max() {
|
||||
if (this.max_file_size_mb === 0) {
|
||||
return this.current_file_size_mb * 4
|
||||
}
|
||||
return this.max_file_size_mb
|
||||
},
|
||||
display_max(){
|
||||
if (this.max_file_size_mb === 0) {
|
||||
return '∞'
|
||||
}
|
||||
return this.max_file_size_mb
|
||||
}
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
current_file_size_mb: window.CURRENT_FILE_SIZE_MB,
|
||||
max_file_size_mb: window.MAX_FILE_SIZE_MB
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user