Skip to content

Commit

Permalink
Amazing new stuff! (Read description of commit!)
Browse files Browse the repository at this point in the history
Faster loading times! SnailFM is slow? Not anymore!

A inbuilt reset option (in settings), Delete SnailFM and reset it up!

A built in welcome screen! Welcome new people!

Brand new CSS!

New update system!

Amazing new colours and styles

New dependencies!

New splash!

New render system!

Let's go!
  • Loading branch information
snaildos committed Mar 9, 2021
1 parent afc5198 commit 5a307c9
Show file tree
Hide file tree
Showing 9 changed files with 319 additions and 11 deletions.
66 changes: 65 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,31 @@
<script>
window.jQuery = window.$ = require('jquery');
const loudness = require('loudness')
</script>
<script>
// Needs window render
require('./renderer.js')
</script>

<script>
// oobe
(function($){
$(document).ready(function() {

var consent = localStorage.getItem('cookie-consent');

if(consent != 'true'){
$('#cookie').fadeIn();
}

$('#cookie-ok').click(function(event){
localStorage.setItem('cookie-consent', 'true');
$('#cookie').fadeOut();
});

});
})(jQuery);
</script>
</script>
<link rel="icon" href="snailfm.png">
<script src="./YoutubeJS/video.js"></script>
Expand Down Expand Up @@ -80,7 +105,7 @@

.settings {
position: absolute;
top: 8px;
top: 30px;
right: 16px;
font-size: 18px;
}
Expand Down Expand Up @@ -134,6 +159,36 @@
.sidenav {padding-top: 15px;}
.sidenav a {font-size: 18px;}
}

#cookie{
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
padding-top: 100px; /* Location of the box */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(212, 178, 27); /* Fallback color */
}
#cookie-wrapper{
display: flex;
flex-direction: row;
padding: .6rem 0;
}

#cookie-content{
border-right: 1px solid #1e67af;
}

#cookie-ok{
border: 0;
background: none;
color: rgb(255, 0, 212);
}
}
}
</style>
<!-- deprecated code lol-->
<script>
Expand All @@ -148,6 +203,14 @@
</script>
</head>
<body>

<div id="cookie">
<div id="cookie-wrapper">
<div id="cookie-content" class="h1">Welcome too SnailFM! <p>For more infomation, visit https://snaildos.tk/snailfm</p>Hit the let's go button too start using this software!</div>
<button id="cookie-ok">Let's go!</button>
</div>
</div>

<h1>SnailFM</h1>
<button type="button" class="settings" data-toggle="modal" data-target="#myModal">Settings</button>
<h3>Powered by <b>SnailDOS</b></h3>
Expand Down Expand Up @@ -243,6 +306,7 @@ <h4 class="modal-title"><h2>SnailFM Settings</h2></h4>
<h4>Please click what settings you want too change.</h4>
<h4>If you don't want too change SnailFM settings, press the "More Settings" too change Account settings, encoder settings, and more.</h4>
<span class="hiddentext" style="font-size:20px;cursor:pointer;color:red" onclick="openNav()">&#9776; More settings</span>
<a style="font-size:20px;cursor:pointer;color:red" href="reset.html">&#9776; ResetSnailFM</a>
<h2>SnailFM Settings</h2>
<script type="text/javascript">
function toggle(button)
Expand Down
3 changes: 2 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const createLoadingScreen = () => {
Object.assign({
width: 700,
height: 120,
alwaysOnTop: true,
frame: false,
fullscreen: false,
show: true,
Expand Down Expand Up @@ -92,7 +93,7 @@ app.on('ready', () => {
console.log("Alright, lets go!");
setTimeout(() => {
createWindow();
}, 3500);
}, 3000);
})

app.on('window-all-closed', function () {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "SnailFM",
"version": "1.0.1",
"description": "SnailFM is a radio station.",
"version": "1.0.2",
"description": "SnailFM-Application is a application too view SnailFM.",
"main": "main.js",
"repository": {
"type": "git",
Expand All @@ -22,8 +22,8 @@
"dependencies": {
"discord-rpc": "^3.1.4",
"isdev": "^1.0.1",
"jquery": "^3.6.0",
"electron-updater": "^4.0.6",
"jquery": "3.5.1",
"loudness": "0.4.1"
}
}
1 change: 1 addition & 0 deletions renderer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("Renderer.JS is initialized!")
69 changes: 69 additions & 0 deletions reset.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<html>
<head>
<script>
window.jQuery = window.$ = require('jquery');
</script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<title>Resetting SnailFM--- </title>
<style type="text/css">
.bs-example{
margin: 20px;
}
</style>
<style>
body {
background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
background-size: 400% 400%;
animation: gradient 15s ease infinite;
}

@keyframes gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
</style>
</head>
<body>
<script>
console.log("Let's clear localstorage first...")
localStorage.removeItem('cookie-consent', 'true');
console.log("Just wait a bit...")
// import rest of stuff here
</script>
<div class="bs-example">
<h2>Resetting SnailFM...</h2>
<div class="progress">
<div class="progress-bar" id="bar">
<span class="sr-only">src</span>
</div>
</div>
<script type="text/javascript">
var i = 0;
var progressBar = $("#bar");
function countNumbers(){
if(i < 100){
i = i + 10;
progressBar.css("width", i + "%");
}
if(i > 90){
window.location.href = "restart.html";
}
// Wait for sometime before running this script again
setTimeout("countNumbers()", 1000);
}
countNumbers();
</script>
</div>
</body>
</html>
10 changes: 10 additions & 0 deletions restart.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<html>
<head>
<title>Reset sucess</title>
</head>
<body>
<h1> Reset Sucess </h1>
<h2> Please hit the exit button and start SnailFM again...</h2>
<button id="exit" onclick="window.close()">Exit</button>
</body>
</html>
4 changes: 2 additions & 2 deletions splash.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ <h2>Loading SnailFM...</h2>
var progressBar = $("#bar");
function countNumbers(){
if(i < 100){
i = i + 1;
i = i + 25;
progressBar.css("width", i + "%");
}
// Wait for sometime before running this script again
setTimeout("countNumbers()", 100);
setTimeout("countNumbers()", 1000);
}
countNumbers();
</script>
Expand Down
Loading

1 comment on commit 5a307c9

@snaildos
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay :p

Please sign in to comment.