mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-25 11:21:02 +00:00
Fix responsiveness of the settings template (#4383)
This commit is contained in:
parent
75017ac7ca
commit
b906a3337c
6 changed files with 34 additions and 53 deletions
|
@ -3,7 +3,7 @@
|
||||||
<div class="flex flex-col items-center gap-4">
|
<div class="flex flex-col items-center gap-4">
|
||||||
<WoodpeckerLogo class="w-32 h-32 fill-wp-text-200" />
|
<WoodpeckerLogo class="w-32 h-32 fill-wp-text-200" />
|
||||||
|
|
||||||
<i18n-t keypath="running_version" tag="p" class="text-xl">
|
<i18n-t keypath="running_version" tag="p" class="text-xl text-center">
|
||||||
<span class="font-bold">{{ version?.current }}</span>
|
<span class="font-bold">{{ version?.current }}</span>
|
||||||
</i18n-t>
|
</i18n-t>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<component
|
<component
|
||||||
:is="to === undefined ? 'button' : httpLink ? 'a' : 'router-link'"
|
:is="to === undefined ? 'button' : httpLink ? 'a' : 'router-link'"
|
||||||
v-bind="btnAttrs"
|
v-bind="btnAttrs"
|
||||||
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="relative flex flex-shrink-0 whitespace-nowrap 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-wp-control-neutral-100 hover:bg-wp-control-neutral-200 border-wp-control-neutral-300 text-wp-text-100':
|
'bg-wp-control-neutral-100 hover:bg-wp-control-neutral-200 border-wp-control-neutral-300 text-wp-text-100':
|
||||||
color === 'gray',
|
color === 'gray',
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
>
|
>
|
||||||
<slot>
|
<slot>
|
||||||
<Icon v-if="startIcon" :name="startIcon" class="!w-6 !h-6" :class="{ invisible: isLoading, 'mr-1': text }" />
|
<Icon v-if="startIcon" :name="startIcon" class="!w-6 !h-6" :class="{ invisible: isLoading, 'mr-1': text }" />
|
||||||
<span :class="{ invisible: isLoading }" class="flex-shrink-0">{{ text }}</span>
|
<span :class="{ invisible: isLoading }">{{ text }}</span>
|
||||||
<Icon v-if="endIcon" :name="endIcon" class="ml-2 w-6 h-6" :class="{ invisible: isLoading }" />
|
<Icon v-if="endIcon" :name="endIcon" class="ml-2 w-6 h-6" :class="{ invisible: isLoading }" />
|
||||||
<div
|
<div
|
||||||
v-if="isLoading"
|
v-if="isLoading"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="flex gap-2 items-center text-gray-700 font-bold rounded-md p-2 border border-solid border-l-6 border-wp-hint-warn-200 bg-wp-hint-warn-100"
|
class="flex gap-4 items-center text-gray-700 font-bold rounded-md p-4 border border-solid border-l-6 border-wp-hint-warn-200 bg-wp-hint-warn-100"
|
||||||
>
|
>
|
||||||
<Icon v-if="!textOnly" name="warning" />
|
<Icon v-if="!textOnly" name="warning" class="flex-shrink-0" />
|
||||||
<slot>
|
<slot>
|
||||||
<span class="whitespace-pre">{{ text }}</span>
|
<span class="whitespace-pre-wrap">{{ text }}</span>
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
<template>
|
<template>
|
||||||
<Panel>
|
<Panel>
|
||||||
<div class="flex flex-row border-b mb-4 pb-4 items-center dark:border-wp-background-100">
|
<h1 class="text-xl text-wp-text-100">{{ title }}</h1>
|
||||||
<div class="ml-2">
|
<div class="flex flex-col gap-4 border-b mb-4 pb-4">
|
||||||
<h1 class="text-xl text-wp-text-100">{{ title }}</h1>
|
<div class="flex flex-col sm:flex-row gap-4 sm:gap-12 md:justify-between dark:border-wp-background-100">
|
||||||
<p v-if="desc" class="text-sm text-wp-text-alt-100">
|
<div v-if="desc" class="flex items-center gap-x-2 text-sm text-wp-text-alt-100">
|
||||||
{{ desc }}
|
<span class="flex flex-grow-0">{{ desc }}</span>
|
||||||
<DocsLink v-if="docsUrl" :topic="title" :url="docsUrl" />
|
<DocsLink v-if="docsUrl" class="flex flex-grow-0" :topic="title" :url="docsUrl" />
|
||||||
</p>
|
</div>
|
||||||
<Warning v-if="warning" class="text-sm mt-1" :text="warning" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="ml-auto">
|
<div>
|
||||||
<slot v-if="$slots.titleActions" name="titleActions" />
|
<slot v-if="$slots.titleActions" name="titleActions" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<Warning v-if="warning" class="text-sm mt-1" :text="warning" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<slot />
|
<slot />
|
||||||
|
|
|
@ -1,22 +1,18 @@
|
||||||
<template>
|
<template>
|
||||||
<Panel>
|
<Settings
|
||||||
<div class="flex flex-row border-b mb-4 pb-4 items-center dark:border-wp-background-100">
|
:title="$t('registries.registries')"
|
||||||
<div class="ml-2">
|
:desc="$t('user.settings.registries.desc')"
|
||||||
<h1 class="text-xl text-wp-text-100">{{ $t('registries.registries') }}</h1>
|
docs-url="docs/usage/registries"
|
||||||
<p class="text-sm text-wp-text-alt-100">
|
>
|
||||||
{{ $t('user.settings.registries.desc') }}
|
<template #titleActions>
|
||||||
<DocsLink :topic="$t('registries.registries')" url="docs/usage/registries" />
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<Button
|
<Button
|
||||||
v-if="selectedRegistry"
|
v-if="selectedRegistry"
|
||||||
class="ml-auto"
|
|
||||||
:text="$t('registries.show')"
|
:text="$t('registries.show')"
|
||||||
start-icon="back"
|
start-icon="back"
|
||||||
@click="selectedRegistry = undefined"
|
@click="selectedRegistry = undefined"
|
||||||
/>
|
/>
|
||||||
<Button v-else class="ml-auto" :text="$t('registries.add')" start-icon="plus" @click="showAddRegistry" />
|
<Button v-else :text="$t('registries.add')" start-icon="plus" @click="showAddRegistry" />
|
||||||
</div>
|
</template>
|
||||||
|
|
||||||
<RegistryList
|
<RegistryList
|
||||||
v-if="!selectedRegistry"
|
v-if="!selectedRegistry"
|
||||||
|
@ -33,7 +29,7 @@
|
||||||
@save="createRegistry"
|
@save="createRegistry"
|
||||||
@cancel="selectedRegistry = undefined"
|
@cancel="selectedRegistry = undefined"
|
||||||
/>
|
/>
|
||||||
</Panel>
|
</Settings>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
@ -42,8 +38,7 @@ import { computed, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import Button from '~/components/atomic/Button.vue';
|
import Button from '~/components/atomic/Button.vue';
|
||||||
import DocsLink from '~/components/atomic/DocsLink.vue';
|
import Settings from '~/components/layout/Settings.vue';
|
||||||
import Panel from '~/components/layout/Panel.vue';
|
|
||||||
import RegistryEdit from '~/components/registry/RegistryEdit.vue';
|
import RegistryEdit from '~/components/registry/RegistryEdit.vue';
|
||||||
import RegistryList from '~/components/registry/RegistryList.vue';
|
import RegistryList from '~/components/registry/RegistryList.vue';
|
||||||
import useApiClient from '~/compositions/useApiClient';
|
import useApiClient from '~/compositions/useApiClient';
|
||||||
|
|
|
@ -1,22 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<Panel>
|
<Settings :title="$t('secrets.secrets')" :desc="$t('user.settings.secrets.desc')" docs-url="docs/usage/secrets">
|
||||||
<div class="flex flex-row border-b mb-4 pb-4 items-center dark:border-wp-background-100">
|
<template #titleActions>
|
||||||
<div class="ml-2">
|
<Button v-if="selectedSecret" :text="$t('secrets.show')" start-icon="back" @click="selectedSecret = undefined" />
|
||||||
<h1 class="text-xl text-wp-text-100">{{ $t('secrets.secrets') }}</h1>
|
<Button v-else :text="$t('secrets.add')" start-icon="plus" @click="showAddSecret" />
|
||||||
<p class="text-sm text-wp-text-alt-100">
|
</template>
|
||||||
{{ $t('user.settings.secrets.desc') }}
|
|
||||||
<DocsLink :topic="$t('secrets.secrets')" url="docs/usage/secrets" />
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<Button
|
|
||||||
v-if="selectedSecret"
|
|
||||||
class="ml-auto"
|
|
||||||
:text="$t('secrets.show')"
|
|
||||||
start-icon="back"
|
|
||||||
@click="selectedSecret = undefined"
|
|
||||||
/>
|
|
||||||
<Button v-else class="ml-auto" :text="$t('secrets.add')" start-icon="plus" @click="showAddSecret" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<SecretList
|
<SecretList
|
||||||
v-if="!selectedSecret"
|
v-if="!selectedSecret"
|
||||||
|
@ -33,7 +20,7 @@
|
||||||
@save="createSecret"
|
@save="createSecret"
|
||||||
@cancel="selectedSecret = undefined"
|
@cancel="selectedSecret = undefined"
|
||||||
/>
|
/>
|
||||||
</Panel>
|
</Settings>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
@ -42,8 +29,7 @@ import { computed, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import Button from '~/components/atomic/Button.vue';
|
import Button from '~/components/atomic/Button.vue';
|
||||||
import DocsLink from '~/components/atomic/DocsLink.vue';
|
import Settings from '~/components/layout/Settings.vue';
|
||||||
import Panel from '~/components/layout/Panel.vue';
|
|
||||||
import SecretEdit from '~/components/secrets/SecretEdit.vue';
|
import SecretEdit from '~/components/secrets/SecretEdit.vue';
|
||||||
import SecretList from '~/components/secrets/SecretList.vue';
|
import SecretList from '~/components/secrets/SecretList.vue';
|
||||||
import useApiClient from '~/compositions/useApiClient';
|
import useApiClient from '~/compositions/useApiClient';
|
||||||
|
|
Loading…
Reference in a new issue