-
-
+
-
+
@@ -70,7 +78,7 @@ const props = defineProps({
stdWidth: [Number, Array],
shape: Function, // shape() -> Shape
mode: { type: Number, default: 0 }, // rung addition mode: 0 = split, 1 = extend
- flip: { type: Boolean, default: false }, // if true, the skew slider is flipped upside-down
+ flip: { type: Boolean, default: false }, // if true, the balance slider is flipped upside-down
orientation: { type: Number, default: 1 }, // 0 = horizontal slider, 1 = vertical
// values may be scalars or vector arrays
getModelValue: Function, // getModelValue(model) -> value
@@ -82,9 +90,9 @@ const props = defineProps({
const flippedSign = computed(()=>props.flip?-1:1)
-const skew100 = computed( {
- get() {return flippedSign.value*props.builder.skew*100},
- set(v) {props.builder.skew = flippedSign.value*v/100; }
+const balance100 = computed( {
+ get() {return flippedSign.value*props.builder.balance*100},
+ set(v) {props.builder.balance = flippedSign.value*v/100; }
} )
// validity checks
@@ -194,14 +202,14 @@ const values = computed(()=>{
const weights = computed(() => {
- // const skew = props.flip ? -props.builder.skew : props.builder.skew
+ // const balance = props.flip ? -props.builder.balance : props.builder.balance
const most = 0.998
- let skew = -props.builder.skew
- if (skew <= -1)
- skew = -most
- else if (skew >= 1)
- skew = most
- const ws = linearWeights(props.builder.rungs, skew)
+ let balance = -props.builder.balance
+ if (balance <= -1)
+ balance = -most
+ else if (balance >= 1)
+ balance = most
+ const ws = linearWeights(props.builder.rungs, balance)
if (props.setWeights)
props.setWeights(ws)
return ws
@@ -228,7 +236,8 @@ const color = computed({
}
})
const colorStyle = computed(() => {
- return {'color': color.value}
+ // return {'color': color.value}
+ return {}
})
@@ -428,7 +437,7 @@ if (!endpoints.value[0])
:deep(.v-slider.no-slider-bg .v-slider-track__fill) {
background-color: inherit !important;
}
-.skew {
+.balance {
min-width: 9em;
max-width: 12em;
}
diff --git a/src/layouts/default/AppBar.vue b/src/layouts/default/AppBar.vue
index 46ac0dc..c4b3ce3 100644
--- a/src/layouts/default/AppBar.vue
+++ b/src/layouts/default/AppBar.vue
@@ -6,7 +6,6 @@
dexorder
-
diff --git a/src/plugins/vuetify.js b/src/plugins/vuetify.js
index 5bd721e..fc57078 100644
--- a/src/plugins/vuetify.js
+++ b/src/plugins/vuetify.js
@@ -16,7 +16,7 @@ import {
darken1,
darkMiddleShadeIndex,
light,
- lightMiddleShadeIndex, numShades, pageShade,
+ lightMiddleShadeIndex, numShades, surfaceShade,
printContrast
} from "../../theme.js";
@@ -28,13 +28,13 @@ function makeColors(isLight) {
const ink = k[printContrast] // text color
function darken(cols,shades) {return cols[base+(isLight?-shades:shades)]}
// https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
- return {
- background: k[pageShade],
- surface: k[pageShade],
- 'surface-bright': k[pageShade],
- 'surface-light': k[pageShade+2],
+ const colors = {
+ background: k[0],
+ surface: k[surfaceShade],
+ 'surface-bright': k[surfaceShade],
+ 'surface-light': k[surfaceShade+2],
'surface-variant': k[14],
- 'on-surface-variant': k[pageShade+2],
+ 'on-surface-variant': k[surfaceShade+2],
primary: c.greens[base],
'primary-darken-1': darken(c.greens, darken1),
secondary: c.blues[base],
@@ -53,6 +53,8 @@ function makeColors(isLight) {
"on-warning": ink,
"on-error": ink,
}
+ console.log('colors', isLight?'light':'dark', colors)
+ return colors;
}
const lightColors = makeColors(true)
diff --git a/src/store/store.js b/src/store/store.js
index 6b292f7..60f25b7 100644
--- a/src/store/store.js
+++ b/src/store/store.js
@@ -215,11 +215,13 @@ export const usePrefStore = defineStore({
state: ()=> {
// user preferences
const inverted = ref({})
+ const hints = ref({})
+ const newbie = ref(true)
const acceptedTos = ref('NO TOS ACCEPTED')
const selectedTicker = ref(null)
const selectedTimeframe = ref(null)
const timezone = ref('Etc/UTC')
- return {inverted, acceptedTos, selectedTicker, selectedTimeframe, timezone}
+ return {inverted, acceptedTos, selectedTicker, selectedTimeframe, timezone, newbie, hints, }
},
})
diff --git a/src/styles/vars.scss b/src/styles/vars.scss
index 9d39c60..a7517ae 100644
--- a/src/styles/vars.scss
+++ b/src/styles/vars.scss
@@ -1,4 +1,5 @@
// these must also be set in vuetify.js for the "theme"
+// see src/plugins/vuetify.js esp. makeColors()
@use 'sass:color';
// OFFICIAL DEXORDER PALETTE
diff --git a/src/track.js b/src/track.js
new file mode 100644
index 0000000..5dd1bd0
--- /dev/null
+++ b/src/track.js
@@ -0,0 +1,12 @@
+export let tracking_enabled = true
+
+export function track(event, info) {
+ if (tracking_enabled) {
+ if (window.gtag !== undefined)
+ window.gtag('event', event, info)
+ else {
+ console.log('gtag not available')
+ tracking_enabled = false
+ }
+ }
+}
diff --git a/theme.js b/theme.js
index dbf9741..1e9a6fb 100644
--- a/theme.js
+++ b/theme.js
@@ -24,7 +24,7 @@ export const darkMiddleShadeIndex = 9
export const numShades = 20 // if you change this, see vuetify.js colors that hardcode indexes
// these parameters are expressed in terms of numShades:
-export const pageShade = 2
+export const surfaceShade = 3
export const printContrast = 15;
// vuetify darken. values are added/substracted from the middleShadeIndex. use positive numbers here.
export const colorContrast = 4;