|
1 | 1 | <script lang="ts">
|
2 |
| - import { onDestroy, onMount } from "svelte"; |
| 2 | + import { onMount } from "svelte"; |
3 | 3 | import { get } from "svelte/store";
|
4 | 4 |
|
5 | 5 | import Login from "./components/pages/Login.svelte";
|
|
12 | 12 | CheckKeyFileInCWD,
|
13 | 13 | GetDirName,
|
14 | 14 | GetDirectoryPath,
|
15 |
| - GetHeight, |
16 | 15 | } from "../wailsjs/go/main/Getters";
|
17 | 16 | import {
|
18 | 17 | EventsOn,
|
19 | 18 | LogDebug,
|
20 | 19 | LogError,
|
21 | 20 | LogInfo,
|
22 |
| - LogWarning, |
23 | 21 | } from "../wailsjs/runtime/runtime";
|
24 | 22 | import { DirectoryWatcher, ResizeWindow } from "../wailsjs/go/main/App";
|
25 | 23 | import {
|
|
28 | 26 | largeFilePercent,
|
29 | 27 | largeFileName,
|
30 | 28 | newAccount,
|
31 |
| - height, |
32 | 29 | filterInputs,
|
33 | 30 | } from "./stores/dynamicVariables.ts";
|
34 |
| - import { buildFileTree, fileTree } from "./tools/fileTree.ts"; |
| 31 | + import { fileTree } from "./tools/fileTree.ts"; |
35 | 32 | import { addLogEntry } from "./tools/logger.ts";
|
36 | 33 | import AppSetup from "./components/pages/AppSetup.svelte";
|
37 |
| - import { width } from "./stores/constantVariables.ts"; |
| 34 | + import { height, width } from "./stores/constantVariables.ts"; |
38 | 35 | import {
|
39 | 36 | AddInputToFilterTemplate,
|
40 | 37 | LoadFileFilters,
|
|
50 | 47 |
|
51 | 48 | onMount(async () => {
|
52 | 49 | isRightDir = await GetDirName();
|
53 |
| - let _height = await GetHeight(); |
54 |
| - height.set(_height); |
55 |
| -
|
56 |
| - if (!isRightDir) ResizeWindow(320, _height + 10); |
| 50 | + if (!isRightDir) ResizeWindow(320, height + 10); |
57 | 51 | else {
|
58 | 52 | CheckKeyFileInCWD().then((_keyFilePath) => {
|
59 | 53 | if (_keyFilePath === "") {
|
60 | 54 | currentPage.set(AppPage.AppSetup);
|
61 | 55 | newAccount.set(true);
|
62 |
| - ResizeWindow(350, _height + 50); |
| 56 | + ResizeWindow(350, height + 50); |
63 | 57 | }
|
64 | 58 | });
|
65 | 59 | }
|
|
101 | 95 | LogError("Error loading file filters:" + error);
|
102 | 96 | }
|
103 | 97 | currentPage.set(AppPage.Vault);
|
104 |
| - ResizeWindow(width * 2, $height); |
| 98 | + ResizeWindow(width * 2, height); |
105 | 99 |
|
106 | 100 | let unsubscribe = () => {};
|
107 | 101 | unsubscribe = fileTree.subscribe((value) => {
|
|
0 commit comments