mirror of
https://github.com/NebulaServices/Nebula.git
synced 2025-05-17 13:30:00 -04:00
Basic search engine shit
This commit is contained in:
parent
b0ed0359a9
commit
6372debdff
7 changed files with 21 additions and 119 deletions
|
@ -1,52 +0,0 @@
|
||||||
{
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -36,10 +36,7 @@
|
||||||
"subtitle": "Choose your preferred language",
|
"subtitle": "Choose your preferred language",
|
||||||
"japanese": "Japanese",
|
"japanese": "Japanese",
|
||||||
"english": "English",
|
"english": "English",
|
||||||
"spanish": "Spanish",
|
"spanish": "Spanish"
|
||||||
"german": "German",
|
|
||||||
"greek": "Greek",
|
|
||||||
"dutch": "Dutch"
|
|
||||||
},
|
},
|
||||||
"proxymodes": {
|
"proxymodes": {
|
||||||
"title": "Open in",
|
"title": "Open in",
|
||||||
|
|
|
@ -36,10 +36,7 @@
|
||||||
"subtitle": "Elige tu idioma preferido",
|
"subtitle": "Elige tu idioma preferido",
|
||||||
"japanese": "Japonés",
|
"japanese": "Japonés",
|
||||||
"english": "Inglés",
|
"english": "Inglés",
|
||||||
"spanish": "Español",
|
"spanish": "Español"
|
||||||
"german": "",
|
|
||||||
"greek": "",
|
|
||||||
"dutch": ""
|
|
||||||
},
|
},
|
||||||
"proxymodes": {
|
"proxymodes": {
|
||||||
"title": "Abrir en",
|
"title": "Abrir en",
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
{
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -36,10 +36,7 @@
|
||||||
"subtitle": "好きな言語を選んでください",
|
"subtitle": "好きな言語を選んでください",
|
||||||
"japanese": "日本語",
|
"japanese": "日本語",
|
||||||
"english": "英語",
|
"english": "英語",
|
||||||
"spanish": "スペイン語",
|
"spanish": "スペイン語"
|
||||||
"german": "",
|
|
||||||
"greek": "",
|
|
||||||
"dutch": ""
|
|
||||||
},
|
},
|
||||||
"proxymodes": {
|
"proxymodes": {
|
||||||
"title": "開く",
|
"title": "開く",
|
||||||
|
|
|
@ -15,12 +15,13 @@ export function ProxyFrame(props: { url: string }) {
|
||||||
// pass the URL encoded with encodeURIcomponent
|
// pass the URL encoded with encodeURIcomponent
|
||||||
const localProxy = localStorage.getItem("proxy") || "automatic";
|
const localProxy = localStorage.getItem("proxy") || "automatic";
|
||||||
const proxyMode = localStorage.getItem("proxyMode") || "direct";
|
const proxyMode = localStorage.getItem("proxyMode") || "direct";
|
||||||
|
const searchEngine =
|
||||||
|
localStorage.getItem("searchEngine") || "https://google.com/search?q=%s";
|
||||||
const [ProxiedUrl, setProxiedUrl] = useState<string | undefined>(undefined);
|
const [ProxiedUrl, setProxiedUrl] = useState<string | undefined>(undefined);
|
||||||
|
|
||||||
let decodedUrl = decodeURIComponent(props.url);
|
let decodedUrl = decodeURIComponent(props.url);
|
||||||
//attempt to convert to a valid url
|
//attempt to convert to a valid url
|
||||||
decodedUrl = searchUtil(decodedUrl, "https://google.com/search?q=%s");
|
decodedUrl = searchUtil(decodedUrl, searchEngine);
|
||||||
|
|
||||||
let proxyRef;
|
let proxyRef;
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,16 @@ const Proxy = ({ id, active }) => {
|
||||||
];
|
];
|
||||||
|
|
||||||
const proxyModes = [
|
const proxyModes = [
|
||||||
{ id: "direct", label: t("settings.proxymodes.direct") },
|
|
||||||
{ id: "embed", label: t("settings.proxymodes.embed") },
|
{ id: "embed", label: t("settings.proxymodes.embed") },
|
||||||
|
{ id: "direct", label: t("settings.proxymodes.direct") },
|
||||||
{ id: "aboutblank", label: t("settings.proxymodes.aboutblank") }
|
{ 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 (
|
return (
|
||||||
<motion.div
|
<motion.div
|
||||||
role="tabpanel"
|
role="tabpanel"
|
||||||
|
@ -46,6 +51,15 @@ const Proxy = ({ id, active }) => {
|
||||||
refresh={false}
|
refresh={false}
|
||||||
/>
|
/>
|
||||||
</div>
|
</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>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue