fix(ui) pre-fix-regressions
This commit is contained in:
parent
154f68b153
commit
f3b09edcbb
|
@ -88,14 +88,14 @@ onMounted(async () => {
|
||||||
<template>
|
<template>
|
||||||
<Button
|
<Button
|
||||||
@click.prevent="isPreviewing = false"
|
@click.prevent="isPreviewing = false"
|
||||||
:class="[{active: !isPreviewing}, 'item']"
|
:aria-pressed="!isPreviewing"
|
||||||
title="write"
|
title="write"
|
||||||
>
|
>
|
||||||
{{ t('components.common.ContentForm.button.write') }}
|
{{ t('components.common.ContentForm.button.write') }}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
@click.prevent="isPreviewing = true"
|
@click.prevent="isPreviewing = true"
|
||||||
:class="[{active: isPreviewing}, 'item']"
|
:aria-pressed="!isPreviewing"
|
||||||
title="preview"
|
title="preview"
|
||||||
>
|
>
|
||||||
{{ t('components.common.ContentForm.button.preview') }}
|
{{ t('components.common.ContentForm.button.preview') }}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import clip from 'text-clipper'
|
||||||
|
|
||||||
import Button from '~/components/ui/Button.vue'
|
import Button from '~/components/ui/Button.vue'
|
||||||
import Alert from '~/components/ui/Alert.vue'
|
import Alert from '~/components/ui/Alert.vue'
|
||||||
|
import Link from '~/components/ui/Link.vue'
|
||||||
|
|
||||||
interface Events {
|
interface Events {
|
||||||
(e: 'updated', data: unknown): void
|
(e: 'updated', data: unknown): void
|
||||||
|
|
|
@ -8,7 +8,8 @@ import { type AlignmentProps, align } from '~/composables/alignment'
|
||||||
import Loader from '~/components/ui/Loader.vue'
|
import Loader from '~/components/ui/Loader.vue'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
thin?: true
|
thinFont?: true
|
||||||
|
lowHeight? : true
|
||||||
|
|
||||||
isActive?: boolean
|
isActive?: boolean
|
||||||
isLoading?: boolean
|
isLoading?: boolean
|
||||||
|
@ -33,7 +34,7 @@ const isIconOnly = computed(() => !!props.icon && !slots.default)
|
||||||
const internalLoader = ref(false)
|
const internalLoader = ref(false)
|
||||||
const isLoading = computed(() => props.isLoading || internalLoader.value)
|
const isLoading = computed(() => props.isLoading || internalLoader.value)
|
||||||
|
|
||||||
const fontWeight = props.thin ? 400 : 900
|
const fontWeight = props.thinFont ? 400 : 900
|
||||||
|
|
||||||
const button = ref()
|
const button = ref()
|
||||||
|
|
||||||
|
@ -68,7 +69,8 @@ onMounted(() => {
|
||||||
'is-icon-only': isIconOnly,
|
'is-icon-only': isIconOnly,
|
||||||
'has-icon': !!icon,
|
'has-icon': !!icon,
|
||||||
'is-round': round,
|
'is-round': round,
|
||||||
'is-shadow': shadow
|
'is-shadow': shadow,
|
||||||
|
'is-low-height': lowHeight
|
||||||
}"
|
}"
|
||||||
@click="click"
|
@click="click"
|
||||||
>
|
>
|
||||||
|
@ -101,6 +103,10 @@ onMounted(() => {
|
||||||
padding: var(--padding);
|
padding: var(--padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.is-low-height {
|
||||||
|
--padding: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
// Font
|
// Font
|
||||||
|
|
||||||
font-family: $font-main;
|
font-family: $font-main;
|
||||||
|
|
|
@ -10,7 +10,7 @@ const props = defineProps<{
|
||||||
noWrap?: true,
|
noWrap?: true,
|
||||||
} & { [P in "stack" | "grid" | "flex" | "columns" | "row" | "page"]?: true | string }
|
} & { [P in "stack" | "grid" | "flex" | "columns" | "row" | "page"]?: true | string }
|
||||||
& { [C in "nav" | "aside" | "header" | "footer" | "main" | "label" | "form" | "h1" | "h2" | "h3" | "h4" | "h5"]?: true }
|
& { [C in "nav" | "aside" | "header" | "footer" | "main" | "label" | "form" | "h1" | "h2" | "h3" | "h4" | "h5"]?: true }
|
||||||
& { [G in 'no-gap' | 'gap-16' | 'gap-12' | 'gap-8' | 'gap-auto' ]?: true }
|
& { [G in 'no-gap' | 'gap-4' | 'gap-8' | 'gap-16' | 'gap-12' | 'gap-auto' ]?: true }
|
||||||
& (PastelProps | ColorProps | DefaultProps)
|
& (PastelProps | ColorProps | DefaultProps)
|
||||||
& RaisedProps
|
& RaisedProps
|
||||||
& VariantProps
|
& VariantProps
|
||||||
|
@ -100,9 +100,5 @@ const attributes = computed(() => ({
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-wrap: v-bind('props.noWrap ? "nowrap" : "wrap"');
|
flex-wrap: v-bind('props.noWrap ? "nowrap" : "wrap"');
|
||||||
}
|
}
|
||||||
|
|
||||||
> h1, > h2, > h3, > h4, > h5 {
|
|
||||||
margin-top: 0px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -65,10 +65,6 @@ onMounted(() => {
|
||||||
|
|
||||||
<style module lang="scss">
|
<style module lang="scss">
|
||||||
|
|
||||||
.force-underline {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.link {
|
.link {
|
||||||
|
|
||||||
// Layout
|
// Layout
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
import { TABS_INJECTION_KEY } from '~/injection-keys'
|
import { TABS_INJECTION_KEY } from '~/injection-keys'
|
||||||
import { provide, reactive, ref, watch } from 'vue'
|
import { provide, reactive, ref, watch } from 'vue'
|
||||||
|
|
||||||
import Button from '~/components/ui/Button.vue'
|
|
||||||
|
|
||||||
const currentTab = ref()
|
const currentTab = ref()
|
||||||
const tabs = reactive([] as string[])
|
const tabs = reactive([] as string[])
|
||||||
const icons = reactive([] as string[])
|
const icons = reactive([] as string[])
|
||||||
|
@ -24,16 +22,15 @@ watch(() => tabs.length, (to, from) => {
|
||||||
<template>
|
<template>
|
||||||
<div class="funkwhale tabs">
|
<div class="funkwhale tabs">
|
||||||
<div class="tabs-header">
|
<div class="tabs-header">
|
||||||
<Button
|
<button
|
||||||
v-for="(tab, index) in tabs" :key="tab" :class="{ 'is-active': currentTab === tab }"
|
v-for="(tab, index) in tabs" :key="tab" :class="{ 'is-active': currentTab === tab }"
|
||||||
ghost
|
|
||||||
@click="currentTab = tab"
|
@click="currentTab = tab"
|
||||||
@keydown.left="currentTab = tabs[(tabs.findIndex(t => t === currentTab) - 1 + tabs.length) % tabs.length]"
|
@keydown.left="currentTab = tabs[(tabs.findIndex(t => t === currentTab) - 1 + tabs.length) % tabs.length]"
|
||||||
@keydown.right="currentTab = tabs[(tabs.findIndex(t => t === currentTab) + 1) % tabs.length]" class="tabs-item">
|
@keydown.right="currentTab = tabs[(tabs.findIndex(t => t === currentTab) + 1) % tabs.length]" class="tabs-item">
|
||||||
<div class="is-spacing">{{ tab }}</div>
|
<div class="is-spacing">{{ tab }}</div>
|
||||||
<label v-if="icons[index]" class="is-icon">{{ icons[index] }}</label>
|
<label v-if="icons[index]" class="is-icon">{{ icons[index] }}</label>
|
||||||
<label>{{ tab }}</label>
|
<label>{{ tab }}</label>
|
||||||
</Button>
|
</button>
|
||||||
|
|
||||||
<div class="tabs-right">
|
<div class="tabs-right">
|
||||||
<slot name="tabs-right" />
|
<slot name="tabs-right" />
|
||||||
|
|
|
@ -21,14 +21,16 @@
|
||||||
border-radius: var(--fw-border-radius);
|
border-radius: var(--fw-border-radius);
|
||||||
cursor: text;
|
cursor: text;
|
||||||
|
|
||||||
&:focus-visible {
|
|
||||||
outline: none !important;
|
|
||||||
}
|
|
||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: inset 0 0 0 4px var(--border-color)
|
box-shadow: inset 0 0 0 4px var(--border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
box-shadow: inset 0 0 0 4px var(--focus-ring-color)
|
box-shadow: inset 0 0 0 4px var(--focus-ring-color);
|
||||||
|
|
||||||
|
&:focus-visible {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&::placeholder {
|
&::placeholder {
|
||||||
|
|
|
@ -47,7 +47,7 @@ const headerGrid =
|
||||||
<Spacer grow />
|
<Spacer grow />
|
||||||
<!-- Action! You can either specify `to` or `onClick`. -->
|
<!-- Action! You can either specify `to` or `onClick`. -->
|
||||||
<Button v-if="props.action && 'onClick' in props.action"
|
<Button v-if="props.action && 'onClick' in props.action"
|
||||||
ghost thin auto align-self="baseline"
|
ghost thinFont auto align-self="baseline"
|
||||||
style="grid-column:-1;"
|
style="grid-column:-1;"
|
||||||
:onClick="props.action.onClick"
|
:onClick="props.action.onClick"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
|
@ -55,7 +55,7 @@ const headerGrid =
|
||||||
{{ props.action.text }}
|
{{ props.action.text }}
|
||||||
</Button>
|
</Button>
|
||||||
<Link v-if="props.action && 'to' in props.action"
|
<Link v-if="props.action && 'to' in props.action"
|
||||||
ghost force-underline thin align-self="baseline"
|
ghost force-underline thinFont align-self="baseline"
|
||||||
:to="props.action.to"
|
:to="props.action.to"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
>
|
>
|
||||||
|
|
|
@ -324,7 +324,7 @@
|
||||||
--disabled-border-color:var(--fw-gray-950);
|
--disabled-border-color:var(--fw-gray-950);
|
||||||
|
|
||||||
&.raised{
|
&.raised{
|
||||||
--background-color:var(--fw-gray-850);
|
--background-color:var(--fw-gray-950);
|
||||||
--border-color:var(--fw-gray-600);
|
--border-color:var(--fw-gray-600);
|
||||||
--link-color:var(--fw-gray-400);
|
--link-color:var(--fw-gray-400);
|
||||||
--link-hover-color:var(--fw-gray-200);
|
--link-hover-color:var(--fw-gray-200);
|
||||||
|
@ -583,9 +583,9 @@
|
||||||
background-color:var(--disabled-background-color);
|
background-color:var(--disabled-background-color);
|
||||||
}
|
}
|
||||||
// Link
|
// Link
|
||||||
&.active {
|
/* &.active {
|
||||||
border-color: var(--link-active-border-color);
|
border-color: var(--link-active-border-color);
|
||||||
}
|
} */
|
||||||
&.router-link-exact-active {
|
&.router-link-exact-active {
|
||||||
background-color: var(--link-exact-active-background-color, var(--active-background-color));
|
background-color: var(--link-exact-active-background-color, var(--active-background-color));
|
||||||
border-color: var(--link-exact-active-border-color);
|
border-color: var(--link-exact-active-border-color);
|
||||||
|
|
|
@ -35,8 +35,7 @@ const logoUrl = computed(() => store.state.auth.authenticated ? 'library.index'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Layout aside default solid gap-12 :class="[$style.sidebar, $style['sticky-content']]" style="background-color: var(--fw-gray-950);">
|
<Layout aside default raised solid gap-12 :class="[$style.sidebar, $style['sticky-content']]">
|
||||||
<!-- TODO: Fit working sidebar background color -->
|
|
||||||
<Layout header flex no-gap style="justify-content:space-between; padding-right:8px;">
|
<Layout header flex no-gap style="justify-content:space-between; padding-right:8px;">
|
||||||
<Link
|
<Link
|
||||||
:to="{name: logoUrl}"
|
:to="{name: logoUrl}"
|
||||||
|
@ -48,7 +47,7 @@ const logoUrl = computed(() => store.state.auth.authenticated ? 'library.index'
|
||||||
</i>
|
</i>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Layout nav no-gap flex style="align-items: center;">
|
<Layout nav gap-4 flex style="align-items: center;">
|
||||||
<Link
|
<Link
|
||||||
v-if="store.state.auth.availablePermissions['settings'] || store.state.auth.availablePermissions['moderation']"
|
v-if="store.state.auth.availablePermissions['settings'] || store.state.auth.availablePermissions['moderation']"
|
||||||
to="/manage/settings"
|
to="/manage/settings"
|
||||||
|
@ -186,15 +185,15 @@ const logoUrl = computed(() => store.state.auth.authenticated ? 'library.index'
|
||||||
<h3>{{ t('components.Sidebar.link.channels') }}</h3>
|
<h3>{{ t('components.Sidebar.link.channels') }}</h3>
|
||||||
<Spacer grow />
|
<Spacer grow />
|
||||||
<Layout nav flex no-gap style="justify-content: center">
|
<Layout nav flex no-gap style="justify-content: center">
|
||||||
<Link thin to="/about">
|
<Link thinFont to="/about">
|
||||||
{{ t('components.Sidebar.link.about') }}
|
{{ t('components.Sidebar.link.about') }}
|
||||||
</Link>
|
</Link>
|
||||||
<Spacer shrink />
|
<Spacer shrink />
|
||||||
<Link thin to="/privacy">
|
<Link thinFont to="/privacy">
|
||||||
Privacy
|
Privacy
|
||||||
</Link>
|
</Link>
|
||||||
<Spacer shrink />
|
<Spacer shrink />
|
||||||
<Link thin to="/legal">
|
<Link thinFont to="/legal">
|
||||||
Legal
|
Legal
|
||||||
</Link>
|
</Link>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
@ -216,10 +215,8 @@ const logoUrl = computed(() => store.state.auth.authenticated ? 'library.index'
|
||||||
a,
|
a,
|
||||||
button.button {
|
button.button {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
width: 40px;
|
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu {
|
.menu {
|
||||||
|
@ -305,15 +302,6 @@ const logoUrl = computed(() => store.state.auth.authenticated ? 'library.index'
|
||||||
.search {
|
.search {
|
||||||
padding: 0 4px;
|
padding: 0 4px;
|
||||||
margin-bottom: 28px;
|
margin-bottom: 28px;
|
||||||
|
|
||||||
input {
|
|
||||||
height: 48px;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border-color: var(--fw-gray-100);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
> h3 {
|
> h3 {
|
||||||
|
@ -325,15 +313,6 @@ const logoUrl = computed(() => store.state.auth.authenticated ? 'library.index'
|
||||||
.menu-links {
|
.menu-links {
|
||||||
padding: 0 16px 32px;
|
padding: 0 16px 32px;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
|
||||||
nav > a {
|
|
||||||
|
|
||||||
&:global(.active) {
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ const isOpen = computed({
|
||||||
v-model="isOpen"
|
v-model="isOpen"
|
||||||
>
|
>
|
||||||
<Layout columns :column-width="200">
|
<Layout columns :column-width="200">
|
||||||
<Button ghost thin small
|
<Button ghost thinFont small
|
||||||
v-for="(language, key) in SUPPORTED_LOCALES"
|
v-for="(language, key) in SUPPORTED_LOCALES"
|
||||||
align-text="left"
|
align-text="left"
|
||||||
:aria-pressed="key===locale || undefined"
|
:aria-pressed="key===locale || undefined"
|
||||||
|
|
Loading…
Reference in New Issue