From 419e67ff213983a50772de750584a04c8de79aa9 Mon Sep 17 00:00:00 2001 From: tyler Date: Fri, 5 Apr 2024 11:05:17 -0400 Subject: [PATCH] Updated icons and licenses --- .../FortAwesome/Font-Awesome/LICENSE.txt | 165 ++++++++++++++++++ v1/app.go | 135 +++++++++++--- v1/frontend/src/App.jsx | 4 +- v1/frontend/src/Navigation.jsx | 3 +- .../src/assets/icons/Font-Awesome/LICENSE.txt | 165 ++++++++++++++++++ .../assets/icons/Font-Awesome/chess-rook.png | Bin 0 -> 3426 bytes v1/frontend/src/assets/icons/twbs/LICENSE | 21 +++ .../assets/icons/{ => twbs}/chevron-right.png | Bin .../{ => twbs}/circle-green-background.png | Bin .../{ => twbs}/circle-red-background.png | Bin .../src/assets/icons/{ => twbs}/eye-red.png | Bin .../src/assets/icons/{ => twbs}/eye-slash.png | Bin .../src/assets/icons/{ => twbs}/eye.png | Bin .../src/assets/icons/{ => twbs}/gear-fill.png | Bin .../{ => twbs}/hand-thumbs-down-fill.png | Bin .../icons/{ => twbs}/hand-thumbs-up-fill.png | Bin .../assets/icons/{ => twbs}/heart-fill.png | Bin .../icons/{ => twbs}/pause-circle-green.png | Bin .../assets/icons/{ => twbs}/pause-circle.png | Bin .../assets/icons/{ => twbs}/pause-fill.png | Bin .../icons/{ => twbs}/play-circle-green.png | Bin .../assets/icons/{ => twbs}/play-circle.png | Bin .../src/assets/icons/{ => twbs}/play-fill.png | Bin .../icons/{ => twbs}/plus-circle-fill.png | Bin .../src/assets/icons/{ => twbs}/star-fill.png | Bin .../src/assets/icons/{ => twbs}/x-lg.png | Bin v1/frontend/src/assets/index.js | 32 ++-- v1/frontend/src/components/PageDetails.jsx | 5 +- v1/frontend/src/screens/SignIn.jsx | 22 +-- v1/frontend/src/screens/Start.css | 0 v1/frontend/src/screens/Start.jsx | 0 v1/frontend/src/screens/Startup.css | 93 ++++++++++ v1/frontend/src/screens/Startup.jsx | 64 +++++++ 33 files changed, 656 insertions(+), 53 deletions(-) create mode 100644 licenses/github.com/FortAwesome/Font-Awesome/LICENSE.txt create mode 100644 v1/frontend/src/assets/icons/Font-Awesome/LICENSE.txt create mode 100644 v1/frontend/src/assets/icons/Font-Awesome/chess-rook.png create mode 100644 v1/frontend/src/assets/icons/twbs/LICENSE rename v1/frontend/src/assets/icons/{ => twbs}/chevron-right.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/circle-green-background.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/circle-red-background.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/eye-red.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/eye-slash.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/eye.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/gear-fill.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/hand-thumbs-down-fill.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/hand-thumbs-up-fill.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/heart-fill.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/pause-circle-green.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/pause-circle.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/pause-fill.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/play-circle-green.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/play-circle.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/play-fill.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/plus-circle-fill.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/star-fill.png (100%) rename v1/frontend/src/assets/icons/{ => twbs}/x-lg.png (100%) delete mode 100644 v1/frontend/src/screens/Start.css delete mode 100644 v1/frontend/src/screens/Start.jsx create mode 100644 v1/frontend/src/screens/Startup.css create mode 100644 v1/frontend/src/screens/Startup.jsx diff --git a/licenses/github.com/FortAwesome/Font-Awesome/LICENSE.txt b/licenses/github.com/FortAwesome/Font-Awesome/LICENSE.txt new file mode 100644 index 0000000..e69c5e3 --- /dev/null +++ b/licenses/github.com/FortAwesome/Font-Awesome/LICENSE.txt @@ -0,0 +1,165 @@ +Fonticons, Inc. (https://fontawesome.com) + +-------------------------------------------------------------------------------- + +Font Awesome Free License + +Font Awesome Free is free, open source, and GPL friendly. You can use it for +commercial projects, open source projects, or really almost whatever you want. +Full Font Awesome Free license: https://fontawesome.com/license/free. + +-------------------------------------------------------------------------------- + +# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) + +The Font Awesome Free download is licensed under a Creative Commons +Attribution 4.0 International License and applies to all icons packaged +as SVG and JS file types. + +-------------------------------------------------------------------------------- + +# Fonts: SIL OFL 1.1 License + +In the Font Awesome Free download, the SIL OFL license applies to all icons +packaged as web and desktop font files. + +Copyright (c) 2024 Fonticons, Inc. (https://fontawesome.com) +with Reserved Font Name: "Font Awesome". + +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. + +-------------------------------------------------------------------------------- + +# Code: MIT License (https://opensource.org/licenses/MIT) + +In the Font Awesome Free download, the MIT license applies to all non-font and +non-icon files. + +Copyright 2024 Fonticons, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in the +Software without restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------------------- + +# Attribution + +Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font +Awesome Free files already contain embedded comments with sufficient +attribution, so you shouldn't need to do anything additional when using these +files normally. + +We've kept attribution comments terse, so we ask that you do not actively work +to remove them from files, especially code. They're a great way for folks to +learn about Font Awesome. + +-------------------------------------------------------------------------------- + +# Brand Icons + +All brand icons are trademarks of their respective owners. The use of these +trademarks does not indicate endorsement of the trademark holder by Font +Awesome, nor vice versa. **Please do not use brand logos for any purpose except +to represent the company, product, or service to which they refer.** diff --git a/v1/app.go b/v1/app.go index d7119d9..19488d4 100644 --- a/v1/app.go +++ b/v1/app.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "log" + "net/http" "os" "sync" "time" @@ -71,30 +72,6 @@ func (a *App) log() error { func (a *App) startup(ctx context.Context) { a.ctx = ctx a.api.Startup(ctx) - - db, err := config.Database() - if err != nil { - log.Fatal(err) - } - - services, err := models.NewServices( - models.WithDatabase(db), - models.WithAccountService(), - models.WithChannelService(), - models.WithAccountChannelService(), - ) - if err != nil { - log.Fatal(err) - } - - err = services.AutoMigrate() - if err != nil { - log.Fatal(err) - } - - a.services = services - - // TODO: check for update - if available, pop up window } func (a *App) shutdown(ctx context.Context) { @@ -122,6 +99,102 @@ func (a *App) shutdown(ctx context.Context) { a.logFileMu.Unlock() } +func (a *App) Start() (bool, error) { + + runtime.EventsEmit(a.ctx, "StartupMessage", "Initializing database...") + err := a.initServices() + if err != nil { + a.logError.Println("error initializing services:", err) + return false, fmt.Errorf("Error starting Rum Goggles. Try restarting.") + } + runtime.EventsEmit(a.ctx, "StartupMessage", "Initializing database complete.") + + runtime.EventsEmit(a.ctx, "StartupMessage", "Verifying account sessions...") + count, err := a.verifyAccounts() + if err != nil { + a.logError.Println("error verifying accounts:", err) + return false, fmt.Errorf("Error starting Rum Goggles. Try restarting.") + } + runtime.EventsEmit(a.ctx, "StartupMessage", "Verifying account sessions complete.") + + // TODO: check for update - if available, pop up window + // runtime.EventsEmit(a.ctx, "StartupMessage", "Checking for updates...") + // update, err = a.checkForUpdate() + // runtime.EventsEmit(a.ctx, "StartupMessage", "Checking for updates complete.") + + signin := true + if count > 0 { + signin = false + } + + return signin, nil +} + +func (a *App) initServices() error { + db, err := config.Database() + if err != nil { + return fmt.Errorf("error getting database config: %v", err) + } + + services, err := models.NewServices( + models.WithDatabase(db), + models.WithAccountService(), + models.WithChannelService(), + models.WithAccountChannelService(), + ) + if err != nil { + return fmt.Errorf("error initializing services: %v", err) + } + + err = services.AutoMigrate() + if err != nil { + return fmt.Errorf("error auto-migrating services: %v", err) + } + + a.services = services + + return nil +} + +func (a *App) verifyAccounts() (int, error) { + accounts, err := a.services.AccountS.All() + if err != nil { + return -1, fmt.Errorf("error querying all accounts: %v", err) + } + + a.clientsMu.Lock() + defer a.clientsMu.Unlock() + for _, account := range accounts { + if account.Cookies != nil { + var cookies []*http.Cookie + err = json.Unmarshal([]byte(*account.Cookies), &cookies) + if err != nil { + return -1, fmt.Errorf("error un-marshaling cookie string: %v", err) + } + client, err := rumblelivestreamlib.NewClient(rumblelivestreamlib.NewClientOptions{Cookies: cookies}) + if err != nil { + return -1, fmt.Errorf("error creating new client: %v", err) + } + if account.Username == nil { + return -1, fmt.Errorf("account username is nil") + } + loggedIn, err := client.LoggedIn() + if err != nil { + return -1, fmt.Errorf("error check if account is logged in: %v", err) + } + if loggedIn { + a.clients[*account.Username] = client + } else { + account.Cookies = nil + err = a.services.AccountS.Update(&account) + fmt.Errorf("error updating account: %v", err) + } + } + } + + return len(accounts), nil +} + func (a *App) AddPage(apiKey string) error { client := rumblelivestreamlib.Client{StreamKey: apiKey} resp, err := client.Request() @@ -302,6 +375,20 @@ func (a *App) Logout(id int64) error { } if acct.Cookies != nil { + if !exists { + var cookies []*http.Cookie + err = json.Unmarshal([]byte(*acct.Cookies), &cookies) + if err != nil { + a.logError.Println("error un-marshaling cookie string:", err) + return fmt.Errorf("Error logging out. Try again.") + } + client, err = rumblelivestreamlib.NewClient(rumblelivestreamlib.NewClientOptions{Cookies: cookies}) + err = client.Logout() + if err != nil { + a.logError.Println("error logging out:", err) + return fmt.Errorf("Error logging out. Try again.") + } + } acct.Cookies = nil err = a.services.AccountS.Update(acct) if err != nil { diff --git a/v1/frontend/src/App.jsx b/v1/frontend/src/App.jsx index 39affbd..f650a0d 100644 --- a/v1/frontend/src/App.jsx +++ b/v1/frontend/src/App.jsx @@ -1,14 +1,16 @@ import { useState } from 'react'; import { MemoryRouter as Router, Route, Routes, Link } from 'react-router-dom'; import './App.css'; -import { NavDashboard, NavSignIn } from './Navigation'; +import { NavDashboard, NavSignIn, NavStartup } from './Navigation'; import Dashboard from './screens/Dashboard'; import SignIn from './screens/SignIn'; +import Startup from './screens/Startup'; function App() { return ( + } /> } /> } /> diff --git a/v1/frontend/src/Navigation.jsx b/v1/frontend/src/Navigation.jsx index 2293540..77a5756 100644 --- a/v1/frontend/src/Navigation.jsx +++ b/v1/frontend/src/Navigation.jsx @@ -1,2 +1,3 @@ export const NavDashboard = '/dashboard'; -export const NavSignIn = '/'; +export const NavSignIn = '/signin'; +export const NavStartup = '/'; diff --git a/v1/frontend/src/assets/icons/Font-Awesome/LICENSE.txt b/v1/frontend/src/assets/icons/Font-Awesome/LICENSE.txt new file mode 100644 index 0000000..e69c5e3 --- /dev/null +++ b/v1/frontend/src/assets/icons/Font-Awesome/LICENSE.txt @@ -0,0 +1,165 @@ +Fonticons, Inc. (https://fontawesome.com) + +-------------------------------------------------------------------------------- + +Font Awesome Free License + +Font Awesome Free is free, open source, and GPL friendly. You can use it for +commercial projects, open source projects, or really almost whatever you want. +Full Font Awesome Free license: https://fontawesome.com/license/free. + +-------------------------------------------------------------------------------- + +# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) + +The Font Awesome Free download is licensed under a Creative Commons +Attribution 4.0 International License and applies to all icons packaged +as SVG and JS file types. + +-------------------------------------------------------------------------------- + +# Fonts: SIL OFL 1.1 License + +In the Font Awesome Free download, the SIL OFL license applies to all icons +packaged as web and desktop font files. + +Copyright (c) 2024 Fonticons, Inc. (https://fontawesome.com) +with Reserved Font Name: "Font Awesome". + +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. + +-------------------------------------------------------------------------------- + +# Code: MIT License (https://opensource.org/licenses/MIT) + +In the Font Awesome Free download, the MIT license applies to all non-font and +non-icon files. + +Copyright 2024 Fonticons, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in the +Software without restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------------------- + +# Attribution + +Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font +Awesome Free files already contain embedded comments with sufficient +attribution, so you shouldn't need to do anything additional when using these +files normally. + +We've kept attribution comments terse, so we ask that you do not actively work +to remove them from files, especially code. They're a great way for folks to +learn about Font Awesome. + +-------------------------------------------------------------------------------- + +# Brand Icons + +All brand icons are trademarks of their respective owners. The use of these +trademarks does not indicate endorsement of the trademark holder by Font +Awesome, nor vice versa. **Please do not use brand logos for any purpose except +to represent the company, product, or service to which they refer.** diff --git a/v1/frontend/src/assets/icons/Font-Awesome/chess-rook.png b/v1/frontend/src/assets/icons/Font-Awesome/chess-rook.png new file mode 100644 index 0000000000000000000000000000000000000000..7c314dfeb1af2ea7cd7706e6776e2f8b45f08bec GIT binary patch literal 3426 zcmd5;S5%V;xBUV_=sgf5R5c(9q9DD55Sr2i0U->;p-T%=LJNry1O@3uK!JdC0}dqt zCsKZCD!oXNE>cCRz)*i?-TQuD@54D~KkT#D+3URQXBK9LoNO1_007`LHbPmR&w_u8 zh55Y4_qodf0Laf%PtU^B*%<(2Qi4)G-2I4vcH~FK6=q1O3;1_gw39OmB@*pp<@N7S zFe6tQ;gsYzbE#78)>wZT)j0V`&QtJvwko!$0v4&n-bgvi`EXOR{)C47Mw0YCeNqd2 zFr=>d6T_fj66_lfz22Pk}8yyMh<5R8#&#En>; z6q0E-DVZm2=BJi9t2NJSlgi#E-FDLqe7Onoets)=wy@JFDpdY&mIHnB^0AIPBDH)f zanjF~-4AfhUX`KT9P5&bxqMls48yMuYb(!5w{v$YoI@kCH4~ZyD`ppD z3Q^P0a>#0h<%p53=W5yW$+IO-FU29peG9(j(4eV4{{ozN*{H+*{&3KmJ7SipK^c8| z>xa_5X&9wgKk3OP7dCWgFr9Jskx-l_`c{^RB{9=!h?vBVQQ+p7VLVxLwCOohB``ex zwu{2G%<(Gd9(@!c%s}0b0I^w}^AE6MjqCydAp7&b1^S-yMhXDfvyD-@_d^`lU!xQL zuomtdop6`uq=4=us|}?h3k{40GJ_}nG|2!*E1I^nB__?r8#vJ=wf!Oa4VodLEkb&? zwacE}tY3odJ{v9xP)p>ING_9MtW%^6m9H>;?pAZ(qO6$saJSoqSAQem@Y0@-F<%em z&o*#hCyu@y{k#-YG&<0i;GHV>&pVz+LfQ0~Q)9yt+isb#or~F`wpy#P(Xneo^6LS| zl@%-c1nFehl-jmy`9kf5nfKO1SjE{o%k9eOo{5b=UVc9as9ZK7cmeLg_$~NAIUUB+ zia2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;6?LB60b_kLR232v^`LNNdU literal 0 HcmV?d00001 diff --git a/v1/frontend/src/assets/icons/twbs/LICENSE b/v1/frontend/src/assets/icons/twbs/LICENSE new file mode 100644 index 0000000..47f06b6 --- /dev/null +++ b/v1/frontend/src/assets/icons/twbs/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019-2021 The Bootstrap Authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/v1/frontend/src/assets/icons/chevron-right.png b/v1/frontend/src/assets/icons/twbs/chevron-right.png similarity index 100% rename from v1/frontend/src/assets/icons/chevron-right.png rename to v1/frontend/src/assets/icons/twbs/chevron-right.png diff --git a/v1/frontend/src/assets/icons/circle-green-background.png b/v1/frontend/src/assets/icons/twbs/circle-green-background.png similarity index 100% rename from v1/frontend/src/assets/icons/circle-green-background.png rename to v1/frontend/src/assets/icons/twbs/circle-green-background.png diff --git a/v1/frontend/src/assets/icons/circle-red-background.png b/v1/frontend/src/assets/icons/twbs/circle-red-background.png similarity index 100% rename from v1/frontend/src/assets/icons/circle-red-background.png rename to v1/frontend/src/assets/icons/twbs/circle-red-background.png diff --git a/v1/frontend/src/assets/icons/eye-red.png b/v1/frontend/src/assets/icons/twbs/eye-red.png similarity index 100% rename from v1/frontend/src/assets/icons/eye-red.png rename to v1/frontend/src/assets/icons/twbs/eye-red.png diff --git a/v1/frontend/src/assets/icons/eye-slash.png b/v1/frontend/src/assets/icons/twbs/eye-slash.png similarity index 100% rename from v1/frontend/src/assets/icons/eye-slash.png rename to v1/frontend/src/assets/icons/twbs/eye-slash.png diff --git a/v1/frontend/src/assets/icons/eye.png b/v1/frontend/src/assets/icons/twbs/eye.png similarity index 100% rename from v1/frontend/src/assets/icons/eye.png rename to v1/frontend/src/assets/icons/twbs/eye.png diff --git a/v1/frontend/src/assets/icons/gear-fill.png b/v1/frontend/src/assets/icons/twbs/gear-fill.png similarity index 100% rename from v1/frontend/src/assets/icons/gear-fill.png rename to v1/frontend/src/assets/icons/twbs/gear-fill.png diff --git a/v1/frontend/src/assets/icons/hand-thumbs-down-fill.png b/v1/frontend/src/assets/icons/twbs/hand-thumbs-down-fill.png similarity index 100% rename from v1/frontend/src/assets/icons/hand-thumbs-down-fill.png rename to v1/frontend/src/assets/icons/twbs/hand-thumbs-down-fill.png diff --git a/v1/frontend/src/assets/icons/hand-thumbs-up-fill.png b/v1/frontend/src/assets/icons/twbs/hand-thumbs-up-fill.png similarity index 100% rename from v1/frontend/src/assets/icons/hand-thumbs-up-fill.png rename to v1/frontend/src/assets/icons/twbs/hand-thumbs-up-fill.png diff --git a/v1/frontend/src/assets/icons/heart-fill.png b/v1/frontend/src/assets/icons/twbs/heart-fill.png similarity index 100% rename from v1/frontend/src/assets/icons/heart-fill.png rename to v1/frontend/src/assets/icons/twbs/heart-fill.png diff --git a/v1/frontend/src/assets/icons/pause-circle-green.png b/v1/frontend/src/assets/icons/twbs/pause-circle-green.png similarity index 100% rename from v1/frontend/src/assets/icons/pause-circle-green.png rename to v1/frontend/src/assets/icons/twbs/pause-circle-green.png diff --git a/v1/frontend/src/assets/icons/pause-circle.png b/v1/frontend/src/assets/icons/twbs/pause-circle.png similarity index 100% rename from v1/frontend/src/assets/icons/pause-circle.png rename to v1/frontend/src/assets/icons/twbs/pause-circle.png diff --git a/v1/frontend/src/assets/icons/pause-fill.png b/v1/frontend/src/assets/icons/twbs/pause-fill.png similarity index 100% rename from v1/frontend/src/assets/icons/pause-fill.png rename to v1/frontend/src/assets/icons/twbs/pause-fill.png diff --git a/v1/frontend/src/assets/icons/play-circle-green.png b/v1/frontend/src/assets/icons/twbs/play-circle-green.png similarity index 100% rename from v1/frontend/src/assets/icons/play-circle-green.png rename to v1/frontend/src/assets/icons/twbs/play-circle-green.png diff --git a/v1/frontend/src/assets/icons/play-circle.png b/v1/frontend/src/assets/icons/twbs/play-circle.png similarity index 100% rename from v1/frontend/src/assets/icons/play-circle.png rename to v1/frontend/src/assets/icons/twbs/play-circle.png diff --git a/v1/frontend/src/assets/icons/play-fill.png b/v1/frontend/src/assets/icons/twbs/play-fill.png similarity index 100% rename from v1/frontend/src/assets/icons/play-fill.png rename to v1/frontend/src/assets/icons/twbs/play-fill.png diff --git a/v1/frontend/src/assets/icons/plus-circle-fill.png b/v1/frontend/src/assets/icons/twbs/plus-circle-fill.png similarity index 100% rename from v1/frontend/src/assets/icons/plus-circle-fill.png rename to v1/frontend/src/assets/icons/twbs/plus-circle-fill.png diff --git a/v1/frontend/src/assets/icons/star-fill.png b/v1/frontend/src/assets/icons/twbs/star-fill.png similarity index 100% rename from v1/frontend/src/assets/icons/star-fill.png rename to v1/frontend/src/assets/icons/twbs/star-fill.png diff --git a/v1/frontend/src/assets/icons/x-lg.png b/v1/frontend/src/assets/icons/twbs/x-lg.png similarity index 100% rename from v1/frontend/src/assets/icons/x-lg.png rename to v1/frontend/src/assets/icons/twbs/x-lg.png diff --git a/v1/frontend/src/assets/index.js b/v1/frontend/src/assets/index.js index 36a6bae..cbe6f02 100644 --- a/v1/frontend/src/assets/index.js +++ b/v1/frontend/src/assets/index.js @@ -1,20 +1,22 @@ -import chevron_right from './icons/chevron-right.png'; -import circle_green_background from './icons/circle-green-background.png'; -import circle_red_background from './icons/circle-red-background.png'; -import eye from './icons/eye.png'; -import eye_red from './icons/eye-red.png'; -import eye_slash from './icons/eye-slash.png'; -import gear_fill from './icons/gear-fill.png'; -import heart from './icons/heart-fill.png'; -import pause from './icons/pause-circle-green.png'; -import play from './icons/play-circle-green.png'; -import plus_circle from './icons/plus-circle-fill.png'; -import star from './icons/star-fill.png'; -import thumbs_down from './icons/hand-thumbs-down-fill.png'; -import thumbs_up from './icons/hand-thumbs-up-fill.png'; -import x_lg from './icons/x-lg.png'; +import chess_rook from './icons/Font-Awesome/chess-rook.png'; +import chevron_right from './icons/twbs/chevron-right.png'; +import circle_green_background from './icons/twbs/circle-green-background.png'; +import circle_red_background from './icons/twbs/circle-red-background.png'; +import eye from './icons/twbs/eye.png'; +import eye_red from './icons/twbs/eye-red.png'; +import eye_slash from './icons/twbs/eye-slash.png'; +import gear_fill from './icons/twbs/gear-fill.png'; +import heart from './icons/twbs/heart-fill.png'; +import pause from './icons/twbs/pause-circle-green.png'; +import play from './icons/twbs/play-circle-green.png'; +import plus_circle from './icons/twbs/plus-circle-fill.png'; +import star from './icons/twbs/star-fill.png'; +import thumbs_down from './icons/twbs/hand-thumbs-down-fill.png'; +import thumbs_up from './icons/twbs/hand-thumbs-up-fill.png'; +import x_lg from './icons/twbs/x-lg.png'; import logo from './logo/logo.png'; +export const ChessRook = chess_rook; export const ChevronRight = chevron_right; export const CircleGreenBackground = circle_green_background; export const CircleRedBackground = circle_red_background; diff --git a/v1/frontend/src/components/PageDetails.jsx b/v1/frontend/src/components/PageDetails.jsx index b135847..d56ffeb 100644 --- a/v1/frontend/src/components/PageDetails.jsx +++ b/v1/frontend/src/components/PageDetails.jsx @@ -11,6 +11,7 @@ import { Star, ThumbsDown, ThumbsUp, + ChessRook, } from '../assets'; import './PageDetails.css'; import { @@ -638,7 +639,9 @@ function PageEvent(props) {
{props.event.followed_on && } - {props.event.subscribed_on && } + {props.event.subscribed_on && ( + + )}
{props.event.username} diff --git a/v1/frontend/src/screens/SignIn.jsx b/v1/frontend/src/screens/SignIn.jsx index 2f04f9f..624769b 100644 --- a/v1/frontend/src/screens/SignIn.jsx +++ b/v1/frontend/src/screens/SignIn.jsx @@ -17,17 +17,17 @@ function SignIn() { const [username, setUsername] = useState(''); const updateUsername = (event) => setUsername(event.target.value); - useEffect(() => { - SignedIn() - .then((signedIn) => { - if (signedIn) { - navigate(NavDashboard); - } - }) - .catch((error) => { - setError(error); - }); - }, []); + // useEffect(() => { + // SignedIn() + // .then((signedIn) => { + // if (signedIn) { + // navigate(NavDashboard); + // } + // }) + // .catch((error) => { + // setError(error); + // }); + // }, []); useEffect(() => { if (signingIn) { diff --git a/v1/frontend/src/screens/Start.css b/v1/frontend/src/screens/Start.css deleted file mode 100644 index e69de29..0000000 diff --git a/v1/frontend/src/screens/Start.jsx b/v1/frontend/src/screens/Start.jsx deleted file mode 100644 index e69de29..0000000 diff --git a/v1/frontend/src/screens/Startup.css b/v1/frontend/src/screens/Startup.css new file mode 100644 index 0000000..0a6e45f --- /dev/null +++ b/v1/frontend/src/screens/Startup.css @@ -0,0 +1,93 @@ +.startup-body { + align-items: center; + background-color: #f3f5f8; + background-image: linear-gradient(to bottom, #85c742, #061726); + /* background-color: #85c742; */ + display: flex; + flex-direction: column; + justify-content: space-evenly; + height: 100vh; +} + +.startup-center { + align-items: center; + display: flex; + height: 60%; + justify-content: center; + width: 100%; +} + +.startup-error { + color: #f23160; + font-family: monospace; + font-size: 20px; + text-align: center; +} + +.startup-footer { + align-items: center; + display: flex; + flex-direction: column; + justify-content: center; + height: 20%; + width: 100%; +} + +.startup-footer-description { + color: #eee; + font-family: sans-serif; +} + +.startup-header { + align-items: center; + display: flex; + flex-direction: row; + height: 20%; + justify-content: space-evenly; + width: 100%; +} + +.startup-logo { + height: 100px; + width: 100px; +} + +.startup-message { + color: #eee; + font-family: monospace; + font-size: 20px; + text-align: center; +} + +.startup-window { + align-items: center; + background-color: #061726; + border-radius: 12px; + display: flex; + flex-direction: column; + justify-content: space-evenly; + height: 425px; + max-width: 450px; + padding: 20px; + width: 80%; +} + +.startup-window-header { + align-items: center; + display: flex; + flex-direction: column; +} + +.startup-window-message { + align-items: center; + display: flex; + flex-direction: column; + justify-content: center; +} + +.startup-window-title { + color: #eee; + font-family: sans-serif; + font-size: 24px; + font-weight: bold; +} \ No newline at end of file diff --git a/v1/frontend/src/screens/Startup.jsx b/v1/frontend/src/screens/Startup.jsx new file mode 100644 index 0000000..73b60a6 --- /dev/null +++ b/v1/frontend/src/screens/Startup.jsx @@ -0,0 +1,64 @@ +import { useEffect, useState } from 'react'; +import { Navigate, useNavigate } from 'react-router-dom'; +import { NavDashboard, NavSignIn } from '../Navigation'; +import { EventsOn } from '../../wailsjs/runtime/runtime'; +import { Start } from '../../wailsjs/go/main/App'; +import { Logo } from '../assets'; +import './Startup.css'; + +function Startup() { + const [error, setError] = useState(''); + const [message, setMessage] = useState(''); + const navigate = useNavigate(); + const [starting, setStarting] = useState(true); + + useEffect(() => { + EventsOn('StartupMessage', (event) => { + setMessage(event); + }); + setStarting(false); + }, []); + + useEffect(() => { + if (!starting) { + Start() + .then((signin) => { + if (signin) { + navigate(NavSignIn); + } else { + navigate(NavDashboard); + } + }) + .catch((err) => { + setError(err); + }); + } + }, [starting]); + + return ( +
+
+ +
+
+
+
+ Starting Rum Goggles +
+
+ {error !== '' && {error}} + {message !== '' && error === '' && ( + {message} + )} +
+
+
+
+ Rum Goggles by Tyler Travis + Follow @tylertravisty +
+
+ ); +} + +export default Startup;