Skip to content

Commit

Permalink
[#58] remove useNuxtApp usages
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreezag committed Feb 11, 2024
1 parent c6a4515 commit 556da0d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<script lang="ts">
import { storeToRefs } from "pinia";
import { defineComponent } from "vue";
import { useNuxtApp } from "#app";
import { LayoutSidebar } from "~/src/widgets/ui";
import { useEvents } from "~/src/shared/lib/use-events";
import { useSettings } from "~/src/shared/lib/use-settings";
import SfdumpWrap from "~/src/shared/lib/vendor/dumper";
import { version } from "../package.json";
import { useSettingsStore } from "~/stores/settings";
export default defineComponent({
Expand All @@ -32,7 +32,7 @@ export default defineComponent({
const settingsStore = useSettingsStore();
const { themeType, isFixedHeader } = storeToRefs(settingsStore);
const { $config } = useNuxtApp();
const {
api: { getVersion },
} = useSettings();
Expand All @@ -45,16 +45,16 @@ export default defineComponent({
events.getAll();
}
const clientVersion =
!version || version === "0.0.1" ? "@dev" : `v${version}`;
return {
themeType,
isFixedHeader,
apiVersion: String(apiVersion).match(/^[0-9.]+.*$/)
? `v${apiVersion}`
: `@${apiVersion}`,
clientVersion:
!$config?.public?.version || $config.public.version === "0.0.1"
? "@dev"
: `v${$config.public.version}`,
clientVersion,
};
},
});
Expand Down

0 comments on commit 556da0d

Please sign in to comment.