diff --git a/frontend/_src/App.svelte b/frontend/_src/App.svelte new file mode 100644 index 0000000..04206ea --- /dev/null +++ b/frontend/_src/App.svelte @@ -0,0 +1,19 @@ + + + + + + + + \ No newline at end of file diff --git a/frontend/_src/Events.svelte b/frontend/_src/Events.svelte new file mode 100644 index 0000000..1159d97 --- /dev/null +++ b/frontend/_src/Events.svelte @@ -0,0 +1,44 @@ + \ No newline at end of file diff --git a/frontend/_src/components/Footer.svelte b/frontend/_src/components/Footer.svelte new file mode 100644 index 0000000..d199f4c --- /dev/null +++ b/frontend/_src/components/Footer.svelte @@ -0,0 +1,73 @@ + + + + + \ No newline at end of file diff --git a/frontend/_src/components/Header.svelte b/frontend/_src/components/Header.svelte new file mode 100644 index 0000000..2028185 --- /dev/null +++ b/frontend/_src/components/Header.svelte @@ -0,0 +1,28 @@ + + \ No newline at end of file diff --git a/frontend/_src/components/Nav.svelte b/frontend/_src/components/Nav.svelte new file mode 100644 index 0000000..c8f8ccb --- /dev/null +++ b/frontend/_src/components/Nav.svelte @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/frontend/_src/components/elements/ArcReactor.svelte b/frontend/_src/components/elements/ArcReactor.svelte new file mode 100644 index 0000000..adf9ee5 --- /dev/null +++ b/frontend/_src/components/elements/ArcReactor.svelte @@ -0,0 +1,647 @@ + +
+
+
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/frontend/_src/components/elements/HDivider.svelte b/frontend/_src/components/elements/HDivider.svelte new file mode 100644 index 0000000..5c8cea9 --- /dev/null +++ b/frontend/_src/components/elements/HDivider.svelte @@ -0,0 +1,18 @@ + + +
+ + \ No newline at end of file diff --git a/frontend/_src/components/elements/SearchBar.svelte b/frontend/_src/components/elements/SearchBar.svelte new file mode 100644 index 0000000..3e48b10 --- /dev/null +++ b/frontend/_src/components/elements/SearchBar.svelte @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/frontend/_src/components/elements/Stats.svelte b/frontend/_src/components/elements/Stats.svelte new file mode 100644 index 0000000..fe98d49 --- /dev/null +++ b/frontend/_src/components/elements/Stats.svelte @@ -0,0 +1,377 @@ + + +
+
+
+
+ Микрофон + {microphone_label} +
+
+
+
+
+ Нейросети + {nn_details["ww_engine"]} + {nn_details["stt_engine"]} +
+
+
+
+
+ Ресурсы + RAM {resources_ram_usage}mb +
+
+
+ + diff --git a/frontend/_src/css/main.scss b/frontend/_src/css/main.scss new file mode 100644 index 0000000..2cc520d --- /dev/null +++ b/frontend/_src/css/main.scss @@ -0,0 +1,308 @@ +$prim-font: "Roboto", sans-serif; +$sec-font: "Roboto Condensed", sans-serif; + +html, body { + overflow-x: hidden; +} + +::-webkit-scrollbar { + width: 15px; +} + +::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); +} + +::-webkit-scrollbar-thumb { + background: -webkit-gradient(linear,left top,left bottom,from(#999),to(#27292F)); + background: linear-gradient(to bottom,#999,#27292F); +} + +::selection { + background: #FF8901!important; /* WebKit/Blink Browsers */ + color: white!important; + text-shadow: 1px 1px 1px rgba(0, 0, 0, .5)!important; +} +::-moz-selection { + background: #FF8901!important; /* WebKit/Blink Browsers */ + color: white!important; + text-shadow: 1px 1px 1px rgba(0, 0, 0, .5)!important; +} + +/* + * HEADER + */ + +#header { + height: 80px; + background-color: #0c1013; + box-shadow: 0 0 19px 2px rgba(0, 0, 0, 0.91); + position: relative; + z-index: 100; + text-align: justify; + + display: flex; + justify-content: space-between; + + .logo { + margin-top: 12px; + + & > a > img { + width: 57px; + display: inline-block; + transition: .5s opacity ease-in; + + &:hover { + opacity: .8; + } + } + + & > div { + display: inline-block; + margin-left: 13px; + margin-top: 8px; + vertical-align: top; + } + + h1 { + color: #ffffff; + font-family: $sec-font; + font-size: 20px; + font-weight: bold; + text-transform: uppercase; + letter-spacing: 0.1px; + margin: 0; + + & > a { + color: white; + text-shadow: 1px 1px 1px rgba(0, 0, 0, .5); + text-decoration: none; + + &:hover { + color: #8AC832; + } + } + } + + h2 { + color: #888; + font-family: $sec-font; + font-size: 14px; + font-weight: bold; + letter-spacing: 0.1px; + margin-top: 2px; + letter-spacing: -0.01px; + } + } + + .top-menu { + vertical-align: top; + margin-top: 18px; + margin-left: 50px; + + & > ul { + margin: 0; + padding: 0; + list-style: none; + + & > li { + display: inline-block; + position: relative; + + &:not(:first-child) { + margin-left: 20px; + } + + & > a { + display: inline-block; + text-decoration: none; + color: #c6c6c6; + font-family: $sec-font; + font-size: 16px; + text-transform: uppercase; + font-weight: bold; + transition: .2s color; + padding: 10px 0; + + & > svg { + height: 20px; + width: 20px; + vertical-align: middle; + margin-bottom: 4px; + margin-right: 3px; + margin-left: 3px; + } + + &:hover, &.active { + color: #8AC832; + + &:after { + -webkit-transform: scaleX(1); + -ms-transform: scaleX(1); + transform: scaleX(1); + -webkit-transform-origin: left; + -ms-transform-origin: left; + transform-origin: left; + } + } + + &:after { + content: ""; + display: block; + height: 3px; + border-radius: 10px; + -webkit-transform: scaleX(0); + -ms-transform: scaleX(0); + transform: scaleX(0); + transition: .4s -webkit-transform; + transition: .4s transform; + -webkit-transform-origin: 100% 0; + -ms-transform-origin: 100% 0; + transform-origin: 100% 0; + background: #8AC832; + opacity: 0.90; + position: absolute; + bottom: 5px; + left: 0; + width: 100%; + z-index: 333; + } + + } + } + } + } +} + +.search { + display: block; + margin: 20px 0; + text-align: center; + + & > form { + position: relative; + + & > input { + width: 380px; + height: 38px; + box-shadow: inset 0 0 5px 1px rgba(0, 0, 0, 0.6); + border: 1px solid rgba(6, 6, 6, 0.99); + background-color: #0f1012; + outline: none; + + color: #D1D1D1; + font-family: $sec-font; + font-size: 17px; + font-weight: 600; + line-height: 70.58px; + padding-left: 20px; + padding-right: 45px; + padding-right: 45px; + + &::placeholder { + color: #676767; + font-weight: 400; + } + + &:focus + button + small { + opacity: .3; + } + } + + & > button { + position: absolute; + padding: 0; + margin: 0; + background: none; + border: none; + right: 35px; + top: 4px; + width: 30px; + height: 30px; + opacity: 1; + transition: .3s opacity; + + &::before { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 110%; + height: 110%; + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAbCAYAAABvCO8sAAAC4ElEQVRIiaXWX4hXRRTA8c/etkwy+gNBEVRCmxFl1ouZGlEWFUQZPfVQRLAjKvSylEFBf16EiChJOxhLQY8RtA+lRZtpRv8ohUJQNMiHooKyojZNtoeZy95+/fZ3r+uBy5xz5pzznYGZc2dodHRUB1lVviUYwXkYwk84iK8wGRHb2goNtQDXYxRXdVkV9mFrRDx/osCl2IxrG75PsAv75Z1NyzsdwQosb8R+jXURsbML8AG82rDH8TI+77eyiAAppSVYg9SYXhsRW5rxVU/+Qw3Yd7ip+PrCesB7ImKNvNMDxb05pbR+NuBSvFL0L7EYH7SB+oA/Lrm7i2tTSmlVL3AYbxf9eyzDkROFNaBTWCmfYJhIKc1rAh/DuUW/HUfnCmtAp3FrMefjmRp4Kh4tE+PYO6DO6fKp7Ao9hJeKOZZSWlBhNc4ozidbaqyUr8W4/x+42aSuOYT7KtxZHF/gcEvyvDI+KF/yFW20iPgZk8W8o8KVxZjsn/IfOdbQL8OulNLTHfJ2lHFRhYuKcbB/bKs8kVLanVK6ZkBMfS8vqLCgGL/NEQjX48MB8/UVm1/hz2KceRLAfbh3wHxde2pYbmFnY+EcYVsiYm1LzKVl/KHCN8W4sUPxUxr6j7i7AwxuKOP+ykxLW4bzWxKnyziBRXirjZRSOstMx9lW4Q38XRyPt+R/hOtwF35tgzVqDhX99QpTeK441pWVzya/49OOICmlCzFWzE0RcaRuT0/hj6Jv71qwg7xbxuNKv66BR820uIuxE6edDCmltB1XFPOeiPiL/B+sZQcexgtyk96L+3X42/eAFuM1+YUHGyJiop4f7ol/Ef/Iv5TL8VlZQMiXexBoRH7hjTXcj0TEs8242V5tNxdo8wC9J5/Sfq+25bitEfut/Gp7p7dw7w5reV/e4Yay6oW4pXyD5DC2YmNEHOsXMBuwlo3lWy3v+mpcgnPku/WL3Br3yA+uNyPi+KCC/wJQGMGINsMjCwAAAABJRU5ErkJggg=="); + background-repeat: no-repeat; + background-size: 75%; + background-position: center center; + transition: all .3s; + } + + &:hover { + &::before { + cursor: pointer; + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAbCAYAAABvCO8sAAABN2lDQ1BBZG9iZSBSR0IgKDE5OTgpAAAokZWPv0rDUBSHvxtFxaFWCOLgcCdRUGzVwYxJW4ogWKtDkq1JQ5ViEm6uf/oQjm4dXNx9AidHwUHxCXwDxamDQ4QMBYvf9J3fORzOAaNi152GUYbzWKt205Gu58vZF2aYAoBOmKV2q3UAECdxxBjf7wiA10277jTG+38yH6ZKAyNguxtlIYgK0L/SqQYxBMygn2oQD4CpTto1EE9AqZf7G1AKcv8ASsr1fBBfgNlzPR+MOcAMcl8BTB1da4Bakg7UWe9Uy6plWdLuJkEkjweZjs4zuR+HiUoT1dFRF8jvA2AxH2w3HblWtay99X/+PRHX82Vun0cIQCw9F1lBeKEuf1UYO5PrYsdwGQ7vYXpUZLs3cLcBC7dFtlqF8hY8Dn8AwMZP/fNTP8gAAAAJcEhZcwAACxMAAAsTAQCanBgAAAXRaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzE0MiA3OS4xNjA5MjQsIDIwMTcvMDcvMTMtMDE6MDY6MzkgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3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DN5vUNXu4P8Fd0XEAR1uS58XxIeGSr2yjFVn1MyajeWeCa6MxOTjlP3KioV+FfXmZFh3y9sRxUYLLonFkcGyrbM7LdH9eptcNianv5SUJFkTjtzkC4UZ8MGS+vmLzE/wZjXNPA3gI9w2Zr2tPjQgt7HwsnCNse5FV61tirozjDwm+isbNHYqf0dB/xD0dYHBTHA8nZlraclzckjgdxwkswtttpLxMzzPTcXYleBN/R8eTLfkf4gbcjV/bYI2avai/kWAKz0XHhrjy2eR3fNIRJC/TSzEWza1FVh2r29PT+CPqu7sW7CDvxPGk2K9r4HEzLe5y7MVZp0PKy3Q3ronmvUVW/UX4D9ayB4/iBaFJH8QDOvzt+0BL8LrwwoNNRVZN1PMjffEv4h/hl3I1Po0LeEW43MNAo8ILb6zhfqzIqmebcbO92m6N0OYBelc4pYNebStwRyP2W+HVVvYX7t9hLe8JO9wUV70Qt8VvmBzFDmwpsurEoIDZgLVsid8aYddLcQUuEO7WL0JrrIQH11tFVp0cVvBfVZDA+HDoxOQAAAAASUVORK5CYII="); + } + } + } + + & > small { + position: absolute; + font-family: $sec-font; + font-size: 14px; + font-weight: bold; + line-height: 1.7em; + top: 8px; + right: 75px; + background-color: #D1D1D1; + color: #080C0F; + padding: 0 7px; + padding-top: 2px; + border-radius: 4px; + opacity: 0; + transition: opacity .3s; + cursor: default; + } + } + + &.active { + small { + opacity: .3; + } + } +} + +@media (max-width: 1364px) { + #content>.inner>section.materials>header>h1 { + font-size: 26px; + } + + #content>.inner>section.materials>article>.details>h1 { + font-size: 25px; + } + + #content>.inner>section.materials>article>.details>blockquote { + font-size: 17px; + line-height: 24px; + -webkit-line-clamp: 4; + } + + .btn { + font-size: 16px!important; + } + + #paginator>header>h1 { + font-size: 30px!important; + } + + #paginator>.paginator-wrapper>.paginator-box { + transform: scale(1.5); + margin-top: 15px; + } + + #paginator>.paginator-wrapper>small:first-child { + display: none; + } + + #paginator>.paginator-wrapper>small:last-child { + display: none; + } +} \ No newline at end of file diff --git a/frontend/_src/css/styles.scss b/frontend/_src/css/styles.scss new file mode 100644 index 0000000..1cbb6ab --- /dev/null +++ b/frontend/_src/css/styles.scss @@ -0,0 +1,92 @@ +/* + SOME DEFAULT CSS. +*/ +html, body { + margin: 0; + padding: 0; + min-height: 100vh; + min-width: 100vw; + + background-color: #4C5062; + color: white; + + + &.assist-page { + background: rgb(24,123,123); + background: -moz-radial-gradient(circle, rgba(24,123,123,0.4906337535014006) 0%, rgba(13,15,19,1) 64%); + background: -webkit-radial-gradient(circle, rgba(24,123,123,0.4906337535014006) 0%, rgba(13,15,19,1) 64%); + background: radial-gradient(circle, rgba(24,123,123,0.4906337535014006) 0%, rgba(13,15,19,1) 64%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#187b7b",endColorstr="#0d0f13",GradientType=1); + + &.assist-active { + background: rgb(24,81,123); + background: -moz-radial-gradient(circle, rgba(24,81,123,0.6418942577030813) 0%, rgba(13,15,19,1) 64%); + background: -webkit-radial-gradient(circle, rgba(24,81,123,0.6418942577030813) 0%, rgba(13,15,19,1) 64%); + background: radial-gradient(circle, rgba(24,81,123,0.6418942577030813) 0%, rgba(13,15,19,1) 64%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#18517b",endColorstr="#0d0f13",GradientType=1); + } + + } +} + +:root { + font-family: Inter, Avenir, Helvetica, Arial, sans-serif; + font-size: 16px; + line-height: 24px; + font-weight: 400; + + color: #0f0f0f; + background-color: #f6f6f6; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + + +a { + color: #2A9CD0; + text-decoration: none; + font-weight: bold; + + &:hover { + color: #1dabed; + text-decoration: underline; + } +} + +/* + OVERRIDES. +*/ +#wrapper { + padding: 0; + margin: 0; +} + +#header, main { + padding: 0 30px; +} + +select, input { + color: #ccc!important; +} + +.form { + label { + font-weight: bold!important; + color: #8AC832!important; + font-size: 15px!important; + border-bottom: 1px dotted gray; + margin-bottom: 10px!important; + + & + div { + line-height: 1.2em; + } + } + + .svelteui-Tab-label { + font-size: 18px!important; + } +} \ No newline at end of file diff --git a/frontend/_src/functions.ts b/frontend/_src/functions.ts new file mode 100644 index 0000000..10a7e00 --- /dev/null +++ b/frontend/_src/functions.ts @@ -0,0 +1,61 @@ +import { invoke } from "@tauri-apps/api/core" +import { is_listening, isListening } from "@/stores" +import { clearInterval, clearTimeout, setInterval, setTimeout } from 'worker-timers'; + +// setInterval(() => { +// (async () => { +// is_listening.set(await invoke("is_listening")); +// })().catch(err => { +// console.error(err); +// }); +// }, 1000); + +export function startListening() { + (async () => { + invoke('start_listening') + .then((message) => { + is_listening.set(true); + }) + .catch((error) => { + is_listening.set(false); + console.error(error); + // alert("Ошибка: " + error); + }) + })().catch(err => { + console.error(err); + }); +} + +export function stopListening(callback: () => void) { + (async () => { + invoke('stop_listening') + .then((message) => { + is_listening.set(false); + if(callback) { + callback(); + } + }) + .catch((error) => { + console.error(error); + }) + })().catch(err => { + console.error(err); + }); +} + +export function capitalizeFirstLetter(string: string) { + return string.charAt(0).toUpperCase() + string.slice(1); +} + +export function showInExplorer(path: any) { + (async () => { + invoke('show_in_folder', {path: path}) + .then((message) => {}) + .catch((error) => { + console.error(error); + // alert("Ошибка: " + error); + }) + })().catch(err => { + console.error(err); + }); +} \ No newline at end of file diff --git a/frontend/_src/main.ts b/frontend/_src/main.ts new file mode 100644 index 0000000..3fbc72c --- /dev/null +++ b/frontend/_src/main.ts @@ -0,0 +1,13 @@ +// Klondike project old CSS file +import "./css/main.scss"; + +// App current CSS file +import "./css/styles.scss"; + +// deploy app +import App from "./App.svelte"; +const app = new App({ + target: document.getElementById("app")!, +}); + +export default app; \ No newline at end of file diff --git a/frontend/_src/routes/_module.svelte b/frontend/_src/routes/_module.svelte new file mode 100644 index 0000000..f307626 --- /dev/null +++ b/frontend/_src/routes/_module.svelte @@ -0,0 +1,12 @@ + + + + +
+
+ +
+ \ No newline at end of file diff --git a/frontend/_src/routes/commands/index.svelte b/frontend/_src/routes/commands/index.svelte new file mode 100644 index 0000000..d724d7b --- /dev/null +++ b/frontend/_src/routes/commands/index.svelte @@ -0,0 +1,23 @@ + + + + + + Тут будет список команд + полноценный редактор команд.
+ Следите за обновлениями в нашем телеграм канале! +
+ +
+ bruh +
+ + +
\ No newline at end of file diff --git a/frontend/_src/routes/index.svelte b/frontend/_src/routes/index.svelte new file mode 100644 index 0000000..ef8e1a6 --- /dev/null +++ b/frontend/_src/routes/index.svelte @@ -0,0 +1,71 @@ + + + +{#if !is_listening__val} + +В данный момент ассистент не прослушивает команды.
+Пожалуйста, перейдите в настройки и введите ключ Picovoice. +
+ +{:else} + + +{/if} + + +
+ + + \ No newline at end of file diff --git a/frontend/_src/routes/settings/index.svelte b/frontend/_src/routes/settings/index.svelte new file mode 100644 index 0000000..4e14b70 --- /dev/null +++ b/frontend/_src/routes/settings/index.svelte @@ -0,0 +1,188 @@ + + + + + + Часть функций может работать некорректно.
+ Сообщайте обо всех найденных багах в наш телеграм бот. + + +
+ + + +{#if settings_saved } + + +{/if} + + + + + + + + + + + + + + + + + + {#if selected_wake_word_engine == "picovoice"} + + + + + Мы ждем официального патча от разработчиков. + + + + + Введите сюда свой ключ Picovoice.
+ Он выдается бесплатно при регистрации в Picovoice Console.
+
+ + + +
+ {/if} + + + + + + В данный момент ChatGPT не поддерживается. Он будет добавлен в ближайших обновлениях. + + + +
+
+ + + + + + + + +
\ No newline at end of file diff --git a/frontend/_src/stores.ts b/frontend/_src/stores.ts new file mode 100644 index 0000000..dcdd2fa --- /dev/null +++ b/frontend/_src/stores.ts @@ -0,0 +1,34 @@ +import { invoke } from "@tauri-apps/api/core" +import { writable } from 'svelte/store' + +// listen state +export const is_listening = writable(true); +let is_listening__val: boolean; +is_listening.subscribe(value => { + is_listening__val = value; +}); +export function isListening() {return is_listening__val} + +// assistant voice +export const assistant_voice = writable(""); + +(async () => { + assistant_voice.set(await invoke("db_read", {key: "assistant_voice"})); +})().catch(err => { + console.error(err); +}); + +// etc +export let tg_official_link = ""; +export let feedback_link = ""; +export let github_repository_link = ""; +export let log_file_path = ""; + +(async () => { + tg_official_link = await invoke("get_tg_official_link") + feedback_link = await invoke("get_feedback_link") + github_repository_link = await invoke("get_repository_link") + log_file_path = await invoke("get_log_file_path") +})().catch(err => { + console.error(err); +}); \ No newline at end of file diff --git a/frontend/_src/vite-env.d.ts b/frontend/_src/vite-env.d.ts new file mode 100644 index 0000000..4078e74 --- /dev/null +++ b/frontend/_src/vite-env.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 04206ea..e4f7866 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -1,19 +1,12 @@ - - - - + + - \ No newline at end of file + diff --git a/frontend/src/Events.svelte b/frontend/src/Events.svelte index 1159d97..b8c3e68 100644 --- a/frontend/src/Events.svelte +++ b/frontend/src/Events.svelte @@ -1,44 +1,34 @@ - \ No newline at end of file + await listen("assistant-waiting", () => { + document.getElementById("arc-reactor")?.classList.remove("active") + }) + }) + diff --git a/frontend/src/components/Footer.svelte b/frontend/src/components/Footer.svelte index d199f4c..466b29e 100644 --- a/frontend/src/components/Footer.svelte +++ b/frontend/src/components/Footer.svelte @@ -1,25 +1,43 @@ - \ No newline at end of file + diff --git a/frontend/src/components/Header.svelte b/frontend/src/components/Header.svelte index 2028185..65ce528 100644 --- a/frontend/src/components/Header.svelte +++ b/frontend/src/components/Header.svelte @@ -1,28 +1,54 @@ + \ No newline at end of file +
+ + diff --git a/frontend/src/components/Nav.svelte b/frontend/src/components/Nav.svelte index c8f8ccb..a8fd535 100644 --- a/frontend/src/components/Nav.svelte +++ b/frontend/src/components/Nav.svelte @@ -1,5 +1,4 @@ - \ No newline at end of file + diff --git a/frontend/src/components/elements/ArcReactor.svelte b/frontend/src/components/elements/ArcReactor.svelte index adf9ee5..c7003ff 100644 --- a/frontend/src/components/elements/ArcReactor.svelte +++ b/frontend/src/components/elements/ArcReactor.svelte @@ -1,65 +1,54 @@ - + + +
-
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
+
    + {#each Array(60) as _, i} +
  • + {/each} +
-
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
+ {#each Array(8) as _, i} +
+ {/each}
\ No newline at end of file + diff --git a/frontend/src/components/elements/HDivider.svelte b/frontend/src/components/elements/HDivider.svelte index 5c8cea9..47e57e6 100644 --- a/frontend/src/components/elements/HDivider.svelte +++ b/frontend/src/components/elements/HDivider.svelte @@ -1,18 +1,18 @@ - -
+
\ No newline at end of file + diff --git a/frontend/src/components/elements/SearchBar.svelte b/frontend/src/components/elements/SearchBar.svelte index 3e48b10..3fd11bc 100644 --- a/frontend/src/components/elements/SearchBar.svelte +++ b/frontend/src/components/elements/SearchBar.svelte @@ -1,11 +1,19 @@ - - diff --git a/frontend/src/components/elements/Stats.svelte b/frontend/src/components/elements/Stats.svelte index fe98d49..daf6535 100644 --- a/frontend/src/components/elements/Stats.svelte +++ b/frontend/src/components/elements/Stats.svelte @@ -1,46 +1,46 @@ -
@@ -48,21 +48,23 @@
Микрофон - {microphone_label} + {microphoneLabel}
+
Нейросети - {nn_details["ww_engine"]} + {nn_details["stt_engine"]} + {wakeWordEngine} + {sttEngine}
+
Ресурсы - RAM {resources_ram_usage}mb + RAM {ramUsage}mb
@@ -84,6 +86,7 @@ z-index: 10; } + // [ Online/Microphone stat ]-- & > .online { position: relative; width: 40%; @@ -93,24 +96,22 @@ $end-color: rgba(0, 191, 8, 0); & > .pulse::before { - background-color: rgba(0, 191, 8, 1); + background-color: $base-color; } + & > .pulse::after { - background-color: rgba(0, 191, 8, 1); - animation: online-cdot linear 3s; - animation-iteration-count: infinite; - animation-fill-mode: forwards; + background-color: $base-color; + animation: online-cdot linear 3s infinite forwards; } + & > .pulse .wave { - background-color: rgba(0, 191, 8, 0.4); - animation: online-radarWave cubic-bezier(0, 0.54, 0.53, 1) 3s 0s; - animation-iteration-count: infinite; + background-color: $mid-color; + animation: online-radarWave cubic-bezier(0, 0.54, 0.53, 1) 3s 0s infinite; } + & > .pulse .wave::after { - background-color: rgba(0, 191, 8, 0.4); - animation: online-radarWave cubic-bezier(0, 0.54, 0.53, 1) 3s - 0.1s; - animation-iteration-count: infinite; + background-color: $mid-color; + animation: online-radarWave cubic-bezier(0, 0.54, 0.53, 1) 3s 0.1s infinite; } & > .info { @@ -123,6 +124,7 @@ font-weight: bold; color: #00bf08; } + & > small { display: block; color: #535a60; @@ -137,34 +139,19 @@ } @keyframes online-cdot { - 0% { - opacity: 0.3; - background: $base-color; - } - 50% { - opacity: 0.5; - } - 100% { - opacity: 1; - background: $end-color; - } + 0% { opacity: 0.3; background: $base-color; } + 50% { opacity: 0.5; } + 100% { opacity: 1; background: $end-color; } } + @keyframes online-radarWave { - 0% { - opacity: 0.1; - transform: scale(0); - } - 5% { - background: $mid-color; - opacity: 1; - } - 100% { - transform: scale(1.2); - background: $end-color; - } + 0% { opacity: 0.1; transform: scale(0); } + 5% { background: $mid-color; opacity: 1; } + 100% { transform: scale(1.2); background: $end-color; } } } + // [ Files/Neural networks stat ]-- & > .files { position: relative; width: 35%; @@ -176,22 +163,20 @@ & > .pulse::before { background-color: $base-color; } + & > .pulse::after { background-color: $base-color; - animation: files-cdot linear 5s; - animation-iteration-count: infinite; - animation-fill-mode: forwards; + animation: files-cdot linear 5s infinite forwards; } + & > .pulse .wave { background-color: $mid-color; - animation: files-radarWave cubic-bezier(0, 0.54, 0.53, 1) 5s 0s; - animation-iteration-count: infinite; + animation: files-radarWave cubic-bezier(0, 0.54, 0.53, 1) 5s 0s infinite; } + & > .pulse .wave::after { background-color: $mid-color; - animation: files-radarWave cubic-bezier(0, 0.54, 0.53, 1) 5s - 0.1s; - animation-iteration-count: infinite; + animation: files-radarWave cubic-bezier(0, 0.54, 0.53, 1) 5s 0.1s infinite; } & > .info { @@ -204,6 +189,7 @@ font-weight: bold; color: #ff8130; } + & > small { display: block; color: #535a60; @@ -214,64 +200,45 @@ } @keyframes files-cdot { - 0% { - opacity: 0.3; - background: $base-color; - } - 50% { - opacity: 0.5; - } - 100% { - opacity: 1; - background: $end-color; - } + 0% { opacity: 0.3; background: $base-color; } + 50% { opacity: 0.5; } + 100% { opacity: 1; background: $end-color; } } + @keyframes files-radarWave { - 0% { - opacity: 0.1; - transform: scale(0); - } - 5% { - background: $mid-color; - transform: scale(0.2); - opacity: 1; - } - 100% { - transform: scale(0.8); - background: $end-color; - } + 0% { opacity: 0.1; transform: scale(0); } + 5% { background: $mid-color; transform: scale(0.2); opacity: 1; } + 100% { transform: scale(0.8); background: $end-color; } } } + // [ Downloads/Resources stat ]-- & > .downloads { position: relative; - $base-color: rgba(11,66,166, 1); + $base-color: rgba(11, 66, 166, 1); $mid-color: rgba(32, 150, 243, 0.4); $end-color: rgba(32, 150, 243, 0); & > .pulse::before { background: rgba(32, 150, 243, 1); } + & > .pulse::after { background: rgba(32, 150, 243, 1); - animation: downloads-cdot linear 7s; - animation-iteration-count: infinite; - animation-fill-mode: forwards; + animation: downloads-cdot linear 7s infinite forwards; animation-delay: 1s; } + & > .pulse .wave { background-color: $mid-color; - animation: downloads-radarWave cubic-bezier(0, 0.54, 0.53, 1) 7s - 0s; - animation-iteration-count: infinite; + animation: downloads-radarWave cubic-bezier(0, 0.54, 0.53, 1) 7s 0s infinite; animation-delay: 1s; } + & > .pulse .wave::after { background-color: $mid-color; - animation: downloads-radarWave cubic-bezier(0, 0.54, 0.53, 1) 7s - 0.1s; - animation-iteration-count: infinite; + animation: downloads-radarWave cubic-bezier(0, 0.54, 0.53, 1) 7s 0.1s infinite; animation-delay: 1s; } @@ -296,34 +263,19 @@ } @keyframes downloads-cdot { - 0% { - opacity: 0.3; - background: $base-color; - } - 50% { - opacity: 0.5; - } - 100% { - opacity: 1; - background: $end-color; - } + 0% { opacity: 0.3; background: $base-color; } + 50% { opacity: 0.5; } + 100% { opacity: 1; background: $end-color; } } + @keyframes downloads-radarWave { - 0% { - opacity: 0.1; - transform: scale(0); - } - 5% { - background: $mid-color; - opacity: 1; - } - 100% { - transform: scale(0.7); - background: $end-color; - } + 0% { opacity: 0.1; transform: scale(0); } + 5% { background: $mid-color; opacity: 1; } + 100% { transform: scale(0.7); background: $end-color; } } } + // [ Shared pulse styles ]-- .pulse { position: relative; height: 100px; @@ -333,8 +285,9 @@ top: 0px; z-index: 5; } + .pulse::before { - content: ''; + content: ""; position: absolute; width: 11px; height: 11px; @@ -342,10 +295,11 @@ left: 50%; top: 50%; transform: translate(-50%, -50%); - opacity: .5; + opacity: 0.5; } + .pulse::after { - content: ''; + content: ""; position: absolute; width: 20px; height: 20px; @@ -354,6 +308,7 @@ top: 50%; transform: translate(-50%, -50%); } + .pulse .wave { position: absolute; left: 7%; @@ -363,8 +318,9 @@ border-radius: 50%; opacity: 0; } + .pulse .wave::after { - content: ''; + content: ""; position: absolute; left: 7%; top: 7%; diff --git a/frontend/src/css/main.scss b/frontend/src/css/main.scss index 2cc520d..f00538f 100644 --- a/frontend/src/css/main.scss +++ b/frontend/src/css/main.scss @@ -1,38 +1,40 @@ +// ### FONTS $prim-font: "Roboto", sans-serif; $sec-font: "Roboto Condensed", sans-serif; -html, body { +// ### BASE +html, +body { overflow-x: hidden; } +// ### SCROLLBAR ::-webkit-scrollbar { width: 15px; } - + ::-webkit-scrollbar-track { - -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); + box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); } - + ::-webkit-scrollbar-thumb { - background: -webkit-gradient(linear,left top,left bottom,from(#999),to(#27292F)); - background: linear-gradient(to bottom,#999,#27292F); + background: linear-gradient(to bottom, #999, #27292f); } +// ### TEXT SELECTION ::selection { - background: #FF8901!important; /* WebKit/Blink Browsers */ - color: white!important; - text-shadow: 1px 1px 1px rgba(0, 0, 0, .5)!important; + background: #ff8901 !important; + color: white !important; + text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5) !important; } + ::-moz-selection { - background: #FF8901!important; /* WebKit/Blink Browsers */ - color: white!important; - text-shadow: 1px 1px 1px rgba(0, 0, 0, .5)!important; + background: #ff8901 !important; + color: white !important; + text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5) !important; } -/* - * HEADER - */ - +// ### HEADER #header { height: 80px; background-color: #0c1013; @@ -40,23 +42,22 @@ html, body { position: relative; z-index: 100; text-align: justify; - display: flex; justify-content: space-between; - + .logo { margin-top: 12px; & > a > img { width: 57px; display: inline-block; - transition: .5s opacity ease-in; - + transition: 0.5s opacity ease-in; + &:hover { - opacity: .8; + opacity: 0.8; } } - + & > div { display: inline-block; margin-left: 13px; @@ -75,11 +76,11 @@ html, body { & > a { color: white; - text-shadow: 1px 1px 1px rgba(0, 0, 0, .5); + text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5); text-decoration: none; &:hover { - color: #8AC832; + color: #8ac832; } } } @@ -89,7 +90,6 @@ html, body { font-family: $sec-font; font-size: 14px; font-weight: bold; - letter-spacing: 0.1px; margin-top: 2px; letter-spacing: -0.01px; } @@ -104,15 +104,15 @@ html, body { margin: 0; padding: 0; list-style: none; - + & > li { display: inline-block; position: relative; - + &:not(:first-child) { margin-left: 20px; } - + & > a { display: inline-block; text-decoration: none; @@ -121,7 +121,7 @@ html, body { font-size: 16px; text-transform: uppercase; font-weight: bold; - transition: .2s color; + transition: 0.2s color; padding: 10px 0; & > svg { @@ -133,15 +133,12 @@ html, body { margin-left: 3px; } - &:hover, &.active { - color: #8AC832; - + &:hover, + &.active { + color: #8ac832; + &:after { - -webkit-transform: scaleX(1); - -ms-transform: scaleX(1); transform: scaleX(1); - -webkit-transform-origin: left; - -ms-transform-origin: left; transform-origin: left; } } @@ -151,29 +148,24 @@ html, body { display: block; height: 3px; border-radius: 10px; - -webkit-transform: scaleX(0); - -ms-transform: scaleX(0); transform: scaleX(0); - transition: .4s -webkit-transform; - transition: .4s transform; - -webkit-transform-origin: 100% 0; - -ms-transform-origin: 100% 0; + transition: 0.4s transform; transform-origin: 100% 0; - background: #8AC832; - opacity: 0.90; + background: #8ac832; + opacity: 0.9; position: absolute; bottom: 5px; left: 0; width: 100%; z-index: 333; } - } } } } } +// ### SEARCH BAR .search { display: block; margin: 20px 0; @@ -181,7 +173,7 @@ html, body { & > form { position: relative; - + & > input { width: 380px; height: 38px; @@ -189,26 +181,24 @@ html, body { border: 1px solid rgba(6, 6, 6, 0.99); background-color: #0f1012; outline: none; - - color: #D1D1D1; + color: #d1d1d1; font-family: $sec-font; font-size: 17px; font-weight: 600; line-height: 70.58px; padding-left: 20px; padding-right: 45px; - padding-right: 45px; - + &::placeholder { color: #676767; font-weight: 400; } &:focus + button + small { - opacity: .3; + opacity: 0.3; } } - + & > button { position: absolute; padding: 0; @@ -220,7 +210,7 @@ html, body { width: 30px; height: 30px; opacity: 1; - transition: .3s opacity; + transition: 0.3s opacity; &::before { content: ""; @@ -233,14 +223,12 @@ html, body { background-repeat: no-repeat; background-size: 75%; background-position: center center; - transition: all .3s; + transition: all 0.3s; } - - &:hover { - &::before { - cursor: pointer; - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAbCAYAAABvCO8sAAABN2lDQ1BBZG9iZSBSR0IgKDE5OTgpAAAokZWPv0rDUBSHvxtFxaFWCOLgcCdRUGzVwYxJW4ogWKtDkq1JQ5ViEm6uf/oQjm4dXNx9AidHwUHxCXwDxamDQ4QMBYvf9J3fORzOAaNi152GUYbzWKt205Gu58vZF2aYAoBOmKV2q3UAECdxxBjf7wiA10277jTG+38yH6ZKAyNguxtlIYgK0L/SqQYxBMygn2oQD4CpTto1EE9AqZf7G1AKcv8ASsr1fBBfgNlzPR+MOcAMcl8BTB1da4Bakg7UWe9Uy6plWdLuJkEkjweZjs4zuR+HiUoT1dFRF8jvA2AxH2w3HblWtay99X/+PRHX82Vun0cIQCw9F1lBeKEuf1UYO5PrYsdwGQ7vYXpUZLs3cLcBC7dFtlqF8hY8Dn8AwMZP/fNTP8gAAAAJcEhZcwAAC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Y51PQiRERJWhhLQY8RtA+OFm2mGf2RGqEQDAvyoaigrKhNk+3h3mGnX7/9zbgeGO45555zvvfCvWdub/POpTrI6vilGMVF6OEnHMEXmCyyaldboV4LcCPWYnGXVeEQdhRZ9fypApdhG65v+D7GPhwWdjYt7HQUK7GiEfslNhRZtbcL8EG81rDH8TI+G7SyIqtAXqYp1uGRxvT6Iqu2N+OTvvyHG7DvcEv0DYT1gasiq9YJO/06urflZbpxNuAyvBr1z7EE77eBBoA/irn7o2trXqar+4Ej2Bn177Ecx04V1oBOYZVwgmEiL9N5TeATuDDqGY7PFdaATuP2aM7HMzXwTDweJ8ZxcEids4VT2RX6DV6K5lhepgsSrME50flUS41VwrUY9/8DN5vUNXu4P8Fd0XEAR1uS58XxIeGSr2yjFVn1MyajeWeCa6MxOTjlP3KioV+FfXmZFh3y9sRxUYLLonFkcGyrbM7LdH9eptcNianv5SUJFkTjtzkC4UZ8MGS+vmLzE/wZjXNPA3gI9w2Zr2tPjQgt7HwsnCNse5FV61tirozjDwm+isbNHYqf0dB/xD0dYHBTHA8nZlraclzckjgdxwkswtttpLxMzzPTcXYleBN/R8eTLfkf4gbcjV/bYI2avai/kWAKz0XHhrjy2eR3fNIRJC/TSzEWza1FVh2r29PT+CPqu7sW7CDvxPGk2K9r4HEzLe5y7MVZp0PKy3Q3ronmvUVW/UX4D9ayB4/iBaFJH8QDOvzt+0BL8LrwwoNNRVZN1PMjffEv4h/hl3I1Po0LeEW43MNAo8ILb6zhfqzIqmebcbO92m6N0OYBelc4pYNebStwRyP2W+HVVvYX7t9hLe8JO9wUV70Qt8VvmBzFDmwpsurEoIDZgLVsid8aYddLcQUuEO7WL0JrrIQH11tFVp0cVvBfVZDA+HDoxOQAAAAASUVORK5CYII="); - } + + &:hover::before { + cursor: pointer; + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAbCAYAAABvCO8sAAABN2lDQ1BBZG9iZSBSR0IgKDE5OTgpAAAokZWPv0rDUBSHv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u7sW7CDvxPGk2K9r4HEzLe5y7MVZp0PKy3Q3ronmvUVW/UX4D9ayB4/iBaFJH8QDOvzt+0BL8LrwwoNNRVZN1PMjffEv4h/hl3I1Po0LeEW43MNAo8ILb6zhfqzIqmebcbO92m6N0OYBelc4pYNebStwRyP2W+HVVvYX7t9hLe8JO9wUV70Qt8VvmBzFDmwpsurEoIDZgLVsid8aYddLcQUuEO7WL0JrrIQH11tFVp0cVvBfVZDA+HDoxOQAAAAASUVORK5CYII="); } } @@ -252,57 +240,55 @@ html, body { line-height: 1.7em; top: 8px; right: 75px; - background-color: #D1D1D1; - color: #080C0F; + background-color: #d1d1d1; + color: #080c0f; padding: 0 7px; padding-top: 2px; border-radius: 4px; opacity: 0; - transition: opacity .3s; + transition: opacity 0.3s; cursor: default; } } &.active { small { - opacity: .3; + opacity: 0.3; } } } +// ### RESPONSIVE @media (max-width: 1364px) { - #content>.inner>section.materials>header>h1 { + #content > .inner > section.materials > header > h1 { font-size: 26px; } - #content>.inner>section.materials>article>.details>h1 { + #content > .inner > section.materials > article > .details > h1 { font-size: 25px; } - #content>.inner>section.materials>article>.details>blockquote { + #content > .inner > section.materials > article > .details > blockquote { font-size: 17px; line-height: 24px; -webkit-line-clamp: 4; } .btn { - font-size: 16px!important; + font-size: 16px !important; } - #paginator>header>h1 { - font-size: 30px!important; + #paginator > header > h1 { + font-size: 30px !important; } - #paginator>.paginator-wrapper>.paginator-box { + #paginator > .paginator-wrapper > .paginator-box { transform: scale(1.5); margin-top: 15px; } - #paginator>.paginator-wrapper>small:first-child { + #paginator > .paginator-wrapper > small:first-child, + #paginator > .paginator-wrapper > small:last-child { display: none; } - - #paginator>.paginator-wrapper>small:last-child { - display: none; - } -} \ No newline at end of file +} diff --git a/frontend/src/css/styles.scss b/frontend/src/css/styles.scss index 1cbb6ab..80d8319 100644 --- a/frontend/src/css/styles.scss +++ b/frontend/src/css/styles.scss @@ -1,92 +1,92 @@ -/* - SOME DEFAULT CSS. -*/ -html, body { - margin: 0; - padding: 0; - min-height: 100vh; - min-width: 100vw; +// ### BASE STYLES - background-color: #4C5062; - color: white; +html, +body { + margin: 0; + padding: 0; + min-height: 100vh; + min-width: 100vw; + background-color: #4c5062; + color: white; + // assistant page background + &.assist-page { + background: radial-gradient( + circle, + rgba(24, 123, 123, 0.49) 0%, + rgba(13, 15, 19, 1) 64% + ); - &.assist-page { - background: rgb(24,123,123); - background: -moz-radial-gradient(circle, rgba(24,123,123,0.4906337535014006) 0%, rgba(13,15,19,1) 64%); - background: -webkit-radial-gradient(circle, rgba(24,123,123,0.4906337535014006) 0%, rgba(13,15,19,1) 64%); - background: radial-gradient(circle, rgba(24,123,123,0.4906337535014006) 0%, rgba(13,15,19,1) 64%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#187b7b",endColorstr="#0d0f13",GradientType=1); - - &.assist-active { - background: rgb(24,81,123); - background: -moz-radial-gradient(circle, rgba(24,81,123,0.6418942577030813) 0%, rgba(13,15,19,1) 64%); - background: -webkit-radial-gradient(circle, rgba(24,81,123,0.6418942577030813) 0%, rgba(13,15,19,1) 64%); - background: radial-gradient(circle, rgba(24,81,123,0.6418942577030813) 0%, rgba(13,15,19,1) 64%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#18517b",endColorstr="#0d0f13",GradientType=1); + &.assist-active { + background: radial-gradient( + circle, + rgba(24, 81, 123, 0.64) 0%, + rgba(13, 15, 19, 1) 64% + ); + } } - - } } :root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; + font-family: Inter, Avenir, Helvetica, Arial, sans-serif; + font-size: 16px; + line-height: 24px; + font-weight: 400; - color: #0f0f0f; - background-color: #f6f6f6; + color: #0f0f0f; + background-color: #f6f6f6; - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; } - a { - color: #2A9CD0; - text-decoration: none; - font-weight: bold; + color: #2a9cd0; + text-decoration: none; + font-weight: bold; - &:hover { - color: #1dabed; - text-decoration: underline; - } + &:hover { + color: #1dabed; + text-decoration: underline; + } } -/* - OVERRIDES. -*/ +// ### LAYOUT OVERRIDES + #wrapper { - padding: 0; - margin: 0; + padding: 0; + margin: 0; } -#header, main { - padding: 0 30px; +#header, +main { + padding: 0 30px; } -select, input { - color: #ccc!important; +// ### FORM OVERRIDES + +select, +input { + color: #ccc !important; } .form { - label { - font-weight: bold!important; - color: #8AC832!important; - font-size: 15px!important; - border-bottom: 1px dotted gray; - margin-bottom: 10px!important; + label { + font-weight: bold !important; + color: #8ac832 !important; + font-size: 15px !important; + border-bottom: 1px dotted gray; + margin-bottom: 10px !important; - & + div { - line-height: 1.2em; + & + div { + line-height: 1.2em; + } } - } - .svelteui-Tab-label { - font-size: 18px!important; - } -} \ No newline at end of file + .svelteui-Tab-label { + font-size: 18px !important; + } +} diff --git a/frontend/src/functions.ts b/frontend/src/functions.ts index 10a7e00..b970ec9 100644 --- a/frontend/src/functions.ts +++ b/frontend/src/functions.ts @@ -1,61 +1,27 @@ import { invoke } from "@tauri-apps/api/core" -import { is_listening, isListening } from "@/stores" -import { clearInterval, clearTimeout, setInterval, setTimeout } from 'worker-timers'; -// setInterval(() => { -// (async () => { -// is_listening.set(await invoke("is_listening")); -// })().catch(err => { -// console.error(err); -// }); -// }, 1000); +// ### UTILITY FUNCTIONS -export function startListening() { - (async () => { - invoke('start_listening') - .then((message) => { - is_listening.set(true); - }) - .catch((error) => { - is_listening.set(false); - console.error(error); - // alert("Ошибка: " + error); - }) - })().catch(err => { - console.error(err); - }); +export function capitalizeFirstLetter(str: string): string { + if (!str) return "" + return str.charAt(0).toUpperCase() + str.slice(1) } -export function stopListening(callback: () => void) { - (async () => { - invoke('stop_listening') - .then((message) => { - is_listening.set(false); - if(callback) { - callback(); - } - }) - .catch((error) => { - console.error(error); - }) - })().catch(err => { - console.error(err); - }); +export function showInExplorer(path: string): void { + invoke("show_in_folder", { path }) + .catch(err => console.error("failed to open explorer:", err)) } -export function capitalizeFirstLetter(string: string) { - return string.charAt(0).toUpperCase() + string.slice(1); +// ### LISTENER FUNCTIONS +// removed since gui now doesn't handle listening + +export function startListening(): void { + // disabled in GUI - listening is handled by the tray app + console.log("[gui] listening not available in settings app") } -export function showInExplorer(path: any) { - (async () => { - invoke('show_in_folder', {path: path}) - .then((message) => {}) - .catch((error) => { - console.error(error); - // alert("Ошибка: " + error); - }) - })().catch(err => { - console.error(err); - }); -} \ No newline at end of file +export function stopListening(callback?: () => void): void { + // disabled in GUI - just call the callback if provided + console.log("[gui] listening not available in settings app") + if (callback) callback() +} diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 3fbc72c..e8274ac 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -1,13 +1,12 @@ -// Klondike project old CSS file -import "./css/main.scss"; +// ### STYLES +import "./css/main.scss" +import "./css/styles.scss" -// App current CSS file -import "./css/styles.scss"; +// ### APP +import App from "./App.svelte" -// deploy app -import App from "./App.svelte"; const app = new App({ - target: document.getElementById("app")!, -}); + target: document.getElementById("app")! +}) -export default app; \ No newline at end of file +export default app diff --git a/frontend/src/routes/_module.svelte b/frontend/src/routes/_module.svelte index f307626..364f3e2 100644 --- a/frontend/src/routes/_module.svelte +++ b/frontend/src/routes/_module.svelte @@ -1,7 +1,6 @@ - - @@ -9,4 +8,4 @@
-
\ No newline at end of file + diff --git a/frontend/src/routes/commands/index.svelte b/frontend/src/routes/commands/index.svelte index d724d7b..29e27e0 100644 --- a/frontend/src/routes/commands/index.svelte +++ b/frontend/src/routes/commands/index.svelte @@ -1,23 +1,39 @@ - - Тут будет список команд + полноценный редактор команд.
- Следите за обновлениями в нашем телеграм канале! + + Тут будет список команд + полноценный редактор команд.
+ Следите за обновлениями в нашем телеграм канале!
-
- bruh +
+ bruh
-