diff --git a/src/components/dialogs/AvatarDialog/SetAvatarStylesDialog.vue b/src/components/dialogs/AvatarDialog/SetAvatarStylesDialog.vue index f4ab264f..1c95e142 100644 --- a/src/components/dialogs/AvatarDialog/SetAvatarStylesDialog.vue +++ b/src/components/dialogs/AvatarDialog/SetAvatarStylesDialog.vue @@ -3,58 +3,73 @@ ref="setAvatarStylesDialog" class="x-dialog" :model-value="setAvatarStylesDialog.visible" - @close="closeSetAvatarStylesDialog" :title="t('dialog.set_avatar_styles.header')" width="400px" - append-to-body> + append-to-body + @close="closeSetAvatarStylesDialog"> + @@ -64,13 +79,11 @@ import { useI18n } from 'vue-i18n'; import { watch } from 'vue'; + import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../../ui/select'; import { arraysMatch } from '../../../shared/utils'; import { avatarRequest } from '../../../api'; import { useAvatarStore } from '../../../stores'; - const { t } = useI18n(); - const { applyAvatar } = useAvatarStore(); - const props = defineProps({ setAvatarStylesDialog: { type: Object, @@ -80,6 +93,11 @@ const emit = defineEmits(['update:setAvatarStylesDialog']); + const { t } = useI18n(); + const { applyAvatar } = useAvatarStore(); + + const SELECT_CLEAR_VALUE = '__clear__'; + watch( () => props.setAvatarStylesDialog.visible, (newVal) => { @@ -89,23 +107,34 @@ } ); + function updateDialog(patch) { + emit('update:setAvatarStylesDialog', { + ...props.setAvatarStylesDialog, + ...patch + }); + } + async function getAvatarStyles() { - const ref = await avatarRequest.getAvailableAvatarStyles(); - const styles = []; - const stylesMap = new Map(); - for (const style of ref.json) { - styles.push(style.styleName); - stylesMap.set(style.styleName, style.id); + try { + const ref = await avatarRequest.getAvailableAvatarStyles(); + const styles = []; + const stylesMap = new Map(); + for (const style of ref.json) { + styles.push(style.styleName); + stylesMap.set(style.styleName, style.id); + } + + updateDialog({ + availableAvatarStyles: styles, + availableAvatarStylesMap: stylesMap + }); + } catch (error) { + console.error('Error loading avatar styles:', error); } - props.setAvatarStylesDialog.availableAvatarStyles = styles; - props.setAvatarStylesDialog.availableAvatarStylesMap = stylesMap; } function closeSetAvatarStylesDialog() { - emit('update:setAvatarStylesDialog', { - ...props.setAvatarStylesDialog, - visible: false - }); + updateDialog({ visible: false }); } function saveSetAvatarStylesDialog() { @@ -114,18 +143,19 @@ const secondaryStyleId = props.setAvatarStylesDialog.availableAvatarStylesMap.get(props.setAvatarStylesDialog.secondaryStyle) || ''; - let tags = []; + const tags = []; for (const tag of props.setAvatarStylesDialog.initialTags) { if (!tag.startsWith('author_tag_')) { tags.push(tag); } } + const authorTagsArray = props.setAvatarStylesDialog.authorTags.split(','); for (const tag of authorTagsArray) { if (!tag.trim()) { continue; } - let tagName = `author_tag_${tag}`; + const tagName = `author_tag_${tag}`; if (!tags.includes(tagName)) { tags.push(tagName); } @@ -146,6 +176,7 @@ secondaryStyle: secondaryStyleId, tags }; + avatarRequest .saveAvatar(params) .then((args) => { diff --git a/src/components/dialogs/GroupDialog/GroupMemberModerationDialog.vue b/src/components/dialogs/GroupDialog/GroupMemberModerationDialog.vue index cae34344..5cda235b 100644 --- a/src/components/dialogs/GroupDialog/GroupMemberModerationDialog.vue +++ b/src/components/dialogs/GroupDialog/GroupMemberModerationDialog.vue @@ -623,25 +623,19 @@
- - - + + + + + -
- -
-
-
-
+ {{ getAuditLogTypeName(type) }} + + + {{ t('dialog.group_member_moderation.selected_roles') }}
- - - -
- -
-
-
-
+

{{ t('dialog.group_member_moderation.actions') }} @@ -881,6 +864,7 @@ import { toast } from 'vue-sonner'; import { useI18n } from 'vue-i18n'; + import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../../ui/select'; import { debounce, formatDateFilter, hasGroupPermission, userImage, userImageFull } from '../../../shared/utils'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '../../ui/dropdown-menu'; import { useAppearanceSettingsStore, useGalleryStore, useGroupStore, useUserStore } from '../../../stores'; diff --git a/src/components/dialogs/VRCXUpdateDialog.vue b/src/components/dialogs/VRCXUpdateDialog.vue index d5f23ed6..5d8c2c97 100644 --- a/src/components/dialogs/VRCXUpdateDialog.vue +++ b/src/components/dialogs/VRCXUpdateDialog.vue @@ -17,20 +17,33 @@
{{ t('dialog.vrcx_updater.ready_for_update') }}
- - - - - - - + +
@@ -62,6 +75,7 @@ import { storeToRefs } from 'pinia'; import { useI18n } from 'vue-i18n'; + import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../ui/select'; import { branches } from '../../shared/constants'; import { getNextDialogIndex } from '../../shared/utils/base/ui'; import { useVRCXUpdaterStore } from '../../stores'; diff --git a/src/components/ui/tags-input/TagsInput.vue b/src/components/ui/tags-input/TagsInput.vue new file mode 100644 index 00000000..b7befb73 --- /dev/null +++ b/src/components/ui/tags-input/TagsInput.vue @@ -0,0 +1,47 @@ + + + diff --git a/src/components/ui/tags-input/TagsInputInput.vue b/src/components/ui/tags-input/TagsInputInput.vue new file mode 100644 index 00000000..69a67a11 --- /dev/null +++ b/src/components/ui/tags-input/TagsInputInput.vue @@ -0,0 +1,24 @@ + + + diff --git a/src/components/ui/tags-input/TagsInputItem.vue b/src/components/ui/tags-input/TagsInputItem.vue new file mode 100644 index 00000000..3d490972 --- /dev/null +++ b/src/components/ui/tags-input/TagsInputItem.vue @@ -0,0 +1,30 @@ + + + diff --git a/src/components/ui/tags-input/TagsInputItemDelete.vue b/src/components/ui/tags-input/TagsInputItemDelete.vue new file mode 100644 index 00000000..10780994 --- /dev/null +++ b/src/components/ui/tags-input/TagsInputItemDelete.vue @@ -0,0 +1,24 @@ + + + diff --git a/src/components/ui/tags-input/TagsInputItemText.vue b/src/components/ui/tags-input/TagsInputItemText.vue new file mode 100644 index 00000000..be929d27 --- /dev/null +++ b/src/components/ui/tags-input/TagsInputItemText.vue @@ -0,0 +1,19 @@ + + + diff --git a/src/components/ui/tags-input/index.js b/src/components/ui/tags-input/index.js new file mode 100644 index 00000000..bd740c60 --- /dev/null +++ b/src/components/ui/tags-input/index.js @@ -0,0 +1,5 @@ +export { default as TagsInput } from './TagsInput.vue'; +export { default as TagsInputInput } from './TagsInputInput.vue'; +export { default as TagsInputItem } from './TagsInputItem.vue'; +export { default as TagsInputItemDelete } from './TagsInputItemDelete.vue'; +export { default as TagsInputItemText } from './TagsInputItemText.vue'; diff --git a/src/localization/index.js b/src/localization/index.js index b145c8a2..b1fcbacd 100644 --- a/src/localization/index.js +++ b/src/localization/index.js @@ -62,7 +62,7 @@ const languageNames = import.meta.glob('./*.json', { }); function getLanguageName(code) { - return languageNames[`./${code}.json`]; + return String(languageNames[`./${code}.json`] ?? code); } export * from './locales'; diff --git a/src/views/PlayerList/components/PhotonEventTable.vue b/src/views/PlayerList/components/PhotonEventTable.vue index 8aae90dc..ee083f40 100644 --- a/src/views/PlayerList/components/PhotonEventTable.vue +++ b/src/views/PlayerList/components/PhotonEventTable.vue @@ -1,20 +1,24 @@