diff --git a/src/components/AllApps.vue b/src/components/AllApps.vue index 202a4085e5f574cbe51b488542e938fc01e1e0cf..d7002fd586602d4bcc743c7ead6d2b873b9e4071 100755 --- a/src/components/AllApps.vue +++ b/src/components/AllApps.vue @@ -28,7 +28,7 @@

{{ t(appName, 'Welcome back') }} {{ displayName }}

-
+
{{ t(appName, 'Show All Apps') }} {{ t(appName, 'Show Less Apps') }}
@@ -64,6 +64,10 @@
{{ entry.name }}
+
+ {{ t(appName, 'Show All Apps') }} + {{ t(appName, 'Show Less Apps') }} +
@@ -75,7 +79,9 @@ export default { name: 'AllApps', data() { return { - defaultAppCount: 12, + mobileAppCount: 9, + desktopAppCount: 12, + defaultAppCount: this.isMobile() ? this.mobileAppCount : this.desktopAppCount, showAllApps: false, entries: loadState(APPLICATION_NAME, 'entries'), displayName: loadState(APPLICATION_NAME, 'displayName'), @@ -83,7 +89,19 @@ export default { documentsBaseDirectory: loadState(APPLICATION_NAME, 'documentsBaseDirectory'), } }, + mounted() { + window.addEventListener('resize', this.updateDefaultAppCount) + }, + beforeDestroy() { + window.removeEventListener('resize', this.updateDefaultAppCount) + }, methods: { + isMobile() { + return window.innerWidth <= 768 + }, + updateDefaultAppCount() { + this.defaultAppCount = this.isMobile() ? this.mobileAppCount : this.desktopAppCount + }, getHref(entry) { const extensions = { onlyoffice_docx: '.docx', @@ -161,8 +179,8 @@ export default { text-align: center; width: 16.6666667%; float: left; - margin-top: 10px; - margin-bottom: 10px; + margin-top: 6px; + margin-bottom: 6px; padding: 20px 0; } @media only screen and (max-width: 768px) { diff --git a/src/components/StorageLayout.vue b/src/components/StorageLayout.vue index a539a23eebfe927fcf8777fdab1d178bfe6d41a6..790c6276a5665364396af59d974d8156d753693f 100755 --- a/src/components/StorageLayout.vue +++ b/src/components/StorageLayout.vue @@ -247,6 +247,7 @@ a { .upgrade__main_div { padding-right: 0; + margin-top: 24px; } .align-center {