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

[stable30] fix(icons): rename icon components #13974

Merged
merged 3 commits into from
Dec 10, 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
18 changes: 9 additions & 9 deletions src/components/MediaSettings/MediaDevicesSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
:title="t('spreed', 'Refresh devices list')"
:aria-lebel="t('spreed', 'Refresh devices list')"
@click="$emit('refresh')">
<RefreshIcon :size="20" />
<IconRefresh :size="20" />
</NcButton>
</div>
</template>

<script>
import Microphone from 'vue-material-design-icons/Microphone.vue'
import RefreshIcon from 'vue-material-design-icons/Refresh.vue'
import VideoIcon from 'vue-material-design-icons/Video.vue'
import IconMicrophone from 'vue-material-design-icons/Microphone.vue'
import IconRefresh from 'vue-material-design-icons/Refresh.vue'
import IconVideo from 'vue-material-design-icons/Video.vue'

import { t } from '@nextcloud/l10n'

Expand All @@ -45,9 +45,9 @@ export default {
components: {
NcButton,
NcSelect,
Microphone,
RefreshIcon,
VideoIcon,
IconMicrophone,
IconRefresh,
IconVideo,
},

props: {
Expand Down Expand Up @@ -86,8 +86,8 @@ export default {

deviceIcon() {
switch (this.kind) {
case 'audioinput': return Microphone
case 'videoinput': return VideoIcon
case 'audioinput': return IconMicrophone
case 'videoinput': return IconVideo
default: return null
}
},
Expand Down
6 changes: 3 additions & 3 deletions src/components/MediaSettings/MediaDevicesSpeakerTest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<template>
<div class="media-devices-checker">
<VolumeHighIcon class="media-devices-checker__icon" :size="16" />
<IconVolumeHigh class="media-devices-checker__icon" :size="16" />
<NcButton type="secondary" @click="playTestSound">
{{ buttonLabel }}
</NcButton>
Expand All @@ -19,7 +19,7 @@
</template>

<script>
import VolumeHighIcon from 'vue-material-design-icons/VolumeHigh.vue'
import IconVolumeHigh from 'vue-material-design-icons/VolumeHigh.vue'

import { t } from '@nextcloud/l10n'

Expand All @@ -32,8 +32,8 @@ export default {
name: 'MediaDevicesSpeakerTest',

components: {
IconVolumeHigh,
NcButton,
VolumeHighIcon,
},

setup() {
Expand Down
49 changes: 24 additions & 25 deletions src/components/MediaSettings/MediaSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
:aria-label="mirrorToggleLabel"
@click="isMirrored = !isMirrored">
<template #icon>
<ReflectHorizontal :size="20" />
<IconReflectHorizontal :size="20" />
</template>
</NcButton>
<div v-show="!showVideo"
Expand Down Expand Up @@ -65,10 +65,8 @@
:disabled="!videoPreviewAvailable"
@click="toggleVideo">
<template #icon>
<VideoIcon v-if="videoOn"
:size="20" />
<VideoOff v-else
:size="20" />
<IconVideo v-if="videoOn" :size="20" />
<IconVideoOff v-else :size="20" />
</template>
</NcButton>
</div>
Expand Down Expand Up @@ -144,15 +142,15 @@
@click="setSilentCall(true)">
{{ t('spreed', 'The conversation participants will not be notified about this call') }}
<template #icon>
<BellOff :size="16" />
<IconBellOff :size="16" />
</template>
</NcActionButton>
<NcActionButton v-else
:name="t('spreed', 'Normal call')"
close-after-click
@click="setSilentCall(false)">
<template #icon>
<Bell :size="16" />
<IconBell :size="16" />
</template>
{{ t('spreed', 'The conversation participants will be notified about this call') }}
</NcActionButton>
Expand All @@ -177,13 +175,13 @@
<script>
import { computed, markRaw, ref } from 'vue'

import Bell from 'vue-material-design-icons/Bell.vue'
import BellOff from 'vue-material-design-icons/BellOff.vue'
import Cog from 'vue-material-design-icons/Cog.vue'
import Creation from 'vue-material-design-icons/Creation.vue'
import ReflectHorizontal from 'vue-material-design-icons/ReflectHorizontal.vue'
import VideoIcon from 'vue-material-design-icons/Video.vue'
import VideoOff from 'vue-material-design-icons/VideoOff.vue'
import IconBell from 'vue-material-design-icons/Bell.vue'
import IconBellOff from 'vue-material-design-icons/BellOff.vue'
import IconCog from 'vue-material-design-icons/Cog.vue'
import IconCreation from 'vue-material-design-icons/Creation.vue'
import IconReflectHorizontal from 'vue-material-design-icons/ReflectHorizontal.vue'
import IconVideo from 'vue-material-design-icons/Video.vue'
import IconVideoOff from 'vue-material-design-icons/VideoOff.vue'

import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'
import { t } from '@nextcloud/l10n'
Expand Down Expand Up @@ -219,24 +217,25 @@ export default {

components: {
AvatarWrapper,
Bell,
BellOff,
CallButton,
MediaDevicesSelector,
MediaDevicesSpeakerTest,
MediaSettingsTabs,
NcActionButton,
NcActions,
NcButton,
NcCheckboxRadioSwitch,
NcModal,
NcNoteCard,
MediaDevicesSelector,
MediaDevicesSpeakerTest,
MediaSettingsTabs,
ReflectHorizontal,
VideoBackground,
VideoIcon,
VideoOff,
VolumeIndicator,
VideoBackgroundEditor,
VolumeIndicator,
// Icons
IconBell,
IconBellOff,
IconReflectHorizontal,
IconVideo,
IconVideoOff,
},

props: {
Expand Down Expand Up @@ -275,12 +274,12 @@ export default {
const devicesTab = {
id: 'devices',
label: t('spreed', 'Devices'),
icon: markRaw(Cog),
icon: markRaw(IconCog),
}
const backgroundsTab = {
id: 'backgrounds',
label: t('spreed', 'Backgrounds'),
icon: markRaw(Creation),
icon: markRaw(IconCreation),
}
const tabs = computed(() => isVirtualBackgroundAvailable.value ? [devicesTab, backgroundsTab] : [devicesTab])

Expand Down
30 changes: 15 additions & 15 deletions src/components/MediaSettings/VideoBackgroundEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class="background-editor__element"
:class="{'background-editor__element--selected': selectedBackground === 'none'}"
@click="handleSelectBackground('none')">
<Cancel :size="20" />
<IconCancel :size="20" />
{{
// TRANSLATORS: "None" refers to "No background effect applied" in videos, for context, other options are "blur" or "image"
t('spreed', 'None')
Expand All @@ -19,20 +19,20 @@
class="background-editor__element"
:class="{'background-editor__element--selected': selectedBackground === 'blur'}"
@click="handleSelectBackground('blur')">
<Blur :size="20" />
<IconBlur :size="20" />
{{ t('spreed', 'Blur') }}
</button>
<template v-if="predefinedBackgrounds?.length">
<template v-if="canUploadBackgrounds">
<button class="background-editor__element"
@click="clickImportInput">
<Upload :size="20" />
<IconUpload :size="20" />
{{ t('spreed', 'Upload') }}
</button>
<button class="background-editor__element"
:class="{'background-editor__element--selected': isCustomBackground }"
@click="showFilePicker = true">
<Folder :size="20" />
<IconFolder :size="20" />
{{ t('spreed', 'Files') }}
</button>
</template>
Expand All @@ -46,7 +46,7 @@
'background-image': 'url(' + path + ')'
}"
@click="handleSelectBackground(path)">
<CheckBold v-if="selectedBackground === path"
<IconCheckBold v-if="selectedBackground === path"
:size="40"
fill-color="#fff" />
</button>
Expand All @@ -72,11 +72,11 @@
</template>

<script>
import Blur from 'vue-material-design-icons/Blur.vue'
import Cancel from 'vue-material-design-icons/Cancel.vue'
import CheckBold from 'vue-material-design-icons/CheckBold.vue'
import Folder from 'vue-material-design-icons/Folder.vue'
import Upload from 'vue-material-design-icons/Upload.vue'
import IconBlur from 'vue-material-design-icons/Blur.vue'
import IconCancel from 'vue-material-design-icons/Cancel.vue'
import IconCheckBold from 'vue-material-design-icons/CheckBold.vue'
import IconFolder from 'vue-material-design-icons/Folder.vue'
import IconUpload from 'vue-material-design-icons/Upload.vue'

import { showError } from '@nextcloud/dialogs'
import { FilePickerVue } from '@nextcloud/dialogs/filepicker.js'
Expand Down Expand Up @@ -105,12 +105,12 @@ export default {
name: 'VideoBackgroundEditor',

components: {
Blur,
Cancel,
CheckBold,
FilePickerVue,
Folder,
Upload,
IconBlur,
IconCancel,
IconCheckBold,
IconFolder,
IconUpload,
},

props: {
Expand Down
14 changes: 7 additions & 7 deletions src/components/TopBar/CallTime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
type="tertiary"
@click="showPopover = !showPopover">
<template v-if="isRecording || isStartingRecording" #icon>
<RecordCircle v-if="isRecording"
<IconRecordCircle v-if="isRecording"
:size="20"
fill-color="#e9322d" />
<RecordCircle v-else
<IconRecordCircle v-else
:size="20"
fill-color="var(--color-loading-light)" />
</template>
Expand Down Expand Up @@ -51,7 +51,7 @@
:wide="true"
@click="stopRecording">
<template #icon>
<StopIcon :size="20" />
<IconStop :size="20" />
</template>
{{ t('spreed', 'Stop recording') }}
</NcButton>
Expand All @@ -60,8 +60,8 @@
</template>

<script>
import RecordCircle from 'vue-material-design-icons/RecordCircle.vue'
import StopIcon from 'vue-material-design-icons/Stop.vue'
import IconRecordCircle from 'vue-material-design-icons/RecordCircle.vue'
import IconStop from 'vue-material-design-icons/Stop.vue'

import { t } from '@nextcloud/l10n'

Expand All @@ -82,8 +82,8 @@ export default {
NcButton,
NcLoadingIcon,
NcPopover,
RecordCircle,
StopIcon,
IconRecordCircle,
IconStop,
},

props: {
Expand Down
6 changes: 3 additions & 3 deletions src/components/TopBar/ReactionMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
:aria-label="t('spreed', 'Send a reaction')"
class="reaction">
<template #icon>
<EmoticonOutline :size="20" />
<IconEmoticonOutline :size="20" />
</template>

<NcActionButtonGroup class="reaction__group"
Expand All @@ -28,7 +28,7 @@
</template>

<script>
import EmoticonOutline from 'vue-material-design-icons/EmoticonOutline.vue'
import IconEmoticonOutline from 'vue-material-design-icons/EmoticonOutline.vue'

import { emit } from '@nextcloud/event-bus'
import { t } from '@nextcloud/l10n'
Expand All @@ -44,7 +44,7 @@ export default {
NcActions,
NcActionButton,
NcActionButtonGroup,
EmoticonOutline,
IconEmoticonOutline,
},

props: {
Expand Down
12 changes: 6 additions & 6 deletions src/components/TopBar/TopBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
:title="t('spreed', 'Open Calendar')"
target="_blank">
<div class="icon">
<CalendarBlank :size="20" />
<IconCalendarBlank :size="20" />
</div>
<div class="event-info">
<p class="event-info__header">
Expand All @@ -84,7 +84,7 @@
type="tertiary"
@click="openSidebar('participants')">
<template #icon>
<AccountMultiple :size="20" />
<IconAccountMultiple :size="20" />
</template>
{{ participantsInCall }}
</NcButton>
Expand Down Expand Up @@ -120,8 +120,8 @@
</template>

<script>
import AccountMultiple from 'vue-material-design-icons/AccountMultiple.vue'
import CalendarBlank from 'vue-material-design-icons/CalendarBlank.vue'
import IconAccountMultiple from 'vue-material-design-icons/AccountMultiple.vue'
import IconCalendarBlank from 'vue-material-design-icons/CalendarBlank.vue'

import { emit } from '@nextcloud/event-bus'
import { t, n } from '@nextcloud/l10n'
Expand Down Expand Up @@ -165,8 +165,8 @@ export default {
TasksCounter,
ReactionMenu,
// Icons
AccountMultiple,
CalendarBlank,
IconAccountMultiple,
IconCalendarBlank,
},

mixins: [richEditor],
Expand Down
Loading
Loading