Commit ef9f257e authored by Joel Collins's avatar Joel Collins
Browse files

Fixed global state and scrolltotop

parent a1ae9479
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -102,9 +102,9 @@ export default {
    },
    handleTheme: function() {
      var isDark = false;
      if (this.$store.state.globalSettings.appTheme == "dark") {
      if (this.$store.state.appTheme == "dark") {
        isDark = true;
      } else if (this.$store.state.globalSettings.appTheme == "system") {
      } else if (this.$store.state.appTheme == "system") {
        if (this.systemDark) {
          isDark = true;
        }
+1 −1
Original line number Diff line number Diff line
@@ -214,7 +214,7 @@ export default {
  computed: {
    enabledTopTabs: function() {
      var enabledTabs = this.topTabs;
      if (this.$store.state.globalSettings.IHIEnabled) {
      if (this.$store.state.IHIEnabled) {
        enabledTabs.push({
          id: "slidescan",
          icon: "settings_overscan",
+6 −0
Original line number Diff line number Diff line
@@ -23,6 +23,12 @@ export default {
    };
  },

  mounted() {
    if (!this.$store.getters.ready) {
      this.currentOrigin = "http://microscope.local:5000";
    }
  },

  methods: {
    overrideAPIHost: function() {
      this.$store.commit("changeOrigin", this.currentOrigin);
+1 −1
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ export default {
      resizeDims: [640, 480],
      tags: [],
      annotations: {
        Client: `${process.env.PACKAGE.name}.${process.env.PACKAGE.version}`
        Client: "openflexure-microscope-jsclient:builtin"
      },
      scanUri: null
    };
+3 −5
Original line number Diff line number Diff line
<template>
  <div
    class="capture-card uk-card uk-card-default uk-padding-remove uk-width-medium"
    :class="{ 'uk-card-secondary': $store.state.globalSettings.darkMode }"
    :class="{ 'uk-card-secondary': $store.state.darkMode }"
  >
    <div class="uk-card-media-top">
      <a class="lightbox-link" :href="imgURL" :data-caption="name">
@@ -70,8 +70,7 @@
      <div
        class="uk-modal-dialog uk-modal-body"
        :class="{
          'uk-light uk-background-secondary':
            $store.state.globalSettings.darkMode
          'uk-light uk-background-secondary': $store.state.darkMode
        }"
      >
        <button class="uk-modal-close-default" type="button" uk-close></button>
@@ -112,8 +111,7 @@
      <form
        class="uk-modal-dialog uk-modal-body uk-margin-auto-vertical"
        :class="{
          'uk-light uk-background-secondary':
            $store.state.globalSettings.darkMode
          'uk-light uk-background-secondary': $store.state.darkMode
        }"
        @submit.prevent="handleTagSubmit"
      >
Loading