forked from zammad/zammad
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes: Mobile - Fix small select field height and "More" icons in art…
…icles
- Loading branch information
1 parent
1133100
commit 35166ec
Showing
33 changed files
with
203 additions
and
400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 0 additions & 54 deletions
54
app/frontend/apps/mobile/components/CommonButtonPills/CommonButtonPills.vue
This file was deleted.
Oops, something went wrong.
110 changes: 0 additions & 110 deletions
110
app/frontend/apps/mobile/components/CommonButtonPills/__tests__/CommonButtonPills.spec.ts
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
app/frontend/apps/mobile/components/CommonButtonPills/types.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
app/frontend/apps/mobile/components/CommonSelectPill/CommonSelectPill.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<!-- Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/ --> | ||
|
||
<script setup lang="ts"> | ||
import CommonSelect from '@mobile/components/CommonSelect/CommonSelect.vue' | ||
import type { SelectOption } from '@shared/components/Form/fields/FieldSelect/types' | ||
import { computed } from 'vue' | ||
|
||
const props = defineProps<{ | ||
modelValue?: string | number | boolean | (string | number | boolean)[] | null | ||
options: SelectOption[] | ||
placeholder?: string | ||
multiple?: boolean | ||
noClose?: boolean | ||
noOptionsLabelTranslation?: boolean | ||
}>() | ||
|
||
const emit = defineEmits<{ | ||
( | ||
event: 'update:modelValue', | ||
value: string | number | (string | number)[], | ||
): void | ||
(e: 'select', option: SelectOption): void | ||
}>() | ||
|
||
const dialogProps = computed(() => { | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const { placeholder, ...dialogProps } = props | ||
return dialogProps | ||
}) | ||
|
||
const defaultLabel = computed(() => { | ||
const option = props.options.find( | ||
(option) => option.value === props.modelValue, | ||
) | ||
return option?.label || props.placeholder || '' | ||
}) | ||
</script> | ||
|
||
<template> | ||
<CommonSelect | ||
#default="{ open }" | ||
v-bind="dialogProps" | ||
@update:model-value="emit('update:modelValue', $event)" | ||
@select="emit('select', $event)" | ||
> | ||
<button | ||
type="button" | ||
class="inline-flex w-auto cursor-pointer rounded-lg bg-gray-600 py-1 ltr:pl-2 ltr:pr-1 rtl:pr-2 rtl:pl-1" | ||
@click="open" | ||
@keydown.space="open" | ||
> | ||
<slot> | ||
{{ defaultLabel }} | ||
</slot> | ||
<CommonIcon | ||
class="self-center" | ||
name="mobile-caret-down" | ||
size="tiny" | ||
decorative | ||
/> | ||
</button> | ||
</CommonSelect> | ||
</template> |
Oops, something went wrong.