mirror of
https://github.com/Starlio-app/StarlioX
synced 2024-11-22 08:46:22 +03:00
rewritten from net/http to fiber, changed port from 8080, 4662 to one 3000
This commit is contained in:
parent
3afc5c2c00
commit
30b820abee
2 changed files with 10 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
||||||
let button = document.querySelector("#createLabelButton");
|
let button = document.querySelector("#createLabelButton");
|
||||||
button.addEventListener("click", function() {
|
button.addEventListener("click", function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "http://localhost:8080/api/create/label",
|
url: "http://localhost:3000/api/create/label",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
if(data.status) {
|
if(data.status) {
|
||||||
|
|
|
@ -6,9 +6,10 @@ $(document).ready(async function() {
|
||||||
const $wallpaperSwitchTogglerName = $("#settings_autoSetWallpaperTogglerName");
|
const $wallpaperSwitchTogglerName = $("#settings_autoSetWallpaperTogglerName");
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "http://localhost:8080/api/get/settings",
|
url: "http://localhost:3000/api/get/settings",
|
||||||
type: "GET",
|
type: "GET",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
console.log(data);
|
||||||
if (data["wallpaper"] === 1) {
|
if (data["wallpaper"] === 1) {
|
||||||
$wallpaperSwitch.attr("checked", "true");
|
$wallpaperSwitch.attr("checked", "true");
|
||||||
$wallpaperSwitchTogglerName.text("On");
|
$wallpaperSwitchTogglerName.text("On");
|
||||||
|
@ -22,12 +23,12 @@ $(document).ready(async function() {
|
||||||
|
|
||||||
$wallpaperSwitch.click(async function() {
|
$wallpaperSwitch.click(async function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "http://localhost:8080/api/get/settings",
|
url: "http://localhost:3000/api/get/settings",
|
||||||
type: "GET",
|
type: "GET",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data["wallpaper"] === 1) {
|
if (data["wallpaper"] === 1) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "http://localhost:8080/api/update/settings",
|
url: "http://localhost:3000/api/update/settings",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: {
|
data: {
|
||||||
"wallpaper": 0,
|
"wallpaper": 0,
|
||||||
|
@ -45,7 +46,7 @@ $(document).ready(async function() {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "http://localhost:8080/api/update/settings",
|
url: "http://localhost:3000/api/update/settings",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: {
|
data: {
|
||||||
"wallpaper": 1,
|
"wallpaper": 1,
|
||||||
|
@ -69,12 +70,12 @@ $(document).ready(async function() {
|
||||||
|
|
||||||
$startupSwitch.click(async function() {
|
$startupSwitch.click(async function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "http://localhost:8080/api/get/settings",
|
url: "http://localhost:3000/api/get/settings",
|
||||||
type: "GET",
|
type: "GET",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data["startup"] === 1) {
|
if (data["startup"] === 1) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "http://localhost:8080/api/update/settings",
|
url: "http://localhost:3000/api/update/settings",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: {
|
data: {
|
||||||
"startup": 0,
|
"startup": 0,
|
||||||
|
@ -94,7 +95,7 @@ $(document).ready(async function() {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "http://localhost:8080/api/update/settings",
|
url: "http://localhost:3000/api/update/settings",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: {
|
data: {
|
||||||
"startup": 1,
|
"startup": 1,
|
||||||
|
@ -127,7 +128,7 @@ function toast(message) {
|
||||||
|
|
||||||
function editStartup(i) {
|
function editStartup(i) {
|
||||||
return $.ajax({
|
return $.ajax({
|
||||||
url: "http://localhost:8080/api/update/startup",
|
url: "http://localhost:3000/api/update/startup",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: {
|
data: {
|
||||||
"startup": i
|
"startup": i
|
||||||
|
|
Loading…
Add table
Reference in a new issue