mirror of
https://github.com/CaramelFur/Picsur.git
synced 2025-11-11 22:35:39 +01:00
Rename files and add fab
This commit is contained in:
@@ -1,15 +1,21 @@
|
|||||||
<footer class="container">
|
<footer class="container">
|
||||||
<p>
|
<p>
|
||||||
|
<span class="line">
|
||||||
Made with 🤍 by
|
Made with 🤍 by
|
||||||
<a class="link-unstyled" href="https://rubikscraft.nl" target="_blank"
|
<a class="link-unstyled" href="https://rubikscraft.nl" target="_blank"
|
||||||
>Rubikscraft</a
|
>Rubikscraft</a
|
||||||
>
|
>
|
||||||
|
|
||||||
{{ isDemo ? " - Demo Version" : "" }}
|
{{ isDemo ? " - Demo Version" : "" }}
|
||||||
-
|
</span>
|
||||||
|
|
||||||
|
<span class="line">
|
||||||
|
-
|
||||||
{{ version }}
|
{{ version }}
|
||||||
-
|
-
|
||||||
<a class="link-unstyled" href="https://github.com/rubikscraft/picsur"
|
<a class="link-unstyled" href="https://github.com/rubikscraft/picsur"
|
||||||
>Source Code</a
|
>Source Code</a
|
||||||
>
|
>
|
||||||
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@@ -4,4 +4,10 @@ footer {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
|
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.line {
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import { CommonModule } from '@angular/common';
|
|||||||
import { Injector, NgModule } from '@angular/core';
|
import { Injector, NgModule } from '@angular/core';
|
||||||
import { MatIconModule } from '@angular/material/icon';
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
import { MatListModule } from '@angular/material/list';
|
import { MatListModule } from '@angular/material/list';
|
||||||
import { SettingsSidebarComponent } from './settings-sidebar/settings-sidebar.component';
|
|
||||||
import { SettingsRoutingModule } from './settings.routing.module';
|
import { SettingsRoutingModule } from './settings.routing.module';
|
||||||
|
import { SettingsSidebarComponent } from './sidebar/settings-sidebar.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [SettingsSidebarComponent],
|
declarations: [SettingsSidebarComponent],
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import { Permission } from 'picsur-shared/dist/dto/permissions';
|
|||||||
import { PermissionGuard } from 'src/app/guards/permission.guard';
|
import { PermissionGuard } from 'src/app/guards/permission.guard';
|
||||||
import { PRoutes } from 'src/app/models/picsur-routes';
|
import { PRoutes } from 'src/app/models/picsur-routes';
|
||||||
import { SidebarResolverService } from 'src/app/services/sidebar-resolver/sidebar-resolver.service';
|
import { SidebarResolverService } from 'src/app/services/sidebar-resolver/sidebar-resolver.service';
|
||||||
import { SettingsGeneralRouteModule } from './settings-general/settings-general.module';
|
import { SettingsGeneralRouteModule } from './general/settings-general.module';
|
||||||
import { SettingsSidebarComponent } from './settings-sidebar/settings-sidebar.component';
|
import { SettingsSidebarComponent } from './sidebar/settings-sidebar.component';
|
||||||
import { SettingsSysprefRouteModule } from './settings-syspref/settings-syspref.module';
|
import { SettingsSysprefRouteModule } from './syspref/settings-syspref.module';
|
||||||
import { SettingsUsersRouteModule } from './settings-users/settings-users.module';
|
import { SettingsUsersRouteModule } from './users/settings-users.module';
|
||||||
|
|
||||||
const SettingsRoutes: PRoutes = [
|
const SettingsRoutes: PRoutes = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { AutoUnsubscribe } from 'ngx-auto-unsubscribe-decorator';
|
import { AutoUnsubscribe } from 'ngx-auto-unsubscribe-decorator';
|
||||||
import { SysPreferenceResponse } from 'picsur-shared/dist/dto/api/pref.dto';
|
import { SysPreferenceResponse } from 'picsur-shared/dist/dto/api/pref.dto';
|
||||||
|
import { HasFailed } from 'picsur-shared/dist/types';
|
||||||
|
import { SnackBarType } from 'src/app/models/snack-bar-type';
|
||||||
import { SysprefService as SysPrefService } from 'src/app/services/api/syspref.service';
|
import { SysprefService as SysPrefService } from 'src/app/services/api/syspref.service';
|
||||||
|
import { UtilService } from 'src/app/util/util.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: './settings-syspref.component.html',
|
templateUrl: './settings-syspref.component.html',
|
||||||
@@ -10,11 +13,20 @@ export class SettingsSysprefComponent implements OnInit {
|
|||||||
render = true;
|
render = true;
|
||||||
preferences: SysPreferenceResponse[] = [];
|
preferences: SysPreferenceResponse[] = [];
|
||||||
|
|
||||||
constructor(private sysprefService: SysPrefService) {}
|
constructor(
|
||||||
|
private sysprefService: SysPrefService,
|
||||||
|
private utilService: UtilService
|
||||||
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.subscribePreferences();
|
this.subscribePreferences();
|
||||||
await this.sysprefService.getPreferences();
|
const success = await this.sysprefService.getPreferences();
|
||||||
|
if (HasFailed(success)) {
|
||||||
|
this.utilService.showSnackBar(
|
||||||
|
'Failed to load preferences',
|
||||||
|
SnackBarType.Error
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@AutoUnsubscribe()
|
@AutoUnsubscribe()
|
||||||
@@ -2,9 +2,9 @@ import { CommonModule } from '@angular/common';
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { MatInputModule } from '@angular/material/input';
|
import { MatInputModule } from '@angular/material/input';
|
||||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
||||||
import { SettingsSysprefOptionComponent } from './settings-syspref-option/settings-syspref-option.component';
|
|
||||||
import { SettingsSysprefComponent } from './settings-syspref.component';
|
import { SettingsSysprefComponent } from './settings-syspref.component';
|
||||||
import { SettingsSysprefRoutingModule } from './settings-syspref.routing.module';
|
import { SettingsSysprefRoutingModule } from './settings-syspref.routing.module';
|
||||||
|
import { SettingsSysprefOptionComponent } from './syspref-option/settings-syspref-option.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [SettingsSysprefComponent, SettingsSysprefOptionComponent],
|
declarations: [SettingsSysprefComponent, SettingsSysprefOptionComponent],
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<h1>Users</h1>
|
<h1>Users</h1>
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSubject" class="mat-elevation-z8">
|
<mat-table [dataSource]="dataSubject" class="mat-elevation-z2">
|
||||||
<ng-container matColumnDef="id">
|
<ng-container matColumnDef="id">
|
||||||
<mat-header-cell *matHeaderCellDef>ID</mat-header-cell>
|
<mat-header-cell *matHeaderCellDef>ID</mat-header-cell>
|
||||||
<mat-cell *matCellDef="let user">{{ user.id }}</mat-cell>
|
<mat-cell *matCellDef="let user">{{ user.id }}</mat-cell>
|
||||||
@@ -21,17 +21,11 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||||
<mat-row *matRowDef="let row; columns: displayedColumns">
|
<mat-row *matRowDef="let row; columns: displayedColumns"> pog </mat-row>
|
||||||
pog
|
|
||||||
</mat-row>
|
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator
|
<div class="fabholder">
|
||||||
color="accent"
|
<button mat-fab color="accent" class="fabbutton fullanimate mat-elevation-z6">
|
||||||
[pageSizeOptions]="pageSizeOptions"
|
<mat-icon>add</mat-icon>
|
||||||
[pageSize]="startingPageSize"
|
</button>
|
||||||
length="Infinity"
|
</div>
|
||||||
aria-label="Select page of periodic elements"
|
|
||||||
(page)="updateSubject.next($event)"
|
|
||||||
>
|
|
||||||
</mat-paginator>
|
|
||||||
@@ -5,3 +5,4 @@ mat-table {
|
|||||||
.mat-column-actions {
|
.mat-column-actions {
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// General styling
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -19,13 +20,6 @@ html {
|
|||||||
*:before,
|
*:before,
|
||||||
*:after {
|
*:after {
|
||||||
box-sizing: inherit;
|
box-sizing: inherit;
|
||||||
|
|
||||||
-webkit-transition: 0.2s;
|
|
||||||
-moz-transition: 0.2s;
|
|
||||||
-o-transition: 0.2s;
|
|
||||||
transition: 0.2s;
|
|
||||||
|
|
||||||
transition-property: width, height, background-color, color, opacity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:not(input) {
|
:not(input) {
|
||||||
@@ -42,6 +36,8 @@ html {
|
|||||||
width: initial !important;
|
width: initial !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fix small form inputs
|
||||||
|
|
||||||
form mat-form-field {
|
form mat-form-field {
|
||||||
width: inherit;
|
width: inherit;
|
||||||
max-width: 40rem;
|
max-width: 40rem;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// Create white border around content
|
||||||
.content-border {
|
.content-border {
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -6,6 +7,7 @@
|
|||||||
border-width: 5px;
|
border-width: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Easily center content
|
||||||
.centered {
|
.centered {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -18,6 +20,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Unstyled links
|
||||||
.link-unstyled {
|
.link-unstyled {
|
||||||
&,
|
&,
|
||||||
&:visited,
|
&:visited,
|
||||||
@@ -42,3 +45,24 @@
|
|||||||
vertical-align: inherit;
|
vertical-align: inherit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fabs
|
||||||
|
.fabholder {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
& > .fabbutton {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 1.5rem;
|
||||||
|
|
||||||
|
@include media-breakpoint-up(xl) {
|
||||||
|
bottom: 4rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Anim
|
||||||
|
|
||||||
|
.fullanimate, .fullanimate * {
|
||||||
|
transition: ease-in-out all 0.2s !important;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user