Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move quota info to general info #11279

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: Move quota info to general info in user menu

We've moved the quota information out of its own section in the user menu and into the general information section.
This change makes it easier to find and understand the quota information.

https://github.com/owncloud/web/pull/11279
50 changes: 21 additions & 29 deletions packages/web-runtime/src/components/Topbar/UserMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,24 @@
<span class="profile-info-wrapper" :class="{ 'oc-py-xs': !user.mail }">
<span class="oc-display-block" v-text="user.displayName" />
<span v-if="user.mail" class="oc-text-small" v-text="user.mail" />
<div v-if="quotaEnabled" class="storage-wrapper oc-flex oc-flex-bottom oc-mt-xs">
<oc-icon name="hard-drive-2" size="small" fill-type="line" class="oc-mr-xs" />
<div>
<p class="oc-my-rm">
<span
class="storage-wrapper-quota oc-text-small"
v-text="personalStorageDetailsLabel"
/>
</p>
<oc-progress
v-if="limitedPersonalStorage"
:value="quotaUsagePercent"
:max="100"
size="small"
:variation="quotaProgressVariant"
/>
</div>
</div>
</span>
</li>
<li>
Expand All @@ -83,25 +101,6 @@
<span v-text="$gettext('Preferences')" />
</oc-button>
</li>
<li v-if="quotaEnabled" class="storage-wrapper oc-pl-s">
<oc-icon name="cloud" fill-type="line" class="oc-p-xs" />
<div class="oc-width-1-1">
<p class="oc-my-rm">
<span class="oc-display-block" v-text="personalStorageLabel" />
<span
class="storage-wrapper-quota oc-text-small"
v-text="personalStorageDetailsLabel"
/>
</p>
<oc-progress
v-if="limitedPersonalStorage"
:value="quotaUsagePercent"
:max="100"
size="small"
:variation="quotaProgressVariant"
/>
</div>
</li>
<li>
<oc-button id="oc-topbar-account-logout" appearance="raw" @click="logout">
<oc-icon name="logout-box-r" fill-type="line" class="oc-p-xs" />
Expand Down Expand Up @@ -183,21 +182,14 @@ export default defineComponent({
onPremisesSamAccountName() {
return this.user?.onPremisesSamAccountName
},
personalStorageLabel() {
if (!this.limitedPersonalStorage) {
return this.$gettext('Personal storage')
}
return this.$gettext('Personal storage (%{percentage}% used)', {
percentage: (this.quotaUsagePercent || 0).toString()
})
},
personalStorageDetailsLabel() {
const total = this.quota.total || 0
const used = this.quota.used || 0
return total
? this.$gettext('%{used} of %{total} used', {
? this.$gettext('%{used} of %{total} used (%{percentage}%)', {
used: filesize(used),
total: filesize(total)
total: filesize(total),
percentage: (this.quotaUsagePercent || 0).toString()
})
: this.$gettext('%{used} used', {
used: filesize(used),
Expand Down
Loading