Skip to content

Commit

Permalink
refactor : component name
Browse files Browse the repository at this point in the history
  • Loading branch information
Liry24 committed Feb 14, 2025
1 parent 69b46d0 commit af95994
Show file tree
Hide file tree
Showing 41 changed files with 132 additions and 133 deletions.
2 changes: 1 addition & 1 deletion components/badge/header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ try {
</script>

<template>
<ButtonBase
<Button
v-if="badge"
:to="badge.link"
:label="badge.label"
Expand Down
2 changes: 1 addition & 1 deletion components/banner/ownerWarning.client.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const save = async () => await storage.set('ownerWarningBanner', true);
{{ useSentence('よりご連絡をお願いします。') }}
</p>

<ButtonBase
<Button
icon="lucide:x"
variant="flat"
class="place-self-end rounded-full p-2"
Expand Down
2 changes: 1 addition & 1 deletion components/button/copyUrl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const writeClipboard = () => {
</script>

<template>
<ButtonBase
<Button
:icon="copied ? 'lucide:check' : 'lucide:link'"
:icon-size="18"
:label="copied ? 'コピーしました' : 'URLをコピー'"
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions components/button/link.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ watch(modal, (newValue) => {
</script>

<template>
<ButtonBase
<Button
:tooltip="props.link"
:aria-label="props.link"
variant="flat"
Expand All @@ -33,9 +33,9 @@ watch(modal, (newValue) => {
:size="data.iconSize"
class="bg-zinc-700 dark:bg-zinc-300"
/>
</ButtonBase>
</Button>

<ModalBase v-model="modal">
<Modal v-model="modal">
<template #header>
<DialogTitle> 外部サイトに移動します </DialogTitle>
</template>
Expand All @@ -48,13 +48,13 @@ watch(modal, (newValue) => {
</span>

<template #footer>
<ButtonBase
<Button
:to="props.link"
:disabled="!isButtonEnabled"
new-tab
label="リンク先に移動"
class="w-full"
/>
</template>
</ModalBase>
</Modal>
</template>
2 changes: 1 addition & 1 deletion components/button/loadMore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const emit = defineEmits(['click']);
</script>

<template>
<ButtonBase
<Button
:disabled="props.loading"
label="さらに読み込む"
:icon="props.loading ? 'svg-spinners:ring-resize' : ''"
Expand Down
4 changes: 2 additions & 2 deletions components/button/theme.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const colorMode = useColorMode();
</script>

<template>
<ButtonBase
<Button
:tooltip="props.label ? '' : 'テーマ'"
aria-label="テーマ"
variant="flat"
Expand Down Expand Up @@ -40,5 +40,5 @@ const colorMode = useColorMode();
</ClientOnly>

<span v-if="props.label">テーマ</span>
</ButtonBase>
</Button>
</template>
12 changes: 6 additions & 6 deletions components/edit/coAuthor/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ watch(input, handleInputChange);

<template>
<div class="w-full flex flex-col gap-2">
<PopupBase v-if="model.length < 5" side="top">
<Popup v-if="model.length < 5" side="top">
<template #trigger>
<ButtonBase variant="flat">
<Button variant="flat">
<Icon name="lucide:plus" size="18" />
<span>ユーザーを追加</span>
</ButtonBase>
</Button>
</template>

<template #panel>
Expand All @@ -93,7 +93,7 @@ watch(input, handleInputChange);
/>

<div v-else class="empty:hidden flex flex-col gap-1">
<ButtonBase
<Button
v-for="i in searchedUsers"
:key="`coauthor-${i.id}`"
variant="flat"
Expand All @@ -111,11 +111,11 @@ watch(input, handleInputChange);
:alt="i.name"
/>
<span>{{ i.name }}</span>
</ButtonBase>
</Button>
</div>
</div>
</template>
</PopupBase>
</Popup>
<EditCoAuthorItem
v-for="(i, index) in model"
:key="`coauthor-${index}`"
Expand Down
4 changes: 2 additions & 2 deletions components/edit/coAuthor/item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ const note = defineModel<string>('note', {
<div class="flex gap-1.5 items-center">
<UiAvatar :url="props.avatar" alt="co-author" />
<span class="grow text-sm leading-none">{{ props.name }}</span>
<ButtonBase variant="flat" class="p-2" @click="emit('remove')">
<Button variant="flat" class="p-2" @click="emit('remove')">
<Icon name="lucide:x" size="16" />
</ButtonBase>
</Button>
</div>
<UiTextinput v-model="note" placeholder="ノート">
<template #trailing>
Expand Down
18 changes: 9 additions & 9 deletions components/edit/items.vue → components/edit/items/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,14 @@ quickAvatarsOwned.value = await getOwnedAvatars();
@keyup.enter="addItemFromURL"
>
<template #trailing>
<ButtonBase
<Button
v-if="!inputUrl"
icon="lucide:clipboard"
variant="flat"
class="p-1.5"
@click="pasteFromClipboard"
/>
<ButtonBase
<Button
v-if="inputUrl !== ''"
icon="lucide:x"
variant="flat"
Expand All @@ -211,7 +211,7 @@ quickAvatarsOwned.value = await getOwnedAvatars();
/>
</template>
</UiTextinput>
<ButtonBase
<Button
:disabled="adding"
:icon="
!adding ? 'lucide:plus' : 'i-svg-spinners-ring-resize'
Expand All @@ -224,13 +224,13 @@ quickAvatarsOwned.value = await getOwnedAvatars();

<div class="gap-2 flex flex-wrap items-center justify-between">
<div class="self-end gap-1 flex items-center">
<ButtonBase
<Button
icon="lucide:undo-2"
variant="flat"
class="size-9"
@click="emit('undo')"
/>
<ButtonBase
<Button
icon="lucide:redo-2"
variant="flat"
class="size-9"
Expand Down Expand Up @@ -287,7 +287,7 @@ quickAvatarsOwned.value = await getOwnedAvatars();
</div>
</div>

<ButtonBase
<Button
icon="lucide:search"
label="アバター・アイテムを検索"
class="h-9"
Expand All @@ -309,7 +309,7 @@ quickAvatarsOwned.value = await getOwnedAvatars();
アイテムが登録されていません
</p>
<div class="flex flex-wrap gap-2 items-center justify-center">
<ButtonBase
<Button
v-for="i in quickAvatarsOwned"
class="p-1 pr-2.5"
@click="addItem(i.id)"
Expand All @@ -321,7 +321,7 @@ quickAvatarsOwned.value = await getOwnedAvatars();
class="rounded-lg"
/>
<span>{{ useAvatarName(i.name) }}</span>
</ButtonBase>
</Button>
</div>
</div>

Expand All @@ -345,7 +345,7 @@ quickAvatarsOwned.value = await getOwnedAvatars();
ghost-class="opacity-0"
class="flex flex-col gap-2"
>
<EditItem
<EditItemsItem
v-for="item in value"
v-model:note="item.note"
v-model:unsupported="item.unsupported"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const booth_url = 'https://booth.pm/ja/items/';
<div
class="shrink-0 w-fit h-full pt-2 gap-4 flex flex-col items-end justify-between"
>
<ButtonBase
<Button
icon="lucide:trash"
:icon-size="16"
tooltip="アイテム削除"
Expand Down
4 changes: 2 additions & 2 deletions components/hero/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
>
あなたのアバター改変を共有しよう
</p>
<ButtonBase
<Button
to="/setup/edit"
class="p-3 md:pr-6 md:pl-5 md:mr-2 outline-0 md:outline-1 md:rounded-full whitespace-nowrap hover:bg-zinc-700 hover:text-zinc-200 hover:dark:bg-zinc-300 hover:dark:text-zinc-800"
>
<!-- <Icon name="lucide:plus" :size="18" /> -->
<span class="hidden md:block">ログイン</span>
</ButtonBase>
</Button>
</div>
</template>
4 changes: 2 additions & 2 deletions components/hovercard/feedback.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup></script>

<template>
<HovercardBase>
<Hovercard>
<template #trigger>
<slot />
</template>
Expand All @@ -14,5 +14,5 @@
</p>
</DialogDescription>
</template>
</HovercardBase>
</Hovercard>
</template>
File renamed without changes.
4 changes: 2 additions & 2 deletions components/hovercard/shop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const props = defineProps<Props>();
</script>

<template>
<HovercardBase side="top" class="pl-3 pr-4 py-2.5">
<Hovercard side="top" class="pl-3 pr-4 py-2.5">
<template #trigger>
<slot />
</template>
Expand Down Expand Up @@ -35,5 +35,5 @@ const props = defineProps<Props>();
</div>
</div>
</template>
</HovercardBase>
</Hovercard>
</template>
4 changes: 2 additions & 2 deletions components/hovercard/user.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const props = defineProps<Props>();
</script>

<template>
<HovercardBase side="top" class="pl-3 pr-4 py-2.5">
<Hovercard side="top" class="pl-3 pr-4 py-2.5">
<template #trigger>
<slot />
</template>
Expand Down Expand Up @@ -34,5 +34,5 @@ const props = defineProps<Props>();
</span>
</NuxtLink>
</template>
</HovercardBase>
</Hovercard>
</template>
8 changes: 4 additions & 4 deletions components/modal/deleteSetup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const vis = defineModel<boolean>({
</script>

<template>
<ModalBase v-model="vis">
<Modal v-model="vis">
<template #header>
<UiTitle label="セットアップ削除" icon="lucide:trash" />
</template>
Expand All @@ -23,16 +23,16 @@ const vis = defineModel<boolean>({

<template #footer>
<div class="flex gap-2 items-center justify-end">
<ButtonBase
<Button
label="削除"
class="text-red-500 dark:text-red-400 hover:text-white hover:dark:text-white hover:bg-red-500 hover:dark:bg-red-800 hover:outline-red-400 hover:dark:outline-red-700"
@click="
useDeleteSetup(props.id);
vis = false;
"
/>
<ButtonBase label="キャンセル" @click="vis = false" />
<Button label="キャンセル" @click="vis = false" />
</div>
</template>
</ModalBase>
</Modal>
</template>
8 changes: 4 additions & 4 deletions components/modal/deleteUser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ watch(vis, () => {
</script>

<template>
<ModalBase v-model="vis">
<Modal v-model="vis">
<template #header>
<UiTitle label="アカウント削除" icon="lucide:circle-alert" />
</template>
Expand Down Expand Up @@ -86,7 +86,7 @@ watch(vis, () => {

<template #footer>
<div class="w-full flex gap-2 items-center justify-between">
<ButtonBase
<Button
v-if="status !== 'loading'"
label="キャンセル"
variant="flat"
Expand All @@ -96,7 +96,7 @@ watch(vis, () => {
"
/>

<ButtonBase
<Button
v-if="status === 'idle'"
:disabled="!deletable"
label="削除"
Expand All @@ -105,5 +105,5 @@ watch(vis, () => {
/>
</div>
</template>
</ModalBase>
</Modal>
</template>
8 changes: 4 additions & 4 deletions components/modal/feedback.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Submit = async () => {
</script>

<template>
<ModalBase v-model="vis">
<Modal v-model="vis">
<template #header>
<div class="flex items-center gap-2 justify-between">
<DialogTitle>
Expand Down Expand Up @@ -51,13 +51,13 @@ const Submit = async () => {

<template #footer>
<div class="gap-1.5 flex items-center justify-between">
<ButtonBase
<Button
label="キャンセル"
variant="flat"
@click="vis = false"
/>
<ButtonBase label="送信" @click="Submit" />
<Button label="送信" @click="Submit" />
</div>
</template>
</ModalBase>
</Modal>
</template>
File renamed without changes.
Loading

0 comments on commit af95994

Please sign in to comment.