Skip to content

Commit 6437aa3

Browse files
committed
Improve toolbar coloring logic
1 parent a8e21be commit 6437aa3

File tree

14 files changed

+59
-51
lines changed

14 files changed

+59
-51
lines changed

Tekst-API/demo/state.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"prioritize_browse_level_resources": true,
1717
"show_location_aliases": true,
1818
"browse_bar_uses_text_color": false,
19-
"ui_color": "#316149",
19+
"ui_color": "#2F7561",
2020
"show_logo_on_loading_screen": true,
2121
"show_logo_in_header": true,
2222
"show_tekst_footer_hint": true,

Tekst-API/demo/texts.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"default_level": 2,
2525
"loc_delim": " > ",
2626
"labeled_location": true,
27-
"color": "#274891",
27+
"color": "#134F86",
2828
"sort_order": 10,
2929
"is_active": true,
3030
"resource_categories": [
@@ -82,7 +82,7 @@
8282
"default_level": 0,
8383
"loc_delim": "/",
8484
"labeled_location": true,
85-
"color": "#823c88",
85+
"color": "#A2313C",
8686
"sort_order": 10,
8787
"is_active": true,
8888
"resource_categories": [

Tekst-API/openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"title": "Tekst-Dev",
55
"summary": "An online text research platform",
66
"contact": {},
7-
"version": "0.48.3a0"
7+
"version": "0.48.4a0"
88
},
99
"servers": [
1010
{

Tekst-API/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "tekst"
3-
version = "0.48.3a0"
3+
version = "0.48.4a0"
44
description = "An online text research platform"
55
readme = "README.md"
66
authors = [

Tekst-API/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tekst-Web/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tekst-Web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tekst",
3-
"version": "0.48.3-alpha.0",
3+
"version": "0.48.4-alpha.0",
44
"private": true,
55
"type": "module",
66
"scripts": {

Tekst-Web/src/api/index.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,7 @@ export function downloadData(blob: Blob, filename: string) {
9999

100100
// export some common platform properties for use throughout codebase
101101

102-
export const colorPresets = [
103-
'#274891ff', // indigo
104-
'#197c85ff', // teal
105-
'#2d7e48ff', // green
106-
'#75881eff', // olive
107-
'#5e4724ff', // coffee
108-
'#862628ff', // dark red
109-
'#9b344eff', // raspberry
110-
'#823c88ff', // violet
111-
];
102+
export const colorPresets = ['#a2313c', '#563175', '#2F7561', '#c06709', '#134f86'];
112103

113104
export const resourceTypes = [
114105
{

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ import { useMessages } from '@/composables/messages';
77
import { usePrompt } from '@/composables/prompt';
88
import { $t } from '@/i18n';
99
import { AddIcon, BookIcon, BookmarksIcon, DeleteIcon, NoContentIcon, SearchIcon } from '@/icons';
10-
import { useBrowseStore, useStateStore } from '@/stores';
10+
import { useBrowseStore, useStateStore, useThemeStore } from '@/stores';
1111
import { NButton, NEmpty, NFlex, NIcon, NInput, NList, NListItem, NThing } from 'naive-ui';
1212
import { computed, ref } from 'vue';
1313
import { useRouter } from 'vue-router';
1414
1515
defineProps<{
1616
buttonSize?: 'small' | 'medium' | 'large';
17-
color?: string;
1817
}>();
1918
2019
const browse = useBrowseStore();
2120
const state = useStateStore();
21+
const theme = useThemeStore();
2222
const { message } = useMessages();
2323
const { bookmarks, loadBookmarks, createBookmark, deleteBookmark } = useBookmarks();
2424
const router = useRouter();
@@ -93,11 +93,11 @@ async function handleWidgetClick() {
9393
<template>
9494
<n-button
9595
quaternary
96-
:color="color"
9796
:size="buttonSize"
9897
:focusable="false"
9998
:title="$t('browse.bookmarks.bookmarks')"
10099
:bordered="false"
100+
:theme-overrides="theme.toolbarBtnTheme"
101101
@click.stop.prevent="handleWidgetClick"
102102
>
103103
<template #icon>

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import LocationSelectModal from '@/components/modals/LocationSelectModal.vue';
55
import { $t } from '@/i18n';
66
import { ArrowBackIcon, ArrowForwardIcon, BookIcon } from '@/icons';
77
import router from '@/router';
8-
import { useAuthStore, useBrowseStore } from '@/stores';
8+
import { useAuthStore, useBrowseStore, useThemeStore } from '@/stores';
99
import { isInputFocused, isOverlayOpen } from '@/utils';
1010
import { useMagicKeys, whenever } from '@vueuse/core';
1111
import { NBadge, NButton, NFlex, NIcon } from 'naive-ui';
@@ -14,7 +14,6 @@ import { ref } from 'vue';
1414
withDefaults(
1515
defineProps<{
1616
buttonSize?: 'small' | 'medium' | 'large';
17-
color?: string;
1817
}>(),
1918
{
2019
buttonSize: 'large',
@@ -23,6 +22,7 @@ withDefaults(
2322
2423
const auth = useAuthStore();
2524
const browse = useBrowseStore();
25+
const theme = useThemeStore();
2626
2727
const { ArrowLeft, ArrowRight } = useMagicKeys();
2828
@@ -55,12 +55,12 @@ whenever(ArrowRight, () => {
5555
<n-flex justify="space-between" align="center" :wrap="false">
5656
<n-button
5757
quaternary
58-
:color="color"
5958
:focusable="false"
6059
:title="$t('browse.toolbar.tipPreviousLocation')"
6160
:size="buttonSize"
6261
:bordered="false"
6362
:disabled="!browse.prevLocationId"
63+
:theme-overrides="theme.toolbarBtnTheme"
6464
@click="() => gotoLocation(browse.prevLocationId)"
6565
>
6666
<template #icon>
@@ -71,14 +71,14 @@ whenever(ArrowRight, () => {
7171
<n-badge value="!" :show="!browse.isOnDefaultLevel && !browse.loadingLocationData">
7272
<n-button
7373
quaternary
74-
:color="color"
7574
:title="
7675
$t('browse.toolbar.tipSelectLocation') +
7776
(!browse.isOnDefaultLevel ? ' (' + $t('browse.toolbar.tipNotOnDefaultLevel') + ')' : '')
7877
"
7978
:focusable="false"
8079
:size="buttonSize"
8180
:bordered="false"
81+
:theme-overrides="theme.toolbarBtnTheme"
8282
@click="showLocationSelectModal = true"
8383
>
8484
<template #icon>
@@ -87,16 +87,16 @@ whenever(ArrowRight, () => {
8787
</n-button>
8888
</n-badge>
8989

90-
<bookmarks-widget v-if="!!auth.user" :button-size="buttonSize" :color="color" />
90+
<bookmarks-widget v-if="!!auth.user" :button-size="buttonSize" />
9191

9292
<n-button
9393
quaternary
94-
:color="color"
9594
:focusable="false"
9695
:title="$t('browse.toolbar.tipNextLocation')"
9796
:size="buttonSize"
9897
:bordered="false"
9998
:disabled="!browse.nextLocationId"
99+
:theme-overrides="theme.toolbarBtnTheme"
100100
@click="() => gotoLocation(browse.nextLocationId)"
101101
>
102102
<template #icon>

0 commit comments

Comments
 (0)