Skip to content

Commit

Permalink
Merge pull request #71 from internetstandards/50
Browse files Browse the repository at this point in the history
Version 5.0.0
  • Loading branch information
stitch authored Nov 8, 2024
2 parents 7bb0585 + 8727a56 commit a3ee803
Show file tree
Hide file tree
Showing 21 changed files with 489 additions and 135 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
<router-view></router-view>
</keep-alive>
</div>
<GithubMessage />
<GithubMessage v-if="$store.state.config.app.layout === 'internet_nl'" />
</div>
</main>

<footer id="footer">
<img id="flag" src="static/images/vendor/internet_nl/clear.gif" alt="">
<footer id="footer" v-if="$store.state.config.app.layout === 'internet_nl'">
<template>
<img id="flag" src="static_frontend/images/vendor/internet_nl/clear.gif" alt="">
<div class="wrap">
{{ $t('base.info') }}
<hr>
Expand All @@ -43,6 +44,7 @@

</ul>
</div>
</template>
</footer>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/assets/css/vendor/internet_nl/style-min.css
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ footer ul li:last-child {

.home .block.news, .home {
position: relative;
padding-bottom: 32px
/* padding-bottom: 32px */
}

.home .block.news .read-more, .home .read-more {
Expand Down
2 changes: 1 addition & 1 deletion src/components/DashboardIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name: "DashboardIcon",
props: {
icon: {type: String, required: true},
scale: {type: Number, required: false, default: 0.7},
stackscale: {type: Number, required: false, default: 1.3},
stackscale: {type: Number, required: false, default: 1.7},
ariaLabel: {type: String, required: false, default: ""}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<!-- https://github.com/internetstandards/Internet.nl-dashboard/issues/352 This page is a fallback for people
that have the login page bookmarked. They are still pointed to the right place to log in. -->
<content-block v-if="true">
<content-block v-if="false">
<h1>{{ $t("title") }}</h1>
<p>{{ $t("intro") }}</p>
<server-response :response="server_response" :message="$t(server_response.message)"></server-response>
Expand Down
5 changes: 5 additions & 0 deletions src/components/ServerResponse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ export default {
},
watch: {
response: function () {

// don't toast when there is nothing to say
if (Object.keys(this.response).length === 0)
return;

// a new response, means this should be visible again:
this.show = true;

Expand Down
8 changes: 5 additions & 3 deletions src/components/SiteMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ li a {
<b-navbar toggleable="md" id="sitenav">
<b-container class="max_container_width">
<b-navbar-brand to="domains">
<p id="site-title"><a><span class="hidden">{{ $t('sitetitle') }}</span></a></p>
<p id="site-description"><span class="hidden">{{ $t('sitedescription') }}</span></p>
<template v-if="$store.state.config.app.layout === 'internet_nl'">
<p id="site-title"><a><span class="hidden">{{ $t('sitetitle') }}</span></a></p>
<p id="site-description"><span class="hidden">{{ $t('sitedescription') }}</span></p>
</template>
</b-navbar-brand>

<b-navbar-toggle target="nav-collapse"></b-navbar-toggle>
Expand Down Expand Up @@ -216,7 +218,7 @@ li a {
</template>
<template v-if="!is_authenticated">
<b-nav-item to="/tour" accesskey="t" exact exact-active-class="active"><b-icon icon="info-circle" /> {{ $t("tour") }}</b-nav-item>
<b-nav-item to="/signup" accesskey="u" exact exact-active-class="active"><b-icon icon="person-check" /> {{ $t("request_access") }}</b-nav-item>
<b-nav-item v-if="$store.state.config.show.signup_form" to="/signup" accesskey="u" exact exact-active-class="active"><b-icon icon="person-check" /> {{ $t("request_access") }}</b-nav-item>
<b-nav-item :href="$baseUrl + '/account/login/'" accesskey="l" exact exact-active-class="active"><b-icon icon="box-arrow-in-right" /> {{ $t("log_in") }}</b-nav-item>
</template>
</b-navbar-nav>
Expand Down
2 changes: 1 addition & 1 deletion src/components/admin/InstantAddAccount.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default {
{
"en": {
"title": "Instant User Creation",
"intro": "This creates a standard user, an Account to internet.nl and the bridge between it (DashboardUser). There are minimal password checks on this form. This form is intended to quickly migrate API user accounts and give them access to the dashboard with the same username and password.",
"intro": "This creates a standard user, an Account to an internet.nl API and the bridge between it (DashboardUser). There are minimal password checks on this form. This form is intended to quickly migrate API user accounts and give them access to the dashboard with the same username and password.",
"username": "Username",
"password": "Password",
"save": "Add user"
Expand Down
4 changes: 2 additions & 2 deletions src/components/domains/SpreadsheetUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export default {
"upload": {
"bulk_data_uploader": {
"title": "Domain Spreadsheet Uploader",
"introduction": "It's possible to upload large amounts of internet addresses and lists using spreadsheets. To do so, please expand on the example spreadsheets listed below. This shows how the data has to be structured. Examples with and without data are provided as Open Document Spreadsheet, Microsoft Office Excel and Comma Separated."
"introduction": "It's possible to upload large amounts of internet addresses and lists using spreadsheets. To do so, please expand on the example spreadsheets listed below. This shows how the data has to be structured. Examples with and without data are provided as Open Document Spreadsheet, Microsoft Office Excel and Comma Separated. Below are some example files that specify the exact format."
},
"empty_file": "Empty file",
"file_with_example_data": "File with example data",
Expand Down Expand Up @@ -282,7 +282,7 @@ export default {
"upload": {
"bulk_data_uploader": {
"title": "Spreadsheet Domeinen Uploader",
"introduction": "Hiermee is het mogelijk om grote hoeveelheden internet adressen en lijsten toe te voegen. Dit gebeurd met spreadsheets. Begin met het downloaden van de voorbeelden hieronder, deze geven aan wat het juiste formaat is. De voorbeeldbestanden zijn te downloaden in het Open Document formaat, Microsoft Office formaat en Kommagescheiden."
"introduction": "Hiermee is het mogelijk om grote hoeveelheden internet adressen en lijsten toe te voegen. Dit gebeurd met spreadsheets. Begin met het downloaden van de voorbeelden hieronder, deze geven aan wat het juiste formaat is. De voorbeeldbestanden zijn te downloaden in het Open Document formaat, Microsoft Office formaat en Kommagescheiden. Hieronder staan een aantal voorbeeldbestanden waarin het exacte juiste formaat wordt aangegeven."
},
"empty_file": "Leeg bestand",
"file_with_example_data": "Bestand met voorbeelddata",
Expand Down
26 changes: 13 additions & 13 deletions src/components/domains/SubdomainDiscovery.vue
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<template>
<div>
<span>
<template
v-if="['not_scanned_at_all'].includes(state_message) || ['finished', 'error', 'cancelled'].includes(state)">

<b-button size="sm" v-if="success_while_visible" @click="reload_and_reset" variant="success" :disabled="loading">
<b-button style="font-weight: bold" size="sm" v-if="success_while_visible" @click="reload_and_reset" variant="success" :disabled="loading">
{{ $t('Scanning done, click to reload domain list') }}
</b-button>

<b-button size="sm" v-if="!success_while_visible" v-b-modal="`subdomain_discovery_modal_${list_id}`" variant="info" :disabled="loading">{{ $t("Find 'www.' subdomains") }}<span
v-if="state_changed_on">{{ $t(', last scan finished ') }}{{ humanize_relative_date(state_changed_on) }}</span></b-button>
<b-button style="font-weight: bold" size="sm" v-if="!success_while_visible" v-b-modal="`subdomain_discovery_modal_${list_id}`" :disabled="loading">{{ $t("Find 'www.' subdomains") }}<span
v-if="state_changed_on">{{ $t(', last scan finished ') }}</span></b-button>
</template>
<template v-else>
<b-button size="sm" @click="status" :disabled="loading">
<b-button style="font-weight: bold" size="sm" @click="status" :disabled="loading">
<probe/>
{{ $t("... finding 'www.' subdomains ") }}({{ $t(state) }}, {{ humanize_relative_date(state_changed_on) }})
{{ $t("... finding 'www.' subdomains ") }}
</b-button>
</template>
<subdomain-discovery-modal :id="`subdomain_discovery_modal_${list_id}`" @ok="request" />
</div>
</span>
</template>

<script>
Expand Down Expand Up @@ -120,20 +120,20 @@ export default {
{
"en": {
"Scanning done, click to reload domain list": "Scanning done, click to reload domain list",
"Find 'www.' subdomains": "Add www. subsubdomains",
"Find 'www.' subdomains": "www. discovery",
", last scan finished ": ", last index finished ",
"... finding 'www.' subdomains ": "... finding subdomains ",
"requested": "requested",
"... finding 'www.' subdomains ": "finding www. ",
"requested": "since",
"scanning": "gathering",
"finished": "finished",
"error": "error"
},
"nl": {
"Scanning done, click to reload domain list": "Klaar met zoeken, klik om de domeinlijst te herladen",
"Find 'www.' subdomains": "Voeg www. subdomeinen toe",
"Find 'www.' subdomains": "www. zoeker",
", last scan finished ": ", laatste keer was ",
"... finding 'www.' subdomains ": "... zoekt subdomeinen ",
"requested": "aangevraagd",
"... finding 'www.' subdomains ": "zoekt www. ",
"requested": "vanaf",
"scanning": "verzamelen",
"finished": "afgerond",
"error": "fout"
Expand Down
51 changes: 33 additions & 18 deletions src/components/domains/UrlList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@ h2 {
<span :aria-label="$t('icon.settings')" role="img">📝</span> {{ $t("button.configure") }}
</button> &nbsp;

<button @click="download_list" v-if="urls.length">⬇️ {{ $t("button.download") }}</button> &nbsp;

<button class="border-danger" @click="visible.delete = true">🗑️ {{ $t("button.delete") }}</button>
</div>
</span>


<div v-if="is_opened">
<br>
<SubdomainDiscovery v-if="urls.length" :list_id="list.id" class="float-right" @finished="get_urls"/>
<About :list="list" :urls="urls"></About>

<br>
Expand All @@ -72,21 +73,24 @@ h2 {
</div>
</template>

<div v-if="!urls.length">
<button class="border-success" @click="visible.add_domains = true">🌐 {{ $t("button.add_domains") }}</button> &nbsp;
<button class="border-success" @click="visible.upload = true">⬆️ {{ $t("button.upload") }}</button> &nbsp;
<div style="width: 100%; text-align: right" class="mb-2" v-if="!urls.length">
Add domains using:
<b-button style="font-weight: bold" @click="visible.add_domains = true" size="sm"><span :aria-label="$t('icon.bulk_add_new')" role="img">🌐</span> {{ $t("button.add_domains") }}</b-button> &nbsp;
<b-button style="font-weight: bold" @click="visible.discover_subdomains = true" v-if="$store.state.config.app.subdomain_suggestion.enabled" size="sm">🌪️️ {{ $t("button.discover_subdomains") }}</b-button> &nbsp;
<b-button style="font-weight: bold" @click="visible.upload = true" size="sm">⬆️ {{ $t("button.upload") }}</b-button> &nbsp;
<!-- <button class="border-success" @click="get_urls()">⬆️ {{ $t("button.reload") }}</button> -->
</div>

<div style="float: right" class="mb-2" v-if="urls.length">
<button @click="visible.add_domains = true">
<span :aria-label="$t('icon.bulk_add_new')" role="img">🌐</span> {{ $t("button.add_domains") }}
</button> &nbsp;
<button @click="visible.upload = true">⬆️ {{ $t("button.upload") }}</button> &nbsp;
<button @click="download_list">⬇️ {{ $t("button.download") }}</button> &nbsp;
<div style="width: 100%; text-align: right" class="mb-2" v-if="urls.length">
Add domains using:
<b-button style="font-weight: bold" @click="visible.add_domains = true" size="sm"><span :aria-label="$t('icon.bulk_add_new')" role="img">🌐</span> {{ $t("button.add_domains") }}
</b-button> &nbsp;
<b-button style="font-weight: bold" @click="visible.discover_subdomains = true" v-if="$store.state.config.app.subdomain_suggestion.enabled" size="sm">🌪️️ {{ $t("button.discover_subdomains") }}</b-button> &nbsp;
<b-button style="font-weight: bold" @click="visible.upload = true" size="sm">⬆️ {{ $t("button.upload") }}</b-button> &nbsp;
<SubdomainDiscovery v-if="urls.length" :list_id="list.id" @finished="get_urls"/>
</div>



<template v-if="urls.length">
<DomainTable :loading="loading" :urllist="list" :urls="urls" @update="get_urls()"/>
<p><small><i v-html="$t('domains.intro')"></i></small></p>
Expand All @@ -98,6 +102,8 @@ h2 {

<Configure :list="list" :show="visible.configure" :visible="visible.configure" @cancel="visible.configure = false"
@done="visible.configure = false"></Configure>
<DiscoverSubdomains :list="list" :show="visible.discover_subdomains" :visible="visible.discover_subdomains" @cancel="visible.discover_subdomains = false"
@done="visible.discover_subdomains = false; get_urls();"></DiscoverSubdomains>
<Upload :list="list" :show="visible.upload" :visible="visible.upload" @cancel="visible.upload = false"
@done="visible.upload = false; get_urls();"></Upload>
<Delete :list="list" :show="visible.delete" :visible="visible.delete" @cancel="visible.delete = false"
Expand Down Expand Up @@ -127,13 +133,17 @@ import About from './list/about-this-list'
import http from "@/httpclient";
import ScanTypeIcon from "@/components/ScanTypeIcon";
import DomainTable from "@/components/domains/DomainTable";
import SubdomainDiscovery from "@/components/domains/SubdomainDiscovery";

import autorefresh from '@/components/autorefresh'
import Probe from '@/components/probe'
import DiscoverSubdomains from "@/components/domains/list/discover-subdomains";
import SubdomainDiscovery from "@/components/domains/SubdomainDiscovery";

export default {
components: {
SubdomainDiscovery,
DiscoverSubdomains,

DomainTable,
ScanTypeIcon,
Delete,
Expand Down Expand Up @@ -167,6 +177,7 @@ export default {
scan: false,
add_domains: false,
upload: false,
discover_subdomains: false,
},
}
},
Expand Down Expand Up @@ -335,14 +346,16 @@ export default {
},
"button": {
"configure": "Configure",
"add_domains": "Add domains",
"add_domains": "Free text",
"scan_now": "Scan now",
"scan_now_scanning": "Scanning",
"scan_now_scanning_title": "The scan now option is available only once a day, when no scan is running.",
"delete": "Delete",
"scanning_disabled": "Scanning disabled",
"upload": "Upload domains",
"download": "Download domains"
"upload": "Spreadsheet",
"download": "Download",
"reload": "Reload domains",
"discover_subdomains": "Subdomain discovery"
},
"domains": {
"header": "Domains",
Expand All @@ -364,14 +377,16 @@ export default {
},
"button": {
"configure": "Instellingen",
"add_domains": "Domeinen toevoegen",
"add_domains": "Vrije tekst",
"scan_now": "Nu scannen",
"scan_now_scanning": "Aan het scannen",
"scan_now_scanning_title": "Nu scannen is alleen beschikbaar als er geen scan draait, en kan maximaal 1x per dag worden aangeroepen.",
"delete": "Verwijder",
"scanning_disabled": "Scans uitgeschakeld",
"upload": "Domeinen uploaden",
"download": "Domeinen downloaden"
"upload": "Spreadsheet",
"download": "Downloaden",
"reload": "Domeinen ophalen",
"discover_subdomains": "Subdomeinen zoeker"
},
"domains": {
"header": "Domeinen",
Expand Down
16 changes: 9 additions & 7 deletions src/components/domains/list/about-this-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<DashboardIcon icon="hourglass-split" />

<span v-if="list.last_scan">
{{ $t("last_scan_started") }}: {{ humanize_date(list.last_scan) }}, {{ list.last_scan_state }}.
{{ $t("last_scan_started") }}: {{ humanize_date(list.last_scan) }}, {{ list.last_scan_state }}
</span>
<span v-if="!list.last_scan">
{{ $t("last_scan_started") }}: {{ $t("not_scanned_before") }}.
{{ $t("last_scan_started") }}: {{ $t("not_scanned_before") }}
</span>
<br>
<template class="scan-configuration">
Expand All @@ -34,10 +34,10 @@
{{ $t("next_scheduled_scan") }}: {{ humanize_date(list.scheduled_next_scan) }} <br>
</span>
</span>
<span v-if="!list.enable_scans"> {{ $t("scanning_disabled") }} </span><br>
<span v-if="!list.enable_scans"> {{ $t("scanning_disabled") }} </span>
</template>

<DashboardIcon icon="share" :scale="0.5" class="mr-1"/>
<DashboardIcon icon="share" :scale="0.5" class="mr-1"/>{{$t('sharing')}}:
<span v-if="!list.automatically_share_new_reports">{{$t('Not automatically shared')}}</span>
<span v-if="list.automatically_share_new_reports">{{$t('Automatically shared')}}

Expand Down Expand Up @@ -89,15 +89,16 @@ export default {
"report": "report",
"header": "About this list",
"number_of_domains": "Number of domains",
"last_scan_started": "Last scan started at",
"last_scan_started": "Last scan",
"still_running": "still running",
"finished": "finished",
"not_scanned_before": "Not scanned before",
"type_of_scan_performed": "Type of scan performed",
"type_of_scan_performed": "Type of scan",
"scan_frequency": "Scan frequency",
"next_scheduled_scan": "Next scheduled scan",
"scanning_disabled": "Scanning of this list is disabled.",
"latest_report": "Latest report",
"sharing": "Sharing",
"Automatically shared": "Automatically shared",
"Not automatically shared": "Not automatically shared",
"Listed on sharing page": ", also on sharing page",
Expand All @@ -108,7 +109,7 @@ export default {
"report": "rapport",
"header": "Over deze lijst",
"number_of_domains": "Aantal domeinen",
"last_scan_started": "Laatste scan gestart op",
"last_scan_started": "Laatste scan",
"still_running": "loopt nog",
"finished": "afgerond",
"not_scanned_before": "Niet eerder gescand",
Expand All @@ -117,6 +118,7 @@ export default {
"next_scheduled_scan": "Volgende ingeplande scan",
"scanning_disabled": "Scannen van deze lijst is uitgeschakeld.",
"latest_report": "Actueelste rapportage",
"sharing": "Delen",
"Automatically shared": "Automatisch gedeeld",
"Not automatically shared": "Niet automatisch gedeeld",
"Listed on sharing page": "en ook op deze openbare pagina",
Expand Down
4 changes: 2 additions & 2 deletions src/components/domains/list/add domains.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

<template>
<b-modal :visible="visible" @hidden="stop()" header-bg-variant="info"
header-text-variant="light" no-fade scrollable size="xl">
header-text-variant="light" no-fade scrollable size="lg">
<h3 slot="modal-title">🌐 {{ $t("title") }}</h3>
<div slot="default">
<div slot="default" style="min-height: 50vh;">

<server-response :response="response" v-if="response" :message="$t('' + response.message)"/>

Expand Down
Loading

0 comments on commit a3ee803

Please sign in to comment.