First version running with npm run dev
This commit is contained in:
commit
f90ec06a4f
28 files changed
+12042
No files matched your search
@@ -0,0 +1,147 @@
|
||||
<script setup lang="ts">
|
||||
import ThemeToggle from "~/components/ThemeToggle.vue";
|
||||
import SettingsModal from "~/components/SettingsModal.vue";
|
||||
import ToastNotification from "~/components/ToastNotification.vue";
|
||||
import { useTheme } from "~/composables/useTheme";
|
||||
import { useSettings } from "~/composables/useSettings";
|
||||
|
||||
useTheme();
|
||||
const { model, setModel } = useSettings();
|
||||
|
||||
const showSettings = ref(false);
|
||||
|
||||
function handleModelUpdate(newModel: string) {
|
||||
setModel(newModel);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-layout">
|
||||
<header class="app-header">
|
||||
<div class="container header-container">
|
||||
<div class="header-text">
|
||||
<h1 class="app-title">Quick Ling</h1>
|
||||
<p class="app-subtitle">Fast Translation with translategemma</p>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
<button
|
||||
class="header-btn"
|
||||
@click="showSettings = true"
|
||||
type="button"
|
||||
aria-label="Open settings"
|
||||
title="Settings"
|
||||
>
|
||||
⚙
|
||||
</button>
|
||||
<ThemeToggle />
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<main class="app-main">
|
||||
<div class="container">
|
||||
<slot />
|
||||
</div>
|
||||
</main>
|
||||
<footer class="app-footer">
|
||||
<div class="container">
|
||||
<p>Powered by translategemma • Ollama</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<SettingsModal
|
||||
:visible="showSettings"
|
||||
:current-model="model"
|
||||
@update:visible="showSettings = $event"
|
||||
@update:current-model="handleModelUpdate"
|
||||
/>
|
||||
<ToastNotification />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.app-layout {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.app-header {
|
||||
background-color: var(--secondary-color);
|
||||
color: white;
|
||||
padding: 2rem 0;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.header-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.header-text {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.app-title {
|
||||
font-size: 2.5rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.app-subtitle {
|
||||
font-size: 1rem;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.header-btn {
|
||||
background: none;
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
border-radius: 4px;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
padding: 0.25rem 0.5rem;
|
||||
font-size: 1.25rem;
|
||||
line-height: 1;
|
||||
transition:
|
||||
border-color 0.2s,
|
||||
background-color 0.2s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.header-btn:hover {
|
||||
border-color: rgba(255, 255, 255, 0.6);
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.app-main {
|
||||
flex: 1;
|
||||
padding: 2rem 0;
|
||||
}
|
||||
|
||||
.app-footer {
|
||||
background-color: var(--secondary-color);
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 1rem 0;
|
||||
margin-top: auto;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.app-title {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
|
||||
.app-subtitle {
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user