diff --git a/.gitignore b/.gitignore index 6e704f10f..f4cc28daa 100644 --- a/.gitignore +++ b/.gitignore @@ -175,3 +175,24 @@ $RECYCLE.BIN/ # Mac crap .DS_Store *.lnk + +# Melia GUI WebApp +/system/web-optional/MeliaGUI/.phpunit.cache +/system/web-optional/MeliaGUI/node_modules +/system/web-optional/MeliaGUI/public/build +/system/web-optional/MeliaGUI/public/hot +/system/web-optional/MeliaGUI/public/storage +/system/web-optional/MeliaGUI/storage/*.key +/system/web-optional/MeliaGUI/vendor +/system/web-optional/MeliaGUI/.env +/system/web-optional/MeliaGUI/.env.backup +/system/web-optional/MeliaGUI/.env.production +/system/web-optional/MeliaGUI/.phpunit.result.cache +/system/web-optional/MeliaGUI/Homestead.json +/system/web-optional/MeliaGUI/Homestead.yaml +/system/web-optional/MeliaGUI/auth.json +/system/web-optional/MeliaGUI/npm-debug.log +/system/web-optional/MeliaGUI/yarn-error.log +/system/web-optional/MeliaGUI/.fleet +/system/web-optional/MeliaGUI/.idea +/system/web-optional/MeliaGUI/.vscode \ No newline at end of file diff --git a/dump.sql b/dump.sql new file mode 100644 index 000000000..e69de29bb diff --git a/src/BarracksServer/BarracksServer.cs b/src/BarracksServer/BarracksServer.cs index b1a5e6f65..02aabcb6c 100644 --- a/src/BarracksServer/BarracksServer.cs +++ b/src/BarracksServer/BarracksServer.cs @@ -1,7 +1,10 @@ -using System; +using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; +using System.Threading.Tasks; +using System.Threading; using Melia.Barracks.Database; using Melia.Barracks.Network; using Melia.Barracks.Util; @@ -10,6 +13,7 @@ using Melia.Shared.IES; using Melia.Shared.Network; using Melia.Shared.Network.Inter.Messages; +using Microsoft.VisualBasic.Devices; using Yggdrasil.Logging; using Yggdrasil.Network.Communication; using Yggdrasil.Network.Communication.Messages; @@ -77,6 +81,7 @@ public override void Run(string[] args) this.StartCommunicator(); this.StartAcceptor(); + this.SendProcessInformation(); ConsoleUtil.RunningTitle(); new BarracksConsoleCommands().Wait(); @@ -144,7 +149,7 @@ private void Communicator_OnClientDisconnected(string commName) private void Communicator_OnMessageReceived(string sender, ICommMessage message) { //Log.Debug("Message received from '{0}': {1}", sender, message); - + switch (message) { case ServerUpdateMessage serverUpdateMessage: @@ -185,6 +190,11 @@ private void Communicator_OnRequestReceived(string sender, RequestMessage reques this.Communicator.Send(sender, responseMessage); break; } + case ResServerInformationMessage resServerInformationMessage: + { + this.Communicator.Send("Web", resServerInformationMessage); + break; + } } } @@ -259,5 +269,35 @@ public void Broadcast(Packet packet) conn.Send(packet); } } + + /// + /// Send the information about the process to the coordinator. + /// + private async void SendProcessInformation() + { + var cpuCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total"); + cpuCounter.NextValue(); + Thread.Sleep(1000); + var cpuUsage = cpuCounter.NextValue(); + + var processRamCounter = new PerformanceCounter("Process", "Working Set", Process.GetCurrentProcess().ProcessName); + + var totalRam = new ComputerInfo().TotalPhysicalMemory; + var processRamUsage = processRamCounter.NextValue(); + + var serverInformationMessage = new ResServerInformationMessage( + this.ServerInfo.Type, Process.GetCurrentProcess().Id, this.ServerInfo.Id, + Process.GetCurrentProcess().ProcessName, this.ServerInfo.Status, + cpuUsage, processRamUsage, totalRam, this.ServerInfo.Ip + ); + + try { + this.Communicator.Send("Web", serverInformationMessage); + } catch (Exception) + { + } + + await Task.Delay(TimeSpan.FromMinutes(5)); + } } } diff --git a/src/BarracksServer/BarracksServer.csproj b/src/BarracksServer/BarracksServer.csproj index 2bac60a62..4690b49f9 100644 --- a/src/BarracksServer/BarracksServer.csproj +++ b/src/BarracksServer/BarracksServer.csproj @@ -36,6 +36,7 @@ false + False ..\..\lib\MySql.Data.dll diff --git a/src/Shared/Configuration/Files/Barracks.cs b/src/Shared/Configuration/Files/Barracks.cs index 49c4c3250..4778091e3 100644 --- a/src/Shared/Configuration/Files/Barracks.cs +++ b/src/Shared/Configuration/Files/Barracks.cs @@ -1,4 +1,5 @@ -using Melia.Shared.World; +using System.Collections.Generic; +using Melia.Shared.World; using Yggdrasil.Configuration; using Yggdrasil.Logging; @@ -70,5 +71,10 @@ private Position GetPosition(string option, Position defaultValue) return new Position(x, y, z); } + + public Dictionary GetOptions() + { + return _options; + } } } diff --git a/src/Shared/Configuration/Files/Commands.cs b/src/Shared/Configuration/Files/Commands.cs index fd76744c4..1520b07ec 100644 --- a/src/Shared/Configuration/Files/Commands.cs +++ b/src/Shared/Configuration/Files/Commands.cs @@ -113,6 +113,11 @@ public CommandAuthLevels GetLevelsOrDefault(string command) return result; } + + public Dictionary GetOptions() + { + return _options; + } } /// diff --git a/src/Shared/Configuration/Files/Database.cs b/src/Shared/Configuration/Files/Database.cs index 2372f7570..6a929c235 100644 --- a/src/Shared/Configuration/Files/Database.cs +++ b/src/Shared/Configuration/Files/Database.cs @@ -1,4 +1,5 @@ -using Yggdrasil.Configuration; +using System.Collections.Generic; +using Yggdrasil.Configuration; namespace Melia.Shared.Configuration.Files { @@ -25,5 +26,10 @@ public void Load(string filePath) this.Pass = this.GetString("pass", ""); this.Db = this.GetString("database", "melia"); } + + public Dictionary GetOptions() + { + return _options; + } } } diff --git a/src/Shared/Configuration/Files/Localization.cs b/src/Shared/Configuration/Files/Localization.cs index a2022efc8..374fcebda 100644 --- a/src/Shared/Configuration/Files/Localization.cs +++ b/src/Shared/Configuration/Files/Localization.cs @@ -1,4 +1,5 @@ -using Yggdrasil.Configuration; +using System.Collections.Generic; +using Yggdrasil.Configuration; namespace Melia.Shared.Configuration.Files { @@ -23,5 +24,10 @@ public void Load(string filePath) this.Culture = this.GetString("culture", "en-US"); this.CultureUi = this.GetString("culture_ui", "en-US"); } + + public Dictionary GetOptions() + { + return _options; + } } } diff --git a/src/Shared/Configuration/Files/Log.cs b/src/Shared/Configuration/Files/Log.cs index a1e3f3cb3..4b0a60a6a 100644 --- a/src/Shared/Configuration/Files/Log.cs +++ b/src/Shared/Configuration/Files/Log.cs @@ -1,4 +1,5 @@ -using Yggdrasil.Configuration; +using System.Collections.Generic; +using Yggdrasil.Configuration; using Yggdrasil.Logging; namespace Melia.Shared.Configuration.Files @@ -20,5 +21,10 @@ public void Load(string filePath) this.Filter = (LogLevel)this.GetInt("log_filter", 0); } + + public Dictionary GetOptions() + { + return _options; + } } } diff --git a/src/Shared/Configuration/Files/Web.cs b/src/Shared/Configuration/Files/Web.cs index 28a199962..6a6ca8754 100644 --- a/src/Shared/Configuration/Files/Web.cs +++ b/src/Shared/Configuration/Files/Web.cs @@ -1,4 +1,5 @@ -using System.IO; +using System.Collections.Generic; +using System.IO; using Yggdrasil.Configuration; namespace Melia.Shared.Configuration.Files @@ -22,5 +23,10 @@ public void Load(string filePath) this.PhpCgiFilePath = this.GetString("php_cgi_bin", Path.Combine("user", "tools", "php", "php-cgi.exe")); this.PhpDownloadUrl = this.GetString("php_download", "https://windows.php.net/downloads/releases/php-8.2.7-nts-Win32-vs16-x86.zip"); } + + public Dictionary GetOptions() + { + return _options; + } } } diff --git a/src/Shared/Configuration/Files/World.cs b/src/Shared/Configuration/Files/World.cs index c8fc75f82..32e77a4e2 100644 --- a/src/Shared/Configuration/Files/World.cs +++ b/src/Shared/Configuration/Files/World.cs @@ -1,4 +1,5 @@ -using Yggdrasil.Configuration; +using System.Collections.Generic; +using Yggdrasil.Configuration; namespace Melia.Shared.Configuration.Files { @@ -113,5 +114,10 @@ public void Load(string filePath) this.RedOrbJackpotRate = this.GetFloat("red_orb_jackpot_rate", 10000); this.RedOrbEliteRate = this.GetFloat("red_orb_elite_rate", 1000); } + + public Dictionary GetOptions() + { + return _options; + } } } diff --git a/src/Shared/Network/Inter/Messages/ReqKickAllMessage.cs b/src/Shared/Network/Inter/Messages/ReqKickAllMessage.cs new file mode 100644 index 000000000..5154490f0 --- /dev/null +++ b/src/Shared/Network/Inter/Messages/ReqKickAllMessage.cs @@ -0,0 +1,13 @@ +using System; +using Yggdrasil.Network.Communication; + +namespace Melia.Shared.Network.Inter.Messages +{ + /// + /// Instruction to kick all players. + /// + [Serializable] + public class ReqKickAllMessage : ICommMessage + { + } +} diff --git a/src/Shared/Network/Inter/Messages/ResServerInformationMessage.cs b/src/Shared/Network/Inter/Messages/ResServerInformationMessage.cs new file mode 100644 index 000000000..4f6c1563e --- /dev/null +++ b/src/Shared/Network/Inter/Messages/ResServerInformationMessage.cs @@ -0,0 +1,83 @@ +using System; +using Melia.Shared.Data.Database; +using Yggdrasil.Network.Communication; + +namespace Melia.Shared.Network.Inter.Messages +{ + /// + /// Contains updated information about a server. + /// + [Serializable] + public class ResServerInformationMessage : ICommMessage + { + /// + /// Returns the type of the server. + /// + public ServerType ServerType { get; set; } + + /// + /// Returns the server's processId + /// + public int ProcessId { get; set; } + + /// + /// Returns the server's id. + /// + public int ServerId { get; set; } + + /// + /// Returns the server's processName + /// + public string ProcessName { get; set; } + + /// + /// Returns the server's status. + /// + public ServerStatus Status { get; set; } + + /// + /// Returns the server's CPU usage percentage + /// + public float CpuUsagePercentage { get; set; } + + /// + /// Returns the server's memory usage + /// + public float ProcessRamUsage { get; set; } + + /// + /// Returns the server's total memory + /// + public ulong TotalRAM { get; set; } + + /// + /// Returns the server's ip address + /// + public string ServerIp { get; set; } + + /// + /// Creates a new message. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public ResServerInformationMessage(ServerType serverType, int processId, int serverId, string processName, ServerStatus status, float cpuUsagePercentage, float processRamUsage, ulong totalRAM, string serverIp) + { + this.ServerType = serverType; + this.ProcessId = processId; + this.ServerId = serverId; + this.ProcessName = processName; + this.Status = status; + this.CpuUsagePercentage = cpuUsagePercentage; + this.ProcessRamUsage = processRamUsage; + this.TotalRAM = totalRAM; + this.ServerIp = serverIp; + } + } +} diff --git a/src/Shared/Network/Inter/Messages/ServerUpdateMessage.cs b/src/Shared/Network/Inter/Messages/ServerUpdateMessage.cs index bd3e02463..bf89e3d33 100644 --- a/src/Shared/Network/Inter/Messages/ServerUpdateMessage.cs +++ b/src/Shared/Network/Inter/Messages/ServerUpdateMessage.cs @@ -31,7 +31,7 @@ public class ServerUpdateMessage : ICommMessage /// /// Returns the server's status. /// - public ServerStatus Status { get; set; } + public ServerStatus ServerStatus { get; set; } /// /// Creates a new message. @@ -39,13 +39,13 @@ public class ServerUpdateMessage : ICommMessage /// /// /// - /// - public ServerUpdateMessage(ServerType serverType, int serverId, int playerCount, ServerStatus status) + /// + public ServerUpdateMessage(ServerType serverType, int serverId, int playerCount, ServerStatus serverStatus) { this.ServerType = serverType; this.ServerId = serverId; this.PlayerCount = playerCount; - this.Status = status; + this.ServerStatus = serverStatus; } } } diff --git a/src/Shared/Network/Inter/Messages/UpdateConfigsMessage.cs b/src/Shared/Network/Inter/Messages/UpdateConfigsMessage.cs new file mode 100644 index 000000000..8ab81a4cb --- /dev/null +++ b/src/Shared/Network/Inter/Messages/UpdateConfigsMessage.cs @@ -0,0 +1,13 @@ +using System; +using Yggdrasil.Network.Communication; + +namespace Melia.Shared.Network.Inter.Messages +{ + /// + /// Instruction to kick all players. + /// + [Serializable] + public class ReqReloadConfigsMessage : ICommMessage + { + } +} diff --git a/src/Shared/Network/ServerList.cs b/src/Shared/Network/ServerList.cs index 24a78330d..7a06bb95b 100644 --- a/src/Shared/Network/ServerList.cs +++ b/src/Shared/Network/ServerList.cs @@ -103,7 +103,7 @@ public void Update(ServerUpdateMessage serverUpdateMessage) return; serverInfo.CurrentPlayers = serverUpdateMessage.PlayerCount; - serverInfo.Status = serverUpdateMessage.Status; + serverInfo.Status = serverUpdateMessage.ServerStatus; } } diff --git a/src/Shared/Shared.csproj b/src/Shared/Shared.csproj index d3b078638..ec8ecab7e 100644 --- a/src/Shared/Shared.csproj +++ b/src/Shared/Shared.csproj @@ -102,10 +102,13 @@ + + + @@ -200,7 +203,9 @@ - + + + + + + + + + + diff --git a/system/web-optional/MeliaGUI/postcss.config.js b/system/web-optional/MeliaGUI/postcss.config.js new file mode 100644 index 000000000..04b6f0d99 --- /dev/null +++ b/system/web-optional/MeliaGUI/postcss.config.js @@ -0,0 +1,11 @@ +import postcssImport from 'postcss-import'; +import tailwindcss from 'tailwindcss'; +import autoprefixer from 'autoprefixer'; + +export default { + plugins: [ + postcssImport, + tailwindcss, + autoprefixer, + ], +}; diff --git a/system/web-optional/MeliaGUI/public/.htaccess b/system/web-optional/MeliaGUI/public/.htaccess new file mode 100644 index 000000000..3aec5e27e --- /dev/null +++ b/system/web-optional/MeliaGUI/public/.htaccess @@ -0,0 +1,21 @@ + + + Options -MultiViews -Indexes + + + RewriteEngine On + + # Handle Authorization Header + RewriteCond %{HTTP:Authorization} . + RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + + # Redirect Trailing Slashes If Not A Folder... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_URI} (.+)/$ + RewriteRule ^ %1 [L,R=301] + + # Send Requests To Front Controller... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [L] + diff --git a/system/web-optional/MeliaGUI/public/assets/img/advanced-trading-tools.webp b/system/web-optional/MeliaGUI/public/assets/img/advanced-trading-tools.webp new file mode 100644 index 000000000..d72dda80e Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/advanced-trading-tools.webp differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/bg-trading-tools.webp b/system/web-optional/MeliaGUI/public/assets/img/bg-trading-tools.webp new file mode 100644 index 000000000..a859efe61 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/bg-trading-tools.webp differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/brain-cogs.png b/system/web-optional/MeliaGUI/public/assets/img/brain-cogs.png new file mode 100644 index 000000000..bd5611481 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/brain-cogs.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/buy-and-trade.webp b/system/web-optional/MeliaGUI/public/assets/img/buy-and-trade.webp new file mode 100644 index 000000000..1790b169c Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/buy-and-trade.webp differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/code_icon.png b/system/web-optional/MeliaGUI/public/assets/img/code_icon.png new file mode 100644 index 000000000..c9d2b923b Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/code_icon.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/country-icon/eng.png b/system/web-optional/MeliaGUI/public/assets/img/country-icon/eng.png new file mode 100644 index 000000000..7e4f33348 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/country-icon/eng.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/2share.png b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/2share.png new file mode 100644 index 000000000..143a943a3 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/2share.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/bitcoin-asia.png b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/bitcoin-asia.png new file mode 100644 index 000000000..ec377d69f Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/bitcoin-asia.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/bitcoin.png b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/bitcoin.png new file mode 100644 index 000000000..f489c2f1a Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/bitcoin.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/dogecoin.png b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/dogecoin.png new file mode 100644 index 000000000..38514dee0 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/dogecoin.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/ethereum.png b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/ethereum.png new file mode 100644 index 000000000..235fc05f0 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/ethereum.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/frog.png b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/frog.png new file mode 100644 index 000000000..5b75f5001 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/frog.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/metacraft.png b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/metacraft.png new file mode 100644 index 000000000..921bc3060 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/metacraft.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/moonrock.png b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/moonrock.png new file mode 100644 index 000000000..547575b90 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/moonrock.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/musk-doge.png b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/musk-doge.png new file mode 100644 index 000000000..b5841bd82 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/musk-doge.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/ninjafloki.png b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/ninjafloki.png new file mode 100644 index 000000000..2bf8808ca Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/ninjafloki.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/pappay.png b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/pappay.png new file mode 100644 index 000000000..cb7b91778 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/pappay.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/solana.png b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/solana.png new file mode 100644 index 000000000..42a9664e7 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/crypto-icon/solana.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/development.png b/system/web-optional/MeliaGUI/public/assets/img/development.png new file mode 100644 index 000000000..8bc3fc4e1 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/development.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/faq.webp b/system/web-optional/MeliaGUI/public/assets/img/faq.webp new file mode 100644 index 000000000..c47622bae Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/faq.webp differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/getting-started/arrow.png b/system/web-optional/MeliaGUI/public/assets/img/getting-started/arrow.png new file mode 100644 index 000000000..9a55b1dac Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/getting-started/arrow.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/getting-started/buy-crypto.png b/system/web-optional/MeliaGUI/public/assets/img/getting-started/buy-crypto.png new file mode 100644 index 000000000..77e4b5a00 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/getting-started/buy-crypto.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/getting-started/fund.png b/system/web-optional/MeliaGUI/public/assets/img/getting-started/fund.png new file mode 100644 index 000000000..19481e45e Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/getting-started/fund.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/getting-started/sign-up.png b/system/web-optional/MeliaGUI/public/assets/img/getting-started/sign-up.png new file mode 100644 index 000000000..e69ac8287 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/getting-started/sign-up.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/github/SalmanTKhan.png b/system/web-optional/MeliaGUI/public/assets/img/github/SalmanTKhan.png new file mode 100644 index 000000000..7935efdb6 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/github/SalmanTKhan.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/github/Tachiorz.png b/system/web-optional/MeliaGUI/public/assets/img/github/Tachiorz.png new file mode 100644 index 000000000..0e12b3b07 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/github/Tachiorz.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/github/avatar_3271.png b/system/web-optional/MeliaGUI/public/assets/img/github/avatar_3271.png new file mode 100644 index 000000000..191f164b0 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/github/avatar_3271.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/github/exec.png b/system/web-optional/MeliaGUI/public/assets/img/github/exec.png new file mode 100644 index 000000000..ab04977ff Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/github/exec.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/github/felipecastagnaro.jpeg b/system/web-optional/MeliaGUI/public/assets/img/github/felipecastagnaro.jpeg new file mode 100644 index 000000000..f3de22c03 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/github/felipecastagnaro.jpeg differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/github/kenedos.jpeg b/system/web-optional/MeliaGUI/public/assets/img/github/kenedos.jpeg new file mode 100644 index 000000000..b563717e4 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/github/kenedos.jpeg differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/hero-image.webp b/system/web-optional/MeliaGUI/public/assets/img/hero-image.webp new file mode 100644 index 000000000..7c3f8f311 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/hero-image.webp differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/industry-leading-security.webp b/system/web-optional/MeliaGUI/public/assets/img/industry-leading-security.webp new file mode 100644 index 000000000..4bcdcfa38 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/industry-leading-security.webp differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/logo/favicon.svg b/system/web-optional/MeliaGUI/public/assets/img/logo/favicon.svg new file mode 100644 index 000000000..3638fadee --- /dev/null +++ b/system/web-optional/MeliaGUI/public/assets/img/logo/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/system/web-optional/MeliaGUI/public/assets/img/logo/nefa.svg b/system/web-optional/MeliaGUI/public/assets/img/logo/nefa.svg new file mode 100644 index 000000000..ca870dc66 --- /dev/null +++ b/system/web-optional/MeliaGUI/public/assets/img/logo/nefa.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/system/web-optional/MeliaGUI/public/assets/img/logo_big.png b/system/web-optional/MeliaGUI/public/assets/img/logo_big.png new file mode 100644 index 000000000..9f30da089 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/logo_big.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/logo_black.png b/system/web-optional/MeliaGUI/public/assets/img/logo_black.png new file mode 100644 index 000000000..64d26bc37 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/logo_black.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/logo_white.png b/system/web-optional/MeliaGUI/public/assets/img/logo_white.png new file mode 100644 index 000000000..09eda9744 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/logo_white.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/nefa-cc.webp b/system/web-optional/MeliaGUI/public/assets/img/nefa-cc.webp new file mode 100644 index 000000000..c3f5f5a35 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/nefa-cc.webp differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/partner/background.png b/system/web-optional/MeliaGUI/public/assets/img/partner/background.png new file mode 100644 index 000000000..cf198b9cf Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/partner/background.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/partner/clever.png b/system/web-optional/MeliaGUI/public/assets/img/partner/clever.png new file mode 100644 index 000000000..1d66d1636 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/partner/clever.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/partner/diamon-cutts.png b/system/web-optional/MeliaGUI/public/assets/img/partner/diamon-cutts.png new file mode 100644 index 000000000..18c207980 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/partner/diamon-cutts.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/partner/gambio.png b/system/web-optional/MeliaGUI/public/assets/img/partner/gambio.png new file mode 100644 index 000000000..b8d3e6718 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/partner/gambio.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/partner/swiss-finance.png b/system/web-optional/MeliaGUI/public/assets/img/partner/swiss-finance.png new file mode 100644 index 000000000..293df7929 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/partner/swiss-finance.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/pattern/ellipse-1.png b/system/web-optional/MeliaGUI/public/assets/img/pattern/ellipse-1.png new file mode 100644 index 000000000..571f1a95b Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/pattern/ellipse-1.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/pattern/ellipse-2.png b/system/web-optional/MeliaGUI/public/assets/img/pattern/ellipse-2.png new file mode 100644 index 000000000..56e532260 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/pattern/ellipse-2.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/pattern/ellipse-3.png b/system/web-optional/MeliaGUI/public/assets/img/pattern/ellipse-3.png new file mode 100644 index 000000000..01ce7abf4 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/pattern/ellipse-3.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/pattern/star.png b/system/web-optional/MeliaGUI/public/assets/img/pattern/star.png new file mode 100644 index 000000000..2083134d2 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/pattern/star.png differ diff --git a/system/web-optional/MeliaGUI/public/assets/img/thumbnail.jpg b/system/web-optional/MeliaGUI/public/assets/img/thumbnail.jpg new file mode 100644 index 000000000..dc654f8a6 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/assets/img/thumbnail.jpg differ diff --git a/system/web-optional/MeliaGUI/public/dump.sql b/system/web-optional/MeliaGUI/public/dump.sql new file mode 100644 index 000000000..e69de29bb diff --git a/system/web-optional/MeliaGUI/public/favicon.ico b/system/web-optional/MeliaGUI/public/favicon.ico new file mode 100644 index 000000000..1a5526580 Binary files /dev/null and b/system/web-optional/MeliaGUI/public/favicon.ico differ diff --git a/system/web-optional/MeliaGUI/public/index.php b/system/web-optional/MeliaGUI/public/index.php new file mode 100644 index 000000000..1d69f3a28 --- /dev/null +++ b/system/web-optional/MeliaGUI/public/index.php @@ -0,0 +1,55 @@ +make(Kernel::class); + +$response = $kernel->handle( + $request = Request::capture() +)->send(); + +$kernel->terminate($request, $response); diff --git a/system/web-optional/MeliaGUI/public/robots.txt b/system/web-optional/MeliaGUI/public/robots.txt new file mode 100644 index 000000000..eb0536286 --- /dev/null +++ b/system/web-optional/MeliaGUI/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/system/web-optional/MeliaGUI/resources/css/_checkbox-radio-switch.css b/system/web-optional/MeliaGUI/resources/css/_checkbox-radio-switch.css new file mode 100644 index 000000000..a0ed24d9b --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/css/_checkbox-radio-switch.css @@ -0,0 +1,59 @@ +@layer components { + .checkbox, .radio, .switch { + @apply inline-flex items-center cursor-pointer relative; + } + + .checkbox input[type=checkbox], .radio input[type=radio], .switch input[type=checkbox] { + @apply absolute left-0 opacity-0; + } + + .checkbox input[type=checkbox]+.check, .radio input[type=radio]+.check, .switch input[type=checkbox]+.check { + @apply border-gray-700 border transition-colors duration-200 dark:bg-slate-800; + } + + .checkbox input[type=checkbox]:focus+.check, .radio input[type=radio]:focus+.check, .switch input[type=checkbox]:focus+.check { + @apply ring ring-blue-700; + } + + .checkbox input[type=checkbox]+.check, .radio input[type=radio]+.check { + @apply block w-5 h-5; + } + + .checkbox input[type=checkbox]+.check { + @apply rounded; + } + + .switch input[type=checkbox]+.check { + @apply flex items-center shrink-0 w-12 h-6 p-0.5 bg-gray-200; + } + + .radio input[type=radio]+.check, .switch input[type=checkbox]+.check, .switch input[type=checkbox]+.check:before { + @apply rounded-full; + } + + .checkbox input[type=checkbox]:checked+.check, .radio input[type=radio]:checked+.check { + @apply bg-no-repeat bg-center border-4; + } + + .checkbox input[type=checkbox]:checked+.check { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath style='fill:%23fff' d='M 0.04038059,0.6267767 0.14644661,0.52071068 0.42928932,0.80355339 0.3232233,0.90961941 z M 0.21715729,0.80355339 0.85355339,0.16715729 0.95961941,0.2732233 0.3232233,0.90961941 z'%3E%3C/path%3E%3C/svg%3E"); + } + + .radio input[type=radio]:checked+.check { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z' /%3E%3C/svg%3E"); + } + + .switch input[type=checkbox]:checked+.check, .checkbox input[type=checkbox]:checked+.check, .radio input[type=radio]:checked+.check { + @apply bg-blue-600 border-blue-600; + } + + .switch input[type=checkbox]+.check:before { + content: ''; + @apply block w-5 h-5 bg-white border border-gray-700; + } + + .switch input[type=checkbox]:checked+.check:before { + transform: translate3d(110%, 0 ,0); + @apply border-blue-600; + } +} diff --git a/system/web-optional/MeliaGUI/resources/css/_disable_caret.css b/system/web-optional/MeliaGUI/resources/css/_disable_caret.css new file mode 100644 index 000000000..1753e881f --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/css/_disable_caret.css @@ -0,0 +1,6 @@ +.disableCaret { + -webkit-user-select: none; /* Chrome all / Safari all */ + -moz-user-select: none; /* Firefox all */ + -ms-user-select: none; /* IE 10+ */ + user-select: none; +} diff --git a/system/web-optional/MeliaGUI/resources/css/_progress.css b/system/web-optional/MeliaGUI/resources/css/_progress.css new file mode 100644 index 000000000..65d6796e8 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/css/_progress.css @@ -0,0 +1,21 @@ +@layer base { + progress { + @apply h-3 rounded-full overflow-hidden; + } + + progress::-webkit-progress-bar { + @apply bg-blue-200; + } + + progress::-webkit-progress-value { + @apply bg-blue-500; + } + + progress::-moz-progress-bar { + @apply bg-blue-500; + } + + progress::-ms-fill { + @apply bg-blue-500 border-0; + } +} diff --git a/system/web-optional/MeliaGUI/resources/css/_scrollbars.css b/system/web-optional/MeliaGUI/resources/css/_scrollbars.css new file mode 100644 index 000000000..bf9fd85fa --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/css/_scrollbars.css @@ -0,0 +1,41 @@ +@layer base { + html { + scrollbar-width: thin; + scrollbar-color: rgb(71, 85, 105) rgb(30, 41, 59); + } + + body::-webkit-scrollbar { + width: 8px; + height: 8px; + } + + body::-webkit-scrollbar-track { + @apply bg-slate-800; + } + + body::-webkit-scrollbar-thumb { + @apply bg-slate-600; + } + + body::-webkit-scrollbar-thumb:hover { + @apply bg-slate-500; + } +} + +@layer utilities { + .dark-scrollbars-compat { + scrollbar-color: rgb(71, 85, 105) rgb(30, 41, 59); + } + + .dark-scrollbars::-webkit-scrollbar-track { + @apply bg-slate-800; + } + + .dark-scrollbars::-webkit-scrollbar-thumb { + @apply bg-slate-600; + } + + .dark-scrollbars::-webkit-scrollbar-thumb:hover { + @apply bg-slate-500; + } +} diff --git a/system/web-optional/MeliaGUI/resources/css/_table.css b/system/web-optional/MeliaGUI/resources/css/_table.css new file mode 100644 index 000000000..962b9af4c --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/css/_table.css @@ -0,0 +1,48 @@ +@layer base { + table { + @apply w-full; + } + + thead { + @apply hidden lg:table-header-group; + } + + tr { + @apply max-w-full block relative border-b-4 border-gray-100 + lg:table-row lg:border-b-0 dark:border-slate-800; + } + + tr:last-child { + @apply border-b-0; + } + + td:not(:first-child) { + @apply lg:border-l lg:border-t-0 lg:border-r-0 lg:border-b-0 lg:border-gray-100 lg:dark:border-slate-700; + } + + th { + @apply lg:text-left lg:p-3; + } + + td { + @apply flex justify-between text-right py-3 px-4 align-top border-b border-gray-100 + lg:table-cell lg:text-left lg:p-3 lg:align-middle lg:border-b-0 dark:border-slate-800; + } + + td:last-child { + @apply border-b-0; + } + + tbody tr, tbody tr:nth-child(odd) { + @apply lg:hover:bg-gray-100 lg:dark:hover:bg-slate-700/70; + } + + tbody tr:nth-child(odd) { + @apply lg:bg-gray-100/50 lg:dark:bg-slate-800/50; + } + + td:before { + content: attr(data-label); + @apply font-semibold pr-3 text-left lg:hidden; + } +} diff --git a/system/web-optional/MeliaGUI/resources/css/app.css b/system/web-optional/MeliaGUI/resources/css/app.css new file mode 100644 index 000000000..49bc22147 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/css/app.css @@ -0,0 +1,9 @@ +@import '_checkbox-radio-switch.css'; +@import '_progress.css'; +@import '_scrollbars.css'; +@import '_table.css'; +@import '_disable_caret.css'; + +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/system/web-optional/MeliaGUI/resources/css/tailwind/_base.css b/system/web-optional/MeliaGUI/resources/css/tailwind/_base.css new file mode 100644 index 000000000..2f02db53f --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/css/tailwind/_base.css @@ -0,0 +1 @@ +@tailwind base; diff --git a/system/web-optional/MeliaGUI/resources/css/tailwind/_components.css b/system/web-optional/MeliaGUI/resources/css/tailwind/_components.css new file mode 100644 index 000000000..020aabafd --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/css/tailwind/_components.css @@ -0,0 +1 @@ +@tailwind components; diff --git a/system/web-optional/MeliaGUI/resources/css/tailwind/_utilities.css b/system/web-optional/MeliaGUI/resources/css/tailwind/_utilities.css new file mode 100644 index 000000000..65dd5f63a --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/css/tailwind/_utilities.css @@ -0,0 +1 @@ +@tailwind utilities; diff --git a/system/web-optional/MeliaGUI/resources/js/Layouts/LayoutAuthenticated.vue b/system/web-optional/MeliaGUI/resources/js/Layouts/LayoutAuthenticated.vue new file mode 100644 index 000000000..4c98c1145 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/Layouts/LayoutAuthenticated.vue @@ -0,0 +1,94 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/Layouts/LayoutGuest.vue b/system/web-optional/MeliaGUI/resources/js/Layouts/LayoutGuest.vue new file mode 100644 index 000000000..b0d1baae1 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/Layouts/LayoutGuest.vue @@ -0,0 +1,22 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/Pages/AdminDashboard.vue b/system/web-optional/MeliaGUI/resources/js/Pages/AdminDashboard.vue new file mode 100644 index 000000000..9be306663 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/Pages/AdminDashboard.vue @@ -0,0 +1,493 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/Pages/Auth/ConfirmPassword.vue b/system/web-optional/MeliaGUI/resources/js/Pages/Auth/ConfirmPassword.vue new file mode 100644 index 000000000..503271454 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/Pages/Auth/ConfirmPassword.vue @@ -0,0 +1,55 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/Pages/Auth/ForgotPassword.vue b/system/web-optional/MeliaGUI/resources/js/Pages/Auth/ForgotPassword.vue new file mode 100644 index 000000000..e6242db92 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/Pages/Auth/ForgotPassword.vue @@ -0,0 +1,86 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/Pages/Auth/ResetPassword.vue b/system/web-optional/MeliaGUI/resources/js/Pages/Auth/ResetPassword.vue new file mode 100644 index 000000000..97a0c2002 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/Pages/Auth/ResetPassword.vue @@ -0,0 +1,109 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/Pages/Auth/VerifyEmail.vue b/system/web-optional/MeliaGUI/resources/js/Pages/Auth/VerifyEmail.vue new file mode 100644 index 000000000..557c36b29 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/Pages/Auth/VerifyEmail.vue @@ -0,0 +1,62 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/Pages/ConfigsView.vue b/system/web-optional/MeliaGUI/resources/js/Pages/ConfigsView.vue new file mode 100644 index 000000000..d219cea97 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/Pages/ConfigsView.vue @@ -0,0 +1,480 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/Pages/Dashboard.vue b/system/web-optional/MeliaGUI/resources/js/Pages/Dashboard.vue new file mode 100644 index 000000000..ed8e7f8cc --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/Pages/Dashboard.vue @@ -0,0 +1,34 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/Pages/InventoryView.vue b/system/web-optional/MeliaGUI/resources/js/Pages/InventoryView.vue new file mode 100644 index 000000000..17e6951ca --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/Pages/InventoryView.vue @@ -0,0 +1,190 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/Pages/LoginView.vue b/system/web-optional/MeliaGUI/resources/js/Pages/LoginView.vue new file mode 100644 index 000000000..e8374275f --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/Pages/LoginView.vue @@ -0,0 +1,105 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/Pages/Profile/Edit.vue b/system/web-optional/MeliaGUI/resources/js/Pages/Profile/Edit.vue new file mode 100644 index 000000000..cab651c6e --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/Pages/Profile/Edit.vue @@ -0,0 +1,45 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/Pages/Profile/Partials/UpdatePasswordForm.vue b/system/web-optional/MeliaGUI/resources/js/Pages/Profile/Partials/UpdatePasswordForm.vue new file mode 100644 index 000000000..910b58f3e --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/Pages/Profile/Partials/UpdatePasswordForm.vue @@ -0,0 +1,107 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/Pages/Profile/Partials/UpdateProfileInformationForm.vue b/system/web-optional/MeliaGUI/resources/js/Pages/Profile/Partials/UpdateProfileInformationForm.vue new file mode 100644 index 000000000..af02b7370 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/Pages/Profile/Partials/UpdateProfileInformationForm.vue @@ -0,0 +1,91 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/Pages/ProfileView.vue b/system/web-optional/MeliaGUI/resources/js/Pages/ProfileView.vue new file mode 100644 index 000000000..9441d6622 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/Pages/ProfileView.vue @@ -0,0 +1,242 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/app.js b/system/web-optional/MeliaGUI/resources/js/app.js new file mode 100644 index 000000000..b71e7f724 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/app.js @@ -0,0 +1,29 @@ +import './bootstrap' +import '../css/app.css' + +import { createApp, h } from 'vue' +import { createInertiaApp } from '@inertiajs/vue3' +import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers' +import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m' +import { useStore } from '@/store.js' + +const appName = import.meta.env.APP_NAME || 'Melia' + +createInertiaApp({ + title: (title) => `${title} - ${appName}`, + resolve: (name) => + resolvePageComponent( + `./Pages/${name}.vue`, + import.meta.glob('./Pages/**/*.vue'), + ), + setup({ el, App, props, plugin }) { + return createApp({ render: () => h(App, props) }) + .use(plugin) + .use(ZiggyVue, Ziggy) + .use(useStore) + .mount(el) + }, + progress: { + color: '#4B5563', + }, +}) diff --git a/system/web-optional/MeliaGUI/resources/js/bootstrap.js b/system/web-optional/MeliaGUI/resources/js/bootstrap.js new file mode 100644 index 000000000..bd7d5b0ef --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/bootstrap.js @@ -0,0 +1,33 @@ +import 'bootstrap'; + +/** + * We'll load the axios HTTP library which allows us to easily issue requests + * to our Laravel back-end. This library automatically handles sending the + * CSRF token as a header based on the value of the "XSRF" token cookie. + */ + +import axios from 'axios'; +window.axios = axios; + +window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; + +/** + * Echo exposes an expressive API for subscribing to channels and listening + * for events that are broadcast by Laravel. Echo and event broadcasting + * allows your team to easily build robust real-time web applications. + */ + +// import Echo from 'laravel-echo'; + +// import Pusher from 'pusher-js'; +// window.Pusher = Pusher; + +// window.Echo = new Echo({ +// broadcaster: 'pusher', +// key: import.meta.env.VITE_PUSHER_APP_KEY, +// wsHost: import.meta.env.VITE_PUSHER_HOST ?? `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`, +// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, +// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, +// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', +// enabledTransports: ['ws', 'wss'], +// }); diff --git a/system/web-optional/MeliaGUI/resources/js/colors.js b/system/web-optional/MeliaGUI/resources/js/colors.js new file mode 100644 index 000000000..a2945a054 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/colors.js @@ -0,0 +1,139 @@ +export const gradientBgBase = "bg-gradient-to-tr"; +export const gradientBgPurplePink = `${gradientBgBase} from-purple-400 via-pink-500 to-red-500`; +export const gradientBgDark = `${gradientBgBase} from-slate-700 via-slate-900 to-slate-800`; +export const gradientBgPinkRed = `${gradientBgBase} from-pink-400 via-red-500 to-yellow-500`; + +export const colorsBgLight = { + white: "bg-white text-black", + light: "bg-white text-black dark:bg-slate-900/70 dark:text-white", + contrast: "bg-gray-800 text-white dark:bg-white", + success: "bg-emerald-500 border-emerald-500 text-white", + danger: "bg-red-500 border-red-500 text-white", + warning: "bg-yellow-500 border-yellow-500 text-white", + info: "bg-blue-500 border-blue-500 text-black dark:text-white", +}; + +export const colorsText = { + white: "text-black dark:text-slate-100", + light: "text-gray-700 dark:text-slate-400", + contrast: "dark:text-white", + success: "text-emerald-500", + danger: "text-red-500", + warning: "text-yellow-500", + info: "text-black dark:text-white", +}; + +export const colorsOutline = { + white: [colorsText.white, "border-gray-100"], + light: [colorsText.light, "border-gray-100"], + contrast: [colorsText.contrast, "border-gray-900 dark:border-slate-100"], + success: [colorsText.success, "border-emerald-500"], + danger: [colorsText.danger, "border-red-500"], + warning: [colorsText.warning, "border-yellow-500"], + info: [colorsText.info, "border-blue-500"], +}; + +export const getButtonColor = ( + color, + isOutlined, + hasHover, + isActive = false +) => { + const colors = { + ring: { + white: "ring-gray-200 dark:ring-gray-500", + whiteDark: "ring-gray-200 dark:ring-gray-500", + lightDark: "ring-gray-200 dark:ring-gray-500", + contrast: "ring-gray-300 dark:ring-gray-400", + success: "ring-emerald-300 dark:ring-emerald-700", + danger: "ring-red-300 dark:ring-red-700", + warning: "ring-yellow-300 dark:ring-yellow-700", + info: "text-black dark:text-white ring-blue-300 dark:ring-blue-700", + }, + active: { + white: "bg-gray-100", + whiteDark: "bg-gray-100 dark:bg-slate-800", + lightDark: "bg-gray-200 dark:bg-slate-700", + contrast: "bg-gray-700 dark:bg-slate-100", + success: "bg-emerald-700 dark:bg-emerald-600", + danger: "bg-red-700 dark:bg-red-600", + warning: "bg-yellow-700 dark:bg-yellow-600", + info: "bg-blue-700 dark:bg-blue-600", + }, + bg: { + white: "bg-white text-black", + whiteDark: "bg-white text-black dark:bg-slate-900 dark:text-white", + lightDark: "bg-gray-100 text-black dark:bg-slate-800 dark:text-white", + contrast: "bg-gray-800 text-white dark:bg-white", + success: "bg-emerald-600 dark:bg-emerald-500 text-white", + danger: "bg-red-600 dark:bg-red-500 text-white", + warning: "bg-yellow-600 dark:bg-yellow-500 text-white", + info: "bg-blue-600 dark:bg-blue-500 text-black dark:text-white", + }, + bgHover: { + white: "hover:bg-gray-100", + whiteDark: "hover:bg-gray-100 hover:dark:bg-slate-800", + lightDark: "hover:bg-gray-200 hover:dark:bg-slate-700", + contrast: "hover:bg-gray-700 hover:dark:bg-slate-100", + success: + "hover:bg-emerald-700 hover:border-emerald-700 hover:dark:bg-emerald-600 hover:dark:border-emerald-600", + danger: + "hover:bg-red-700 hover:border-red-700 hover:dark:bg-red-600 hover:dark:border-red-600", + warning: + "hover:bg-yellow-700 hover:border-yellow-700 hover:dark:bg-yellow-600 hover:dark:border-yellow-600", + info: + "hover:bg-blue-700 hover:border-blue-700 hover:dark:bg-blue-600 hover:dark:border-blue-600", + }, + borders: { + white: "border-white", + whiteDark: "border-white dark:border-slate-900", + lightDark: "border-gray-100 dark:border-slate-800", + contrast: "border-gray-800 dark:border-white", + success: "border-emerald-600 dark:border-emerald-500", + danger: "border-red-600 dark:border-red-500", + warning: "border-yellow-600 dark:border-yellow-500", + info: "border-blue-600 dark:border-blue-500", + }, + text: { + contrast: "dark:text-slate-100", + success: "text-emerald-600 dark:text-emerald-500", + danger: "text-red-600 dark:text-red-500", + warning: "text-yellow-600 dark:text-yellow-500", + info: "text-black dark:text-white", + }, + outlineHover: { + contrast: + "hover:bg-gray-800 hover:text-gray-100 hover:dark:bg-slate-100 hover:dark:text-black", + success: + "hover:bg-emerald-600 hover:text-white hover:text-white hover:dark:text-white hover:dark:border-emerald-600", + danger: + "hover:bg-red-600 hover:text-white hover:text-white hover:dark:text-white hover:dark:border-red-600", + warning: + "hover:bg-yellow-600 hover:text-white hover:text-white hover:dark:text-white hover:dark:border-yellow-600", + info: "hover:bg-blue-600 hover:text-blue hover:dark:text-blue hover:dark:border-blue-600 text-black dark:text-white", + }, + }; + + if (!colors.bg[color]) { + return color; + } + + const isOutlinedProcessed = + isOutlined && ["white", "whiteDark", "lightDark"].indexOf(color) < 0; + + const base = [colors.borders[color], colors.ring[color]]; + + if (isActive) { + base.push(colors.active[color]); + } else { + base.push(isOutlinedProcessed ? colors.text[color] : colors.bg[color]); + } + + if (hasHover) { + base.push( + isOutlinedProcessed ? colors.outlineHover[color] : colors.bgHover[color] + ); + } + + return base; +}; diff --git a/system/web-optional/MeliaGUI/resources/js/components/AsideMenu.vue b/system/web-optional/MeliaGUI/resources/js/components/AsideMenu.vue new file mode 100644 index 000000000..6e89a1932 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/AsideMenu.vue @@ -0,0 +1,40 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/AsideMenuItem.vue b/system/web-optional/MeliaGUI/resources/js/components/AsideMenuItem.vue new file mode 100644 index 000000000..afc811902 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/AsideMenuItem.vue @@ -0,0 +1,99 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/AsideMenuLayer.vue b/system/web-optional/MeliaGUI/resources/js/components/AsideMenuLayer.vue new file mode 100644 index 000000000..2007f51d2 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/AsideMenuLayer.vue @@ -0,0 +1,77 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/AsideMenuList.vue b/system/web-optional/MeliaGUI/resources/js/components/AsideMenuList.vue new file mode 100644 index 000000000..41f4cd742 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/AsideMenuList.vue @@ -0,0 +1,29 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/BaseButton.vue b/system/web-optional/MeliaGUI/resources/js/components/BaseButton.vue new file mode 100644 index 000000000..45cd08b7f --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/BaseButton.vue @@ -0,0 +1,127 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/BaseButtons.vue b/system/web-optional/MeliaGUI/resources/js/components/BaseButtons.vue new file mode 100644 index 000000000..5cf1af6a1 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/BaseButtons.vue @@ -0,0 +1,60 @@ + diff --git a/system/web-optional/MeliaGUI/resources/js/components/BaseDivider.vue b/system/web-optional/MeliaGUI/resources/js/components/BaseDivider.vue new file mode 100644 index 000000000..d3af35cb5 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/BaseDivider.vue @@ -0,0 +1,19 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/BaseIcon.vue b/system/web-optional/MeliaGUI/resources/js/components/BaseIcon.vue new file mode 100644 index 000000000..e3141f5fa --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/BaseIcon.vue @@ -0,0 +1,42 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/BaseLevel.vue b/system/web-optional/MeliaGUI/resources/js/components/BaseLevel.vue new file mode 100644 index 000000000..493351ad0 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/BaseLevel.vue @@ -0,0 +1,40 @@ + diff --git a/system/web-optional/MeliaGUI/resources/js/components/CardBox.vue b/system/web-optional/MeliaGUI/resources/js/components/CardBox.vue new file mode 100644 index 000000000..f2b30b612 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/CardBox.vue @@ -0,0 +1,67 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/CardBoxAction.vue b/system/web-optional/MeliaGUI/resources/js/components/CardBoxAction.vue new file mode 100644 index 000000000..91599e80c --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/CardBoxAction.vue @@ -0,0 +1,55 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/CardBoxClient.vue b/system/web-optional/MeliaGUI/resources/js/components/CardBoxClient.vue new file mode 100644 index 000000000..b29ece259 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/CardBoxClient.vue @@ -0,0 +1,89 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/CardBoxComponentBody.vue b/system/web-optional/MeliaGUI/resources/js/components/CardBoxComponentBody.vue new file mode 100644 index 000000000..8daaec40e --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/CardBoxComponentBody.vue @@ -0,0 +1,11 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/CardBoxComponentEmpty.vue b/system/web-optional/MeliaGUI/resources/js/components/CardBoxComponentEmpty.vue new file mode 100644 index 000000000..f4c07a8f0 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/CardBoxComponentEmpty.vue @@ -0,0 +1,5 @@ + diff --git a/system/web-optional/MeliaGUI/resources/js/components/CardBoxComponentFooter.vue b/system/web-optional/MeliaGUI/resources/js/components/CardBoxComponentFooter.vue new file mode 100644 index 000000000..71dd3eef8 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/CardBoxComponentFooter.vue @@ -0,0 +1,5 @@ + diff --git a/system/web-optional/MeliaGUI/resources/js/components/CardBoxComponentHeader.vue b/system/web-optional/MeliaGUI/resources/js/components/CardBoxComponentHeader.vue new file mode 100644 index 000000000..18c15092f --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/CardBoxComponentHeader.vue @@ -0,0 +1,45 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/CardBoxComponentTitle.vue b/system/web-optional/MeliaGUI/resources/js/components/CardBoxComponentTitle.vue new file mode 100644 index 000000000..2ecaf0718 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/CardBoxComponentTitle.vue @@ -0,0 +1,17 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/CardBoxModal.vue b/system/web-optional/MeliaGUI/resources/js/components/CardBoxModal.vue new file mode 100644 index 000000000..b6e3f6fe3 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/CardBoxModal.vue @@ -0,0 +1,94 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/CardBoxTransaction.vue b/system/web-optional/MeliaGUI/resources/js/components/CardBoxTransaction.vue new file mode 100644 index 000000000..70a3e203e --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/CardBoxTransaction.vue @@ -0,0 +1,88 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/CardBoxWidget.vue b/system/web-optional/MeliaGUI/resources/js/components/CardBoxWidget.vue new file mode 100644 index 000000000..bbdd92e89 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/CardBoxWidget.vue @@ -0,0 +1,76 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/Charts/JobsChart.vue b/system/web-optional/MeliaGUI/resources/js/components/Charts/JobsChart.vue new file mode 100644 index 000000000..dff173cd6 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/Charts/JobsChart.vue @@ -0,0 +1,63 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/Charts/LineChart.vue b/system/web-optional/MeliaGUI/resources/js/components/Charts/LineChart.vue new file mode 100644 index 000000000..c24a5cb89 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/Charts/LineChart.vue @@ -0,0 +1,69 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/Charts/SilverChart.vue b/system/web-optional/MeliaGUI/resources/js/components/Charts/SilverChart.vue new file mode 100644 index 000000000..b241a5cd7 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/Charts/SilverChart.vue @@ -0,0 +1,101 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/Charts/chart.config.js b/system/web-optional/MeliaGUI/resources/js/components/Charts/chart.config.js new file mode 100644 index 000000000..2fba5e8ba --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/Charts/chart.config.js @@ -0,0 +1,54 @@ +export const chartColors = { + default: { + primary: '#00D1B2', + info: '#209CEE', + danger: '#FF3860', + }, +} + +const randomChartData = (n) => { + const data = [] + + for (let i = 0; i < n; i++) { + data.push(Math.round(Math.random() * 200)) + } + + return data +} + +const datasetObject = (color, points) => { + return { + fill: false, + borderColor: chartColors.default[color], + borderWidth: 2, + borderDash: [], + borderDashOffset: 0.0, + pointBackgroundColor: chartColors.default[color], + pointBorderColor: 'rgba(255,255,255,0)', + pointHoverBackgroundColor: chartColors.default[color], + pointBorderWidth: 20, + pointHoverRadius: 4, + pointHoverBorderWidth: 15, + pointRadius: 4, + data: randomChartData(points), + tension: 0.5, + cubicInterpolationMode: 'default', + } +} + +export const sampleChartData = (points = 9) => { + const labels = [] + + for (let i = 1; i <= points; i++) { + labels.push(`0${i}`) + } + + return { + labels, + datasets: [ + datasetObject('primary', points), + datasetObject('info', points), + datasetObject('danger', points), + ], + } +} diff --git a/system/web-optional/MeliaGUI/resources/js/components/Checkbox.vue b/system/web-optional/MeliaGUI/resources/js/components/Checkbox.vue new file mode 100644 index 000000000..22672c1af --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/Checkbox.vue @@ -0,0 +1,34 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/DangerButton.vue b/system/web-optional/MeliaGUI/resources/js/components/DangerButton.vue new file mode 100644 index 000000000..721c4ff49 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/DangerButton.vue @@ -0,0 +1,7 @@ + diff --git a/system/web-optional/MeliaGUI/resources/js/components/Dropdown.vue b/system/web-optional/MeliaGUI/resources/js/components/Dropdown.vue new file mode 100644 index 000000000..c6566e8d5 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/Dropdown.vue @@ -0,0 +1,80 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/DropdownLink.vue b/system/web-optional/MeliaGUI/resources/js/components/DropdownLink.vue new file mode 100644 index 000000000..5eab0f6c2 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/DropdownLink.vue @@ -0,0 +1,19 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/ExampleComponent.vue b/system/web-optional/MeliaGUI/resources/js/components/ExampleComponent.vue new file mode 100644 index 000000000..ad26aad36 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/ExampleComponent.vue @@ -0,0 +1,21 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/FooterBar.vue b/system/web-optional/MeliaGUI/resources/js/components/FooterBar.vue new file mode 100644 index 000000000..ff27d965e --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/FooterBar.vue @@ -0,0 +1,22 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/FormCheckRadio.vue b/system/web-optional/MeliaGUI/resources/js/components/FormCheckRadio.vue new file mode 100644 index 000000000..56088053a --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/FormCheckRadio.vue @@ -0,0 +1,53 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/FormCheckRadioGroup.vue b/system/web-optional/MeliaGUI/resources/js/components/FormCheckRadioGroup.vue new file mode 100644 index 000000000..26da3ce68 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/FormCheckRadioGroup.vue @@ -0,0 +1,57 @@ + + + diff --git a/system/web-optional/MeliaGUI/resources/js/components/FormControl.vue b/system/web-optional/MeliaGUI/resources/js/components/FormControl.vue new file mode 100644 index 000000000..16fcacb10 --- /dev/null +++ b/system/web-optional/MeliaGUI/resources/js/components/FormControl.vue @@ -0,0 +1,171 @@ + + +