Refactor usages for prettyBytes

pull/4870/head
Angel Fernando Quiroz Campos 1 year ago
parent f8339d1b2d
commit b73449f9ea
  1. 6
      assets/vue/main.js
  2. 4
      assets/vue/views/documents/DocumentForHtmlEditor.vue
  3. 3
      assets/vue/views/documents/DocumentsList.vue
  4. 4
      assets/vue/views/documents/ListQuasar.vue
  5. 4
      assets/vue/views/personalfile/List.vue
  6. 4
      assets/vue/views/personalfile/Shared.vue

@ -215,12 +215,6 @@ app.component("TinyEditor", Editor)
app.config.globalProperties.axios = axios
app.config.globalProperties.window = window
const prettyBytes = require("pretty-bytes")
app.config.globalProperties.$filters = {
prettyBytes,
}
window.Alpine = Alpine
Alpine.start()

@ -84,7 +84,7 @@
<template #body="slotProps">
{{
slotProps.data.resourceNode.resourceFile
? $filters.prettyBytes(slotProps.data.resourceNode.resourceFile.size)
? prettyBytes(slotProps.data.resourceNode.resourceFile.size)
: ""
}}
</template>
@ -157,6 +157,7 @@ import DocumentsFilterForm from "../../components/documents/Filter"
import { RESOURCE_LINK_PUBLISHED } from "../../components/resource_links/visibility"
import { useI18n } from "vue-i18n"
import { useFormatDate } from "../../composables/formatDate"
import prettyBytes from "pretty-bytes"
export default {
name: "DocumentForHtmlEditor",
@ -196,6 +197,7 @@ export default {
filters: {},
submitted: false,
relativeDatetime,
prettyBytes,
}
return data

@ -112,7 +112,7 @@
<template #body="slotProps">
{{
slotProps.data.resourceNode.resourceFile
? $filters.prettyBytes(slotProps.data.resourceNode.resourceFile.size)
? prettyBytes(slotProps.data.resourceNode.resourceFile.size)
: ""
}}
</template>
@ -305,6 +305,7 @@ import BaseChart from "../../components/basecomponents/BaseChart.vue"
import DocumentAudioRecorder from "../../components/documents/DocumentAudioRecorder.vue"
import { useNotification } from "../../composables/notification"
import { useSecurityStore } from "../../store/securityStore"
import prettyBytes from "pretty-bytes"
const store = useStore()
const route = useRoute()

@ -61,7 +61,7 @@
auto-width
>
<span v-if="props.row.resourceNode.resourceFile">
{{ $filters.prettyBytes(props.row.resourceNode.resourceFile.size) }}
{{ prettyBytes(props.row.resourceNode.resourceFile.size) }}
</span>
</q-td>
</template>
@ -89,6 +89,7 @@ import Toolbar from "../../components/Toolbar.vue"
import ResourceIcon from "../../components/documents/ResourceIcon.vue"
import { useRoute } from "vue-router"
import moment from "moment"
import prettyBytes from "pretty-bytes"
/*const servicePrefix = 'documents';
const { getters, actions } = list(servicePrefix);*/
@ -120,6 +121,7 @@ export default {
selected: [],
selectMode: "multi",
isBusy: false,
prettyBytes,
}
},
created() {

@ -87,7 +87,7 @@
<template #body="slotProps">
{{
slotProps.data.resourceNode.resourceFile
? $filters.prettyBytes(slotProps.data.resourceNode.resourceFile.size)
? prettyBytes(slotProps.data.resourceNode.resourceFile.size)
: ""
}}
</template>
@ -261,6 +261,7 @@ import isEmpty from "lodash/isEmpty"
import { RESOURCE_LINK_PUBLISHED } from "../../components/resource_links/visibility"
import { useI18n } from "vue-i18n"
import { useFormatDate } from "../../composables/formatDate"
import prettyBytes from "pretty-bytes"
export default {
name: "PersonalFileList",
@ -316,6 +317,7 @@ export default {
item: {},
filters: { shared: 0, loadNode: 1 },
submitted: false,
prettyBytes,
relativeDatetime
}

@ -49,7 +49,7 @@
<template #body="slotProps">
{{
slotProps.data.resourceNode.resourceFile
? $filters.prettyBytes(slotProps.data.resourceNode.resourceFile.size)
? prettyBytes(slotProps.data.resourceNode.resourceFile.size)
: ""
}}
</template>
@ -88,6 +88,7 @@ import ResourceFileLink from "../../components/documents/ResourceFileLink.vue"
import DataFilter from "../../components/DataFilter"
import isEmpty from "lodash/isEmpty"
import { useFormatDate } from "../../composables/formatDate"
import prettyBytes from "pretty-bytes"
export default {
name: "PersonalFileShared",
@ -124,6 +125,7 @@ export default {
filters: { shared: 1, loadNode: 0 },
submitted: false,
relativeDatetime,
prettyBytes,
}
},
created() {

Loading…
Cancel
Save