Skip to content

Commit ad6831c

Browse files
committed
2 parents 2e57fac + 4b05519 commit ad6831c

File tree

17 files changed

+135
-31
lines changed

17 files changed

+135
-31
lines changed

.github/renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": [
44
"config:recommended",
5-
"schedule:daily",
5+
"schedule:weekly",
66
"schedule:automergeDaily"
77
],
88
"baseBranches": ["main"],

Tekst-API/openapi.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14992,6 +14992,12 @@
1499214992
"description": "Show location aliases in browse view",
1499314993
"default": true
1499414994
},
14995+
"browseBarUsesTextColor": {
14996+
"type": "boolean",
14997+
"title": "Browsebarusestextcolor",
14998+
"description": "Use current working text's accent color for browse toolbar",
14999+
"default": false
15000+
},
1499515001
"uiColor": {
1499615002
"type": "string",
1499715003
"format": "color",
@@ -15274,6 +15280,19 @@
1527415280
"description": "Show location aliases in browse view",
1527515281
"optionalNullable": false
1527615282
},
15283+
"browseBarUsesTextColor": {
15284+
"anyOf": [
15285+
{
15286+
"type": "boolean"
15287+
},
15288+
{
15289+
"type": "null"
15290+
}
15291+
],
15292+
"title": "Browsebarusestextcolor",
15293+
"description": "Use current working text's accent color for browse toolbar",
15294+
"optionalNullable": false
15295+
},
1527715296
"uiColor": {
1527815297
"anyOf": [
1527915298
{

Tekst-API/tekst/models/platform.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,13 @@ class PlatformState(ModelBase, ModelFactoryMixin):
200200
),
201201
] = True
202202

203+
browse_bar_uses_text_color: Annotated[
204+
bool,
205+
Field(
206+
description="Use current working text's accent color for browse toolbar",
207+
),
208+
] = False
209+
203210
ui_color: Annotated[
204211
Color,
205212
ColorSerializer,

Tekst-Web/i18n/ui/deDE.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ models:
363363
showResourceCategoryHeadings: Zeige Überschriften für Kategorien
364364
prioritizeBrowseLevelResources: Platziere Ressourcen der aktuellen Ebene vor anderen (innerhalb ihrer Kategorien)
365365
showLocationAliases: Zeige Belegstellen-Aliase
366+
browseBarUsesTextColor: Färbe Toolbar der Lese-Ansicht in der Farbe des aktuellen Arbeitstextes
366367
denyResourceTypes: Erstellung dieser Ressourcentypen nur Administratoren erlauben
367368
fonts: Benutzer*innendefinierte Schritarten
368369
uiFont: UI-Schriftart

Tekst-Web/i18n/ui/enUS.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ models:
359359
showResourceCategoryHeadings: Show category headings
360360
prioritizeBrowseLevelResources: Place resources of current browse level before others (inside their category)
361361
showLocationAliases: Show location aliases
362+
browseBarUsesTextColor: Use current working text's accent color for browse toolbar
362363
denyResourceTypes: Allow creation of these resource types for administrators only
363364
fonts: Custom Fonts
364365
uiFont: User Interface Font

Tekst-Web/src/api/schema.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4882,6 +4882,12 @@ export interface components {
48824882
* @default true
48834883
*/
48844884
showLocationAliases: boolean;
4885+
/**
4886+
* Browsebarusestextcolor
4887+
* @description Use current working text's accent color for browse toolbar
4888+
* @default false
4889+
*/
4890+
browseBarUsesTextColor: boolean;
48854891
/**
48864892
* Uicolor
48874893
* Format: color
@@ -5001,6 +5007,11 @@ export interface components {
50015007
* @description Show location aliases in browse view
50025008
*/
50035009
showLocationAliases?: boolean;
5010+
/**
5011+
* Browsebarusestextcolor
5012+
* @description Use current working text's accent color for browse toolbar
5013+
*/
5014+
browseBarUsesTextColor?: boolean;
50045015
/**
50055016
* Uicolor
50065017
* @description Primary color used in for client UI

Tekst-Web/src/assets/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ table td {
383383
}
384384

385385
.divided {
386-
border-bottom: 1px solid var(--main-bg-color);
386+
border-bottom: 1px solid var(--primary-color);
387387
margin-bottom: var(--gap-md) !important;
388388
}
389389

Tekst-Web/src/components/browse/BookmarksWidget.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ async function handleWidgetClick() {
8686

8787
<template>
8888
<n-button
89-
type="primary"
89+
quaternary
90+
color="var(--base-color)"
9091
:size="buttonSize"
9192
:focusable="false"
9293
:title="$t('browse.bookmarks.bookmarks')"

Tekst-Web/src/components/browse/BrowseLocationControls.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ whenever(ArrowRight, () => {
5353
<!-- text location toolbar buttons -->
5454
<n-flex justify="space-between" align="center" :wrap="false">
5555
<n-button
56-
type="primary"
56+
quaternary
57+
color="var(--base-color)"
5758
:focusable="false"
5859
:title="$t('browse.toolbar.tipPreviousLocation')"
5960
:size="buttonSize"
@@ -68,7 +69,8 @@ whenever(ArrowRight, () => {
6869

6970
<n-badge value="!" :show="!browse.isOnDefaultLevel && !browse.loadingLocationData">
7071
<n-button
71-
type="primary"
72+
quaternary
73+
color="var(--base-color)"
7274
:title="
7375
$t('browse.toolbar.tipSelectLocation') +
7476
(!browse.isOnDefaultLevel ? ' (' + $t('browse.toolbar.tipNotOnDefaultLevel') + ')' : '')
@@ -87,7 +89,8 @@ whenever(ArrowRight, () => {
8789
<bookmarks-widget v-if="!!auth.user" :button-size="buttonSize" />
8890

8991
<n-button
90-
type="primary"
92+
quaternary
93+
color="var(--base-color)"
9194
:focusable="false"
9295
:title="$t('browse.toolbar.tipNextLocation')"
9396
:size="buttonSize"

Tekst-Web/src/components/browse/BrowseSearchResultsToolbar.vue

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
SkipNextIcon,
99
SkipPreviousIcon,
1010
} from '@/icons';
11-
import { useBrowseStore, useSearchStore } from '@/stores';
11+
import { useBrowseStore, useSearchStore, useStateStore, useThemeStore } from '@/stores';
1212
import { NBadge, NButton, NFlex, NIcon } from 'naive-ui';
1313
import { computed, onMounted } from 'vue';
1414
@@ -22,8 +22,16 @@ withDefaults(
2222
}
2323
);
2424
25+
const state = useStateStore();
2526
const browse = useBrowseStore();
2627
const search = useSearchStore();
28+
const theme = useThemeStore();
29+
30+
const bgColor = computed(() =>
31+
!!state.pf?.state.browseBarUsesTextColor
32+
? theme.getTextColors().fade4
33+
: 'var(--primary-color-fade4)'
34+
);
2735
2836
const resultNo = computed(
2937
() =>
@@ -70,7 +78,13 @@ onMounted(() => {
7078

7179
<template>
7280
<div v-if="search.browseHits" class="bsr-container">
73-
<n-flex justify="space-between" align="center" :wrap="false" class="bsr-toolbar">
81+
<n-flex
82+
justify="space-between"
83+
align="center"
84+
:wrap="false"
85+
class="bsr-toolbar"
86+
:style="{ backgroundColor: bgColor }"
87+
>
7488
<n-flex :wrap="false">
7589
<!-- skip to previous search result -->
7690
<n-button
@@ -189,7 +203,6 @@ onMounted(() => {
189203
190204
.bsr-toolbar {
191205
padding: var(--gap-sm);
192-
background-color: var(--primary-color-fade3);
193206
border-bottom-left-radius: var(--border-radius);
194207
border-bottom-right-radius: var(--border-radius);
195208
}

0 commit comments

Comments
 (0)