Skip to content

Commit

Permalink
1.0.0-beta-3
Browse files Browse the repository at this point in the history
1.0.0-beta-3
  • Loading branch information
Alexxiia authored Jan 10, 2023
2 parents 3e971e7 + 4329fb8 commit 2a117a7
Show file tree
Hide file tree
Showing 58 changed files with 5,235 additions and 100 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "vernite",
"version": "1.0.0-beta-2",
"version": "1.0.0-beta-3",
"scripts": {
"@------ WORKFLOW SCRIPTS --------": "",
"postinstall": "husky install",
"@-------- MAIN SCRIPTS ----------": "",
"start": "yarn serve",
"serve": "ng serve",
"build": "yarn print \"You need to choose configuration: 'dev', 'prod' and type command like 'yarn build:dev'\" --color=yellow",
"build:prod": "ng build --stats-json --configuration=production",
"build:dev": "ng build --stats-json --configuration=dev",
"build:prod": "ng build --configuration=production",
"build:dev": "ng build --configuration=dev",
"lint": "ng lint",
"analyze:serve": "webpack-bundle-analyzer dist/vernite/en-US/stats.json",
"analyze:build": "yarn analyze:serve -m static -O -r documentation/report/index.html",
Expand Down
6 changes: 6 additions & 0 deletions src/app/_main/_main.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ import { LoaderComponent } from './components/loader/loader.component';
import { ContrastColorPipe } from './pipes/contrast-color/contrast-color.pipe';
import { DateTimePickerComponent } from './components/input-date-time/date-time-picker/date-time-picker.component';
import { TimePickerComponent } from './components/input-date-time/time-picker/time-picker.component';
import { PrivacyPolicyPage } from './pages/privacy-policy/privacy-policy.page';
import { TermsAndConditionsPage } from './pages/terms-and-conditions/terms-and-conditions.page';
import { DateTimeByPreferencesPipe } from './pipes/date-time-by-preferences/date-time-by-preferences.pipe';
import { SidebarEntryComponent } from './components/sidebar-navigation/sidebar-entry/sidebar-entry.component';
import { ColorPipe } from './pipes/color/color.pipe';
import { PillComponent } from './components/pill/pill.component';
Expand Down Expand Up @@ -179,6 +182,7 @@ const ngModuleConfig = {
DayOfWeekPipe,
DayjsPipe,
DateByPreferencesPipe,
DateTimeByPreferencesPipe,
TabsComponent,
TabComponent,
InputColorComponent,
Expand All @@ -194,6 +198,8 @@ const ngModuleConfig = {
ColorPipe,
CollapsableDirective,
ReportBugDialog,
TermsAndConditionsPage,
PrivacyPolicyPage,
],
providers: [
/*=============================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { DaysGrid, CalendarDay } from '../date-picker.model';
import { faChevronLeft, faChevronRight } from '@fortawesome/free-solid-svg-icons';
import { ControlAccessor } from '@main/classes/control-accessor/control-accessor.class';
import { unixTimestamp } from '../../../interfaces/date.interface';
import { weekdaysShort } from '@main/libs/localization/weekdays.localization.lib';

/**
* Date picker component
Expand All @@ -17,7 +18,7 @@ export class DatePickerComponent extends ControlAccessor<unixTimestamp | null> i
/**
* First day of week
*/
@Input() firstDayOfWeek = 1;
@Input() firstDayOfWeek = dayjs.localeData().firstDayOfWeek();

/**
* Flag to hide today button
Expand All @@ -34,10 +35,7 @@ export class DatePickerComponent extends ControlAccessor<unixTimestamp | null> i
monthNames = dayjs.months();

/** Weekday names */
weekdaysShort = [
...dayjs.weekdaysShort().slice(this.firstDayOfWeek),
...dayjs.weekdaysShort().slice(0, this.firstDayOfWeek),
];
weekdaysShort = weekdaysShort();

/** @ignore */
faChevronLeft = faChevronLeft;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
</section>
</section>

<!-- <span class="version">{{ version }}</span> -->
<span class="version">{{ version }}</span>
3 changes: 3 additions & 0 deletions src/app/_main/components/main-view/main-view.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { environment } from 'src/environments/environment';
import { RouterExtensionsService } from '@main/services/router-extensions/router-extensions.service';
import { AuthService } from '../../../auth/services/auth/auth.service';
import { ProtoService } from '../../services/proto/proto.service';
import { UserService } from '../../../auth/services/user/user.service';

/**
* Main view component
Expand All @@ -30,6 +31,7 @@ export class MainViewComponent implements OnInit {
private routerExtensions: RouterExtensionsService,
private protoService: ProtoService,
private authService: AuthService,
private userService: UserService,
) {}

ngOnInit() {
Expand All @@ -40,6 +42,7 @@ export class MainViewComponent implements OnInit {
if (!isLoggedIn) return;

this.protoService.connect();
this.userService.loadLocale();
});
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<section class="logo-section">
<div class="logo" routerLink="/"></div>
<div class="logo" routerLink="/dashboard"></div>
<app-button class="navigation-collapse-button" variant="transparent" [icon]="faArrowRightArrowLeft" (click)="toggle()"
type="button"></app-button>
</section>
Expand Down
28 changes: 28 additions & 0 deletions src/app/_main/libs/localization/weekdays.localization.lib.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import * as dayjs from 'dayjs';

export function weekdays() {
const localeData = dayjs.localeData();

const firstDayOfWeek = localeData.firstDayOfWeek();
const weekdays = localeData.weekdays();

for (let i = 0; i < firstDayOfWeek; i++) {
weekdays.push(weekdays.shift()!);
}

return weekdays;
}

export function weekdaysShort() {
const localeData = dayjs.localeData();

const firstDayOfWeek = localeData.firstDayOfWeek();
const weekdaysShort = [...localeData.weekdaysShort()];

for (let i = 0; i < firstDayOfWeek; i++) {
weekdaysShort.push(weekdaysShort.shift()!);
}

console.log(weekdaysShort);
return weekdaysShort;
}
Loading

0 comments on commit 2a117a7

Please sign in to comment.