Skip to content

Commit

Permalink
added svg wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
memurats committed Jan 15, 2025
1 parent 7dd9cba commit f70f543
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
23 changes: 23 additions & 0 deletions css/apps/apps.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,27 @@
margin: 73px 0 0;
width: 100%;
}

.app-navigation {

.storage-quota {

&__title {

.icon-vue {
height: 30px;
width: 30px;
min-height: 30px;
min-width: 30px;

svg {
height: 30px;
width: 30px;
max-height: 30px;
max-width: 30px;
}
}
}
}
}
}
8 changes: 7 additions & 1 deletion src/components/StorageQuota.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="storage-quota">
<div class="storage-quota__title" @click.stop.prevent="debounceUpdateStorageStats">
<img class="" src="../../img/app-logo.svg" alt="">
<NcIconSvgWrapper :svg="currentImage" size="30" />
<!-- eslint-disable-next-line vue/no-v-html -->
<p v-html="storageStatsTitle" />
</div>
Expand All @@ -27,10 +27,13 @@ import { generateUrl } from '@nextcloud/router'
import ProgressBar from './ProgressBar.vue'
import axios from '@nextcloud/axios'
import { translate, getCanonicalLocale } from '@nextcloud/l10n'
import { NcIconSvgWrapper } from '@nextcloud/vue'
import cloudSvg from '../../img/app-logo.svg'
export default {
components: {
ProgressBar,
NcIconSvgWrapper,
},
data() {
return {
Expand Down Expand Up @@ -59,6 +62,9 @@ export default {
memoryUsage() {
return parseFloat((this.storageStats?.used / this.storageStats?.quota) * 100).toFixed(2).toLocaleString(getCanonicalLocale())
},
currentImage() {
return cloudSvg
},
},
beforeMount() {
this.loadStorageStats()
Expand Down

0 comments on commit f70f543

Please sign in to comment.