Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

50 #78

Merged
merged 2 commits into from
Dec 11, 2024
Merged

50 #78

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ declare module 'vue' {
AboutThisList: typeof import('./src/components/domains/list/AboutThisList.vue')['default']
Account: typeof import('./src/components/account/Account.vue')['default']
AddDomainsModal: typeof import('./src/components/domains/list/AddDomainsModal.vue')['default']
AITranslationMessage: typeof import('./src/components/AITranslationMessage.vue')['default']
AppliedTags: typeof import('./src/components/reports/AppliedTags.vue')['default']
Autorefresh: typeof import('./src/components/autorefresh.vue')['default']
BAlert: typeof import('bootstrap-vue-next/components/BAlert')['BAlert']
Expand Down
3 changes: 3 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
</router-view>

</div>
<AITranslationMessage v-if="!['nl', 'en'].includes($i18n.locale)"/>
<GithubMessage v-if="config.app.layout === 'internet_nl'"/>
</div>
</main>
Expand Down Expand Up @@ -59,6 +60,7 @@ import SiteMenu from './components/SiteMenu.vue'
import {mapState} from 'pinia'
import http from "@/httpclient";
import GithubMessage from "@/components/GithubMessage.vue";
import AITranslationMessage from "./components/AITranslationMessage.vue";

export default {

Expand Down Expand Up @@ -116,6 +118,7 @@ export default {
},

components: {
AITranslationMessage,
GithubMessage,
SiteMenu
},
Expand Down
11 changes: 11 additions & 0 deletions src/components/AITranslationMessage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<template>
<b-alert :model-value="true" variant="info" class="w-100">
🤖 {{ $t("app.core.translated_by_ai")}}
</b-alert>
</template>

<script>
export default {
name: "AITranslationMessage"
}
</script>
6 changes: 3 additions & 3 deletions src/components/domains/UrlList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ h2 {
<b-button variant="success" @click="visible.discover_subdomains = true" v-if="store.config.app.subdomain_suggestion.enabled" size="sm">🌪️️ {{ $t("domain.urllist.button.discover_subdomains") }}</b-button> &nbsp;
<b-button variant="success" @click="visible.upload = true" size="sm">⬆️ {{ $t("domain.urllist.button.upload") }}</b-button> &nbsp;
<!-- <button class="border-success" @click="get_urls()">⬆️ {{ $t("button.reload") }}</button> -->
<SubdomainDiscovery v-if="urls.length" :list_id="list.id" @finished="get_urls"/>
<WwwDiscovery v-if="urls.length" :list_id="list.id" @finished="get_urls"/>
</div>

<template v-if="urls.length">
Expand Down Expand Up @@ -121,13 +121,13 @@ import DomainTable from "@/components/domains/DomainTable.vue";
import autorefresh from '@/components/autorefresh.vue'
import Probe from '@/components/probe.vue'
import DiscoverSubdomains from "@/components/domains/list/DiscoverSubdomainsModal.vue";
import SubdomainDiscovery from "@/components/domains/list/WwwDiscovery.vue";
import WwwDiscovery from "@/components/domains/list/WwwDiscovery.vue";

import { dashboardStore } from '@/dashboardStore'

export default {
components: {
SubdomainDiscovery,
WwwDiscovery,
DiscoverSubdomains,

DomainTable,
Expand Down
8 changes: 4 additions & 4 deletions src/components/domains/list/AddDomainsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@
</div>
</template>
<template #footer>
<b-button variant="secondary" @click="stop()">{{ $t("domain.list.add-domains.cancel") }}</b-button>
&nbsp;
<template v-if="!loading">
<b-button variant="warning" @click="bulk_add_new()" :disabled="too_many_new_domains">
<b-button variant="success" @click="bulk_add_new()" :disabled="too_many_new_domains">
{{ $t("domain.list.add-domains.ok") }}
</b-button>
</template>
<template v-else>
<b-button variant="warning" disabled="disabled">
<b-button variant="success" disabled="disabled">
<probe/>
{{ $t("domain.list.add-domains.loading") }}
</b-button>
</template>
&nbsp;
<b-button variant="warning" @click="stop()">{{ $t("domain.list.add-domains.cancel") }}</b-button>
</template>
</b-modal>
</template>
Expand Down
17 changes: 13 additions & 4 deletions src/components/domains/list/WwwDiscovery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
🔎 {{ $t("domain.www-discovery.scanning-done-click-reload") }}
</b-button>

<b-button variant="success" size="sm" v-if="!success_while_visible" v-b-modal="`subdomain_discovery_modal_${list_id}`" :disabled="loading" @click="visible=true;">
<b-button variant="success" size="sm" v-if="!success_while_visible" v-b-modal="`subdomain_discovery_modal_${list_id}`" :disabled="loading" @click="make_visible()">
🔎 {{ $t("domain.www-discovery.find-www-subdomains") }}
<span v-if="state_changed_on">{{ $t("domain.www-discovery.last-scan-finished") }}</span></b-button>
</template>
Expand All @@ -17,7 +17,8 @@
{{ $t("domain.www-discovery.finding-www-subdomains") }}
</b-button>
</template>
<subdomain-discovery-modal :id="`subdomain_discovery_modal_${list_id}`" @ok="request(); visible=false;" @cancel="visible=false;" v-model="visible" :show="visible" />

<subdomain-discovery-modal :id="`subdomain_discovery_modal_${list_id}`" v-if="modal_visible" @close="modal_visible=false" @ok="request(); modal_visible=false"/>
</span>
</template>

Expand Down Expand Up @@ -45,7 +46,7 @@ export default {
domains_discovered: {},
success_while_visible: false,

visible: false,
modal_visible: false,
}
},
beforeDestroy() {
Expand All @@ -56,13 +57,20 @@ export default {
},
mounted() {
// todo: recheck every minute or so until the state is finished|error|cancelled
// note: do not automatically reload lists as a side effect, might be annoying when someones edits just disappear.
// note: do not automatically reload lists as a aside effect, might be annoying when someones edits just disappear.
this.status()
},
computed: {
is_scanning() {return ['requested', 'scanning'].includes(this.state)}
},
methods: {
make_visible() {
this.modal_visible = true;
this.modal_visible = true;
this.modal_visible = true;
this.modal_visible_2 = "true";
console.log('show modal');
},
reset() {
this.state = 'finished';
this.state_message = '';
Expand All @@ -85,6 +93,7 @@ export default {
this.reset()
this.status()
this.visible = true;
console.log('tada')
},
status() {
this.loading = true;
Expand Down
10 changes: 5 additions & 5 deletions src/components/domains/list/WwwDiscoveryModal.vue
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<!-- SPDX-License-Identifier: Apache-2.0 -->
<template>
<b-modal :id="id" @ok="$emit('ok')" header-bg-variant="info" header-text-variant="light" no-fade scrollable size="lg">
<b-modal :id="id" @ok="$emit('ok')" @close="$emit('close')" header-bg-variant="info" header-text-variant="light" no-fade scrollable size="lg">

<template #header><h4>{{ $t("domain.www-discovery-modal.title") }}</h4></template>
<template #default>
<p>{{ $t("domain.www-discovery-modal.message") }}</p>
</template>
<template #footer>
<b-button variant="secondary" @click="$emit('close');">{{ $t("domain.www-discovery-modal.cancel") }}</b-button>
&nbsp;
<b-button variant="warning" @click="$emit('ok')">{{ $t("domain.www-discovery-modal.ok") }}</b-button>
<b-button variant="success" @click="$emit('ok')">{{ $t("domain.www-discovery-modal.ok") }}</b-button>
</template>
</b-modal>
</template>
<script>

export default {
name: "SubdomainDiscoveryModal",
name: "WwwDiscoveryModal",
props: {
id: {type: String},
visible: {type: Boolean, default: false}
id: {type: String}
}
}
</script>
51 changes: 51 additions & 0 deletions src/locales/dashboard-frontend.babel
Original file line number Diff line number Diff line change
Expand Up @@ -1526,6 +1526,34 @@
</concept_node>
</children>
</folder_node>
<folder_node>
<name>core</name>
<children>
<concept_node>
<name>translated_by_ai</name>
<description/>
<comment/>
<translations>
<translation>
<language>de-DE</language>
<approved>false</approved>
</translation>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-FR</language>
<approved>false</approved>
</translation>
<translation>
<language>nl-NL</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
</children>
</folder_node>
<folder_node>
<name>footer</name>
<children>
Expand Down Expand Up @@ -1940,6 +1968,29 @@
<folder_node>
<name>locale</name>
<children>
<concept_node>
<name>ai_translated</name>
<description/>
<comment/>
<translations>
<translation>
<language>de-DE</language>
<approved>false</approved>
</translation>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-FR</language>
<approved>false</approved>
</translation>
<translation>
<language>nl-NL</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>de</name>
<description/>
Expand Down
8 changes: 6 additions & 2 deletions src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
"refresh_now": "Daten jetzt aktualisieren",
"units": "Sekunden"
},
"core": {
"translated_by_ai": "Diese Übersetzung wurde mit Hilfe künstlicher Intelligenz erstellt, was zu kontextbezogenen Fehlern oder falschen Formulierungen führen kann. Bitte setzen Sie sich mit uns in Verbindung, um eine offizielle Übersetzung zu erhalten. Bei Unklarheiten beziehen Sie sich bitte auf den englischen oder niederländischen Originaltext. Wir entschuldigen uns im Voraus für etwaige Übersetzungsfehler."
},
"footer": {
"copyright": "Urheberrecht",
"disclosure": "Schwachstelle melden",
Expand All @@ -111,9 +114,10 @@
"loading": "Laden..."
},
"locale": {
"de": "Deutsch",
"ai_translated": "via AI",
"de": "Deutsch - 🤖KI",
"en": "English",
"fr": "Français",
"fr": "Français - 🤖IA",
"nl": "Nederlands"
},
"login": {
Expand Down
8 changes: 6 additions & 2 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
"refresh_now": "refresh data now",
"units": "seconds"
},
"core": {
"translated_by_ai": "This translation is performed using artificial intelligence, this may result in contextual mistakes or incorrect wording. Please get in touch to support an official translation. Please refer to the original English or Dutch texts in case of confusion. Our apologies in advance for any translation mistakes."
},
"footer": {
"copyright": "Copyright",
"disclosure": "Report vulnerability",
Expand All @@ -111,9 +114,10 @@
"loading": "Loading..."
},
"locale": {
"de": "Deutsch",
"ai_translated": "via AI",
"de": "Deutsch - 🤖KI",
"en": "English",
"fr": "Français",
"fr": "Français - 🤖IA",
"nl": "Nederlands"
},
"login": {
Expand Down
8 changes: 6 additions & 2 deletions src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
"refresh_now": "rafraîchir les données maintenant",
"units": "Secondes"
},
"core": {
"translated_by_ai": "Cette traduction est réalisée à l'aide de l'intelligence artificielle, ce qui peut entraîner des erreurs contextuelles ou des formulations incorrectes. Veuillez nous contacter pour obtenir une traduction officielle. En cas de confusion, veuillez vous référer aux textes originaux en anglais ou en néerlandais. Nous nous excusons par avance pour toute erreur de traduction."
},
"footer": {
"copyright": "Droit d'auteur",
"disclosure": "Signaler une vulnérabilité",
Expand All @@ -111,9 +114,10 @@
"loading": "Chargement..."
},
"locale": {
"de": "Deutsch",
"ai_translated": "via AI",
"de": "Deutsch - 🤖KI",
"en": "English",
"fr": "Français",
"fr": "Français - 🤖IA",
"nl": "Nederlands"
},
"login": {
Expand Down
8 changes: 6 additions & 2 deletions src/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
"refresh_now": "ververs gegevens nu",
"units": "s"
},
"core": {
"translated_by_ai": "Deze vertaling is uitgevoerd met behulp van kunstmatige intelligentie, dit kan leiden tot contextuele fouten of onjuiste bewoordingen. Neem contact op voor een officiële vertaling. Raadpleeg de originele Engelse of Nederlandse tekst in geval van verwarring. Bij voorbaat onze excuses voor eventuele vertaalfouten."
},
"footer": {
"copyright": "Auteursrecht",
"disclosure": "Kwetsbaarheid melden",
Expand All @@ -111,9 +114,10 @@
"loading": "Laden..."
},
"locale": {
"de": "Deutsch",
"ai_translated": "via AI",
"de": "Deutsch - 🤖KI",
"en": "English",
"fr": "Français",
"fr": "Français - 🤖IA",
"nl": "Nederlands"
},
"login": {
Expand Down
Loading