diff --git a/.gitignore b/.gitignore index b515a12..156654f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,6 @@ node_modules frontend/.vscode frontend/dist frontend/wailsjs -frontend/package-lock.json -frontend/package.json.md5 +*/package-lock.json +*/package.json.md5 *.exe \ No newline at end of file diff --git a/frontend/index.html b/frontend/index.html index 02e008f..2b66f4a 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -3,10 +3,12 @@ - dmxconnect + + + + DMXConnect - -
+ diff --git a/frontend/package.json b/frontend/package.json index 8c9ae62..d70738c 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -12,5 +12,8 @@ "@sveltejs/vite-plugin-svelte": "^1.0.1", "svelte": "^3.49.0", "vite": "^3.0.7" + }, + "dependencies": { + "svelte-i18n": "^3.7.0" } -} \ No newline at end of file +} diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 2a2ce22..0eac829 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -1,79 +1,48 @@ +
+ + +
- -
{resultText}
-
- - -
+ {#if selectedMenu === "stage"} + + {:else if selectedMenu === "atmo"} + + {:else if selectedMenu === "settings"} + + {:else if selectedMenu === "devicesLibrary"} + + {/if}
+ @media (min-width: 640px) { + main { + max-width: none; + } + } + \ No newline at end of file diff --git a/frontend/src/assets/fonts/OFL.txt b/frontend/src/assets/fonts/OFL.txt deleted file mode 100644 index 9cac04c..0000000 --- a/frontend/src/assets/fonts/OFL.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2016 The Nunito Project Authors (contact@sansoxygen.com), - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/frontend/src/assets/fonts/nunito-v16-latin-regular.woff2 b/frontend/src/assets/fonts/nunito-v16-latin-regular.woff2 deleted file mode 100644 index 2f9cc59..0000000 Binary files a/frontend/src/assets/fonts/nunito-v16-latin-regular.woff2 and /dev/null differ diff --git a/frontend/src/assets/images/stage_background.png b/frontend/src/assets/images/stage_background.png new file mode 100644 index 0000000..f200d8f Binary files /dev/null and b/frontend/src/assets/images/stage_background.png differ diff --git a/frontend/src/components/Atmo.svelte b/frontend/src/components/Atmo.svelte new file mode 100644 index 0000000..93dd410 --- /dev/null +++ b/frontend/src/components/Atmo.svelte @@ -0,0 +1 @@ +

Atmo

diff --git a/frontend/src/components/Clock.svelte b/frontend/src/components/Clock.svelte new file mode 100644 index 0000000..9f9037e --- /dev/null +++ b/frontend/src/components/Clock.svelte @@ -0,0 +1,50 @@ + + + +
+ {hours}:{minutes}{seconds} +
+ + + diff --git a/frontend/src/components/DevicesLibrary.svelte b/frontend/src/components/DevicesLibrary.svelte new file mode 100644 index 0000000..695f54b --- /dev/null +++ b/frontend/src/components/DevicesLibrary.svelte @@ -0,0 +1 @@ +

Devices Library

\ No newline at end of file diff --git a/frontend/src/components/NavigationBar.svelte b/frontend/src/components/NavigationBar.svelte new file mode 100644 index 0000000..527087e --- /dev/null +++ b/frontend/src/components/NavigationBar.svelte @@ -0,0 +1,72 @@ + + +
+ + + + + +
+ + \ No newline at end of file diff --git a/frontend/src/components/RoundIconButton.svelte b/frontend/src/components/RoundIconButton.svelte new file mode 100644 index 0000000..8de06d6 --- /dev/null +++ b/frontend/src/components/RoundIconButton.svelte @@ -0,0 +1,114 @@ + + + + +
+ + + + + {#if (operationalStatus !== undefined)} +
+
+ {/if} +
+ + \ No newline at end of file diff --git a/frontend/src/components/Settings.svelte b/frontend/src/components/Settings.svelte new file mode 100644 index 0000000..282c703 --- /dev/null +++ b/frontend/src/components/Settings.svelte @@ -0,0 +1 @@ +

Settings

\ No newline at end of file diff --git a/frontend/src/components/Stage.svelte b/frontend/src/components/Stage.svelte new file mode 100644 index 0000000..54c7051 --- /dev/null +++ b/frontend/src/components/Stage.svelte @@ -0,0 +1,17 @@ +
+

Stage

+ + + diff --git a/frontend/src/components/Tooltip.svelte b/frontend/src/components/Tooltip.svelte new file mode 100644 index 0000000..7e64f16 --- /dev/null +++ b/frontend/src/components/Tooltip.svelte @@ -0,0 +1,44 @@ + + +
+

{message}

+
+ + \ No newline at end of file diff --git a/frontend/src/lang/en.json b/frontend/src/lang/en.json new file mode 100644 index 0000000..86d17c7 --- /dev/null +++ b/frontend/src/lang/en.json @@ -0,0 +1,9 @@ +{ + "stageMenuTooltip": "Stage configuration", + "atmoMenuTooltip": "Atmosphere effects", + "devicesLibraryMenuTooltip": "Devices library", + "settingsMenuTooltip": "Software settings", + "dmxBoxStatusTooltip": "DMXBox status:", + "dmxBoxOkStatusTooltip": "connected", + "dmxBoxNokStatusTooltip": "disconnected" +} diff --git a/frontend/src/main.js b/frontend/src/main.js index 95c41a5..0545c0b 100644 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -1,8 +1,23 @@ -import './style.css' -import App from './App.svelte' +import App from './App.svelte'; +// Load dictionaries +import { addMessages, init } from 'svelte-i18n'; + +// Import dictionaries +import en from './lang/en.json'; + +// Add dictionaries to svelte-i18n +addMessages('en', en); + +// Initialize svelte-i18n dictionaries +init({ + fallbackLocale: 'en', + initialLocale: 'en', + }); + +// Create the main app const app = new App({ - target: document.getElementById('app') -}) + target: document.body, +}); -export default app +export default app; \ No newline at end of file diff --git a/frontend/src/stores.js b/frontend/src/stores.js new file mode 100644 index 0000000..76de050 --- /dev/null +++ b/frontend/src/stores.js @@ -0,0 +1,14 @@ +import { writable } from 'svelte/store'; + +// Colors defined in the software +export const firstColor = writable("#1B262C"); +export const secondColor = writable("#0F4C75"); +export const thirdColor = writable("#3282B8"); +export const fourthColor = writable("#BBE1FA"); +export const okColor = writable("#2BA646"); +export const nokColor = writable("#A6322B"); + +// Font sizes defined in the software +export const firstSize = writable("10px") +export const secondSize = writable("14px") +export const thirdSize = writable("20px") diff --git a/frontend/src/style.css b/frontend/src/style.css index 3940d6c..bb28a94 100644 --- a/frontend/src/style.css +++ b/frontend/src/style.css @@ -1,26 +1,63 @@ -html { - background-color: rgba(27, 38, 54, 1); - text-align: center; - color: white; +html, body { + position: relative; + width: 100%; + height: 100%; } body { - margin: 0; - color: white; - font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", - "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", - sans-serif; + color: #333; + margin: 0; + padding: 8px; + box-sizing: border-box; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; } -@font-face { - font-family: "Nunito"; - font-style: normal; - font-weight: 400; - src: local(""), - url("assets/fonts/nunito-v16-latin-regular.woff2") format("woff2"); +a { + color: rgb(0,100,200); + text-decoration: none; } -#app { - height: 100vh; - text-align: center; +a:hover { + text-decoration: underline; +} + +a:visited { + color: rgb(0,80,160); +} + +label { + display: block; +} + +input, button, select, textarea { + font-family: inherit; + font-size: inherit; + -webkit-padding: 0.4em 0; + padding: 0.4em; + margin: 0 0 0.5em 0; + box-sizing: border-box; + border: 1px solid #ccc; + border-radius: 2px; +} + +input:disabled { + color: #ccc; +} + +button { + color: #333; + background-color: #f4f4f4; + outline: none; +} + +button:disabled { + color: #999; +} + +button:not(:disabled):active { + background-color: #ddd; +} + +button:focus { + border-color: #666; }