diff --git a/frontend/env.d.ts b/frontend/env.d.ts index 6a6c5c6..bf3f482 100755 --- a/frontend/env.d.ts +++ b/frontend/env.d.ts @@ -9,3 +9,8 @@ declare module '*.vue' { declare module '@vueuse/sound' { export function useSound(url: string): { play: () => void }; } + +declare module '*.yml' { + const content: any; + export default content; +} diff --git a/frontend/package.json b/frontend/package.json index d08a254..06082d7 100755 --- a/frontend/package.json +++ b/frontend/package.json @@ -29,6 +29,7 @@ "vue-turnstile": "^1.0.11" }, "devDependencies": { + "@modyfi/vite-plugin-yaml": "^1.1.0", "@tsconfig/node22": "^22.0.0", "@types/node": "^22.9.0", "@vitejs/plugin-vue": "^5.1.4", diff --git a/frontend/src/locale/en.json b/frontend/src/locale/en.json deleted file mode 100755 index 7016cb4..0000000 --- a/frontend/src/locale/en.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "auth": { - "logic": { - "errors": { - "footer": "Please contact support for assistance", - "title": "Session Error", - "expired": "Your session has expired" - } - }, - "pages": { - "login": { - "components": { - "form": { - "support_center": "Support Center" - } - }, - "alerts": { - "success": { - "title": "Success", - "login_success": "You have successfully logged in", - "footer": "Welcome back!" - }, - "error": { - "title": "Login Error", - "missing_fields": "Please fill in all fields", - "invalid_credentials": "Invalid credentials", - "generic": "An error occurred. Please try again later", - "cloudflare_error": "You have been blocked by Cloudflare Turnstile", - "footer": "Please contact support for assistance", - "not_verified": "Your email is not verified yet", - "banned": "Your account was permanently banned", - "deleted": "Your account was deleted either by you or an admin" - } - }, - "page": { - "title": "Login", - "subTitle": "Login in to your account", - "form": { - "email": { - "label": "Email or Username", - "placeholder": "Enter your email or username" - }, - "password": { - "label": "Password", - "placeholder": "Enter your password" - }, - "forgot_password": "Forgot password?", - "login_button": { - "label": "Login", - "loading": "Logging in..." - }, - "register": { - "label": "Don't have an account?", - "link": "Register" - } - } - } - }, - "register": { - "alerts": { - "success": { - "title": "Success", - "register_success": "You have successfully registered", - "footer": "Thanks for choosing us!" - }, - "error": { - "title": "Registration Failed", - "csrf_error": "CSRF token mismatch", - "username_exists": "Username already exists", - "email_exists": "Email already exists", - "generic": "An error occurred. Please try again later", - "cloudflare_error": "You have been blocked by Cloudflare Turnstile", - "footer": "Please contact support for assistance" - } - }, - "page": { - "title": "Register", - "subTitle": "Create a new account", - "form": { - "email": { - "label": "Email", - "placeholder": "Enter your email" - }, - "firstName": { - "label": "First Name", - "placeholder": "Enter your first name" - }, - "lastName": { - "label": "Last Name", - "placeholder": "Enter your last name" - }, - "username": { - "label": "Username", - "placeholder": "Enter your username" - }, - "password": { - "label": "Password", - "placeholder": "Enter your password" - }, - "confirm_password": { - "label": "Confirm Password", - "placeholder": "Confirm your password" - }, - "register_button": { - "label": "Register", - "loading": "Registering..." - }, - "login": { - "label": "Already have an account?", - "link": "Login" - } - } - } - }, - "forgot_password": { - "alerts": { - "success": { - "title": "Success", - "reset_success": "Password reset link sent", - "footer": "Check your email!" - }, - "error": { - "title": "Error", - "missing_fields": "Please fill in all fields", - "email_not_found": "Email not found", - "generic": "An error occurred. Please try again later", - "cloudflare_error": "You have been blocked by Cloudflare Turnstile", - "footer": "Please contact support for assistance" - } - }, - "page": { - "title": "Forgot Password", - "subTitle": "Reset your password", - "form": { - "email": { - "label": "Email", - "placeholder": "Enter your email" - }, - "reset_button": { - "label": "Reset Password", - "loading": "Sending reset link..." - }, - "login": { - "label": "Remembered your password?", - "link": "Login" - } - } - } - }, - "twofactor_setup": { - "alerts": {}, - "page": { - "title": "Two Factor Authentication", - "subTitle": "Setup Two Factor Authentication", - "form": { - "secret": { - "label": "Secret", - "placeholder": "Here is your secret key" - }, - "code": { - "label": "Code", - "placeholder": "Enter the code from your authenticator app" - }, - "setup_button": { - "label": "Setup", - "loading": "Setting up..." - } - } - } - }, - "reset_password": { - "alerts": { - "success": { - "title": "Success", - "reset_success": "We have successfully reset your password", - "footer": "Check your email!" - }, - "error": { - "title": "Error", - "missing_fields": "Please fill in all fields", - "passwords_mismatch": "Passwords do not match", - "generic": "An error occurred. Please try again later", - "cloudflare_error": "You have been blocked by Cloudflare Turnstile", - "footer": "Please contact support for assistance", - "invalid_code": "Invalid reset code" - } - }, - "page": { - "title": "Reset Password", - "subTitle": "Reset your password", - "form": { - "password_new": { - "label": "New Password", - "placeholder": "Enter your new password" - }, - "password_confirm": { - "label": "Confirm Password", - "placeholder": "Confirm your new password" - }, - "reset_button": { - "label": "Reset Password", - "loading": "Applying changes..." - }, - "login": { - "label": "Remembered your password?", - "link": "Login" - } - } - } - } - } - }, - "errors": { - "forbidden": { - "title": "403 Forbidden", - "message": "Hold it right there, space traveler! You don't have the necessary clearance to access this area." - }, - "notfound": { - "title": "404 Not Found", - "message": "We couldn't find the page you were looking for. It may have been moved or deleted." - }, - "servererror": { - "title": "500 Server Error", - "message": "An error occurred on our end. Please try again later." - } - }, - "account": { - "pages": { - "billing": { - "alerts": { - "success": { - "title": "Success", - "update_success": "Billing information updated", - "footer": "Your billing information has been updated" - }, - "error": { - "title": "Error", - "generic": "An error occurred. Please try again later", - "footer": "Please contact support for assistance" - } - }, - "page": { - "title": "Billing", - "subTitle": "Manage your billing information", - "form": { - "company_name": { - "label": "Company Name" - }, - "vat_id": { - "label": "VAT ID" - }, - "address": { - "label": "Address" - }, - "city": { - "label": "City" - }, - "state": { - "label": "State" - }, - "zip": { - "label": "Zip" - }, - "country": { - "label": "Country" - }, - "address2": { - "label": "Address 2" - }, - "update_button": { - "label": "Update", - "reset": "Reset" - } - } - } - } - } - }, - "components": { - "sidebar": { - "dashboard": "Dashboard", - "tickets": "Tickets", - "eula": "EULA", - "announcements": "Announcements", - "addons": "Addons", - "logs": "Logs", - "settings": "Settings", - "users": "Users", - "apikeys": "API Keys" - } - } -} \ No newline at end of file diff --git a/frontend/src/locale/en.yml b/frontend/src/locale/en.yml new file mode 100755 index 0000000..e86255b --- /dev/null +++ b/frontend/src/locale/en.yml @@ -0,0 +1,216 @@ +auth: + logic: + errors: + footer: Please contact support for assistance + title: Session Error + expired: Your session has expired + pages: + login: + components: + form: + support_center: Support Center + alerts: + success: + title: Success + login_success: You have successfully logged in + footer: Welcome back! + error: + title: Login Error + missing_fields: Please fill in all fields + invalid_credentials: Invalid credentials + generic: An error occurred. Please try again later + cloudflare_error: You have been blocked by Cloudflare Turnstile + footer: Please contact support for assistance + not_verified: Your email is not verified yet + banned: Your account was permanently banned + deleted: Your account was deleted either by you or an admin + page: + title: Login + subTitle: Login in to your account + form: + email: + label: Email or Username + placeholder: Enter your email or username + password: + label: Password + placeholder: Enter your password + forgot_password: Forgot password? + login_button: + label: Login + loading: Logging in... + register: + label: Don't have an account? + link: Register + register: + alerts: + success: + title: Success + register_success: You have successfully registered + footer: Thanks for choosing us! + error: + title: Registration Failed + csrf_error: CSRF token mismatch + username_exists: Username already exists + email_exists: Email already exists + generic: An error occurred. Please try again later + cloudflare_error: You have been blocked by Cloudflare Turnstile + footer: Please contact support for assistance + page: + title: Register + subTitle: Create a new account + form: + email: + label: Email + placeholder: Enter your email + firstName: + label: First Name + placeholder: Enter your first name + lastName: + label: Last Name + placeholder: Enter your last name + username: + label: Username + placeholder: Enter your username + password: + label: Password + placeholder: Enter your password + confirm_password: + label: Confirm Password + placeholder: Confirm your password + register_button: + label: Register + loading: Registering... + login: + label: Already have an account? + link: Login + forgot_password: + alerts: + success: + title: Success + reset_success: Password reset link sent + footer: Check your email! + error: + title: Error + missing_fields: Please fill in all fields + email_not_found: Email not found + generic: An error occurred. Please try again later + cloudflare_error: You have been blocked by Cloudflare Turnstile + footer: Please contact support for assistance + page: + title: Forgot Password + subTitle: Reset your password + form: + email: + label: Email + placeholder: Enter your email + reset_button: + label: Reset Password + loading: Sending reset link... + login: + label: Remembered your password? + link: Login + twofactor_setup: + alerts: "" + page: + title: Two Factor Authentication + subTitle: Setup Two Factor Authentication + form: + secret: + label: Secret + placeholder: Here is your secret key + code: + label: Code + placeholder: Enter the code from your authenticator app + setup_button: + label: Setup + loading: Setting up... + reset_password: + alerts: + success: + title: Success + reset_success: We have successfully reset your password + footer: Check your email! + error: + title: Error + missing_fields: Please fill in all fields + passwords_mismatch: Passwords do not match + generic: An error occurred. Please try again later + cloudflare_error: You have been blocked by Cloudflare Turnstile + footer: Please contact support for assistance + invalid_code: Invalid reset code + page: + title: Reset Password + subTitle: Reset your password + form: + password_new: + label: New Password + placeholder: Enter your new password + password_confirm: + label: Confirm Password + placeholder: Confirm your new password + reset_button: + label: Reset Password + loading: Applying changes... + login: + label: Remembered your password? + link: Login +errors: + forbidden: + title: 403 Forbidden + message: >- + Hold it right there, space traveler! You don't have the necessary + clearance to access this area. + notfound: + title: 404 Not Found + message: >- + We couldn't find the page you were looking for. It may have been moved or + deleted. + servererror: + title: 500 Server Error + message: An error occurred on our end. Please try again later. +account: + pages: + billing: + alerts: + success: + title: Success + update_success: Billing information updated + footer: Your billing information has been updated + error: + title: Error + generic: An error occurred. Please try again later + footer: Please contact support for assistance + page: + title: Billing + subTitle: Manage your billing information + form: + company_name: + label: Company Name + vat_id: + label: VAT ID + address: + label: Address + city: + label: City + state: + label: State + zip: + label: Zip + country: + label: Country + address2: + label: Address 2 + update_button: + label: Update + reset: Reset +components: + sidebar: + dashboard: Dashboard + tickets: Tickets + eula: EULA + announcements: Announcements + addons: Addons + logs: Logs + settings: Settings + users: Users + apikeys: API Keys diff --git a/frontend/src/main.ts b/frontend/src/main.ts index a5fc0ee..7676d64 100755 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -5,7 +5,7 @@ import App from './App.vue'; import router from './router'; import VueSweetalert2 from 'vue-sweetalert2'; import { createI18n } from 'vue-i18n'; -import EN from '@/locale/en.json'; +import EN from '@/locale/en.yml'; import Settings from '@/mythicalclient/Settings'; import 'sweetalert2/dist/sweetalert2.min.css'; diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 634b495..cd9513a 100755 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -4,10 +4,12 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' import vueDevTools from 'vite-plugin-vue-devtools' +import ViteYaml from '@modyfi/vite-plugin-yaml'; // https://vite.dev/config/ export default defineConfig({ plugins: [ + ViteYaml(), vue(), vueJsx(), vueDevTools(), diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 5d5a913..47cf852 100755 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -532,6 +532,15 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@modyfi/vite-plugin-yaml@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@modyfi/vite-plugin-yaml/-/vite-plugin-yaml-1.1.0.tgz#dc26e66f1715a4739fb3051f12ccf1f0a3a1a96e" + integrity sha512-L26xfzkSo1yamODCAtk/ipVlL6OEw2bcJ92zunyHu8zxi7+meV0zefA9xscRMDCsMY8xL3C3wi3DhMiPxcbxbw== + dependencies: + "@rollup/pluginutils" "5.1.0" + js-yaml "4.1.0" + tosource "2.0.0-alpha.3" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -568,6 +577,15 @@ resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.28.tgz#d45e01c4a56f143ee69c54dd6b12eade9e270a73" integrity sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw== +"@rollup/pluginutils@5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.1.0.tgz#7e53eddc8c7f483a4ad0b94afb1f7f5fd3c771e0" + integrity sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g== + dependencies: + "@types/estree" "^1.0.0" + estree-walker "^2.0.2" + picomatch "^2.3.1" + "@rollup/pluginutils@^5.1.3": version "5.1.3" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.1.3.tgz#3001bf1a03f3ad24457591f2c259c8e514e0dbdf" @@ -1889,7 +1907,7 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^4.1.0: +js-yaml@4.1.0, js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== @@ -2716,6 +2734,11 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +tosource@2.0.0-alpha.3: + version "2.0.0-alpha.3" + resolved "https://registry.yarnpkg.com/tosource/-/tosource-2.0.0-alpha.3.tgz#ef385dac9092e009bf25c018838ddaae436daeb6" + integrity sha512-KAB2lrSS48y91MzFPFuDg4hLbvDiyTjOVgaK7Erw+5AmZXNq4sFRVn8r6yxSLuNs15PaokrDRpS61ERY9uZOug== + totalist@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/totalist/-/totalist-3.0.1.tgz#ba3a3d600c915b1a97872348f79c127475f6acf8" diff --git a/install.bash b/install.bash index eab30b3..5967e91 100755 --- a/install.bash +++ b/install.bash @@ -40,14 +40,6 @@ echo -e " \x1b[35;1m┃ ☻ \x1b[0mhttps://discord.mythical.systems " -printf "\n\x1b[2;1m┃\x1b[0;2m Setting permissions.\x1b[0m" -sleep 1 -# Set the right permissions -chown -R www-data:www-data ./ -chmod -R 777 ./ -printf "\n\x1b[2;1m┃\x1b[0;2m Permission set.\x1b[0m" -sleep 1 - printf "\n\x1b[2;1m┃\x1b[0;2m Installing dependencies. \x1b[0m" sleep 1 # Install the dependencies