Compare commits

...

No commits in common. "main" and "beta" have entirely different histories.
main ... beta

65 changed files with 667 additions and 2634 deletions

View file

@ -1,36 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: Bug
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. Linux, Debian]
- Version [e.g. 10]
- Graphical shell [e.g. GNOME]
**Smartphone (please complete the following information):**
- Device: [e.g. Galaxy Z Fold 2]
- OS: [e.g. Android 12]
**Additional context**
Add any other context about the problem here.

View file

@ -1,20 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: FEAT
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View file

@ -1,14 +0,0 @@
---
name: Questions
about: Question about the program or something else
title: Questions
labels: question
assignees: ''
---
Before publishing, make sure
**That this question has not been asked before otherwise your question will be marked as a duplicate and closed**
**Describe your question**
Clearly and concisely, if possible without the words of parasites

16
.gitignore vendored
View file

@ -1,15 +1,5 @@
# Other # Other
.idea .idea
/logs log/*
EveryNASA.db
# Database files EveryNASA.exe
*.db
*.db-journal
# Build files
*.exe
*.msi
*.syso

View file

@ -1,128 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
https://t.me/Redume.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

11
NOTICE Normal file
View file

@ -0,0 +1,11 @@
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
EveryNasa Copyright (C) 2022-2023 Redume
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

View file

@ -1,20 +1,19 @@
<p align="center"><img src="web/static/image/icons/favicon.png" alt="Starlio"></p> <p align="center"><img src="interface/static/assets/icons/favicon.png" alt="EveryNASA"></p>
<h2 align="center"> Amazing wallpaper straight from space! </h2> <h2 align="center"> Amazing wallpaper straight from space! </h2>
**<p align="center">This version of the project is no longer maintained. See another: https://github.com/Starlio-app/Starlio</p>**
---
> **Note** > **Note**
> This app is not official from NASA > This app is not official from NASA
| Platform | Status | Get in on | > **Warning**
|----------|--------|--------------------------------------------------| > This branch with unstable changes, some features may be removed or not work properly
| Windows | 🟡 | [Github][windows-download] |
| Linux | 🟡 | [Github][linux-download] | | Platform | Status | Get in on | Branche |
| Android | 🟢 | [Google Play][google-play] / [RuStore][rustore]* | |----------|--------|--------------------------------------------------|-------------------------|
| MacOS | 🔴 | N/A | | Windows | 🟢 | [Github][windows-download] | [main][windows-branche] |
| iOS | 🔴 | N/A | | Linux | 🟡 | [Github][linux-download] | N/A |
| Android | 🟢 | [Google Play][google-play] / [RuStore][rustore]* | N/A |
| MacOS | 🔴 | N/A | N/A |
| iOS | 🔴 | N/A | N/A |
<details> <details>
<summary>Explanation of designations</summary> <summary>Explanation of designations</summary>
@ -27,40 +26,26 @@
--- ---
[windows-download]: https://github.com/Starlio-app/StarlioX/releases/latest [windows-download]: https://github.com/Redume/EveryNasa/releases/latest
[linux-download]: https://github.com/Starlio-app/StarlioX/releases/download/v1.6/Starlio [windows-branche]: https://github.com/Redume/EveryNasa/
[linux-download]: https://github.com/Redume/EveryNASA/releases/download/v1.6/EveryNasa
[google-play]: https://play.google.com/store/apps/details?id=ru.murzify.everynasa [google-play]: https://play.google.com/store/apps/details?id=ru.murzify.everynasa
[rustore]: https://apps.rustore.ru/app/ru.murzify.everynasa [rustore]: https://apps.rustore.ru/app/ru.murzify.everynasa
### License. The project is under the [GPLv3](https://www.gnu.org/licenses/gpl-3.0.html) license. ### License. The project is under the GPLv3 license
``` ```
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
EveryNasa Copyright (C) 2022-2023 Redume EveryNasa Copyright (C) 2022-2023 Redume
StarlioX Copyright (C) 2023 Redume This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
This program is free software: you can redistribute it and/or modify The hypothetical commands `show w' and `show c' should show the appropriate
it under the terms of the GNU General Public License as published by parts of the General Public License. Of course, your program's commands
the Free Software Foundation, either version 3 of the License, or might be different; for a GUI interface, you would use an "about box".
(at your option) any later version. ```
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
```
### Third-party library licenses
- [getlantern/systray](https://github.com/getlantern/systray) — [Apache-2.0](https://github.com/getlantern/systray/blob/master/LICENSE)
- [gofiber/fiber](https://github.com/gofiber/fiber) — [MIT](https://github.com/gofiber/fiber/blob/master/LICENSE)
- [go-ole/go-ole](https://github.com/go-ole/go-ole) — [MIT](https://github.com/go-ole/go-ole/blob/master/LICENSE)
- [mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) — [MIT](https://github.com/mattn/go-sqlite3/blob/master/LICENSE)
- [rodkranz/fetch](https://github.com/rodkranz/fetch) — [MIT](https://github.com/rodkranz/fetch/blob/master/LICENSE)
- [shirou/gopsutil](https://github.com/shirou/gopsutil) — [BSD-3](https://github.com/shirou/gopsutil/blob/master/LICENSE)
- [skratchdot/open-golang](https://github.com/skratchdot/open-golang) — [MIT](https://github.com/skratchdot/open-golang/blob/master/LICENSE)
- [twbs/bootstrap](https://github.com/twbs/bootstrap) — [MIT](https://github.com/twbs/bootstrap/blob/main/LICENSE)
- [LottieFiles/lottie-player](https://github.com/LottieFiles/lottie-player) — [MIT](https://github.com/LottieFiles/lottie-player/blob/master/LICENSE)
- [jquery/jquery](https://github.com/jquery/jquery) — [MIT](https://github.com/jquery/jquery/blob/main/LICENSE.txt)

View file

@ -9,6 +9,7 @@ currently being supported with security updates.
|---------|--------| |---------|--------|
| < 2.4 | | | < 2.4 | |
| 2.4 | ✔️ | | 2.4 | ✔️ |
| 3.0 | ✔️ |
## Reporting a Vulnerability ## Reporting a Vulnerability

View file

@ -1,135 +0,0 @@
package controllers
import (
"database/sql"
"github.com/Redume/Starlio/utils"
"github.com/gofiber/fiber/v2"
)
var GetFavorites = func(c *fiber.Ctx) error {
FavoriteTitle := c.Query("title")
type Favorite struct {
Title string `json:"title"`
Explanation string `json:"explanation"`
Copyright string `json:"copyright"`
Date string `json:"date"`
URL string `json:"url"`
HDURL string `json:"hdurl"`
MediaType string `json:"media_type"`
}
var title, explanation, copyright, date, url, hdurl, media_type string
db := utils.GetDatabase()
if FavoriteTitle != "" {
queryFavorites, err := db.Query("SELECT * FROM favorite WHERE title LIKE ?", FavoriteTitle)
if err != nil {
utils.Logger(err.Error())
}
defer func(query *sql.Rows) {
err := query.Close()
if err != nil {
utils.Logger(err.Error())
}
}(queryFavorites)
for queryFavorites.Next() {
err := queryFavorites.Scan(&title, &explanation, &copyright, &date, &url, &hdurl, &media_type)
if err != nil {
utils.Logger(err.Error())
}
return c.JSON(fiber.Map{
"title": title,
"explanation": explanation,
"copyright": copyright,
"date": date,
"url": url,
"hdurl": hdurl,
"media_type": media_type,
})
}
} else {
queryFavorite, err := db.Query("SELECT * FROM favorite")
if err != nil {
utils.Logger(err.Error())
}
defer func(query *sql.Rows) {
err := query.Close()
if err != nil {
utils.Logger(err.Error())
}
}(queryFavorite)
var favorites []Favorite
for queryFavorite.Next() {
err := queryFavorite.Scan(&title, &explanation, &copyright, &date, &url, &hdurl, &media_type)
if err != nil {
utils.Logger(err.Error())
}
favorites = append(favorites, Favorite{
Title: title,
Explanation: explanation,
Copyright: copyright,
Date: date,
URL: url,
HDURL: hdurl,
MediaType: media_type})
}
return c.JSON(favorites)
}
return c.SendString("No favorites found")
}
var AddFavorite = func(c *fiber.Ctx) error {
title := c.FormValue("title")
explanation := c.FormValue("explanation")
copyright := c.FormValue("copyright")
date := c.FormValue("date")
url := c.FormValue("url")
hdurl := c.FormValue("hdurl")
media_type := c.FormValue("media_type")
if title == "" && explanation == "" && date == "" && url == "" && hdurl == "" && media_type == "" {
utils.Respond(c, utils.Message(false, "All fields are required"))
return nil
}
db := utils.GetDatabase()
_, err := db.Exec("INSERT INTO favorite (title, explanation, copyright, date, url, hdurl, media_type) VALUES (?, ?, ?, ?, ?, ?, ?)",
title,
explanation,
copyright,
date,
url,
hdurl,
media_type)
if err != nil {
utils.Logger(err.Error())
}
utils.Respond(c, utils.Message(true, "Favorite added"))
return nil
}
var DeleteFavorite = func(c *fiber.Ctx) error {
title := c.FormValue("title")
db := utils.GetDatabase()
_, err := db.Exec("DELETE FROM favorite WHERE title = ?", title)
if err != nil {
utils.Logger(err.Error())
}
utils.Respond(c, utils.Message(true, "Favorite deleted"))
return nil
}

View file

@ -1,32 +0,0 @@
package controllers
import (
"os"
"os/user"
"strings"
"github.com/Redume/Starlio/utils"
"github.com/gofiber/fiber/v2"
)
var CreateLabel = func(c *fiber.Ctx) error {
u, err := user.Current()
if err != nil {
utils.Logger(err.Error())
}
dir, err := os.Getwd()
if err != nil {
utils.Logger(err.Error())
}
dir = strings.Replace(dir, "\\", "\\\\", -1) + "\\Starlio.exe"
err = utils.CreateLnk(dir, strings.Replace(u.HomeDir, "\\", "\\\\", -1)+"\\Desktop\\Starlio.lnk")
if err != nil {
utils.Logger(err.Error())
}
utils.Respond(c, utils.Message(true, "The shortcut was successfully created"))
return nil
}

View file

@ -0,0 +1,26 @@
package controllers
import (
"github.com/Redume/EveryNASA/api/utils"
utils2 "github.com/Redume/EveryNASA/utils"
"github.com/gofiber/fiber/v2"
"github.com/reujab/wallpaper"
)
var SetWallpaper = func(c *fiber.Ctx) error {
url := c.FormValue("url")
if url == "" {
utils.Respond(c, utils.Message(false, "URL`s required."))
return nil
}
err := wallpaper.SetFromURL(url)
if err != nil {
utils2.Log(err.Error())
utils.Respond(c, utils.Message(false, "An error occurred while setting the wallpaper."))
return err
}
utils.Respond(c, utils.Message(true, "The wallpaper was successfully installed."))
return nil
}

View file

@ -1,91 +0,0 @@
package controllers
import (
"database/sql"
"github.com/Redume/Starlio/utils"
"github.com/gofiber/fiber/v2"
_ "github.com/mattn/go-sqlite3"
)
var SettingsGet = func(c *fiber.Ctx) error {
db, err := sql.Open("sqlite3", "Starlio.db")
if err != nil {
utils.Logger(err.Error())
}
querySettings, err := db.Query("SELECT * FROM settings")
if err != nil {
utils.Logger(err.Error())
}
defer func(query *sql.Rows) {
err := query.Close()
if err != nil {
utils.Logger(err.Error())
}
}(querySettings)
var startup, wallpaper, save_logg int
for querySettings.Next() {
err := querySettings.Scan(&startup, &wallpaper, &save_logg)
if err != nil {
utils.Logger(err.Error())
}
var data = map[string]interface{}{
"startup": startup,
"wallpaper": wallpaper,
"save_logg": save_logg,
}
utils.Respond(c, data)
}
return nil
}
var SettingsUpdate = func(c *fiber.Ctx) error {
db, err := sql.Open("sqlite3", "Starlio.db")
if err != nil {
utils.Logger(err.Error())
}
startup := c.FormValue("startup")
wallpaper := c.FormValue("wallpaper")
save_logg := c.FormValue("save_logg")
if startup == "" && wallpaper == "" && save_logg == "" {
utils.Respond(c, utils.Message(false, "All fields are required."))
return nil
}
if wallpaper != "" {
_, err := db.Exec("UPDATE settings SET wallpaper = ?", wallpaper)
if err != nil {
utils.Logger(err.Error())
}
if wallpaper == "1" {
go utils.StartWallpaper()
}
}
if startup != "" {
_, err := db.Exec("UPDATE settings SET startup = ?", startup)
if err != nil {
utils.Logger(err.Error())
}
}
if save_logg != "" {
_, err := db.Exec("UPDATE settings SET save_logg = ?", save_logg)
if err != nil {
utils.Logger(err.Error())
}
}
utils.Respond(c, utils.Message(true, "The settings have been applied successfully."))
return nil
}

View file

@ -1,66 +0,0 @@
package controllers
import (
"github.com/gofiber/fiber/v2"
"os"
"os/user"
"strings"
"github.com/Redume/Starlio/utils"
)
var Startup = func(c *fiber.Ctx) error {
startup := c.FormValue("startup")
if startup == "" {
utils.Respond(c, utils.Message(false, "All fields are required."))
return nil
}
if startup == "1" {
SetStartup(c)
} else if startup == "0" {
RemoveStartup(c)
} else {
utils.Respond(c, utils.Message(false, "Invalid field."))
return nil
}
return nil
}
var SetStartup = func(c *fiber.Ctx) error {
u, err := user.Current()
if err != nil {
utils.Logger(err.Error())
}
dir, err := os.Getwd()
if err != nil {
utils.Logger(err.Error())
}
dir = strings.Replace(dir, "\\", "\\\\", -1) + "\\Starlio.exe"
err = utils.CreateLnk(dir, strings.Replace(u.HomeDir, "\\", "\\\\", -1)+"\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\Starlio.lnk")
if err != nil {
utils.Logger(err.Error())
}
utils.Respond(c, utils.Message(true, "The settings have been applied successfully."))
return nil
}
var RemoveStartup = func(c *fiber.Ctx) error {
u, err := user.Current()
if err != nil {
utils.Logger(err.Error())
}
err = os.Remove(strings.Replace(u.HomeDir, "\\", "\\\\", -1) + "\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\Starlio.lnk")
if err != nil {
utils.Logger(err.Error())
}
utils.Respond(c, utils.Message(true, "The settings have been applied successfully."))
return nil
}

View file

@ -1,27 +0,0 @@
package controllers
import (
"github.com/Redume/Starlio/utils"
"github.com/gofiber/fiber/v2"
"github.com/reujab/wallpaper"
)
var WallpaperUpdate = func(c *fiber.Ctx) error {
var url string
url = c.FormValue("url")
if url == "" {
utils.Respond(c, utils.Message(false, "URL is required"))
return nil
}
err := wallpaper.SetFromURL(url)
if err != nil {
utils.Logger(err.Error())
utils.Respond(c, utils.Message(false, "An error occurred while setting the wallpaper"))
return nil
}
utils.Respond(c, utils.Message(true, "Wallpaper successfully updated"))
return nil
}

View file

@ -2,6 +2,7 @@ package utils
import ( import (
"encoding/json" "encoding/json"
"github.com/Redume/EveryNASA/utils"
"github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2"
) )
@ -14,6 +15,6 @@ func Respond(c *fiber.Ctx, data map[string]interface{}) {
c.Set("Content-Type", "application/json") c.Set("Content-Type", "application/json")
err := json.NewEncoder(c).Encode(data) err := json.NewEncoder(c).Encode(data)
if err != nil { if err != nil {
Logger(err.Error()) utils.Log(err.Error())
} }
} }

44
go.mod
View file

@ -1,49 +1,31 @@
module github.com/Redume/Starlio module github.com/Redume/EveryNASA
go 1.19 go 1.20
require ( require (
github.com/getlantern/systray v1.2.1 github.com/gofiber/fiber/v2 v2.42.0
github.com/go-ole/go-ole v1.2.6
github.com/gofiber/fiber/v2 v2.43.0
github.com/jasonlvhit/gocron v0.0.1
github.com/mattn/go-sqlite3 v1.14.16 github.com/mattn/go-sqlite3 v1.14.16
github.com/reujab/wallpaper v0.0.0-20210630195606-5f9f655b3740 github.com/reujab/wallpaper v0.0.0-20210630195606-5f9f655b3740
github.com/rodkranz/fetch v1.2.0 gopkg.in/toast.v1 v1.0.0-20180812000517-0a84660828b2
github.com/shirou/gopsutil/v3 v3.23.2
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
) )
require ( require (
github.com/andybalholm/brotli v1.0.5 // indirect github.com/andybalholm/brotli v1.0.4 // indirect
github.com/getlantern/context v0.0.0-20190109183933-c447772a6520 // indirect
github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7 // indirect
github.com/getlantern/golog v0.0.0-20190830074920-4ef2e798c2d7 // indirect
github.com/getlantern/hex v0.0.0-20190417191902-c6586a6fe0b7 // indirect
github.com/getlantern/hidden v0.0.0-20190325191715-f02dbb02be55 // indirect
github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/google/uuid v1.3.0 // indirect github.com/google/uuid v1.3.0 // indirect
github.com/klauspost/compress v1.16.3 // indirect github.com/klauspost/compress v1.15.9 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c // indirect github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect
github.com/philhofer/fwd v1.1.2 // indirect github.com/philhofer/fwd v1.1.1 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/rivo/uniseg v0.2.0 // indirect github.com/rivo/uniseg v0.2.0 // indirect
github.com/savsgio/dictpool v0.0.0-20221023140959-7bf2e61cea94 // indirect github.com/savsgio/dictpool v0.0.0-20221023140959-7bf2e61cea94 // indirect
github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee // indirect github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d // indirect
github.com/tinylib/msgp v1.1.8 // indirect github.com/tinylib/msgp v1.1.6 // indirect
github.com/tklauser/go-sysconf v0.3.11 // indirect
github.com/tklauser/numcpus v0.6.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.45.0 // indirect github.com/valyala/fasthttp v1.44.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect github.com/valyala/tcplisten v1.0.0 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
golang.org/x/net v0.8.0 // indirect gopkg.in/ini.v1 v1.62.0 // indirect
golang.org/x/sys v0.6.0 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect
) )

144
go.sum
View file

@ -1,45 +1,15 @@
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/gofiber/fiber/v2 v2.42.0 h1:Fnp7ybWvS+sjNQsFvkhf4G8OhXswvB6Vee8hM/LyS+8=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/gofiber/fiber/v2 v2.42.0/go.mod h1:3+SGNjqMh5VQH5Vz2Wdi43zTIV16ktlFd3x3R6O1Zlc=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/getlantern/context v0.0.0-20190109183933-c447772a6520 h1:NRUJuo3v3WGC/g5YiyF790gut6oQr5f3FBI88Wv0dx4=
github.com/getlantern/context v0.0.0-20190109183933-c447772a6520/go.mod h1:L+mq6/vvYHKjCX2oez0CgEAJmbq1fbb/oNJIWQkBybY=
github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7 h1:6uJ+sZ/e03gkbqZ0kUG6mfKoqDb4XMAzMIwlajq19So=
github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7/go.mod h1:l+xpFBrCtDLpK9qNjxs+cHU6+BAdlBaxHqikB6Lku3A=
github.com/getlantern/golog v0.0.0-20190830074920-4ef2e798c2d7 h1:guBYzEaLz0Vfc/jv0czrr2z7qyzTOGC9hiQ0VC+hKjk=
github.com/getlantern/golog v0.0.0-20190830074920-4ef2e798c2d7/go.mod h1:zx/1xUUeYPy3Pcmet8OSXLbF47l+3y6hIPpyLWoR9oc=
github.com/getlantern/hex v0.0.0-20190417191902-c6586a6fe0b7 h1:micT5vkcr9tOVk1FiH8SWKID8ultN44Z+yzd2y/Vyb0=
github.com/getlantern/hex v0.0.0-20190417191902-c6586a6fe0b7/go.mod h1:dD3CgOrwlzca8ed61CsZouQS5h5jIzkK9ZWrTcf0s+o=
github.com/getlantern/hidden v0.0.0-20190325191715-f02dbb02be55 h1:XYzSdCbkzOC0FDNrgJqGRo8PCMFOBFL9py72DRs7bmc=
github.com/getlantern/hidden v0.0.0-20190325191715-f02dbb02be55/go.mod h1:6mmzY2kW1TOOrVy+r41Za2MxXM+hhqTtY3oBKd2AgFA=
github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f h1:wrYrQttPS8FHIRSlsrcuKazukx/xqO/PpLZzZXsF+EA=
github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f/go.mod h1:D5ao98qkA6pxftxoqzibIBBrLSUli+kYnJqrgBf9cIA=
github.com/getlantern/systray v1.2.1 h1:udsC2k98v2hN359VTFShuQW6GGprRprw6kD6539JikI=
github.com/getlantern/systray v1.2.1/go.mod h1:AecygODWIsBquJCJFop8MEQcJbWFfw/1yWbVabNgpCM=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-redis/redis v6.15.5+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gofiber/fiber/v2 v2.43.0 h1:yit3E4kHf178B60p5CQBa/3v+WVuziWMa/G2ZNyLJB0=
github.com/gofiber/fiber/v2 v2.43.0/go.mod h1:mpS1ZNE5jU+u+BA4FbM+KKnUzJ4wzTK+FT2tG3tU+6I=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/jasonlvhit/gocron v0.0.1 h1:qTt5qF3b3srDjeOIR4Le1LfeyvoYzJlYpqvG7tJX5YU=
github.com/jasonlvhit/gocron v0.0.1/go.mod h1:k9a3TV8VcU73XZxfVHCHWMWF9SOqgoku0/QlY2yvlA4=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY= github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY=
github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
@ -49,131 +19,71 @@ github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWV
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ=
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw=
github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/reujab/wallpaper v0.0.0-20210630195606-5f9f655b3740 h1:X6IDPPN+zrSClp0Q+JiERA//d8L0WcU5MqcGeulCW1A= github.com/reujab/wallpaper v0.0.0-20210630195606-5f9f655b3740 h1:X6IDPPN+zrSClp0Q+JiERA//d8L0WcU5MqcGeulCW1A=
github.com/reujab/wallpaper v0.0.0-20210630195606-5f9f655b3740/go.mod h1:WYwPVmM/8szeItLeWkwZSLRvQgrvsvstRzgznR8+E4Q= github.com/reujab/wallpaper v0.0.0-20210630195606-5f9f655b3740/go.mod h1:WYwPVmM/8szeItLeWkwZSLRvQgrvsvstRzgznR8+E4Q=
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rodkranz/fetch v1.2.0 h1:Yw9E7EOfNbCSEdAfNGu7HXJYkqEj/nRG5GQcnc7M1RI=
github.com/rodkranz/fetch v1.2.0/go.mod h1:ojApfh+3ll3N2GP5dvYLGlxOrLS1ke5IRqpOUS7XGf4=
github.com/savsgio/dictpool v0.0.0-20221023140959-7bf2e61cea94 h1:rmMl4fXJhKMNWl+K+r/fq4FbbKI+Ia2m9hYBLm2h4G4= github.com/savsgio/dictpool v0.0.0-20221023140959-7bf2e61cea94 h1:rmMl4fXJhKMNWl+K+r/fq4FbbKI+Ia2m9hYBLm2h4G4=
github.com/savsgio/dictpool v0.0.0-20221023140959-7bf2e61cea94/go.mod h1:90zrgN3D/WJsDd1iXHT96alCoN2KJo6/4x1DZC3wZs8= github.com/savsgio/dictpool v0.0.0-20221023140959-7bf2e61cea94/go.mod h1:90zrgN3D/WJsDd1iXHT96alCoN2KJo6/4x1DZC3wZs8=
github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d h1:Q+gqLBOPkFGHyCJxXMRqtUgUbTjI8/Ze8vu8GGyNFwo=
github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d/go.mod h1:Gy+0tqhJvgGlqnTF8CVGP0AaGRjwBtXs/a5PA0Y3+A4= github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d/go.mod h1:Gy+0tqhJvgGlqnTF8CVGP0AaGRjwBtXs/a5PA0Y3+A4=
github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee h1:8Iv5m6xEo1NR1AvpV+7XmhI4r39LGNzwUL4YpMuL5vk= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee/go.mod h1:qwtSXrKuJh/zsFQ12yEE89xfCrGKK63Rr7ctU/uCo4g=
github.com/shirou/gopsutil/v3 v3.23.2 h1:PAWSuiAszn7IhPMBtXsbSCafej7PqUOvY6YywlQUExU=
github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M=
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA=
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/tinylib/msgp v1.1.6 h1:i+SbKraHhnrf9M5MYmvQhFnbLhAXSDWF8WWsuyRdocw=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/tinylib/msgp v1.1.6/go.mod h1:75BAfg2hauQhs3qedfdDZmWAPcFMAvJE5b9rGOMufyw= github.com/tinylib/msgp v1.1.6/go.mod h1:75BAfg2hauQhs3qedfdDZmWAPcFMAvJE5b9rGOMufyw=
github.com/tinylib/msgp v1.1.8 h1:FCXC1xanKO4I8plpHGH2P7koL/RzZs12l/+r7vakfm0=
github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw=
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=
github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI=
github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms=
github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.45.0 h1:zPkkzpIn8tdHZUrVa6PzYd0i5verqiPSkgTd3bSUcpA= github.com/valyala/fasthttp v1.44.0 h1:R+gLUhldIsfg1HokMuQjdQ5bh9nuXHPIfvkYUu9eR5Q=
github.com/valyala/fasthttp v1.45.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= github.com/valyala/fasthttp v1.44.0/go.mod h1:f6VbjjoI3z1NDOZOv17o6RvtRSWxC77seBFc2uWtgiY=
github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8= github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8=
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20180801234040-f4c29de78a2a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220906165146-f3363e06e74c/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU=
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= gopkg.in/toast.v1 v1.0.0-20180812000517-0a84660828b2 h1:MZF6J7CV6s/h0HBkfqebrYfKCVEo5iN+wzE4QhV3Evo=
gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/toast.v1 v1.0.0-20180812000517-0a84660828b2/go.mod h1:s1Sn2yZos05Qfs7NKt867Xe18emOmtsO3eAKbDaon0o=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>EveryNasa</title>
<link rel="icon" href="/image/icons/favicon.png">
</head>
<style>
* {
line-height: 1.2;
margin: 0;
}
lottie-player {
margin: 0 auto;
width: 300px; height: 300px;
}
p {
font-family: sans-serif;
text-align: center;
margin: 0.4% auto;
width: 300px;
}
a:visited {
color: #9FA4AF;
}
</style>
<body style="background: #131313; color: white;">
<lottie-player src="/static/image/lottie/lf20_2QSlz3Li88.json" background="transparent" speed="1" loop autoplay></lottie-player>
<p style="font-size: 160%;">Page not found!</p>
<p style="font-size: 115%;">Sorry, but the page you want to view may have been deleted or moved!</p>
<p><a style="font-size: 1em;" href="/">General page</a></p>
<script src="/static/scripts/vendors/lottie-player.js"></script>
</body>
</html>

View file

@ -0,0 +1,95 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>EveryNASA</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="/static/fonts/Roboto.css" rel="stylesheet">
<link href="/static/styles/vendors/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="/static/styles/gallery.css" type="text/css">
</head>
<body style="background: #131313; color: white;">
<nav class="navbar navbar-expand-lg bg-dark navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="/">
<img src="/static/assets/icons/favicon.png" width="45" alt="EveryNasa">
</a>
<button class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNavDropdown"
aria-controls="navbarNavDropdown"
aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/">Gallery</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/settings">Settings</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about">About</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="modal fade"
id="wallpaper"
aria-hidden="true"
aria-labelledby="wallpaperWindow"
tabindex="-1" style="color: black;">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
<span class="d-inline-block text-truncate w-modal-title" style="max-width: 429px;"></span>
</h5>
</div>
<div class="modal-body"></div>
<div class="modal-footer"></div>
</div>
</div>
</div>
<div class="container">
<header class="header-row"></header>
</div>
<div class="preloader">
<lottie-player src="https://assets4.lottiefiles.com/datafiles/a3YH0ragZcwfKHS/data.json"
background="transparent"
speed="1"
style="width: 800px; height: 800px; margin: 0 auto;"
loop autoplay>
</lottie-player>
</div>
<script src="/static/scripts/vendors/jquery.min.js" type="application/javascript"></script>
<script src="/static/scripts/vendors/bootstrap.bundle.min.js" type="application/javascript"></script>
<script src="/static/scripts/vendors/lottie-player.js" type="application/javascript"></script>
<script src="/static/scripts/gallery.js" type="application/javascript"></script>
<script type="application/javascript">
startDate.setDate(startDate.getUTCDate() - 19);
$(document).ready(function() {
$.ajax({
url: "https://api.nasa.gov/planetary/apod",
type: "GET",
data: {
api_key: apiKEY,
start_date: `${startDate.getUTCFullYear()}-${startDate.getUTCMonth() + 1}-${startDate.getUTCDate()}`,
end_date: `${endDate.getUTCFullYear()}-${endDate.getUTCMonth() + 1}-${endDate.getUTCDate()}`,
},
success: function(data) {
data.reverse();
wallpaperLoad(data);
},
});
});
</script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View file

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 149 KiB

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"v":"5.5.7","meta":{"g":"LottieFiles AE 0.1.20","a":"","k":"","d":"","tc":""},"fr":24,"ip":0,"op":27,"w":1900,"h":1900,"nm":"Loading","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[994,1018,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[0,-300.414],[-88.29,-121.52],[-285.711,-92.833],[-142.855,46.417],[-176.579,243.04],[0,150.207],[176.579,243.04],[142.855,46.417],[285.711,-92.833],[88.29,-121.52]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.941712622549,0.877833766563,0.047244322534,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0.753744147806,0.783091406729,0.784834558824,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":6,"s":[0.753744147806,0.783091406729,0.784834558824,1]},{"t":7,"s":[0.982552111149,0.763284087181,0,1]}],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-60.047,3.188],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0.227,0.227],"y":[0.013,0.013]},"t":0,"s":[100,100]},{"i":{"x":[0,0],"y":[1.027,1.027]},"o":{"x":[0.645,0.645],"y":[0.021,0.021]},"t":6,"s":[57,57]},{"t":14,"s":[100,100]}],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Polystar 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":28,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[926,1018,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":2,"ty":"el","s":{"a":0,"k":[173,173],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.984313726425,0.764705896378,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0.167},"t":8,"s":[0.5,-7.5],"to":[0,-79.284],"ti":[0,79.284]},{"t":20,"s":[0.5,-483.203]}],"ix":2},"a":{"a":0,"k":[3,85],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.654,0.654],"y":[0.042,0.042]},"t":8,"s":[71.537,71.537]},{"t":20,"s":[0,0]}],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"rp","c":{"a":0,"k":10,"ix":1},"o":{"a":0,"k":0,"ix":2},"m":1,"ix":2,"tr":{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":45,"ix":4},"so":{"a":0,"k":100,"ix":5},"eo":{"a":0,"k":100,"ix":6},"nm":"Transform"},"nm":"Repeater 1","mn":"ADBE Vector Filter - Repeater","hd":false}],"ip":8,"op":30,"st":8,"bm":0}],"markers":[]}

View file

Before

Width:  |  Height:  |  Size: 6 KiB

After

Width:  |  Height:  |  Size: 6 KiB

View file

@ -0,0 +1,63 @@
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu72xKOzY.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu5mxKOzY.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu7mxKOzY.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu4WxKOzY.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu7WxKOzY.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu7GxKOzY.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

View file

@ -0,0 +1,172 @@
const startDate = new Date();
const endDate = new Date();
const ids = [];
let id = ids.length;
const apiKEY = "1gI9G84ZafKDEnrbydviGknReOGiVK9jqrQBE3et";
function wallpaperLoad(data) {
$(".preloader").hide();
for (let i = 0; id < data.length; i++, id++) {
ids.push(data[i]);
if (ids.filter((item) => item['url'] === data[i]['url']).length > 1) continue;
const image = new Image();
image.src = ids[id]['media_type'] === "video" ?
`https://ytproxy.dc09.ru/vi/${ids[id]['url'].slice(30, 41)}/maxresdefault.jpg?host=i.ytimg.com` :
ids[id]['url'];
image.onload = function () {
if (image.width + image.height !== 210) {
$(`img[data-src="${image.src}"]`)
.attr("src", `${image.src}`)
.removeAttr("data-src");
}
}
if (ids[id]['media_type'] === "image") {
$(".header-row").append(`
<div class=card>
<a data-bs-toggle="modal" href="#wallpaper" role="button">
<img src="${ids[id]['url']}"
title="${ids[id]['title']}"
alt="${ids[id]['title']}"
class="card-img-top shimmer"
id="${id}">
</a>
</div>
`)
} else {
$(".header-row").append(`
<div class=card>
<a data-bs-toggle="modal" href="#wallpaper" role="button">
<img src="/static/assets/placeholder.png"
data-src="https://ytproxy.dc09.ru/vi/${ids[id]['url'].slice(30, 41)}/maxresdefault.jpg?host=i.ytimg.com"
title="${ids[id]['title']}"
alt="${ids[id]['title']}"
class="card-img-top shimmer"
id="${id}">
</a>
</div>
`)
}
}
$(".card-img-top").on("load", function () {
$(this).removeClass("shimmer");
});
const button_modal_window = document.querySelector(".header-row");
button_modal_window.addEventListener("click", function (event) {
if (event.target === button_modal_window) return;
const card_id = event.target.getAttribute("id");
const modale_window = document.querySelector(".modal-body");
const title = document.querySelector(".w-modal-title");
const button = document.querySelector(".modal-footer");
button.innerHTML = `<button type="button" class="btn btn-primary" id="setWallpaper">Download</button>`;
const wallpaper_img = $(`img#${id}.card-img-top`);
if (wallpaper_img && wallpaper_img.src === "http://localhost:4000/static/assets/placeholder.png") {
const button_setWallpaper = document.querySelector("#setWallpaper")
button_setWallpaper.disabled = true;
button_setWallpaper.style.backgroundColor = "grey";
button_setWallpaper.style.color = "white;"
button_setWallpaper.style.border = "none";
}
const setWallpaper = document.querySelector("#setWallpaper");
title.innerHTML = `<h5 class="modal-title">${ids[card_id]['title']}</h5>`;
if (ids[card_id]['media_type'] === "image") {
modale_window.innerHTML = `
<img src="${ids[card_id]['url']}" alt="${ids[card_id]['title']}" class="card-img">
<p id="explanation">${ids[card_id]['explanation']}</p>
`;
setWallpaper.addEventListener("click", function () {
updateWallpaper(card_id[card_id]['hdurl']);
});
} else {
const host = new URL(ids[card_id]['url']);
if (["youtube.com", "youtu.be", "yt.be"].includes(host.hostname.replace("www.", ""))) {
ids[card_id]['url'] = `https://yt.dc09.ru${host.pathname}`
}
modale_window.innerHTML = `
<iframe style="display: block; margin: auto; border-radius: 13px;"
width="440"
height="250"
src=${ids[card_id]['url']}
allowFullScreen></iframe>
<p id="explanation">${ids[card_id]['explanation']}</p>
`
setWallpaper.addEventListener("click", function () {
updateWallpaper(`https://ytproxy.dc09.ru/vi/${ids[card_id]['url'].substring(25)}/maxresdefault.jpg?host=i.ytimg.com`)
});
}
if (ids[card_id]['copyright'] !== undefined) {
return modale_window.innerHTML += `<p>© ${ids[card_id]['copyright']}</p>`;
}
$(window).scroll(function () {
if (($(window).scrollTop() > $(document).height() - $(window).height() - 100)) {
$(".preloader").show();
$(window).off("scroll");
startDate.setDate(startDate.getDate() - 1);
endDate.setDate(endDate.getDate() - 15);
endDate.setMonth(endDate.getMonth() - 1);
$.ajax({
url: "https://api.nasa.gov/planetary/apod",
data: {
api_key: apiKEY,
start_date: `${endDate.getUTCFullYear()}-${endDate.getUTCMonth() + 1}-${endDate.getUTCDate()}`,
end_date: `${startDate.getUTCFullYear()}-${startDate.getUTCMonth() + 1}-${startDate.getUTCDate()}`,
},
success: function (data) {
wallpaperLoad(data);
$(window).on("scroll");
},
});
}
});
});
}
function updateWallpaper(url) {
$.ajax({
url: "http://localhost:4000/api/update/wallpaper",
type: "POST",
data: { url: url },
success: function (data) {
if (data.status) notify(data.message)
},
});
}
function notify(message) {
if (!("Notification" in window)) return null;
else if (Notification.permission === "granted") {
new Notification(message);
}
else if (Notification.permission !== "denied") {
Notification.requestPermission(function (permission) {
if (permission === "granted") {
new Notification(message);
}
}).then(r => console.log(r));
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -25,10 +25,6 @@
border-radius: 16px; border-radius: 16px;
} }
lottie-player {
margin: 0 auto;
}
.modal-content { .modal-content {
background-color: #131313; background-color: #131313;
color: white; color: white;
@ -68,20 +64,6 @@ lottie-player {
top: 0; top: 0;
} }
#favorite {
width: 130px;
height: 130px;
margin: -17px;
}
#favorite:hover {
cursor: pointer;
}
#favorite:active {
transform: scale(0.9);
}
#setWallpaper:disabled { #setWallpaper:disabled {
cursor: unset; cursor: unset;
transform: none; transform: none;

File diff suppressed because one or more lines are too long

104
main.go
View file

@ -1,104 +1,40 @@
package main package main
import ( import (
"github.com/Redume/Starlio/api/controllers" "github.com/Redume/EveryNASA/api/controllers"
"github.com/Redume/Starlio/utils" "github.com/Redume/EveryNASA/utils"
"github.com/getlantern/systray"
"github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cors" "github.com/gofiber/fiber/v2/middleware/favicon"
"github.com/skratchdot/open-golang/open"
) )
func main() { func main() {
go open.Run("http://localhost:3000") go utils.CheckLogs()
go utils.Database() app := fiber.New(fiber.Config{
go systray.Run(utils.Tray, utils.Quit) AppName: "EveryNASA",
go utils.StartWallpaper() })
app.Static("/static", "./interface/static")
app.Use(favicon.New(favicon.Config{
File: "./interface/static/assets/icons/favicon.ico",
URL: "/favicon.ico",
}))
app := fiber.New() app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendFile("./interface/page/gallery.html")
app = fiber.New(fiber.Config{
ErrorHandler: func(ctx *fiber.Ctx, err error) error {
code := fiber.StatusInternalServerError
if e, ok := err.(*fiber.Error); ok {
code = e.Code
}
if code == fiber.StatusNotFound {
return ctx.SendFile("./web/errors/404.html")
}
return nil
},
}) })
app.Static("/static", "./web/static") app.Get("/about", func(ctx *fiber.Ctx) error {
app.Use(cors.New()) return ctx.SendFile("./interface/page/about.html")
app.Get("/", func(c *fiber.Ctx) error {
con := utils.Connected()
if con == false {
return c.SendFile("./web/errors/500.html")
}
return c.SendFile("./web/page/gallery.html")
})
app.Get("/settings", func(c *fiber.Ctx) error {
con := utils.Connected()
if con == false {
return c.SendFile("./web/errors/500.html")
}
return c.SendFile("./web/page/settings.html")
})
app.Get("/about", func(c *fiber.Ctx) error {
return c.SendFile("./web/page/about.html")
})
app.Get("/favorite", func(c *fiber.Ctx) error {
return c.SendFile("./web/page/favorite.html")
}) })
api := app.Group("/api") api := app.Group("/api")
update := api.Group("/update") update := api.Group("/update")
get := api.Group("/get")
add := api.Group("/add")
del := api.Group("/del")
create := api.Group("/create")
update.Post("/settings", func(c *fiber.Ctx) error { update.Post("/wallpaper", func(ctx *fiber.Ctx) error {
return controllers.SettingsUpdate(c) return controllers.SetWallpaper(ctx)
})
update.Post("/wallpaper", func(c *fiber.Ctx) error {
return controllers.WallpaperUpdate(c)
})
update.Post("/startup", func(c *fiber.Ctx) error {
return controllers.Startup(c)
}) })
create.Post("/label", func(c *fiber.Ctx) error { err := app.Listen(":4000")
return controllers.CreateLabel(c)
})
get.Get("/settings", func(c *fiber.Ctx) error {
return controllers.SettingsGet(c)
})
get.Get("/favorites", func(c *fiber.Ctx) error {
return controllers.GetFavorites(c)
})
add.Post("/favorite", func(c *fiber.Ctx) error {
return controllers.AddFavorite(c)
})
del.Post("/favorite", func(c *fiber.Ctx) error {
return controllers.DeleteFavorite(c)
})
err := app.Listen(":3000")
if err != nil { if err != nil {
return utils.Log(err.Error())
} }
} }

View file

@ -1,11 +0,0 @@
package utils
import "net/http"
func Connected() (ok bool) {
_, err := http.Get("http://clients3.google.com/generate_204")
if err != nil {
return false
}
return true
}

View file

@ -1,55 +0,0 @@
package utils
import (
"os"
"github.com/go-ole/go-ole"
"github.com/go-ole/go-ole/oleutil"
)
func CreateLnk(src, dst string) error {
err := ole.CoInitializeEx(0, ole.COINIT_APARTMENTTHREADED|ole.COINIT_SPEED_OVER_MEMORY)
if err != nil {
Logger(err.Error())
}
oleShellObject, err := oleutil.CreateObject("WScript.Shell")
if err != nil {
Logger(err.Error())
}
defer oleShellObject.Release()
wshell, err := oleShellObject.QueryInterface(ole.IID_IDispatch)
if err != nil {
Logger(err.Error())
}
defer wshell.Release()
cs, err := oleutil.CallMethod(wshell, "CreateShortcut", dst)
if err != nil {
Logger(err.Error())
}
idispatch := cs.ToIDispatch()
_, err = oleutil.PutProperty(idispatch, "TargetPath", src)
if err != nil {
Logger(err.Error())
}
dir, err := os.Getwd()
if err != nil {
Logger(err.Error())
}
_, err = oleutil.PutProperty(idispatch, "WorkingDirectory", dir)
if err != nil {
Logger(err.Error())
}
_, err = oleutil.CallMethod(idispatch, "Save")
if err != nil {
Logger(err.Error())
}
return nil
}

View file

@ -5,10 +5,10 @@ import (
_ "github.com/mattn/go-sqlite3" _ "github.com/mattn/go-sqlite3"
) )
func Database() { func CreateDatabase() {
db, err := sql.Open("sqlite3", "Starlio.db") db, err := sql.Open("sqlite3", "EveryNasa.db")
if err != nil { if err != nil {
Logger(err.Error()) Log(err.Error())
} }
if !TableExists(db, "settings") { if !TableExists(db, "settings") {
@ -21,43 +21,25 @@ func Database() {
_, err = db.Exec(sqlTable) _, err = db.Exec(sqlTable)
if err != nil { if err != nil {
Logger(err.Error()) Log(err.Error())
} }
stmt, err := db.Prepare("INSERT INTO settings(startup, wallpaper, save_logg) values(?,?,?)") stmt, err := db.Prepare("INSERT INTO settings(startup, wallpaper, save_logg) values(?,?,?)")
if err != nil { if err != nil {
Logger(err.Error()) Log(err.Error())
} }
_, err = stmt.Exec(0, 0, 1) _, err = stmt.Exec(0, 0, 1)
if err != nil { if err != nil {
Logger(err.Error()) Log(err.Error())
}
}
if !TableExists(db, "favorite") {
sqlTable := `
CREATE TABLE IF NOT EXISTS favorite (
title TEXT,
explanation TEXT,
copyright TEXT,
date TEXT,
url TEXT,
hdurl TEXT,
media_type TEXT
);`
_, err = db.Exec(sqlTable)
if err != nil {
Logger(err.Error())
} }
} }
} }
func GetDatabase() *sql.DB { func GetDatabase() *sql.DB {
db, err := sql.Open("sqlite3", "Starlio.db") db, err := sql.Open("sqlite3", "EveryNasa.db")
if err != nil { if err != nil {
Logger(err.Error()) Log(err.Error())
} }
return db return db
@ -67,7 +49,7 @@ func TableExists(db *sql.DB, name string) bool {
var exists bool var exists bool
err := db.QueryRow("SELECT EXISTS(SELECT name FROM sqlite_master WHERE type='table' AND name=?)", name).Scan(&exists) err := db.QueryRow("SELECT EXISTS(SELECT name FROM sqlite_master WHERE type='table' AND name=?)", name).Scan(&exists)
if err != nil { if err != nil {
Logger(err.Error()) Log(err.Error())
} }
return exists return exists

View file

@ -1,70 +1,64 @@
package utils package utils
import ( import (
"encoding/json"
"fmt" "fmt"
"gopkg.in/toast.v1"
"os" "os"
"runtime" "strconv"
"strings"
"time" "time"
"github.com/rodkranz/fetch"
) )
func Logger(text string) { func Log(text string) {
now := time.Now() timestamps := time.Now()
logFile := string(timestamps.Format("02.01.06")) + ".log"
file := string(now.Format("02.01.2006")) + ".log" if !FileExists("log") {
os.Mkdir("log", 0755)
}
if !FileExists("log/" + logFile) {
file, _ := os.Create("log/" + logFile)
if getDatabase() == 0 { defer func(file *os.File) {
file.Close()
}(file)
}
file, _ := os.OpenFile("log/"+logFile, os.O_APPEND|os.O_WRONLY, 0600)
fileText := timestamps.Format("15:04:05") + " | " + text + "\n"
file.Write([]byte(fileText))
fmt.Println(fileText)
dir, _ := os.Getwd()
dir = dir + "\\log\\" + logFile
fmt.Println("Error has been save to " + dir)
Notify(
"There was an error",
"An unknown error occurred, the error was recorded in the log file",
toast.Action{Type: "protocol", Label: "View log file", Arguments: dir},
)
}
func CheckLogs() {
if !FileExists("log") {
return return
} }
if !FileExists("logs") { files, err := os.ReadDir("log")
err := CreateFolder("logs")
if err != nil {
panic(err)
}
}
if !FileExists("./logs/" + file) {
err := CreateFile(file)
if err != nil {
panic(err)
}
}
f, err := os.OpenFile("logs/"+file, os.O_APPEND|os.O_WRONLY, 0600)
if err != nil { if err != nil {
panic(err) panic(err)
} }
_, file, line, ok := runtime.Caller(1) for _, f := range files {
fileTimestamps, _ := strconv.Atoi(f.Name()[:2])
timestamps := time.Now().Day()
if !ok { if timestamps-fileTimestamps >= 7 {
file = "???" os.Remove("log/" + f.Name())
} }
dir, err := os.Getwd()
if err != nil {
Logger(err.Error())
}
if strings.Contains(file, dir) {
file = strings.Replace(file, dir, "", -1)
}
var lineString string
if ok {
lineString = fmt.Sprintf("%d", line)
}
_, err = f.Write([]byte(now.Format("15:04:05") + " | " + text + " [" + file + "] [" + lineString + "]\n"))
if err != nil {
panic(err)
} }
} }
func FileExists(name string) bool { func FileExists(name string) bool {
if _, err := os.Stat(name); err != nil { if _, err := os.Stat(name); err != nil {
if os.IsNotExist(err) { if os.IsNotExist(err) {
@ -73,51 +67,3 @@ func FileExists(name string) bool {
} }
return true return true
} }
func CreateFile(name string) error {
file, err := os.Create("logs/" + name)
if err != nil {
return nil
}
defer func(file *os.File) {
err := file.Close()
if err != nil {
}
}(file)
return nil
}
func CreateFolder(name string) error {
err := os.Mkdir(name, 0755)
if err != nil {
return err
}
return nil
}
func getDatabase() int {
client := fetch.NewDefault()
res, err := client.Get("http://localhost:3000/api/get/settings", nil)
if err != nil {
panic(err)
}
body, err := res.ToString()
if err != nil {
panic(err)
}
type DatabaseStruct struct {
Save_logg int `json:"save_logg"`
}
var Database DatabaseStruct
err = json.Unmarshal([]byte(body), &Database)
if err != nil {
panic(err)
}
return Database.Save_logg
}

20
utils/notify.go Normal file
View file

@ -0,0 +1,20 @@
package utils
import "gopkg.in/toast.v1"
func Notify(title, message string, action toast.Action) {
notification := toast.Notification{
AppID: "EveryNASA",
Title: title,
Message: message,
Duration: toast.Long,
Actions: []toast.Action{
action,
},
}
err := notification.Push()
if err != nil {
panic(err)
}
}

View file

@ -1,66 +0,0 @@
package utils
import (
"fmt"
"os"
"github.com/getlantern/systray"
"github.com/shirou/gopsutil/v3/process"
"github.com/skratchdot/open-golang/open"
)
func Tray() {
systray.SetIcon(GetIcon("web/static/image/icons/icon.ico"))
systray.SetTitle("Starlio")
systray.SetTooltip("Starlio")
ui := systray.AddMenuItem("Open UI", "Open UI")
exit := systray.AddMenuItem("Quit", "Quit the whole app")
for {
select {
case <-ui.ClickedCh:
err := open.Run("http://localhost:3000")
if err != nil {
Logger(err.Error())
}
case <-exit.ClickedCh:
Quit()
}
}
}
func Quit() {
err := KillProcess("Starlio.exe")
if err != nil {
Logger(err.Error())
}
systray.Quit()
}
func KillProcess(name string) error {
processes, err := process.Processes()
if err != nil {
Logger(err.Error())
}
for _, p := range processes {
n, err := p.Name()
if err != nil {
Logger(err.Error())
}
if n == name {
return p.Kill()
}
}
return fmt.Errorf("process not found")
}
func GetIcon(s string) []byte {
b, err := os.ReadFile(s)
if err != nil {
Logger(err.Error())
}
return b
}

View file

@ -1,108 +0,0 @@
package utils
import (
"encoding/json"
"time"
"github.com/jasonlvhit/gocron"
"github.com/reujab/wallpaper"
"github.com/rodkranz/fetch"
)
func GetWallpaper(date string) string {
type WallpaperStruct struct {
Hdurl string `json:"hdurl"`
Url string `json:"url"`
Media_type string `json:"media_type"`
}
client := fetch.NewDefault()
res, err := client.Get("https://api.nasa.gov/planetary/apod?api_key=1gI9G84ZafKDEnrbydviGknReOGiVK9jqrQBE3et&date="+
date,
nil)
if err != nil {
Logger(err.Error())
}
body, err := res.ToString()
if err != nil {
Logger(err.Error())
}
var Wallpaper WallpaperStruct
err = json.Unmarshal([]byte(body), &Wallpaper)
if err != nil {
Logger(err.Error())
}
if Wallpaper.Media_type == "video" {
return "https://img.youtube.com/vi/" + Wallpaper.Url[30:41] + "/maxresdefault.jpg"
}
return Wallpaper.Hdurl
}
func SetWallpaper() {
times := time.Now()
t := time.Date(times.Year(),
times.Month(),
times.Day(),
times.Hour(),
times.Minute(),
times.Second(),
times.Nanosecond(),
time.UTC)
err := wallpaper.SetFromURL(GetWallpaper(t.Format("2006-01-02")))
if err != nil {
t = t.AddDate(0, 0, -1)
err = wallpaper.SetFromURL(GetWallpaper(t.Format("2006-01-02")))
if err != nil {
Logger(err.Error())
}
}
}
func StartWallpaper() {
type Autostart struct {
Wallpaper int `json:"wallpaper"`
}
client := fetch.NewDefault()
res, err := client.Get("http://localhost:3000/api/get/settings", nil)
if err != nil {
Logger(err.Error())
}
body, err := res.ToString()
if err != nil {
Logger(err.Error())
}
var AutostartSetWallpaper Autostart
err = json.Unmarshal([]byte(body), &AutostartSetWallpaper)
if err != nil {
Logger(err.Error())
}
if AutostartSetWallpaper.Wallpaper == 1 {
times := time.Now()
t := time.Date(times.Year(),
times.Month(),
times.Day(),
4,
50,
times.Second(),
times.Nanosecond(),
time.UTC)
SetWallpaper()
err = gocron.Every(1).Day().From(&t).Do(SetWallpaper)
if err != nil {
Logger(err.Error())
}
gocron.Start()
}
}

View file

@ -1,37 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Starlio</title>
<link rel="icon" href="/image/icons/favicon.png">
</head>
<style>
* {
line-height: 1.2;
margin: 0;
}
lottie-player {
margin: 0 auto;
width: 300px; height: 300px;
}
p {
font-family: sans-serif;
text-align: center;
margin: 0.4% auto;
width: 300px;
}
a:visited {
color: #9FA4AF;
}
</style>
<body style="background: #131313; color: white;">
<lottie-player src="/static/image/lottie/lf20_2QSlz3Li88.json" background="transparent" speed="1" loop autoplay></lottie-player>
<p style="font-size: 160%;">Page not found!</p>
<p style="font-size: 115%;">Sorry, but the page you want to view may have been deleted or moved!</p>
<p><a style="font-size: 1em;" href="/">General page</a></p>
<script src="/static/scripts/lottie-player.js"></script>
</body>
</html>

View file

@ -1,35 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Starlio</title>
<link rel="icon" href="/static/image/icons/favicon.png">
<style>
lottie-player {
margin: 2% auto;
width: 250px;
height: 250px;
}
p {
font-family: sans-serif;
text-align: center;
font-size: 130%;
}
li {
font-family: sans-serif;
margin-top: 3%;
margin-left: 43%
}
</style>
</head>
<body style="background: #131313; color: white;">
<lottie-player src="/static/image/lottie/lf20_3FGZxC.json" background="transparent" speed="0.5" style="width: 250px; height: 250px;" loop autoplay></lottie-player>
<p style="margin: 3% auto; font-size: 1.7em;">No internet connection</p>
<p style="margin: -2% auto; font-size: 1.2em;">Try to do the following:</p>
<li>Check the network cables, modem and router.</li>
<li style="margin-top: 1%; margin-left: 43%">Connect to the Wi-Fi network again.</li>
<script src="static/scripts/lottie-player.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

View file

@ -1,97 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Starlio</title>
<link rel="icon" href="/static/image/icons/favicon.png">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
<link rel="stylesheet" href="/static/style/gallery.css" type="text/css">
<link rel="stylesheet" href="/static/style/favorite.css" type="text/css">
</head>
<nav class="navbar navbar-expand-lg bg-dark navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="/" draggable="false">
<img src="/static/image/icons/favicon.png" width="45" alt="Starlio">
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="/">Gallery</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/favorite">Favorite</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/settings">Settings</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about">About</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="modal fade" id="WallpaperModal" aria-hidden="true" aria-labelledby="WallpaperModal" tabindex="-1" style="color: black;">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="WallpaperModale">
<span class="d-inline-block text-truncate w-modal-title" style="max-width: 429px;"></span>
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body"></div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
<div class="container">
<header class="header-row"></header>
</div>
<div class="preloader">
<lottie-player src="https://assets4.lottiefiles.com/datafiles/a3YH0ragZcwfKHS/data.json" background="transparent" speed="1" style="width: 600px; height: 600px;" loop autoplay></lottie-player>
</div>
<body>
<script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.min.js" integrity="sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz" crossorigin="anonymous"></script>
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<script src="/static/scripts/gallery.js" type="application/javascript"></script>
<script type="application/javascript">
$(document).ready(function () {
$.ajax({
url: "http://localhost:3000/api/get/favorites",
type: "GET",
success: function(data) {
console.log(data);
if(data === null) {
$(".preloader").hide();
$("body").append(`
<lottie-player id="star"
src="https://assets2.lottiefiles.com/private_files/lf30_rcvcAS.json"
background="transparent"
autoplay
speed="1">
</lottie-player>
<div class="container">
<div class="row">
<div class="col-12">
<h1 class="text-center" style="color: white; margin-top: -5%">You don't have any favorites</h1>
</div>
</div>
</div>
`);
}
wallpaperLoad(data);
},
});
});
</script>
</body>
</html>

View file

@ -1,97 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Starlio</title>
<link rel="icon" href="/static/image/icons/favicon.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
<link rel="stylesheet" href="/static/style/gallery.css" type="text/css">
</head>
<body style="background: #131313; color: white;">
<nav class="navbar navbar-expand-lg bg-dark navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="/">
<img src="/static/image/icons/favicon.png" width="45" alt="Starlio">
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/">Gallery</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/favorite">Favorite</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/settings">Settings</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about">About</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="modal fade" id="WallpaperModal" aria-hidden="true" aria-labelledby="WallpaperModal" tabindex="-1" style="color: black;">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="WallpaperModale">
<span class="d-inline-block text-truncate w-modal-title" style="max-width: 429px;"></span>
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body"></div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
<div class="container">
<header class="header-row"></header>
</div>
<div class="preloader">
<lottie-player src="https://assets4.lottiefiles.com/datafiles/a3YH0ragZcwfKHS/data.json" background="transparent" speed="1" style="width: 600px; height: 600px;" loop autoplay></lottie-player>
</div>
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="liveToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<img src="/static/image/icons/favicon.png" class="rounded me-2" alt="Starlio" width="30">
<strong class="me-auto" style="color: black;">Starlio</strong>
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
<div class="toast-body" style="color: black;"></div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.min.js" integrity="sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz" crossorigin="anonymous"></script>
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.10.0/lottie.min.js"></script>
<script src="/static/scripts/gallery.js" type="application/javascript"></script>
<script type="application/javascript">
startDate.setDate(startDate.getUTCDate() - 17);
$(document).ready(function() {
$.ajax({
url: "https://api.nasa.gov/planetary/apod",
type: "GET",
data: {
api_key: apiKEY,
start_date: `${startDate.getUTCFullYear()}-${startDate.getUTCMonth() + 1}-${startDate.getUTCDate()}`,
end_date: `${endDate.getUTCFullYear()}-${endDate.getUTCMonth() + 1}-${endDate.getUTCDate()}`,
},
success: function(data) {
data.reverse();
wallpaperLoad(data);
},
});
});
</script>
</body>
</html>

View file

@ -1,86 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Starlio</title>
<link rel="icon" href="/static/image/icons/favicon.png">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
<link rel="stylesheet" href="/static/style/settings.css" type="text/css">
</head>
<body style="background: #131313; color: white;">
<nav class="navbar navbar-expand-lg bg-dark navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="/" draggable="false">
<img src="/static/image/icons/favicon.png" width="45" alt="Starlio">
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="/">Gallery</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/favorite">Favorite</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/settings">Settings</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about">About</a>
</li>
</ul>
</div>
</div>
</nav>
<h1 id="title">Application Settings</h1>
<div class="container">
<header class="header-row">
<div class="settings">
<p class="title"><strong>Add a program to the startup</strong></p>
<p class="desc">EverNasa will automatically start when you log in.</p>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="settings_startupSwitch">
<label class="form-check-label" for="settings_startupTogglerName" id="settings_startupTogglerName">Off</label>
</div>
</div>
<div class="settings">
<p class="title"><strong>Auto-change of desktop wallpaper</strong></p>
<p class="desc">Starlio will automatically change the desktop wallpaper at startup as well as every day.</p>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="settings_autoSetWallpaperSwitch">
<label class="form-check-label" for="settings_autoSetWallpaperTogglerName" id="settings_autoSetWallpaperTogglerName">Off</label>
</div>
</div>
<div class="settings">
<p class="title"><strong>Create log files</strong></p>
<p class="desc">Starlio will create files in which errors will be written that will help developers when correcting errors.</p>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="settings_saveLoggSwitch">
<label class="form-check-label" for="settings_saveLoggTogglerName" id="settings_saveLoggTogglerName">Off</label>
</div>
</div>
<div class="settings">
<p class="title"><strong>Create an application shortcut</strong></p>
<p class="desc">Starlio will create an application shortcut on your desktop.</p>
<button type="button" class="btn btn-outline-primary" id="createLabelButton">Create</button>
</div>
</header>
</div>
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="liveToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<img src="/static/image/icons/favicon.png" class="rounded me-2" alt="Starlio" width="30">
<strong class="me-auto" style="color: black;">Starlio</strong>
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
<div class="toast-body" style="color: black;"></div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.min.js" integrity="sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz" crossorigin="anonymous"></script>
<script src="/static/scripts/switch.js" type="application/javascript"></script>
<script src="/static/scripts/createLabel.js" type="application/javascript"></script>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

File diff suppressed because one or more lines are too long

View file

@ -1,20 +0,0 @@
let button = document.querySelector("#createLabelButton");
button.addEventListener("click", function() {
$.ajax({
url: "http://localhost:3000/api/create/label",
type: "POST",
success: function(data) {
if(data.status) {
$(".toast-body").text(data.message);
let toastLiveExample = document.getElementById('liveToast');
let toast = new bootstrap.Toast(toastLiveExample);
toast.show();
} else {
$(".toast-body").text("An error occurred while creating the label.");
let toastLiveExample = document.getElementById('liveToast');
let toast = new bootstrap.Toast(toastLiveExample);
toast.show();
}
}
});
});

View file

@ -1,299 +0,0 @@
const startDate = new Date();
const endDate = new Date();
const ids = [];
let id = 0;
const apiKEY = "1gI9G84ZafKDEnrbydviGknReOGiVK9jqrQBE3et";
function wallpaperLoad(data) {
$(".preloader").hide();
for (let i = 0; i < data.length; i++, id++) {
ids.push(data[i]);
if (ids.filter((item) => item['url'] === data[i]['url']).length > 1) {
continue;
}
let image = new Image();
image.src = ids[id]['media_type'] === "video" ?
`https://img.youtube.com/vi/${ids[id]['url'].slice(30, 41)}/maxresdefault.jpg` :
ids[id]['url'];
image.onload = function() {
if(image.width+image.height !== 210) {
$(`img[data-src="${image.src}"]`).attr("src", `${image.src}`);
}
}
if (ids[id]['media_type'] === "image") {
$(".header-row").append(`
<div class="card">
<a data-bs-toggle="modal" href="#WallpaperModal" role="button">
<img src="${ids[id]['url']}" alt="${ids[id]['title']}" class="card-img-top shimmer" id="${id}">
</a>
</div>
`);
} else {
$(".header-row").append(`
<div class="card">
<a data-bs-toggle="modal" href="#WallpaperModal" role="button">
<img src="http://localhost:3000/static/image/placeholder.png"
data-src="https://img.youtube.com/vi/${ids[id]['url'].slice(30, 41)}/maxresdefault.jpg"
alt="${ids[id]['title']}"
class="card-img-top shimmer"
id="${id}">
</a>
</div>
`);
}
}
$(".card-img-top").on("load", function() {
$(this).removeClass("shimmer");
});
const button_modal = document.querySelector(".header-row");
button_modal.addEventListener("click", function (event) {
if (event.target === button_modal) {
return;
}
let id = event.target.getAttribute("id");
let img = document.querySelector(".modal-body");
let title = document.querySelector(".w-modal-title");
let button = document.querySelector(".modal-footer");
if($(`img#${id}.card-img-top`).attr("src") !== "http://localhost:3000/static/image/placeholder.png") {
button.innerHTML = `<lottie-player id="favorite"
src="https://assets2.lottiefiles.com/private_files/lf30_rcvcAS.json"
background="transparent"
speed="1">
</lottie-player>
<button type="button" class="btn btn-primary" id="setWallpaper">Set Wallpaper</button>
`;
} else {
button.innerHTML = `<lottie-player id="favorite"
src="https://assets2.lottiefiles.com/private_files/lf30_rcvcAS.json"
background="transparent"
speed="1">
</lottie-player>
<button type="button"
class="btn"
id="setWallpaper"
disabled
style="background-color: grey; color: white;">
Set Wallpaper
</button>
`;
}
const setWallpaper = document.querySelector("#setWallpaper");
const favorite = document.querySelector("#favorite");
$.ajax({
url: "http://localhost:3000/api/get/favorites",
type: "GET",
data: {
title: ids[id]['title'],
},
success: function (data) {
if (data !== "No favorites found") {
favorite.setDirection(1);
favorite.play();
}
},
})
ids[id]['copyright'] = ids[id]['copyright'] === undefined ? "NASA" : ids[id]['copyright'];
const explanation = ids[id]['explanation'].length > 200 ?
ids[id]['explanation'].slice(0, 200) + "..." :
ids[id]['explanation'];
if (ids[id]['media_type'] === "image") {
title.innerHTML = `<h5 class="modal-title">${ids[id]['title']}</h5>`;
img.innerHTML = `
<img src="${ids[id]['url']}" alt="${ids[id]['title']}" class="card-img">
<p><strong>Author:</strong> ${ids[id]['copyright']}</p>
<p><strong>Date of publication:</strong> ${ids[id]['date']}</p>
<p><strong>Explanation:</strong> ${explanation}</p>
<button type="button" class="show-more btn btn-primary" id="show-more">Show more</button>
`;
setWallpaper.addEventListener("click", function () {
wallpaperUpdate(ids[id]['hdurl']);
});
} else {
title.innerHTML = `<h5 class="modal-title">${ids[id]['title']}</h5>`;
img.innerHTML = `
<iframe width="460"
height="315"
src="${ids[id]['url']}"
title="YouTube video player"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen></iframe>
<p><strong>Author:</strong> ${ids[id]['copyright']}</p>
<p><strong>Date of publication:</strong> ${ids[id]['date']}</p>
<p><strong>Explanation:</strong> ${explanation}</p>
<button type="button" class="show-more btn btn-primary" id="show-more">Show more</button>
`;
setWallpaper.addEventListener("click", function () {
wallpaperUpdate(`https://img.youtube.com/vi/${ids[id]['url'].slice(30, 41)}/maxresdefault.jpg`);
});
}
favorite.addEventListener("click", function() {
$.ajax({
url: "http://localhost:3000/api/get/favorites",
type: "GET",
data: {
title: ids[id]['title'],
},
success: function(data) {
if (data === "No favorites found") {
if (ids[id]['media_type'] === "image") {
favoriteAdd(ids[id]['title'],
ids[id]['explanation'],
ids[id]['copyright'],
ids[id]['date'],
ids[id]['url'],
ids[id]['hdurl'],
ids[id]['media_type'],
);
} else {
favoriteAdd(ids[id]['title'],
ids[id]['explanation'],
ids[id]['copyright'],
ids[id]['date'],
`https://img.youtube.com/vi/${ids[id]['url'].slice(30, 41)}/0.jpg`,
`https://img.youtube.com/vi/${ids[id]['url'].slice(30, 41)}/maxresdefault.jpg`,
ids[id]['media_type'],
);
}
favorite.setDirection(1);
favorite.play()
} else {
favoriteRemove(ids[id]['title']);
favorite.setDirection(-1);
favorite.play();
}
}
});
});
let showMore = document.querySelector("#show-more");
showMore.addEventListener("click", function () {
let explanation = document.querySelector(".modal-body p:nth-child(4)");
if(showMore.innerHTML === "Show more") {
explanation.innerHTML = `<strong>Explanation:</strong> ${ids[id]['explanation']}`;
showMore.innerHTML = "Show less";
} else {
explanation.innerHTML = `<strong>Explanation:</strong> ${ids[id]['explanation'].length > 200 ? ids[id]['explanation'].slice(0, 200) + "..." : ids[id]['explanation']}`;
showMore.innerHTML = "Show more";
}
});
});
$(window).scroll(function () {
if (($(window).scrollTop() > $(document).height() - $(window).height() - 100)) {
$(".preloader").show();
$(window).off("scroll");
startDate.setDate(startDate.getDate() - 1);
endDate.setDate(endDate.getDate() - 15);
endDate.setMonth(endDate.getMonth() - 1);
$.ajax({
url: "https://api.nasa.gov/planetary/apod",
data: {
api_key: apiKEY,
start_date: `${endDate.getUTCFullYear()}-${endDate.getUTCMonth() + 1}-${endDate.getUTCDate()}`,
end_date: `${startDate.getUTCFullYear()}-${startDate.getUTCMonth() + 1}-${startDate.getUTCDate()}`,
},
success: function (data) {
wallpaperLoad(data);
$(window).on("scroll");
},
});
}
});
}
/**
* @param url {String} Url of the image to be set as wallpaper
*/
function wallpaperUpdate(url) {
$.ajax({
url: "http://localhost:3000/api/update/wallpaper",
type: "POST",
data: {
url: url,
},
success: function (data) {
$(".toast-body").text(data.message);
let toastLiveExample = document.getElementById('liveToast');
let toast = new bootstrap.Toast(toastLiveExample);
toast.show();
},
});
}
/**
* @param title {String} Title of the image
* @param explanation {String} Explanation of the image
* @param copyright {String} Author of the image
* @param date {String} Date of publication
* @param url {String} Url of the image
* @param hdurl {String} Url of the image in high definition
* @param media_type {String} Type of media
*/
function favoriteAdd(title, explanation, copyright, date, url, hdurl, media_type) {
$.ajax({
url: "http://localhost:3000/api/add/favorite",
type: "POST",
data: {
title: title,
explanation: explanation,
date: date,
url: url,
hdurl: hdurl,
media_type: media_type,
},
success: function (data) {
$(".toast-body").text(data.message);
let toastLiveExample = document.getElementById('liveToast');
let toast = new bootstrap.Toast(toastLiveExample);
toast.show();
},
});
}
/**
* @param title {String} Title of the image
*/
function favoriteRemove(title) {
$.ajax({
url: "http://localhost:3000/api/del/favorite",
type: "POST",
data: {
title: title,
},
success: function (data) {
$(".toast-body").text(data.message);
let toastLiveExample = document.getElementById('liveToast');
let toast = new bootstrap.Toast(toastLiveExample);
toast.show();
},
});
}

File diff suppressed because one or more lines are too long

View file

@ -1,198 +0,0 @@
$(document).ready(async function() {
const $startupSwitch = $("#settings_startupSwitch");
const $startupSwitchTogglerName = $("#settings_startupTogglerName");
const $wallpaperSwitch = $("#settings_autoSetWallpaperSwitch");
const $wallpaperSwitchTogglerName = $("#settings_autoSetWallpaperTogglerName");
const $loggingSwitch = $("#settings_saveLoggSwitch");
const $loggingSwitchTogglerName = $("#settings_saveLoggTogglerName");
getSettings().then((data) => {
if (data["wallpaper"] === 1) {
$wallpaperSwitch.attr("checked", "true");
$wallpaperSwitchTogglerName.text("On");
}
if (data["startup"] === 1) {
$startupSwitch.attr("checked", "true");
$startupSwitchTogglerName.text("On");
}
if (data["save_logg"] === 1) {
$loggingSwitch.attr("checked", "true");
$loggingSwitchTogglerName.text("On");
}
});
$wallpaperSwitch.click(async function () {
$.ajax({
url: "http://localhost:3000/api/get/settings",
type: "GET",
success: function (data) {
if (data["wallpaper"] === 1) {
$.ajax({
url: "http://localhost:3000/api/update/settings",
type: "POST",
data: {
"wallpaper": 0,
},
success: function (data) {
if (data["status"]) {
$wallpaperSwitchTogglerName.text("Off");
$wallpaperSwitch.removeAttr("checked");
toast(data.message);
} else {
toast("Failed to apply settings.");
}
},
});
} else {
$.ajax({
url: "http://localhost:3000/api/update/settings",
type: "POST",
data: {
"wallpaper": 1,
},
success: function (data) {
if (data["status"]) {
$wallpaperSwitchTogglerName.text("On");
$wallpaperSwitch.attr("checked", "true");
toast(data.message);
} else {
toast("Failed to apply settings.");
}
},
});
}
},
})
});
$startupSwitch.click(async function () {
$.ajax({
url: "http://localhost:3000/api/get/settings",
type: "GET",
success: function (data) {
if (data["startup"] === 1) {
$.ajax({
url: "http://localhost:3000/api/update/settings",
type: "POST",
data: {
"startup": 0,
},
success: async function (data) {
if (data["status"]) {
await editStartup(0);
$startupSwitchTogglerName.text("Off");
$startupSwitch.removeAttr("checked");
toast(data.message);
} else {
toast("Failed to apply settings.");
}
},
});
} else {
$.ajax({
url: "http://localhost:3000/api/update/settings",
type: "POST",
data: {
"startup": 1,
},
success: async function (data) {
if (data["status"]) {
await editStartup(1);
$startupSwitchTogglerName.text("On");
$startupSwitch.attr("checked", "true");
toast(data.message);
} else {
toast("Failed to apply settings.");
}
},
});
}
},
});
});
$loggingSwitch.click(async function () {
$.ajax({
url: "http://localhost:3000/api/get/settings",
type: "GET",
success: function (data) {
if (data["save_logg"] === 1) {
$.ajax({
url: "http://localhost:3000/api/update/settings",
type: "POST",
data: {
"save_logg": 0,
},
success: function (data) {
if (data["status"]) {
$loggingSwitchTogglerName.text("Off");
$loggingSwitch.removeAttr("checked");
toast(data.message);
} else {
toast("Failed to apply settings.");
}
},
});
} else {
$.ajax({
url: "http://localhost:3000/api/update/settings",
type: "POST",
data: {
"save_logg": 1,
},
success: function (data) {
if (data["status"]) {
$loggingSwitchTogglerName.text("On");
$loggingSwitch.attr("checked", "true");
toast(data.message);
} else {
toast("Failed to apply settings.");
}
},
});
}
},
});
});
});
function toast(message) {
if (message === null) {
return "Required parameter 'message' is missing.";
}
$(".toast-body").text(message);
let toastLiveExample = document.getElementById('liveToast');
let toast = new bootstrap.Toast(toastLiveExample);
toast.show();
}
function editStartup(i) {
if (i !== 1 || i !== 0 || i === null) {
return "Required parameter 'i' is missing.";
}
return $.ajax({
url: "http://localhost:3000/api/update/startup",
type: "POST",
data: {
"startup": i
},
});
}
function getSettings() {
return $.ajax({
url: "http://localhost:3000/api/get/settings",
type: "GET",
});
}

View file

@ -1,2 +0,0 @@
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))

View file

@ -1,44 +0,0 @@
p {
font-family: sans-serif;
}
#title {
font-size: 1.6em;
text-align: center;
margin-top: 1%;
}
#banner {
display: block;
margin-right: auto;
margin-left: auto;
margin-top: 1%;
}
#description, #dev {
font-size: 1.2em;
text-align: center;
}
#contact-image {
display: flex;
justify-content: center;
align-items: center;
margin-top: -0.5%;
}
#version {
font-size: 1em;
text-align: center;
margin-top: -0.5%;
color: #9FA4AF
}
#license a, #github a {
color: #a596bd;
}
#license, #github {
font-size: 1em;
text-align: center;
}

View file

@ -1,9 +0,0 @@
body {
background-color: #131313;
}
lottie-player {
width: 30%;
height: 30%;
margin-top: -10%;
}

View file

@ -1,36 +0,0 @@
#title {
margin-top: 0.6em;
margin-left: 0.8em;
}
.title {
margin-top: 2.3em;
}
.desc {
margin-top: -0.7em;
}
.settings {
margin-top: 2.4em;
}
.settings p, .form-check {
margin-left: -17.5em;
margin-top: -0.8em;
}
#createLabelButton {
margin-left: -17.6em;
}
.form-check-input {
position: relative;
left: 5px;
font-size: 18px;
}
.form-check-label {
margin-left: 5px;
margin-top: 2.2px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View file

@ -1,60 +0,0 @@
{
"RT_GROUP_ICON": {
"APP": {
"0000": [
"icon.png"
]
}
},
"RT_MANIFEST": {
"#1": {
"0409": {
"identity": {
"name": "Starlio",
"version": "2.3.3"
},
"description": "Automatic space wallpaper from Nasa",
"minimum-os": "win10",
"execution-level": "",
"ui-access": false,
"auto-elevate": false,
"dpi-awareness": "system",
"disable-theming": false,
"disable-window-filtering": false,
"high-resolution-scrolling-aware": false,
"ultra-high-resolution-scrolling-aware": false,
"long-path-aware": false,
"printer-driver-isolation": false,
"gdi-scaling": false,
"segment-heap": false,
"use-common-controls-v6": false
}
}
},
"RT_VERSION": {
"#1": {
"0000": {
"fixed": {
"file_version": "2.3.2",
"product_version": "2.3.2"
},
"info": {
"0409": {
"Comments": "",
"CompanyName": "Redume",
"FileDescription": "",
"FileVersion": "3.2.1",
"InternalName": "Starlio",
"LegalCopyright": "Redume",
"LegalTrademarks": "",
"OriginalFilename": "Starlio.exe",
"PrivateBuild": "",
"ProductName": "Starlio",
"ProductVersion": "2.3.2",
"SpecialBuild": ""
}
}
}
}
}
}

View file

@ -1,50 +0,0 @@
{
"product": "Starlio",
"company": "Redume",
"license": "LICENSE",
"upgrade-code": "4165e562-ab60-4ac2-b27b-df2d62548dd9",
"files": {
"guid": "c68b679d-8199-4036-8ead-d509fad132c8",
"items": [
"Starlio.exe",
"NOTICE"
]
},
"directories": [
"api",
"web",
"utils"
],
"env": {
"guid": "24554370-7366-4725-8509-7aebb35da25a",
"vars": [
{
"name": "PATH",
"value": "[INSTALLDIR]",
"permanent": "no",
"system": "no",
"action": "set",
"part": "last"
}
]
},
"shortcuts": {
"guid": "f2fb0dac-ddda-4c8e-bba4-3eb377150cde",
"items": [
{
"name": "Starlio",
"description": "Automatic space wallpaper from NASA",
"target": "[INSTALLDIR]Starlio.exe",
"wdir": "INSTALLDIR",
"arguments": "",
"icon": "web/static/image/icons/icon.ico"
}
]
},
"choco": {
"description": "Automatic space wallpaper from NASA",
"project-url": "https://github.com/Redume/Starlio",
"tags": "Wallpaper, NASA, go, auto-wallpaper",
"license-url": "https://github.com/Redume/Starlio/blob/main/NOTICE"
}
}

View file

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI>
<Dialog Id="LicenseAgreementDlg_HK" Width="370" Height="270" Title="!(loc.LicenseAgreementDlg_Title)">
<Control Id="LicenseAcceptedCheckBox" Type="CheckBox" X="20" Y="207" Width="330" Height="18" CheckBoxValue="1" Property="LicenseAccepted" Text="!(loc.LicenseAgreementDlgLicenseAcceptedCheckBox)" />
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">CostingComplete = 1</Publish>
<Condition Action="disable">
<![CDATA[LicenseAccepted <> "1"]]>
</Condition>
<Condition Action="enable">LicenseAccepted = "1"</Condition>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" />
<Control Id="LicenseText" Type="ScrollableText" X="20" Y="60" Width="330" Height="140" Sunken="yes" TabSkip="no">
{{if gt (.License | len) 0}}
<Text SourceFile="{{.License}}" />
{{end}}
</Control>
<Control Id="Print" Type="PushButton" X="112" Y="243" Width="56" Height="17" Text="!(loc.WixUIPrint)">
<Publish Event="DoAction" Value="WixUIPrintEula">1</Publish>
</Control>
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="Description" Type="Text" X="25" Y="23" Width="340" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.LicenseAgreementDlgDescription)" />
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.LicenseAgreementDlgTitle)" />
</Dialog>
</UI>
</Fragment>
</Wix>

View file

@ -1,62 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI Id="WixUI_HK">
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
<Property Id="WixUI_Mode" Value="InstallDir" />
<DialogRef Id="BrowseDlg" />
<DialogRef Id="DiskCostDlg" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FatalError" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="MsiRMFilesInUse" />
<DialogRef Id="PrepareDlg" />
<DialogRef Id="ProgressDlg" />
<DialogRef Id="ResumeDlg" />
<DialogRef Id="UserExit" />
<!-- Make sure to include custom dialogs in the installer database via a DialogRef command,
especially if they are not included explicitly in the publish chain below -->
<DialogRef Id="LicenseAgreementDlg_HK" />
<Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish>
<Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4">
<![CDATA[WIXUI_INSTALLDIR_VALID<>"1"]]>
</Publish>
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" {{if gt (.License | len) 0}} Value="LicenseAgreementDlg_HK" {{else}} Value="InstallDirDlg" {{end}}>NOT Installed</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
<Publish Dialog="LicenseAgreementDlg_HK" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
<Publish Dialog="LicenseAgreementDlg_HK" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAccepted = "1"</Publish>
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg_HK">1</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3">
<![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]>
</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed</Publish>
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
</UI>
<UIRef Id="WixUI_Common" />
</Fragment>
</Wix>

View file

@ -1,115 +0,0 @@
<?xml version="1.0"?>
<?if $(sys.BUILDARCH)="x86" ?>
<?define Program_Files="ProgramFilesFolder" ?>
<?elseif $(sys.BUILDARCH)="x64" ?>
<?define Program_Files="ProgramFiles64Folder" ?>
<?else ?>
<?error Unsupported value of sys.BUILDARCH=$(sys.BUILDARCH) ?>
<?endif ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" UpgradeCode="{{.UpgradeCode}}" Name="{{.Product}}" Version="{{.VersionOk}}" Manufacturer="{{.Company}}" Language="1033">
<Package InstallerVersion="200" Compressed="yes" Comments="Windows Installer Package" InstallScope="perMachine" />
<Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
<Upgrade Id="{{.UpgradeCode}}">
<UpgradeVersion Minimum="{{.VersionOk}}" OnlyDetect="yes" Property="NEWERVERSIONDETECTED" />
<UpgradeVersion Minimum="0.0.0" Maximum="{{.VersionOk}}" IncludeMinimum="yes" IncludeMaximum="no" Property="OLDERVERSIONBEINGUPGRADED" />
</Upgrade>
<Condition Message="A newer version of this software is already installed.">NOT NEWERVERSIONDETECTED</Condition>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.Program_Files)">
<Directory Id="INSTALLDIR" Name="{{.Product}}">
{{if gt (.Files.Items | len) 0}}
<Component Id="ApplicationFiles" Guid="{{.Files.GUID}}">
{{range $i, $e := .Files.Items}}
<File Id="ApplicationFile{{$i}}" Source="{{$e}}" />
{{end}}
</Component>
{{end}}
{{if gt (.Directories | len) 0}}
{{range $i, $e := .Directories}}
<Directory Id="APPDIR{{$i}}" Name="{{$e}}" />
{{end}}
{{end}}
</Directory>
</Directory>
{{if gt (.Env.Vars | len) 0}}
<Component Id="ENVS" Guid="{{.Env.GUID}}">
{{range $i, $e := .Env.Vars}}
<Environment Id="ENV{{$i}}" Name="{{$e.Name}}" Value="{{$e.Value}}" Permanent="{{$e.Permanent}}" Part="{{$e.Part}}" Action="{{$e.Action}}" System="{{$e.System}}" />
{{end}}
</Component>
{{end}}
{{if gt (.Shortcuts.Items | len) 0}}
<Directory Id="ProgramMenuFolder">
<Directory Id="ProgramMenuSubfolder" Name="{{.Product}}">
<Component Id="ApplicationShortcuts" Guid="{{.Shortcuts.GUID}}">
{{range $i, $e := .Shortcuts.Items}}
<Shortcut Id="ApplicationShortcut{{$i}}" Name="{{$e.Name}}" Description="{{$e.Description}}" Target="{{$e.Target}}" WorkingDirectory="{{$e.WDir}}" {{if gt ($e.Arguments | len) 0}} Arguments="{{$e.Arguments}}" {{end}}>
{{if gt ($e.Icon | len) 0}}
<Icon Id="Icon{{$i}}" SourceFile="{{$e.Icon}}" />
{{end}}
</Shortcut>
<RegistryValue Root="HKCU" Key="Software\{{$.Company}}\{{$.Product}}" Name="installed{{$i}}" Type="integer" Value="1" KeyPath="yes" />
{{end}}
<RemoveFolder Id="ProgramMenuSubfolder" On="uninstall" />
</Component>
</Directory>
</Directory>
{{end}}
</Directory>
{{range $i, $e := .InstallHooks}}
<SetProperty Id="CustomInstallExec{{$i}}" Value="{{$e.CookedCommand}}" Before="CustomInstallExec{{$i}}" Sequence="execute" />
<CustomAction Id="CustomInstallExec{{$i}}" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="deferred" Return="check" Impersonate="no" />
{{end}}
{{range $i, $e := .UninstallHooks}}
<SetProperty Id="CustomUninstallExec{{$i}}" Value="{{$e.CookedCommand}}" Before="CustomUninstallExec{{$i}}" Sequence="execute" />
<CustomAction Id="CustomUninstallExec{{$i}}" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="deferred" Return="check" Impersonate="no" />
{{end}}
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallValidate" />
{{range $i, $e := .InstallHooks}}
<Custom Action="CustomInstallExec{{$i}}" After="{{if eq $i 0}}InstallFiles{{else}}CustomInstallExec{{dec $i}}{{end}}">NOT Installed AND NOT REMOVE</Custom>
{{end}}
{{range $i, $e := .UninstallHooks}}
<Custom Action="CustomUninstallExec{{$i}}" After="{{if eq $i 0}}InstallInitialize{{else}}CustomUninstallExec{{dec $i}}{{end}}">REMOVE ~= "ALL"</Custom>
{{end}}
</InstallExecuteSequence>
<Feature Id="DefaultFeature" Level="1">
{{if gt (.Env.Vars | len) 0}}
<ComponentRef Id="ENVS" />
{{end}}
{{if gt (.Files.Items | len) 0}}
<ComponentRef Id="ApplicationFiles" />
{{end}}
{{if gt (.Shortcuts.Items | len) 0}}
<ComponentRef Id="ApplicationShortcuts" />
{{end}}
{{range $i, $e := .Directories}}
<ComponentGroupRef Id="AppFiles{{$i}}" />
{{end}}
</Feature>
<UI>
<!-- Define the installer UI -->
<UIRef Id="WixUI_HK" />
</UI>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<!-- this should help to propagate env var changes -->
<CustomActionRef Id="WixBroadcastEnvironmentChange" />
</Product>
</Wix>