Skip to content

Commit 6bffa65

Browse files
committed
Revert "fix: use settings store to retrieve useColorFallback setting (#533)"
This reverts commit 23df3fb.
1 parent 23df3fb commit 6bffa65

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/route.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import Vue from 'vue';
22
import VueRouter from 'vue-router';
33

4-
import { useSettingsStore } from '~/stores/settings';
5-
64
const Home = () => import('./views/Home.vue');
75

86
// Activity views for desktop
@@ -32,8 +30,7 @@ const router = new VueRouter({
3230
{
3331
path: '/',
3432
redirect: _to => {
35-
const settings = useSettingsStore();
36-
return settings.landingpage || '/home';
33+
return localStorage.landingpage || '/home';
3734
},
3835
},
3936
{ path: '/home', component: Home },

src/util/color.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Category, matchString, loadClasses } from './classes';
33
import Color from 'color';
44
import * as d3 from 'd3';
55
import { IEvent, IBucket } from './interfaces';
6-
import { useSettingsStore } from '~/stores/settings';
76

87
// See here for examples:
98
// https://bl.ocks.org/pstuffa/3393ff2711a53975040077b7453781a9
@@ -100,8 +99,10 @@ export function getCategoryColorFromString(str: string): string {
10099

101100
function fallbackColor(str: string): string {
102101
// Get fallback color
103-
const settings = useSettingsStore();
104-
if (settings.useColorFallback) {
102+
// TODO: Fetch setting from somewhere better, where defaults are respected
103+
const useColorFallback =
104+
localStorage !== undefined ? localStorage.useColorFallback === 'true' : true;
105+
if (useColorFallback) {
105106
return getColorFromString(str);
106107
} else {
107108
return COLOR_UNCAT;

0 commit comments

Comments
 (0)