mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
Use consistent woodpecker color scheme (#2003)
Fixes: https://github.com/woodpecker-ci/woodpecker/issues/1079 What do you think about using a consistent `woodpecker` color scheme? Right now, the `lime` color scheme from windicss is used that does not really fit the primary color used for the documentation website. I have used the primary color `#4CAF50` from the docs and created a color palette with https://palettte.app/: <details> <summary>JSON source</summary> ```Json [ { "paletteName": "New Palette", "swatches": [ { "name": "New Swatch", "color": "166E30" }, { "name": "New Swatch", "color": "248438" }, { "name": "New Swatch", "color": "369943" }, { "name": "New Swatch", "color": "4CAF50" }, { "name": "New Swatch", "color": "68C464" }, { "name": "New Swatch", "color": "8AD97F" } ] } ] ``` </details>  I have added this color scheme to the windicss config and replaced the use of `lime` in the UI. While `woodpecker-300` would be the primary color that is used for the docs, I currently use `woodpecke-400` as primary color for the UI to fix some contrast issues.   What do you think? If you would like to stay with the current colors, that's fine for me, I can just use the custom CSS feature in this case. --------- Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<Panel>
|
||||
<div class="flex flex-row border-b mb-4 pb-4 items-center dark:border-gray-600">
|
||||
<div class="flex flex-row border-b mb-4 pb-4 items-center dark:border-wp-background-100">
|
||||
<div class="ml-2">
|
||||
<h1 class="text-xl text-color">{{ $t('admin.settings.agents.agents') }}</h1>
|
||||
<p class="text-sm text-color-alt">{{ $t('admin.settings.agents.desc') }}</p>
|
||||
<h1 class="text-xl text-wp-text-100">{{ $t('admin.settings.agents.agents') }}</h1>
|
||||
<p class="text-sm text-wp-text-alt-100">{{ $t('admin.settings.agents.desc') }}</p>
|
||||
</div>
|
||||
<Button
|
||||
v-if="selectedAgent"
|
||||
@@ -15,8 +15,12 @@
|
||||
<Button v-else class="ml-auto" :text="$t('admin.settings.agents.add')" start-icon="plus" @click="showAddAgent" />
|
||||
</div>
|
||||
|
||||
<div v-if="!selectedAgent" class="space-y-4 text-color">
|
||||
<ListItem v-for="agent in agents" :key="agent.id" class="items-center">
|
||||
<div v-if="!selectedAgent" class="space-y-4 text-wp-text-100">
|
||||
<ListItem
|
||||
v-for="agent in agents"
|
||||
:key="agent.id"
|
||||
class="items-center !bg-wp-background-200 !dark:bg-wp-background-100"
|
||||
>
|
||||
<span>{{ agent.name || `Agent ${agent.id}` }}</span>
|
||||
<span class="ml-auto">
|
||||
<span class="hidden md:inline-block space-x-2">
|
||||
@@ -35,7 +39,7 @@
|
||||
<IconButton
|
||||
icon="trash"
|
||||
:title="$t('admin.settings.agents.delete_agent')"
|
||||
class="ml-2 w-8 h-8 hover:text-red-400 hover:dark:text-red-500"
|
||||
class="ml-2 w-8 h-8 hover:text-wp-control-error-100"
|
||||
:is-loading="isDeleting"
|
||||
@click="deleteAgent(agent)"
|
||||
/>
|
||||
@@ -85,7 +89,7 @@
|
||||
:label="$t('admin.settings.agents.capacity.capacity')"
|
||||
docs-url="docs/next/administration/agent-config#woodpecker_max_procs"
|
||||
>
|
||||
<span class="text-color-alt">{{ $t('admin.settings.agents.capacity.desc') }}</span>
|
||||
<span class="text-wp-text-alt-100">{{ $t('admin.settings.agents.capacity.desc') }}</span>
|
||||
<TextField :model-value="selectedAgent.capacity?.toString()" disabled />
|
||||
</InputField>
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<Panel>
|
||||
<div v-if="queueInfo" class="flex flex-row border-b mb-4 pb-4 items-center dark:border-gray-600">
|
||||
<div v-if="queueInfo" class="flex flex-row border-b mb-4 pb-4 items-center dark:border-wp-background-100">
|
||||
<div class="ml-2">
|
||||
<h1 class="text-xl text-color">{{ $t('admin.settings.queue.queue') }}</h1>
|
||||
<p class="text-sm text-color-alt">{{ $t('admin.settings.queue.desc') }}</p>
|
||||
<h1 class="text-xl text-wp-text-100">{{ $t('admin.settings.queue.queue') }}</h1>
|
||||
<p class="text-sm text-wp-text-alt-100">{{ $t('admin.settings.queue.desc') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="ml-auto flex items-center gap-2">
|
||||
@@ -24,8 +24,8 @@
|
||||
<Icon
|
||||
:name="queueInfo.paused ? 'pause' : 'play'"
|
||||
:class="{
|
||||
'text-red-400': queueInfo.paused,
|
||||
'text-lime-400': !queueInfo.paused,
|
||||
'text-wp-state-error-100': queueInfo.paused,
|
||||
'text-wp-state-ok-100': !queueInfo.paused,
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
@@ -36,7 +36,11 @@
|
||||
|
||||
<div v-if="tasks.length > 0" class="flex flex-col">
|
||||
<p class="mt-6 mb-2 text-xl">{{ $t('admin.settings.queue.tasks') }}</p>
|
||||
<ListItem v-for="task in tasks" :key="task.id" class="items-center mb-2">
|
||||
<ListItem
|
||||
v-for="task in tasks"
|
||||
:key="task.id"
|
||||
class="items-center mb-2 !bg-wp-background-200 !dark:bg-wp-background-100"
|
||||
>
|
||||
<div
|
||||
class="flex items-center"
|
||||
:title="
|
||||
@@ -56,9 +60,9 @@
|
||||
: 'status-declined'
|
||||
"
|
||||
:class="{
|
||||
'text-red-400': task.status === 'waiting_on_deps',
|
||||
'text-blue-400': task.status === 'running',
|
||||
'text-gray-400': task.status === 'pending',
|
||||
'text-wp-state-error-100': task.status === 'waiting_on_deps',
|
||||
'text-wp-state-info-100': task.status === 'running',
|
||||
'text-wp-state-neutral-100': task.status === 'pending',
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<Panel>
|
||||
<div class="flex flex-row border-b mb-4 pb-4 items-center dark:border-gray-600">
|
||||
<div class="flex flex-row border-b mb-4 pb-4 items-center dark:border-wp-background-100">
|
||||
<div class="ml-2">
|
||||
<h1 class="text-xl text-color">{{ $t('admin.settings.secrets.secrets') }}</h1>
|
||||
<p class="text-sm text-color-alt">
|
||||
<h1 class="text-xl text-wp-text-100">{{ $t('admin.settings.secrets.secrets') }}</h1>
|
||||
<p class="text-sm text-wp-text-alt-100">
|
||||
{{ $t('admin.settings.secrets.desc') }}
|
||||
<DocsLink :topic="$t('admin.settings.secrets.secrets')" url="docs/usage/secrets" />
|
||||
</p>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<Panel>
|
||||
<div class="flex flex-row border-b mb-4 pb-4 items-center dark:border-gray-600">
|
||||
<div class="flex flex-row border-b mb-4 pb-4 items-center dark:border-wp-background-100">
|
||||
<div class="ml-2">
|
||||
<h1 class="text-xl text-color">{{ $t('admin.settings.users.users') }}</h1>
|
||||
<p class="text-sm text-color-alt">{{ $t('admin.settings.users.desc') }}</p>
|
||||
<h1 class="text-xl text-wp-text-100">{{ $t('admin.settings.users.users') }}</h1>
|
||||
<p class="text-sm text-wp-text-alt-100">{{ $t('admin.settings.users.desc') }}</p>
|
||||
</div>
|
||||
<Button
|
||||
v-if="selectedUser"
|
||||
@@ -15,8 +15,12 @@
|
||||
<Button v-else class="ml-auto" :text="$t('admin.settings.users.add')" start-icon="plus" @click="showAddUser" />
|
||||
</div>
|
||||
|
||||
<div v-if="!selectedUser" class="space-y-4 text-color">
|
||||
<ListItem v-for="user in users" :key="user.id" class="items-center gap-2">
|
||||
<div v-if="!selectedUser" class="space-y-4 text-wp-text-100">
|
||||
<ListItem
|
||||
v-for="user in users"
|
||||
:key="user.id"
|
||||
class="items-center gap-2 !bg-wp-background-200 !dark:bg-wp-background-100"
|
||||
>
|
||||
<img v-if="user.avatar_url" class="rounded-md h-6" :src="user.avatar_url" />
|
||||
<span>{{ user.login }}</span>
|
||||
<Badge
|
||||
@@ -34,7 +38,7 @@
|
||||
<IconButton
|
||||
icon="trash"
|
||||
:title="$t('admin.settings.users.delete_user')"
|
||||
class="ml-2 w-8 h-8 hover:text-red-400 hover:dark:text-red-500"
|
||||
class="ml-2 w-8 h-8 hover:text-wp-control-error-100"
|
||||
:is-loading="isDeleting"
|
||||
@click="deleteUser(user)"
|
||||
/>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<div v-if="stats" class="flex justify-center">
|
||||
<div class="bg-gray-100 dark:bg-dark-gray-600 text-color dark:text-gray-400 rounded-md py-5 px-5 w-full">
|
||||
<div
|
||||
class="bg-wp-background-200 border border-wp-background-300 dark:bg-wp-background-100 text-wp-text-100 rounded-md py-5 px-5 w-full"
|
||||
>
|
||||
<div class="flex w-full">
|
||||
<h3 class="text-lg font-semibold leading-tight uppercase flex-1">
|
||||
{{ $t('admin.settings.queue.stats.completed_count') }}
|
||||
@@ -81,28 +83,28 @@ const data = computed(() => {
|
||||
label: t('admin.settings.queue.stats.worker_count'),
|
||||
value: props.stats.worker_count,
|
||||
perc: total.value > 0 ? (props.stats.worker_count / total.value) * 100 : 0,
|
||||
color: 'bg-lime-400',
|
||||
color: 'bg-wp-state-ok-100',
|
||||
},
|
||||
{
|
||||
key: 'running_count',
|
||||
label: t('admin.settings.queue.stats.running_count'),
|
||||
value: props.stats.running_count,
|
||||
perc: total.value > 0 ? (props.stats.running_count / total.value) * 100 : 100,
|
||||
color: 'bg-blue-400',
|
||||
color: 'bg-wp-state-info-100',
|
||||
},
|
||||
{
|
||||
key: 'pending_count',
|
||||
label: t('admin.settings.queue.stats.pending_count'),
|
||||
value: props.stats.pending_count,
|
||||
perc: total.value > 0 ? (props.stats.pending_count / total.value) * 100 : 0,
|
||||
color: 'bg-gray-400',
|
||||
color: 'bg-wp-state-neutral-100',
|
||||
},
|
||||
{
|
||||
key: 'waiting_on_deps_count',
|
||||
label: t('admin.settings.queue.stats.waiting_on_deps_count'),
|
||||
value: props.stats.waiting_on_deps_count,
|
||||
perc: total.value > 0 ? (props.stats.waiting_on_deps_count / total.value) * 100 : 0,
|
||||
color: 'bg-red-400',
|
||||
color: 'bg-wp-state-error-100',
|
||||
},
|
||||
];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user