Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/components/Settings/AdvancedSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ const parseError = ref<string | null>(null);
async function browseAndParsePlayerLog() {
const selected = await open({
multiple: false,
defaultPath: settingsStore.settings.logFilePath || settingsStore.settings.gameDataPath || undefined,
filters: [{ name: "Log Files", extensions: ["log", "txt"] }],
});
if (selected) {
Expand Down Expand Up @@ -293,6 +294,7 @@ let unlistenProgress: UnlistenFn | null = null;
async function pickPlayerLogForReplay() {
const selected = await open({
multiple: false,
defaultPath: settingsStore.settings.logFilePath || settingsStore.settings.gameDataPath || undefined,
filters: [{ name: "Log Files", extensions: ["log", "txt"] }],
});
if (selected) {
Expand All @@ -303,6 +305,7 @@ async function pickPlayerLogForReplay() {
async function pickChatLogForReplay() {
const selected = await open({
multiple: false,
defaultPath: (settingsStore.settings.gameDataPath ? settingsStore.settings.gameDataPath + "/ChatLogs" : undefined),
filters: [{ name: "Log Files", extensions: ["log", "txt"] }],
});
if (selected) {
Expand Down
2 changes: 2 additions & 0 deletions src/components/Settings/ChatLogsSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ const parseResult = ref<string | null>(null);
async function selectAndParseFile() {
const selected = await open({
multiple: false,
defaultPath: (settingsStore.settings.gameDataPath ? settingsStore.settings.gameDataPath + "/ChatLogs" : undefined),
filters: [{ name: "Chat Log Files", extensions: ["log", "txt"] }],
});
if (selected) {
Expand All @@ -243,6 +244,7 @@ async function parseFolder() {
const selected = await open({
directory: true,
multiple: false,
defaultPath: (settingsStore.settings.gameDataPath ? settingsStore.settings.gameDataPath + "/ChatLogs" : undefined),
});
if (selected) {
parseResult.value = null;
Expand Down
3 changes: 3 additions & 0 deletions src/components/StallTracker/StallTrackerView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,11 @@ import StallInventoryTab from './StallInventoryTab.vue'
import StallShopLogTab from './StallShopLogTab.vue'
import { useStallTrackerStore } from '../../stores/stallTrackerStore'
import { useViewPrefs } from '../../composables/useViewPrefs'
import { useSettingsStore } from '../../stores/settingsStore'
import type { ImportResult, ExportResult } from '../../types/stallTracker'

const store = useStallTrackerStore()
const settingsStore = useSettingsStore()

// Ephemeral status text shown in the action row (auto-clears after 5s).
const actionMessage = ref<string>('')
Expand All @@ -136,6 +138,7 @@ async function handleImport() {
if (actionInProgress.value) return
const selected = await openDialog({
multiple: true,
defaultPath: settingsStore.settings.gameDataPath || undefined,
filters: [{ name: 'Shop log book', extensions: ['txt'] }],
})
if (!selected) return
Expand Down
3 changes: 3 additions & 0 deletions src/stores/breweryStore.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineStore } from "pinia";
import { ref, computed } from "vue";
import { invoke } from "@tauri-apps/api/core";
import { useSettingsStore } from "./settingsStore";
import type {
BrewingRecipe,
BrewingIngredient,
Expand Down Expand Up @@ -311,8 +312,10 @@ export const useBreweryStore = defineStore("brewery", () => {
async function importCsv(character: string): Promise<BrewingScanResult | null> {
if (scanning.value) return null;

const settingsStore = useSettingsStore();
const { open } = await import("@tauri-apps/plugin-dialog");
const filePath = await open({
defaultPath: settingsStore.settings.gameDataPath || undefined,
filters: [{ name: "CSV", extensions: ["csv"] }],
multiple: false,
});
Expand Down
3 changes: 3 additions & 0 deletions src/stores/cooksHelperStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { invoke } from '@tauri-apps/api/core'
import { open } from '@tauri-apps/plugin-dialog'
import { useCraftingStore } from './craftingStore'
import { useGameStateStore } from './gameStateStore'
import { useSettingsStore } from './settingsStore'
import type { RecipeInfo } from '../types/gameData/recipes'
import type { FoodItem } from '../types/gourmand'
import type { MaterialNeed } from '../types/crafting'
Expand Down Expand Up @@ -145,7 +146,9 @@ export const useCooksHelperStore = defineStore('cooksHelper', () => {
async function importFile() {
error.value = null

const settingsStore = useSettingsStore()
const filePath = await open({
defaultPath: (settingsStore.settings.gameDataPath ? settingsStore.settings.gameDataPath + '/Reports' : undefined),
filters: [{ name: 'Gourmand Skill Report', extensions: ['txt'] }],
})

Expand Down
3 changes: 3 additions & 0 deletions src/stores/gourmandStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { listen } from '@tauri-apps/api/event'
import { open, save } from '@tauri-apps/plugin-dialog'
import { useGameStateStore } from './gameStateStore'
import { useCharacterStore } from './characterStore'
import { useSettingsStore } from './settingsStore'
import type { FoodItem, GourmandFoodEntry, GourmandImportResult } from '../types/gourmand'

export const useGourmandStore = defineStore('gourmand', () => {
Expand Down Expand Up @@ -153,7 +154,9 @@ export const useGourmandStore = defineStore('gourmand', () => {
async function importReport() {
error.value = null

const settingsStore = useSettingsStore()
const filePath = await open({
defaultPath: (settingsStore.settings.gameDataPath ? settingsStore.settings.gameDataPath + '/Reports' : undefined),
filters: [{ name: 'Gourmand Report', extensions: ['txt'] }],
})

Expand Down