diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 9a41aa8f..54ef1892 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -45,6 +45,7 @@ export class AppComponent implements OnDestroy, OnInit { }); this.initializeNotificationService(); this.initWithConfigManager(); + this.checkBrowser(); } initalRequests() { @@ -175,4 +176,18 @@ export class AppComponent implements OnDestroy, OnInit { ConfigManager.refreshConfig(); } } + + checkBrowser() { + const wasChecked = localStorage.getItem("browser_info_checked"); + if (!wasChecked) { + const agent = window.navigator.userAgent; + if (!(agent.indexOf("Chrome/") != -1 && agent.indexOf("Chromium/") == -1) || agent.indexOf("Edg/") != -1) { + const t = "This application was built with chrome. Some things might look different than expected.\n\nFor the best experience we recommend using chrome." + alert(t); + } + localStorage.setItem("browser_info_checked", "1"); + } + } + + } diff --git a/src/app/base/components/header/header.component.html b/src/app/base/components/header/header.component.html index 18ce1a2f..19848fa9 100644 --- a/src/app/base/components/header/header.component.html +++ b/src/app/base/components/header/header.component.html @@ -83,27 +83,24 @@ - - - - - - -
- - + d="M10 5a2 2 0 0 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6"> + - +
+
+
 Star on GitHub
diff --git a/src/app/base/components/header/header.component.scss b/src/app/base/components/header/header.component.scss index e69de29b..ad796e77 100644 --- a/src/app/base/components/header/header.component.scss +++ b/src/app/base/components/header/header.component.scss @@ -0,0 +1,45 @@ +.widget-lg .btnx, +.widget-lg .social-count { + padding: 5px 10px; + font-size: 12px; + line-height: 16px; +} + +.btnx:not(:last-child) { + border-radius: 0.25em 0 0 0.25em; +} + +.btnx { + color: #24292f; + background-color: #ebf0f4; + border-color: #ccd1d5; + border-color: rgba(27, 31, 36, .15); + background-image: -moz-linear-gradient(top, #f6f8fa, #ebf0f4 90%); + background-image: linear-gradient(180deg, #f6f8fa, #ebf0f4 90%); + filter: progid:DXImageTransform.Microsoft.Gradient(startColorstr='#FFF6F8FA', endColorstr='#FFEAEFF3'); +} + +.btnx { + border-radius: 0.25em; +} + +.btnx, +.social-count { + position: relative; + display: inline-flex; + padding: 2px 5px; + font-size: 11px; + font-weight: 600; + line-height: 14px; + vertical-align: bottom; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-repeat: repeat-x; + background-position: -1px -1px; + background-size: 110% 110%; + border: 1px solid; + margin-right: 1rem; +} \ No newline at end of file diff --git a/src/app/base/components/sidebar-pm/sidebar-pm.component.html b/src/app/base/components/sidebar-pm/sidebar-pm.component.html index 95a4f931..f5f52b23 100644 --- a/src/app/base/components/sidebar-pm/sidebar-pm.component.html +++ b/src/app/base/components/sidebar-pm/sidebar-pm.component.html @@ -194,7 +194,7 @@
v1.1 + href="https://docs.kern.ai/changelog">v1.1.1
diff --git a/src/app/data/components/data-browser/data-browser.component.ts b/src/app/data/components/data-browser/data-browser.component.ts index 559d8243..8701c8bd 100644 --- a/src/app/data/components/data-browser/data-browser.component.ts +++ b/src/app/data/components/data-browser/data-browser.component.ts @@ -182,6 +182,8 @@ export class DataBrowserComponent implements OnInit, OnDestroy { currentSearchRequest: CurrentSearchRequest; + alertLastVisible: number; + getSearchFormArray(groupKey: string): FormArray { return this.fullSearch.get(groupKey).get('groupElements') as FormArray; } @@ -1440,7 +1442,7 @@ export class DataBrowserComponent implements OnInit, OnDestroy { } else return; if (this.filteredSliceIds.has(idToDelete)) this.filteredSliceIds.delete(idToDelete); - this.projectApolloService.deleteDataSlice(this.projectId, idToDelete).pipe(first()).subscribe(() => this.clearFilters()); + this.projectApolloService.deleteDataSlice(this.projectId, idToDelete).pipe(first()).subscribe(() => this.clearFilters()); } filterAvailableSlices() { @@ -1909,7 +1911,9 @@ export class DataBrowserComponent implements OnInit, OnDestroy { } alterUser(msgId) { + if (this.alertLastVisible && Date.now() - this.alertLastVisible < 1000) return; alert("Settings were changed (msgId: " + msgId + ")\nFilter will be reloaded."); + this.alertLastVisible = Date.now(); } websocketFilterRefresh(currentFilterData: string) { diff --git a/src/app/data/components/data-browser/helper-classes/filter-parser.ts b/src/app/data/components/data-browser/helper-classes/filter-parser.ts index 2141d931..5cfd78f4 100644 --- a/src/app/data/components/data-browser/helper-classes/filter-parser.ts +++ b/src/app/data/components/data-browser/helper-classes/filter-parser.ts @@ -89,7 +89,6 @@ export class DataBrowserFilterParser { array: any[], drillDown: boolean = false ): any { - if (drillDown) { for (const l of array) { this.appendBlackAndWhiteListUserForArray(appendTo, [l], false); @@ -208,12 +207,16 @@ export class DataBrowserFilterParser { appendTo: string[], array: any[], labelSource: LabelSource, - drillDown: boolean = false + drillDown: boolean = false, + onlyNoLabel: boolean = false //for recursion of NO_LABEL only ): any { - if (drillDown) { for (const l of array) { - this.appendBlackAndWhiteListLabelingTaskForArray(appendTo, [l], labelSource, false); + if (l.id == 'NO_LABEL') { + this.appendBlackAndWhiteListLabelingTaskForArray(appendTo, array, labelSource, false, true); + } else { + this.appendBlackAndWhiteListLabelingTaskForArray(appendTo, [l], labelSource, false); + } } return; } @@ -233,7 +236,7 @@ export class DataBrowserFilterParser { for (let c of array) { if (c.active) { if (c.id == 'NO_LABEL') addNoLabel = true; - else { + else if (!onlyNoLabel) { if (c.negate) notInValues.push(c.id); else inValues.push(c.id); } diff --git a/src/app/projects/components/projects/projects.component.ts b/src/app/projects/components/projects/projects.component.ts index 00c78085..7f72c201 100644 --- a/src/app/projects/components/projects/projects.component.ts +++ b/src/app/projects/components/projects/projects.component.ts @@ -128,7 +128,7 @@ export class ProjectsComponent implements OnInit, OnDestroy { this.isManaged = ConfigManager.getIsManaged(); } }); - this.checkIfDemoUser(); + this.checkIfDemoUser(); } checkIfDemoUser() { @@ -145,7 +145,7 @@ export class ProjectsComponent implements OnInit, OnDestroy { return; } this.isManaged = ConfigManager.getIsManaged(); - if (!this.isManaged) { + if (!this.isManaged && !ConfigManager.getIsDemo()) { this.subscriptions$.push(this.organizationApolloService.canCreateLocalOrg().pipe(first()).subscribe((canCreateOrg) => { this.canCreateOrg = canCreateOrg; @@ -342,10 +342,10 @@ export class ProjectsComponent implements OnInit, OnDestroy { } executeOption(value: string) { - if(value=='Further sample projects') { + if (value == 'Further sample projects') { window.open("https://github.com/code-kern-ai/refinery-sample-projects", "_blank"); } else { - this.importSampleProject(this.isProjectInitial ? this.previousValue+' - initial' : value) + this.importSampleProject(this.isProjectInitial ? this.previousValue + ' - initial' : value) } }