file filter icon change

This commit is contained in:
Čarodej
2021-11-02 08:29:59 +01:00
parent 54167ae366
commit b232701783
10 changed files with 74 additions and 18 deletions
@@ -1,7 +1,14 @@
<template>
<button class="mobile-action-button">
<div class="flex">
<search-icon v-if="icon === 'search'" size="15" class="icon dark-text-theme" />
<hard-drive-icon v-if="icon === 'hard-drive'" size="15" class="icon dark-text-theme" />
<upload-cloud-icon v-if="icon === 'upload-cloud'" size="15" class="icon dark-text-theme" />
<link-icon v-if="icon === 'share'" size="15" class="icon dark-text-theme" />
<trash2-icon v-if="icon === 'trash2'" size="15" class="icon dark-text-theme" />
<users-icon v-if="icon === 'users'" size="15" class="icon dark-text-theme" />
<user-check-icon v-if="icon === 'user-check'" size="15" class="icon dark-text-theme" />
<search-icon v-if="icon === 'search'" size="15" class="icon dark-text-theme" />
<refresh-cw-icon v-if="icon === 'refresh'" size="15" class="icon dark-text-theme" />
<download-icon v-if="icon === 'download'" size="15" class="icon dark-text-theme" />
<copy-icon v-if="icon === 'copy'" size="15" class="icon dark-text-theme" />
@@ -27,7 +34,7 @@
</template>
<script>
import { SearchIcon, RefreshCwIcon, DownloadIcon, CopyIcon, FilterIcon, DollarSignIcon, CheckIcon, XSquareIcon, CheckSquareIcon, FolderPlusIcon, ListIcon, GridIcon, TrashIcon, UserPlusIcon, PlusIcon, CreditCardIcon } from 'vue-feather-icons'
import { UserCheckIcon, HardDriveIcon, UploadCloudIcon, LinkIcon, Trash2Icon, UsersIcon, SearchIcon, RefreshCwIcon, DownloadIcon, CopyIcon, FilterIcon, DollarSignIcon, CheckIcon, XSquareIcon, CheckSquareIcon, FolderPlusIcon, ListIcon, GridIcon, TrashIcon, UserPlusIcon, PlusIcon, CreditCardIcon } from 'vue-feather-icons'
import CloudPlusIcon from '/resources/js/components/FilesView/Icons/CloudPlusIcon'
import SortingIcon from '/resources/js/components/FilesView/Icons/SortingIcon'
@@ -37,6 +44,12 @@
'icon'
],
components: {
UserCheckIcon,
HardDriveIcon,
UploadCloudIcon,
LinkIcon,
Trash2Icon,
UsersIcon,
CheckSquareIcon,
DollarSignIcon,
CreditCardIcon,
@@ -1,7 +1,7 @@
<template>
<button class="mobile-action-button">
<div class="flex">
<upload-cloud-icon class="icon dark-text-theme" size="15" />
<cloud-plus-icon class="icon dark-text-theme" size="15" />
<label label="file" class="label button file-input button-base">
<slot></slot>
<input
@@ -19,10 +19,12 @@
<script>
import { UploadCloudIcon } from 'vue-feather-icons'
import CloudPlusIcon from "./Icons/CloudPlusIcon";
export default {
name: 'MobileActionButtonUpload',
components: {
CloudPlusIcon,
UploadCloudIcon,
},
methods: {
+13
View File
@@ -229,6 +229,19 @@ const FunctionHelpers = {
}[this.$route.name]
}
Vue.prototype.$getCurrentSectionIcon = function () {
return {
'RecentUploads': 'upload-cloud',
'MySharedItems': 'share',
'Trash': 'trash2',
'Public': 'hard-drive',
'Files': 'hard-drive',
'TeamFolders': 'users',
'SharedWithMe': 'user-check',
}[this.$router.currentRoute.name]
}
Vue.prototype.$getDataByLocation = function () {
let routes = {
+1 -1
View File
@@ -83,7 +83,7 @@
<MobileActionButton @click.native="$openSpotlight" icon="search">
{{ $t('Spotlight') }}
</MobileActionButton>
<MobileActionButton @click.native="$showMobileMenu('file-filter')" icon="filter">
<MobileActionButton @click.native="$showMobileMenu('file-filter')" :icon="$getCurrentSectionIcon()">
{{ $getCurrentSectionName() }}
</MobileActionButton>
<MobileActionButton @click.native="$showMobileMenu('create-list')" v-if="$checkPermission(['master', 'editor'])" icon="cloud-plus">
@@ -52,7 +52,7 @@
<MobileActionButton @click.native="$openSpotlight" icon="search">
{{ $t('Spotlight')}}
</MobileActionButton>
<MobileActionButton @click.native="$showMobileMenu('file-filter')" icon="filter">
<MobileActionButton @click.native="$showMobileMenu('file-filter')" :icon="$getCurrentSectionIcon()">
{{ $getCurrentSectionName() }}
</MobileActionButton>
<MobileActionButton @click.native="$enableMultiSelectMode" icon="check-square">
@@ -43,7 +43,7 @@
<MobileActionButton @click.native="$openSpotlight" icon="search">
{{ $t('Spotlight') }}
</MobileActionButton>
<MobileActionButton @click.native="$showMobileMenu('file-filter')" icon="filter">
<MobileActionButton @click.native="$showMobileMenu('file-filter')" :icon="$getCurrentSectionIcon()">
{{ $getCurrentSectionName() }}
</MobileActionButton>
<MobileActionButtonUpload>
+1 -1
View File
@@ -67,7 +67,7 @@
<MobileActionButton @click.native="$openSpotlight" icon="search">
{{ $t('Spotlight') }}
</MobileActionButton>
<MobileActionButton @click.native="$showMobileMenu('file-filter')" icon="filter">
<MobileActionButton @click.native="$showMobileMenu('file-filter')" :icon="$getCurrentSectionIcon()">
{{ $getCurrentSectionName() }}
</MobileActionButton>
<MobileActionButton v-if="canEdit" @click.native="$showMobileMenu('create-list')" icon="cloud-plus">
+1 -1
View File
@@ -91,7 +91,7 @@
<MobileActionButton @click.native="$openSpotlight" icon="search">
{{ $t('Spotlight') }}
</MobileActionButton>
<MobileActionButton @click.native="$showMobileMenu('file-filter')" icon="filter">
<MobileActionButton @click.native="$showMobileMenu('file-filter')" :icon="$getCurrentSectionIcon()">
{{ $getCurrentSectionName() }}
</MobileActionButton>
<MobileActionButton @click.native="$showMobileMenu('create-list')" v-if="$checkPermission(['master', 'editor'])" icon="cloud-plus">
+1 -1
View File
@@ -46,7 +46,7 @@
<MobileActionButton @click.native="$openSpotlight" icon="search">
{{ $t('Spotlight')}}
</MobileActionButton>
<MobileActionButton @click.native="$showMobileMenu('file-filter')" icon="filter">
<MobileActionButton @click.native="$showMobileMenu('file-filter')" :icon="$getCurrentSectionIcon()">
{{ $getCurrentSectionName() }}
</MobileActionButton>
<MobileActionButton @click.native="$emptyTrash" icon="trash">