Revert "Basic search engine shit"

This reverts commit 6372debdff.
This commit is contained in:
rift 2023-12-26 17:59:08 -06:00
parent 950c60ba62
commit 1865161d73
7 changed files with 119 additions and 21 deletions

52
src/locales/de.json Normal file
View file

@ -0,0 +1,52 @@
{
"header": {
"title": "Nebel",
"games": "Spiele",
"settings": "einstellungen",
"discord": "Sie wollen mehr URL-Adresse?"
},
"404": {
"text": "Dieser Nebel-Dienst wurde deaktiviert.",
"return": "Zurück nach Hause."
},
"home": {
"placeholder": "Suchen Sie frei im Web."
},
"discord": {
"title": "Nebel's Discord Server",
"sub": "Möchten Sie diesen über einen Proxy öffnen?",
"button1": "Normal öffnen",
"button2": "Proxy verwenden"
},
"setting": {
"tabs": {
"proxy": "Proxy",
"tab": "tab",
"custom": "Anpassung",
"misc": "Misc"
},
"proxy": {
"title": "Proxy",
"subtitle": "Wählen Sie den Proxy, der Ihren Anforderungen entspricht",
"automatic": "Automatisch",
"buggyWarning": "(PROBLEME)"
},
"languages": {
"title": "Sprache",
"subtitle": "Wählen Sie Ihre bevorzugte Sprache",
"japanese": "Japanisch",
"english": "Englisch",
"spanish": "Spanisch",
"german": "Deutsch",
"greek": "Griechisch",
"dutch": "Niederländisch"
},
"proxymodes": {
"title": "Öffnen in",
"subtitle": "Wählen Sie, wie Ihre Seiten geöffnet werden sollen",
"embed": "Einbetten",
"direct": "Direkt",
"aboutblank": "About:Blank"
}
}
}

View file

@ -36,7 +36,10 @@
"subtitle": "Choose your preferred language",
"japanese": "Japanese",
"english": "English",
"spanish": "Spanish"
"spanish": "Spanish",
"german": "German",
"greek": "Greek",
"dutch": "Dutch"
},
"proxymodes": {
"title": "Open in",

View file

@ -36,7 +36,10 @@
"subtitle": "Elige tu idioma preferido",
"japanese": "Japonés",
"english": "Inglés",
"spanish": "Español"
"spanish": "Español",
"german": "",
"greek": "",
"dutch": ""
},
"proxymodes": {
"title": "Abrir en",

52
src/locales/gr.json Normal file
View file

@ -0,0 +1,52 @@
{
"header": {
"title": "νεφέλωμα",
"games": "Παιχνίδια",
"settings": "Ρυθμίσεις",
"discord": "θέλετε περισσότερους συνδέσμους?"
},
"404": {
"text": "Αυτή η υπηρεσία Νεφέλωμα έχει απενεργοποιηθεί.",
"return": "Επιστροφή στο σπίτι."
},
"home": {
"placeholder": "Ελεύθερη αναζήτηση στο διαδίκτυο."
},
"discord": {
"title": "Discord Διακομιστής του Νεφελώματος",
"sub": "Άνοιγμα μέσω διακομιστή μεσολάβησης;",
"button1": "Ανοιχτό κανονικά",
"button2": "Χρήση μεσολάβησης"
},
"setting": {
"tabs": {
"proxy": "Mεσολάβησης",
"tab": "Καρτέλα",
"custom": "Προσαρμογή",
"misc": "Διάφορα"
},
"proxy": {
"title": "Μεσολάβηση",
"subtitle": "Επιλέξτε τη μεσολάβηση που ταιριάζει στις ανάγκες σας",
"automatic": "Αυτόματο",
"buggyWarning": "(ΠΡΟΒΛΗΜΑ)"
},
"languages": {
"title": "Γλώσσες",
"subtitle": "Επιλέξτε τη γλώσσα που προτιμάτε",
"japanese": "Ιαπωνικά",
"english": "Αγγλικά",
"spanish": "Ησπανικά",
"german": "Γερμανικό",
"greek": "Ελληνικά",
"dutch": "Ολλανδικά"
},
"proxymodes": {
"title": "Άνοιγμα σε",
"subtitle": "Επιλέξτε τον τρόπο ανοίγματος των ιστοσελίδων σας",
"embed": "εΕνσωμάτωση",
"direct": "¨Αμεσα",
"aboutblank": "About:Blank"
}
}
}

View file

@ -36,7 +36,10 @@
"subtitle": "好きな言語を選んでください",
"japanese": "日本語",
"english": "英語",
"spanish": "スペイン語"
"spanish": "スペイン語",
"german": "",
"greek": "",
"dutch": ""
},
"proxymodes": {
"title": "開く",

View file

@ -15,13 +15,12 @@ export function ProxyFrame(props: { url: string }) {
// pass the URL encoded with encodeURIcomponent
const localProxy = localStorage.getItem("proxy") || "automatic";
const proxyMode = localStorage.getItem("proxyMode") || "direct";
const searchEngine =
localStorage.getItem("searchEngine") || "https://google.com/search?q=%s";
const [ProxiedUrl, setProxiedUrl] = useState<string | undefined>(undefined);
let decodedUrl = decodeURIComponent(props.url);
//attempt to convert to a valid url
decodedUrl = searchUtil(decodedUrl, searchEngine);
decodedUrl = searchUtil(decodedUrl, "https://google.com/search?q=%s");
let proxyRef;

View file

@ -14,16 +14,11 @@ const Proxy = ({ id, active }) => {
];
const proxyModes = [
{ id: "embed", label: t("settings.proxymodes.embed") },
{ id: "direct", label: t("settings.proxymodes.direct") },
{ id: "embed", label: t("settings.proxymodes.embed") },
{ id: "aboutblank", label: t("settings.proxymodes.aboutblank") }
];
const searchEngines = [
{ id: "https://google.com/search?q=%s", label: "Google" },
{ id: "https://bing.com/search?q=%s", label: "Bing" }
];
return (
<motion.div
role="tabpanel"
@ -51,15 +46,6 @@ const Proxy = ({ id, active }) => {
refresh={false}
/>
</div>
<div class="flex h-64 w-80 flex-col flex-wrap content-center items-center rounded-lg border border-input-border-color bg-lighter p-7 text-center">
<div class="p-2 text-3xl">Search ENgines</div>
<div class="text-md p-4">{t("settings.proxymodes.subtitle")}</div>
<Dropdown
storageKey="searchEngine"
options={searchEngines}
refresh={false}
/>
</div>
</motion.div>
</motion.div>
);