mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-18 15:00:52 +01:00
added settings page, cleanup
This commit is contained in:
@ -1,11 +1,20 @@
|
||||
<template>
|
||||
<div class="items-center justify-center min-h-full flex w-full">
|
||||
<div class="items-center justify-center min-h-full flex w-full relative">
|
||||
<div class="fixed top-2 right-2">
|
||||
<UiDropdownLocale @select="setLocale" />
|
||||
</div>
|
||||
<div class="flex flex-col justify-center items-center gap-5 max-w-3xl">
|
||||
<img src="/logo.svg" class="bg-primary p-3 size-16 rounded-full" alt="HaexVault Logo" />
|
||||
<img
|
||||
src="/logo.svg"
|
||||
class="bg-primary p-3 size-16 rounded-full"
|
||||
alt="HaexVault Logo"
|
||||
/>
|
||||
|
||||
<span class="flex flex-wrap font-bold text-pretty text-xl gap-2 justify-center">
|
||||
<span
|
||||
class="flex flex-wrap font-bold text-pretty text-xl gap-2 justify-center"
|
||||
>
|
||||
<p class="whitespace-nowrap">
|
||||
{{ t("welcome") }}
|
||||
{{ t('welcome') }}
|
||||
</p>
|
||||
<UiTextGradient>Haex Hub</UiTextGradient>
|
||||
</span>
|
||||
@ -13,34 +22,15 @@
|
||||
<div class="flex flex-col md:flex-row gap-4 w-full h-24 md:h-auto">
|
||||
<VaultButtonCreate />
|
||||
|
||||
<VaultButtonOpen v-model:isOpen="passwordPromptOpen" :path="vaultPath" />
|
||||
<!-- <NuxtLinkLocale
|
||||
:to="{
|
||||
name: 'haexBrowser',
|
||||
params: { vaultId: 'test' },
|
||||
}"
|
||||
>test link</NuxtLinkLocale
|
||||
> -->
|
||||
<!-- <button @click="test">test</button>
|
||||
<NuxtLinkLocale
|
||||
:to="{ name: 'vaultGroup', params: { vaultId: 'test' } }"
|
||||
>test link</NuxtLinkLocale
|
||||
> -->
|
||||
|
||||
<!-- <UiTreeFolder
|
||||
@edit="test"
|
||||
:value="tests"
|
||||
v-for="tests in [1, 2, 3]"
|
||||
<VaultButtonOpen
|
||||
v-model:isOpen="passwordPromptOpen"
|
||||
:path="vaultPath"
|
||||
/>
|
||||
<UiTreeFolder
|
||||
@edit="test"
|
||||
value="test123"
|
||||
/> -->
|
||||
</div>
|
||||
|
||||
<div v-show="lastVaults.length" class="w-full">
|
||||
<div class="font-thin text-sm justify-start px-2 pb-1">
|
||||
{{ t("lastUsed") }}
|
||||
{{ t('lastUsed') }}
|
||||
</div>
|
||||
|
||||
<div
|
||||
@ -53,10 +43,7 @@
|
||||
>
|
||||
<button
|
||||
class="link link-accent flex items-center no-underline justify-between text-nowrap text-sm md:text-base shrink w-full py-2 px-4"
|
||||
@click="
|
||||
passwordPromptOpen = true;
|
||||
vaultPath = vault.path;
|
||||
"
|
||||
@click=";(passwordPromptOpen = true), (vaultPath = vault.path)"
|
||||
>
|
||||
<span class="block md:hidden">
|
||||
{{ vault.name }}
|
||||
@ -68,14 +55,17 @@
|
||||
<button
|
||||
class="absolute right-2 btn btn-square btn-error btn-xs hidden group-hover:flex min-w-6"
|
||||
>
|
||||
<Icon name="mdi:trash-can-outline" @click="removeVaultAsync(vault.path)" />
|
||||
<Icon
|
||||
name="mdi:trash-can-outline"
|
||||
@click="removeVaultAsync(vault.path)"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center gap-2">
|
||||
<h4>{{ t("sponsors") }}</h4>
|
||||
<h4>{{ t('sponsors') }}</h4>
|
||||
<div>
|
||||
<button @click="openUrl('https://itemis.com')">
|
||||
<UiLogoItemis class="text-[#00457C]" />
|
||||
@ -87,41 +77,21 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { openUrl } from "@tauri-apps/plugin-opener";
|
||||
|
||||
const passwordPromptOpen = ref(false);
|
||||
const vaultPath = ref("");
|
||||
import { openUrl } from '@tauri-apps/plugin-opener'
|
||||
|
||||
definePageMeta({
|
||||
name: "vaultOpen",
|
||||
});
|
||||
name: 'vaultOpen',
|
||||
})
|
||||
|
||||
const { t } = useI18n();
|
||||
const passwordPromptOpen = ref(false)
|
||||
const vaultPath = ref('')
|
||||
|
||||
const { syncLastVaultsAsync, removeVaultAsync } = useLastVaultStore();
|
||||
const { lastVaults } = storeToRefs(useLastVaultStore());
|
||||
const { t, setLocale } = useI18n()
|
||||
|
||||
await syncLastVaultsAsync();
|
||||
const { syncLastVaultsAsync, removeVaultAsync } = useLastVaultStore()
|
||||
const { lastVaults } = storeToRefs(useLastVaultStore())
|
||||
|
||||
/* const { $pluginManager } = useNuxtApp();
|
||||
|
||||
console.log('$pluginManager', $pluginManager);
|
||||
async function loadModule() {
|
||||
try {
|
||||
// Dynamisches Laden des Moduls
|
||||
const file = await open({
|
||||
multiple: false,
|
||||
directory: false,
|
||||
});
|
||||
const moduleUrl =
|
||||
'/home/haex/Projekte/haex-vault-2/haex-vault/src/extensions/test/testPlugin.ts'; // Pfad relativ zum Server-Root
|
||||
await $pluginManager.loadDynamicModule(file);
|
||||
console.log('Modul erfolgreich geladen');
|
||||
} catch (error) {
|
||||
console.error('Fehler beim Laden des Moduls:', error);
|
||||
}
|
||||
}
|
||||
//await loadModule(); */
|
||||
await syncLastVaultsAsync()
|
||||
</script>
|
||||
|
||||
<i18n lang="json">
|
||||
|
||||
Reference in New Issue
Block a user