Unify buttons, links and improve focus styles (#1317)

This commit is contained in:
Lukas 2022-11-18 08:10:43 +01:00 committed by GitHub
parent 7859bde63d
commit 2dfa231184
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 110 additions and 189 deletions

View file

@ -53,6 +53,7 @@
"success": "Repository enabled", "success": "Repository enabled",
"list_reloaded": "Repository list reloaded" "list_reloaded": "Repository list reloaded"
}, },
"open_in_forge": "Open Repository in Version Control System",
"settings": { "settings": {
"settings": "Settings", "settings": "Settings",
"not_allowed": "You are not allowed to access this repository's settings", "not_allowed": "You are not allowed to access this repository's settings",

View file

@ -1,7 +1,7 @@
<template> <template>
<button <button
type="button" type="button"
class="relative flex items-center py-1 px-2 rounded-md border shadow-sm cursor-pointer transition-all duration-150 focus:outline-none overflow-hidden disabled:opacity-50 disabled:cursor-not-allowed" class="relative flex items-center py-1 px-2 rounded-md border shadow-sm cursor-pointer transition-all duration-150 overflow-hidden disabled:opacity-50 disabled:cursor-not-allowed"
:class="{ :class="{
'bg-white hover:bg-gray-200 border-gray-300 text-color dark:bg-dark-gray-600 dark:border-dark-400 dark:hover:bg-dark-gray-800': 'bg-white hover:bg-gray-200 border-gray-300 text-color dark:bg-dark-gray-600 dark:border-dark-400 dark:hover:bg-dark-gray-800':
color === 'gray', color === 'gray',

View file

@ -1,13 +1,26 @@
<template> <template>
<button <router-link v-if="to" :to="to" :title="title" :aria-label="title" class="icon-button">
:disabled="disabled" <slot>
class="relative flex items-center justify-center text-color px-1 py-1 rounded-full bg-transparent hover:bg-gray-200 hover:text-gray-700 dark:hover:bg-gray-600 dark:hover:text-gray-700 cursor-pointer transition-all duration-150 focus:outline-none overflow-hidden disabled:opacity-50 disabled:cursor-not-allowed" <Icon :name="icon" />
type="button" </slot>
</router-link>
<a
v-else-if="href"
:href="href"
:title="title" :title="title"
:aria-label="title" :aria-label="title"
@click="doClick" class="icon-button"
target="_blank"
rel="noopener noreferrer"
> >
<Icon :name="icon" /> <slot>
<Icon :name="icon" />
</slot>
</a>
<button v-else :disabled="disabled" class="icon-button" type="button" :title="title" :aria-label="title">
<slot>
<Icon :name="icon" />
</slot>
<div v-if="isLoading" class="absolute left-0 top-0 right-0 bottom-0 flex items-center justify-center"> <div v-if="isLoading" class="absolute left-0 top-0 right-0 bottom-0 flex items-center justify-center">
<Icon name="loading" class="animate-spin" /> <Icon name="loading" class="animate-spin" />
</div> </div>
@ -16,7 +29,7 @@
<script lang="ts"> <script lang="ts">
import { defineComponent, PropType } from 'vue'; import { defineComponent, PropType } from 'vue';
import { RouteLocationRaw, useRouter } from 'vue-router'; import { RouteLocationRaw } from 'vue-router';
import Icon, { IconNames } from '~/components/atomic/Icon.vue'; import Icon, { IconNames } from '~/components/atomic/Icon.vue';
@ -28,7 +41,7 @@ export default defineComponent({
props: { props: {
icon: { icon: {
type: String as PropType<IconNames>, type: String as PropType<IconNames>,
required: true, default: '',
}, },
disabled: { disabled: {
@ -49,29 +62,17 @@ export default defineComponent({
type: String, type: String,
required: true, required: true,
}, },
},
setup(props) { href: {
const router = useRouter(); type: String,
default: '',
async function doClick() { },
if (props.isLoading) {
return;
}
if (!props.to) {
return;
}
if (typeof props.to === 'string' && props.to.startsWith('http')) {
window.location.href = props.to;
return;
}
await router.push(props.to);
}
return { doClick };
}, },
}); });
</script> </script>
<style scoped>
.icon-button {
@apply relative flex items-center justify-center px-1 py-1 rounded-full bg-transparent hover-effect overflow-hidden disabled:opacity-50 disabled:cursor-not-allowed;
}
</style>

View file

@ -1,23 +1,19 @@
<template> <template>
<component <component
:is="clickable ? 'button' : 'div'" :is="to ? 'router-link' : clickable ? 'button' : 'div'"
:to="to"
class="w-full flex border rounded-md bg-white overflow-hidden p-4 border-gray-300 dark:bg-dark-gray-700 dark:border-dark-400" class="w-full flex border rounded-md bg-white overflow-hidden p-4 border-gray-300 dark:bg-dark-gray-700 dark:border-dark-400"
:class="{ 'cursor-pointer hover:shadow-md hover:bg-gray-200 dark:hover:bg-dark-gray-800': clickable }" :class="{ 'cursor-pointer hover:shadow-md hover:bg-gray-200 dark:hover:bg-dark-gray-800': clickable || to }"
> >
<slot /> <slot />
</component> </component>
</template> </template>
<script lang="ts"> <script lang="ts" setup>
import { defineComponent } from 'vue'; import { RouteLocationRaw } from 'vue-router';
export default defineComponent({ defineProps<{
name: 'ListItem', clickable?: boolean;
to?: RouteLocationRaw;
props: { }>();
clickable: {
type: Boolean,
},
},
});
</script> </script>

View file

@ -3,7 +3,7 @@
<input <input
:id="`checkbox-${id}`" :id="`checkbox-${id}`"
type="checkbox" type="checkbox"
class="checkbox flex-shrink-0 relative border border-gray-400 dark:border-gray-600 cursor-pointer rounded-md transition-colors duration-150 w-5 h-5 checked:bg-lime-600 checked:border-lime-600 dark:checked:bg-lime-800 dark:checked:border-lime-800" class="checkbox flex-shrink-0 relative border border-gray-400 dark:border-gray-600 cursor-pointer rounded-md transition-colors duration-150 w-5 h-5 checked:bg-lime-600 checked:border-lime-600 dark:checked:bg-lime-800 dark:checked:border-lime-800 focus-visible:border-gray-600 dark:focus-visible:border-gray-400"
:checked="innerValue" :checked="innerValue"
@click="innerValue = !innerValue" @click="innerValue = !innerValue"
/> />

View file

@ -3,7 +3,7 @@
<input <input
:id="`radio-${id}-${option.value}`" :id="`radio-${id}-${option.value}`"
type="radio" type="radio"
class="radio relative flex-shrink-0 border border-gray-400 dark:border-gray-600 cursor-pointer rounded-full w-5 h-5 checked:bg-lime-600 checked:border-lime-600 dark:checked:bg-lime-700 dark:checked:border-lime-700" class="radio relative flex-shrink-0 border border-gray-400 dark:border-gray-600 cursor-pointer rounded-full w-5 h-5 checked:bg-lime-600 checked:border-lime-600 dark:checked:bg-lime-700 dark:checked:border-lime-700 focus-visible:border-gray-600 dark:focus-visible:border-gray-400"
:value="option.value" :value="option.value"
:checked="innerValue.includes(option.value)" :checked="innerValue.includes(option.value)"
@click="innerValue = option.value" @click="innerValue = option.value"

View file

@ -1,7 +1,7 @@
<template> <template>
<select <select
v-model="innerValue" v-model="innerValue"
class="dark:bg-dark-gray-700 bg-transparent text-color border-gray-200 dark:border-dark-400 w-full border py-1 px-2 rounded-md focus:outline-none" class="dark:bg-dark-gray-700 bg-transparent text-color border-gray-200 dark:border-dark-400 w-full border py-1 px-2 rounded-md"
:class="{ :class="{
'text-color': innerValue === '', 'text-color': innerValue === '',
'text-gray-900': innerValue !== '', 'text-gray-900': innerValue !== '',

View file

@ -1,27 +1,22 @@
<template> <template>
<div <input
class="w-full border border-gray-200 py-1 px-2 rounded-md bg-white hover:border-gray-300 dark:bg-dark-gray-700 dark:border-dark-400 dark:hover:border-dark-800" v-if="lines === 1"
v-model="innerValue"
class="w-full border border-gray-200 py-1 px-2 rounded-md bg-white dark:bg-dark-gray-700 dark:border-dark-400 focus-visible:outline-none focus-visible:border-gray-600 dark:focus-visible:border-gray-400"
:class="{ 'bg-gray-200 dark:bg-gray-600': disabled }" :class="{ 'bg-gray-200 dark:bg-gray-600': disabled }"
> :disabled="disabled"
<input :type="type"
v-if="lines === 1" :placeholder="placeholder"
v-model="innerValue" />
class="w-full bg-transparent text-color focus:outline-none focus:border-blue-400" <textarea
:class="inputClass" v-else
:disabled="disabled" v-model="innerValue"
:type="type" class="w-full border border-gray-200 py-1 px-2 rounded-md bg-white dark:bg-dark-gray-700 dark:border-dark-400 focus-visible:outline-none focus-visible:border-gray-600 dark:focus-visible:border-gray-400"
:placeholder="placeholder" :class="{ 'bg-gray-200 dark:bg-gray-600': disabled }"
/> :disabled="disabled"
<textarea :placeholder="placeholder"
v-else :rows="lines"
v-model="innerValue" />
class="w-full bg-transparent text-color focus:outline-none focus:border-blue-400"
:class="inputClass"
:disabled="disabled"
:placeholder="placeholder"
:rows="lines"
/>
</div>
</template> </template>
<script lang="ts"> <script lang="ts">
@ -54,11 +49,6 @@ export default defineComponent({
disabled: { disabled: {
type: Boolean, type: Boolean,
}, },
inputClass: {
type: String,
default: '',
},
}, },
emits: { emits: {

View file

@ -1,7 +1,7 @@
<template> <template>
<div class="rounded-md w-full shadow overflow-hidden bg-gray-300 dark:bg-dark-gray-700"> <div class="rounded-md w-full shadow overflow-hidden bg-gray-300 dark:bg-dark-gray-700">
<div v-if="title" class="font-bold text-gray-200 bg-gray-400 dark:bg-dark-gray-800 px-4 py-2">{{ title }}</div> <div v-if="title" class="font-bold text-gray-200 bg-gray-400 dark:bg-dark-gray-800 px-4 py-2">{{ title }}</div>
<div class="w-full p-4 bg-white dark:bg-dark-gray-700"> <div class="w-full p-4 bg-white dark:bg-dark-gray-700 text-color">
<slot /> <slot />
</div> </div>
</div> </div>

View file

@ -1,5 +1,5 @@
<template> <template>
<NavbarIcon :title="$t('pipeline_feed')" class="!p-1.5 relative" @click="toggle"> <IconButton :title="$t('pipeline_feed')" class="!p-1.5 relative text-current" @click="toggle">
<div v-if="activePipelines.length > 0" class="spinner"> <div v-if="activePipelines.length > 0" class="spinner">
<div class="spinner-ring ring1" /> <div class="spinner-ring ring1" />
<div class="spinner-ring ring2" /> <div class="spinner-ring ring2" />
@ -11,20 +11,19 @@
> >
{{ activePipelines.length || 0 }} {{ activePipelines.length || 0 }}
</div> </div>
</NavbarIcon> </IconButton>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, onMounted } from 'vue'; import { defineComponent, onMounted } from 'vue';
import IconButton from '~/components/atomic/IconButton.vue';
import usePipelineFeed from '~/compositions/usePipelineFeed'; import usePipelineFeed from '~/compositions/usePipelineFeed';
import NavbarIcon from './NavbarIcon.vue';
export default defineComponent({ export default defineComponent({
name: 'ActivePipelines', name: 'ActivePipelines',
components: { NavbarIcon }, components: { IconButton },
setup() { setup() {
const pipelineFeed = usePipelineFeed(); const pipelineFeed = usePipelineFeed();

View file

@ -19,35 +19,28 @@
<!-- Right Icons Box --> <!-- Right Icons Box -->
<div class="flex ml-auto -m-1.5 items-center space-x-2 text-white dark:text-gray-400"> <div class="flex ml-auto -m-1.5 items-center space-x-2 text-white dark:text-gray-400">
<!-- Dark Mode Toggle --> <!-- Dark Mode Toggle -->
<NavbarIcon <IconButton
:icon="darkMode ? 'dark' : 'light'"
:title="$t(darkMode ? 'color_scheme_dark' : 'color_scheme_light')" :title="$t(darkMode ? 'color_scheme_dark' : 'color_scheme_light')"
class="navbar-icon navbar-clickable" class="navbar-icon"
@click="darkMode = !darkMode" @click="darkMode = !darkMode"
> />
<i-ic-baseline-dark-mode v-if="darkMode" />
<i-ic-round-light-mode v-else />
</NavbarIcon>
<!-- Admin Settings --> <!-- Admin Settings -->
<NavbarIcon <IconButton
v-if="user?.admin" v-if="user?.admin"
class="navbar-icon navbar-clickable" class="navbar-icon"
:title="$t('admin.settings.settings')" :title="$t('admin.settings.settings')"
:to="{ name: 'admin-settings' }" :to="{ name: 'admin-settings' }"
> >
<i-clarity-settings-solid /> <i-clarity-settings-solid />
</NavbarIcon> </IconButton>
<!-- Active Pipelines Indicator --> <!-- Active Pipelines Indicator -->
<ActivePipelines v-if="user" class="navbar-icon navbar-clickable" /> <ActivePipelines v-if="user" class="navbar-icon" />
<!-- User Avatar --> <!-- User Avatar -->
<NavbarIcon <IconButton v-if="user" :to="{ name: 'user' }" :title="$t('user.settings')" class="navbar-icon !p-1.5">
v-if="user"
:to="{ name: 'user' }"
:title="$t('user.settings')"
class="navbar-icon navbar-clickable !p-1.5"
>
<img v-if="user && user.avatar_url" class="rounded-md" :src="`${user.avatar_url}`" /> <img v-if="user && user.avatar_url" class="rounded-md" :src="`${user.avatar_url}`" />
</NavbarIcon> </IconButton>
<!-- Login Button --> <!-- Login Button -->
<Button v-else :text="$t('login')" @click="doLogin" /> <Button v-else :text="$t('login')" @click="doLogin" />
</div> </div>
@ -59,17 +52,17 @@ import { defineComponent } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import Button from '~/components/atomic/Button.vue'; import Button from '~/components/atomic/Button.vue';
import IconButton from '~/components/atomic/IconButton.vue';
import useAuthentication from '~/compositions/useAuthentication'; import useAuthentication from '~/compositions/useAuthentication';
import useConfig from '~/compositions/useConfig'; import useConfig from '~/compositions/useConfig';
import { useDarkMode } from '~/compositions/useDarkMode'; import { useDarkMode } from '~/compositions/useDarkMode';
import ActivePipelines from './ActivePipelines.vue'; import ActivePipelines from './ActivePipelines.vue';
import NavbarIcon from './NavbarIcon.vue';
export default defineComponent({ export default defineComponent({
name: 'Navbar', name: 'Navbar',
components: { Button, ActivePipelines, NavbarIcon }, components: { Button, ActivePipelines, IconButton },
setup() { setup() {
const config = useConfig(); const config = useConfig();
@ -90,11 +83,15 @@ export default defineComponent({
</script> </script>
<style scoped> <style scoped>
.navbar-link { .navbar-icon {
@apply px-3 py-2 -my-1 rounded-md; @apply w-11 h-11 rounded-full p-2.5;
} }
.navbar-clickable { .navbar-icon :deep(svg) {
@apply hover:bg-black hover:bg-opacity-10 dark:hover:bg-white dark:hover:bg-opacity-5 transition-colors duration-100; @apply w-full h-full;
}
.navbar-link {
@apply px-3 py-2 -my-1 rounded-md hover-effect;
} }
</style> </style>

View file

@ -1,55 +0,0 @@
<template>
<button type="button" :title="title" :aria-label="title" class="navbar-icon" @click="doClick">
<slot />
</button>
</template>
<script lang="ts">
import { defineComponent, PropType } from 'vue';
import { RouteLocationRaw, useRouter } from 'vue-router';
export default defineComponent({
name: 'NavbarIcon',
props: {
to: {
type: [String, Object, null] as PropType<RouteLocationRaw | null>,
default: null,
},
title: {
type: String,
required: true,
},
},
setup(props) {
const router = useRouter();
async function doClick() {
if (!props.to) {
return;
}
if (typeof props.to === 'string' && props.to.startsWith('http')) {
window.location.href = props.to;
return;
}
await router.push(props.to);
}
return { doClick };
},
});
</script>
<style scoped>
.navbar-icon {
@apply w-11 h-11 rounded-full p-2.5;
}
.navbar-icon :deep(svg) {
@apply w-full h-full;
}
</style>

View file

@ -1,5 +1,5 @@
<template> <template>
<header class="bg-white dark:bg-dark-gray-900 border-b dark:border-gray-700"> <header class="bg-white dark:bg-dark-gray-900 border-b dark:border-gray-700 text-color">
<FluidContainer class="!py-0"> <FluidContainer class="!py-0">
<div class="flex flex-wrap items-center justify-between py-4 <md:flex-row <md:gap-y-4"> <div class="flex flex-wrap items-center justify-between py-4 <md:flex-row <md:gap-y-4">
<div <div
@ -15,8 +15,7 @@
</div> </div>
<TextField <TextField
v-if="searchBoxPresent" v-if="searchBoxPresent"
class="w-auto !bg-gray-100 !dark:bg-dark-gray-600 <md:w-full <md:order-3" class="w-auto !bg-gray-100 !dark:bg-dark-gray-600 placeholder-gray-500 <md:w-full <md:order-3"
input-class="!placeholder-gray-500"
:placeholder="$t('search')" :placeholder="$t('search')"
:model-value="search" :model-value="search"
@update:model-value="(value: string) => $emit('update:search', value)" @update:model-value="(value: string) => $emit('update:search', value)"

View file

@ -1,8 +1,8 @@
<template> <template>
<ListItem v-if="pipeline" clickable class="p-0 w-full"> <ListItem v-if="pipeline" class="p-0 w-full">
<div class="flex h-full w-11 items-center md:mr-4"> <div class="flex w-11 items-center md:mr-4">
<div <div
class="min-h-full w-3" class="h-full w-3"
:class="{ :class="{
'bg-yellow-400 dark:bg-dark-200': pipeline.status === 'pending', 'bg-yellow-400 dark:bg-dark-200': pipeline.status === 'pending',
'bg-red-400 dark:bg-red-800': pipelineStatusColors[pipeline.status] === 'red', 'bg-red-400 dark:bg-red-800': pipelineStatusColors[pipeline.status] === 'red',

View file

@ -1,16 +1,14 @@
<template> <template>
<div v-if="pipelines" class="space-y-4"> <div v-if="pipelines" class="space-y-4">
<router-link <PipelineItem
v-for="pipeline in pipelines" v-for="pipeline in pipelines"
:key="pipeline.id" :key="pipeline.id"
:to="{ :to="{
name: 'repo-pipeline', name: 'repo-pipeline',
params: { repoOwner: repo.owner, repoName: repo.name, pipelineId: pipeline.number }, params: { repoOwner: repo.owner, repoName: repo.name, pipelineId: pipeline.number },
}" }"
class="flex" :pipeline="pipeline"
> />
<PipelineItem :pipeline="pipeline" />
</router-link>
<Panel v-if="pipelines.length === 0"> <Panel v-if="pipelines.length === 0">
<span class="text-color">{{ $t('repo.pipeline.no_pipelines') }}</span> <span class="text-color">{{ $t('repo.pipeline.no_pipelines') }}</span>
</Panel> </Panel>

View file

@ -66,7 +66,7 @@
v-if="pipeline.steps && pipeline.steps.length > 1" v-if="pipeline.steps && pipeline.steps.length > 1"
type="button" type="button"
:title="workflow.name" :title="workflow.name"
class="flex items-center gap-2 py-2 px-1 hover:bg-black hover:bg-opacity-10 dark:hover:bg-white dark:hover:bg-opacity-5 rounded-md" class="flex items-center gap-2 py-2 px-1 hover-effect rounded-md"
@click="workflowsCollapsed[workflow.id] = !workflowsCollapsed[workflow.id]" @click="workflowsCollapsed[workflow.id] = !workflowsCollapsed[workflow.id]"
> >
<Icon <Icon
@ -91,7 +91,7 @@
:key="step.pid" :key="step.pid"
type="button" type="button"
:title="step.name" :title="step.name"
class="flex p-2 gap-2 border-2 border-transparent rounded-md items-center hover:bg-black hover:bg-opacity-10 dark:hover:bg-white dark:hover:bg-opacity-5 w-full" class="flex p-2 gap-2 border-2 border-transparent rounded-md items-center hover-effect w-full"
:class="{ :class="{
'bg-black bg-opacity-10 dark:bg-white dark:bg-opacity-5': selectedStepId && selectedStepId === step.pid, 'bg-black bg-opacity-10 dark:bg-white dark:bg-opacity-5': selectedStepId && selectedStepId === step.pid,
'mt-1': 'mt-1':

View file

@ -13,8 +13,7 @@
v-for="repo in searchedRepos" v-for="repo in searchedRepos"
:key="repo.id" :key="repo.id"
class="items-center" class="items-center"
:clickable="repo.active" :to="repo.active ? { name: 'repo', params: { repoOwner: repo.owner, repoName: repo.name } } : undefined"
@click="repo.active && $router.push({ name: 'repo', params: { repoOwner: repo.owner, repoName: repo.name } })"
> >
<span class="text-color">{{ repo.full_name }}</span> <span class="text-color">{{ repo.full_name }}</span>
<span v-if="repo.active" class="ml-auto text-color-alt">{{ $t('repo.enable.enabled') }}</span> <span v-if="repo.active" class="ml-auto text-color-alt">{{ $t('repo.enable.enabled') }}</span>

View file

@ -12,8 +12,7 @@
<ListItem <ListItem
v-for="repo in searchedRepos" v-for="repo in searchedRepos"
:key="repo.id" :key="repo.id"
clickable :to="{ name: 'repo', params: { repoName: repo.name, repoOwner: repo.owner } }"
@click="$router.push({ name: 'repo', params: { repoName: repo.name, repoOwner: repo.owner } })"
> >
<span class="text-color">{{ `${repo.owner} / ${repo.name}` }}</span> <span class="text-color">{{ `${repo.owner} / ${repo.name}` }}</span>
</ListItem> </ListItem>

View file

@ -17,8 +17,7 @@
<ListItem <ListItem
v-for="repo in searchedRepos" v-for="repo in searchedRepos"
:key="repo.id" :key="repo.id"
clickable :to="{ name: 'repo', params: { repoName: repo.name, repoOwner: repo.owner } }"
@click="$router.push({ name: 'repo', params: { repoName: repo.name, repoOwner: repo.owner } })"
> >
<span class="text-color">{{ `${repo.name}` }}</span> <span class="text-color">{{ `${repo.name}` }}</span>
</ListItem> </ListItem>

View file

@ -1,15 +1,13 @@
<template> <template>
<div v-if="branches" class="space-y-4"> <div v-if="branches" class="space-y-4">
<router-link <ListItem
v-for="branch in branches" v-for="branch in branches"
:key="branch" :key="branch"
class="text-color"
:to="{ name: 'repo-branch', params: { branch } }" :to="{ name: 'repo-branch', params: { branch } }"
class="flex"
> >
<ListItem clickable class="text-color"> {{ branch }}
{{ branch }} </ListItem>
</ListItem>
</router-link>
</div> </div>
</template> </template>

View file

@ -17,17 +17,13 @@
<a v-if="badgeUrl" :href="badgeUrl" target="_blank" class="ml-2"> <a v-if="badgeUrl" :href="badgeUrl" target="_blank" class="ml-2">
<img :src="badgeUrl" /> <img :src="badgeUrl" />
</a> </a>
<a <IconButton :href="repo.link_url" :title="$t('repo.open_in_forge')">
:href="repo.link_url"
target="_blank"
class="flex p-1 rounded-full text-color hover:bg-gray-200 hover:text-gray-700 dark:hover:bg-gray-600"
>
<Icon v-if="forge === 'github'" name="github" /> <Icon v-if="forge === 'github'" name="github" />
<Icon v-else-if="forge === 'gitea'" name="gitea" /> <Icon v-else-if="forge === 'gitea'" name="gitea" />
<Icon v-else-if="forge === 'gitlab'" name="gitlab" /> <Icon v-else-if="forge === 'gitlab'" name="gitlab" />
<Icon v-else-if="forge === 'bitbucket' || forge === 'stash'" name="bitbucket" /> <Icon v-else-if="forge === 'bitbucket' || forge === 'stash'" name="bitbucket" />
<Icon v-else name="repo" /> <Icon v-else name="repo" />
</a> </IconButton>
<IconButton <IconButton
v-if="repoPermissions.admin" v-if="repoPermissions.admin"
:to="{ name: 'repo-settings' }" :to="{ name: 'repo-settings' }"

View file

@ -35,5 +35,9 @@ export default defineConfig({
], ],
}, },
}, },
shortcuts: {
'hover-effect':
'hover:bg-black hover:bg-opacity-10 dark:hover:bg-white dark:hover:bg-opacity-5 transition-colors duration-100',
},
plugins: [typography], plugins: [typography],
}); });