diff --git a/backend/src/collections/preference-db/sys-preference-db.service.ts b/backend/src/collections/preference-db/sys-preference-db.service.ts index 2d515b0..d79eaf6 100644 --- a/backend/src/collections/preference-db/sys-preference-db.service.ts +++ b/backend/src/collections/preference-db/sys-preference-db.service.ts @@ -3,19 +3,19 @@ import { InjectRepository } from '@nestjs/typeorm'; import { DecodedSysPref, PrefValueType, - PrefValueTypeStrings + PrefValueTypeStrings, } from 'picsur-shared/dist/dto/preferences.dto'; import { SysPreference, SysPreferenceList, SysPreferenceValidators, - SysPreferenceValueTypes + SysPreferenceValueTypes, } from 'picsur-shared/dist/dto/sys-preferences.enum'; import { AsyncFailable, Fail, FT, HasFailed } from 'picsur-shared/dist/types'; import { Repository } from 'typeorm'; import { ESysPreferenceBackend, - ESysPreferenceSchema + ESysPreferenceSchema, } from '../../database/entities/sys-preference.entity'; import { MutexFallBack } from '../../util/mutex-fallback'; import { PreferenceCommonService } from './preference-common.service'; @@ -152,9 +152,8 @@ export class SysPreferenceDbService { ); if (HasFailed(validated)) return validated; - const valueValidated = SysPreferenceValidators[key as SysPreference].safeParse( - value, - ); + const valueValidated = + SysPreferenceValidators[key as SysPreference].safeParse(value); if (!valueValidated.success) { return Fail(FT.UsrValidation, undefined, valueValidated.error); } diff --git a/backend/src/collections/preference-db/usr-preference-db.service.ts b/backend/src/collections/preference-db/usr-preference-db.service.ts index de814c1..1fdf8a2 100644 --- a/backend/src/collections/preference-db/usr-preference-db.service.ts +++ b/backend/src/collections/preference-db/usr-preference-db.service.ts @@ -3,19 +3,19 @@ import { InjectRepository } from '@nestjs/typeorm'; import { DecodedUsrPref, PrefValueType, - PrefValueTypeStrings + PrefValueTypeStrings, } from 'picsur-shared/dist/dto/preferences.dto'; import { UsrPreference, UsrPreferenceList, UsrPreferenceValidators, - UsrPreferenceValueTypes + UsrPreferenceValueTypes, } from 'picsur-shared/dist/dto/usr-preferences.enum'; import { AsyncFailable, Fail, FT, HasFailed } from 'picsur-shared/dist/types'; import { Repository } from 'typeorm'; import { EUsrPreferenceBackend, - EUsrPreferenceSchema + EUsrPreferenceSchema, } from '../../database/entities/usr-preference.entity'; import { MutexFallBack } from '../../util/mutex-fallback'; import { PreferenceCommonService } from './preference-common.service'; diff --git a/backend/src/collections/user-db/user-db.service.ts b/backend/src/collections/user-db/user-db.service.ts index 12f5897..d034b74 100644 --- a/backend/src/collections/user-db/user-db.service.ts +++ b/backend/src/collections/user-db/user-db.service.ts @@ -7,7 +7,7 @@ import { Fail, FT, HasFailed, - HasSuccess + HasSuccess, } from 'picsur-shared/dist/types'; import { FindResult } from 'picsur-shared/dist/types/find-result'; import { makeUnique } from 'picsur-shared/dist/util/unique'; @@ -16,12 +16,12 @@ import { EUserBackend } from '../../database/entities/user.entity'; import { Permissions } from '../../models/constants/permissions.const'; import { DefaultRolesList, - SoulBoundRolesList + SoulBoundRolesList, } from '../../models/constants/roles.const'; import { ImmutableUsersList, LockedLoginUsersList, - UndeletableUsersList + UndeletableUsersList, } from '../../models/constants/special-users.const'; import { GetCols } from '../../util/collection'; import { SysPreferenceDbService } from '../preference-db/sys-preference-db.service'; diff --git a/backend/src/config/early/host.config.service.ts b/backend/src/config/early/host.config.service.ts index c7cd1ba..cbc6978 100644 --- a/backend/src/config/early/host.config.service.ts +++ b/backend/src/config/early/host.config.service.ts @@ -3,7 +3,7 @@ import { ConfigService } from '@nestjs/config'; import { ParseBool, ParseInt, - ParseString + ParseString, } from 'picsur-shared/dist/util/parse-simple'; import { EnvPrefix } from '../config.static'; diff --git a/backend/src/config/late/late-config.module.ts b/backend/src/config/late/late-config.module.ts index dfc5c6b..e81d2c8 100644 --- a/backend/src/config/late/late-config.module.ts +++ b/backend/src/config/late/late-config.module.ts @@ -15,7 +15,12 @@ import { UsageConfigService } from './usage.config.service'; @Module({ imports: [EarlyConfigModule, PreferenceDbModule], providers: [JwtConfigService, InfoConfigService, UsageConfigService], - exports: [EarlyConfigModule, JwtConfigService, InfoConfigService, UsageConfigService], + exports: [ + EarlyConfigModule, + JwtConfigService, + InfoConfigService, + UsageConfigService, + ], }) export class LateConfigModule implements OnModuleInit { private readonly logger = new Logger(LateConfigModule.name); diff --git a/backend/src/decorators/returns.decorator.ts b/backend/src/decorators/returns.decorator.ts index eb962c6..3e32df7 100644 --- a/backend/src/decorators/returns.decorator.ts +++ b/backend/src/decorators/returns.decorator.ts @@ -19,4 +19,4 @@ export function Returns( export function ReturnsAnything(): ReturnsMethodDecorator { return SetMetadata('noreturns', true); -} \ No newline at end of file +} diff --git a/backend/src/main.ts b/backend/src/main.ts index 58917e4..815c771 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -4,7 +4,7 @@ import fastifyReplyFrom from '@fastify/reply-from'; import { NestFactory } from '@nestjs/core'; import { FastifyAdapter, - NestFastifyApplication + NestFastifyApplication, } from '@nestjs/platform-fastify'; import { AppModule } from './app.module'; import { HostConfigService } from './config/early/host.config.service'; diff --git a/backend/src/managers/image/image-converter.service.ts b/backend/src/managers/image/image-converter.service.ts index 1475d58..f814d6a 100644 --- a/backend/src/managers/image/image-converter.service.ts +++ b/backend/src/managers/image/image-converter.service.ts @@ -3,7 +3,7 @@ import ms from 'ms'; import { ImageRequestParams } from 'picsur-shared/dist/dto/api/image.dto'; import { FileType, - SupportedFileTypeCategory + SupportedFileTypeCategory, } from 'picsur-shared/dist/dto/mimes.dto'; import { SysPreference } from 'picsur-shared/dist/dto/sys-preferences.enum'; import { AsyncFailable, Fail, FT, HasFailed } from 'picsur-shared/dist/types'; diff --git a/backend/src/routes/api/info/info.controller.ts b/backend/src/routes/api/info/info.controller.ts index ccc0f89..8d575b9 100644 --- a/backend/src/routes/api/info/info.controller.ts +++ b/backend/src/routes/api/info/info.controller.ts @@ -2,13 +2,13 @@ import { Controller, Get } from '@nestjs/common'; import { AllFormatsResponse, AllPermissionsResponse, - InfoResponse + InfoResponse, } from 'picsur-shared/dist/dto/api/info.dto'; import { FileType2Ext, FileType2Mime, SupportedAnimFileTypes, - SupportedImageFileTypes + SupportedImageFileTypes, } from 'picsur-shared/dist/dto/mimes.dto'; import { TrackingState } from 'picsur-shared/dist/dto/tracking-state.enum'; import { FallbackIfFailed } from 'picsur-shared/dist/types'; diff --git a/backend/src/routes/api/usage/usage.controller.ts b/backend/src/routes/api/usage/usage.controller.ts index a4f71e3..34803ed 100644 --- a/backend/src/routes/api/usage/usage.controller.ts +++ b/backend/src/routes/api/usage/usage.controller.ts @@ -33,13 +33,13 @@ export class UsageController { // remove cookies delete headers.cookie; - + // Add real ip, this should not work, but ackee uses a bad ip resolver // So we might aswell use it headers['X-Forwarded-For'] = req.ip; return headers; - } + }, }); } } diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index f761b31..c82100f 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -6,7 +6,7 @@ import { NavigationEnd, NavigationError, NavigationStart, - Router + Router, } from '@angular/router'; import { AutoUnsubscribe } from 'ngx-auto-unsubscribe-decorator'; import { RouteTransitionAnimations } from './app.animation'; diff --git a/frontend/src/app/components/header/header.component.ts b/frontend/src/app/components/header/header.component.ts index 7e35c3e..cf4d2de 100644 --- a/frontend/src/app/components/header/header.component.ts +++ b/frontend/src/app/components/header/header.component.ts @@ -5,7 +5,7 @@ import { EventEmitter, Input, OnInit, - Output + Output, } from '@angular/core'; import { Router } from '@angular/router'; import { AutoUnsubscribe } from 'ngx-auto-unsubscribe-decorator'; diff --git a/frontend/src/app/components/masonry/masonry.component.ts b/frontend/src/app/components/masonry/masonry.component.ts index be9563d..de18552 100644 --- a/frontend/src/app/components/masonry/masonry.component.ts +++ b/frontend/src/app/components/masonry/masonry.component.ts @@ -8,7 +8,7 @@ import { Input, OnDestroy, QueryList, - ViewChildren + ViewChildren, } from '@angular/core'; import { AutoUnsubscribe } from 'ngx-auto-unsubscribe-decorator'; import { combineLatest, Subscription } from 'rxjs'; diff --git a/frontend/src/app/components/pref-option/pref-option.component.ts b/frontend/src/app/components/pref-option/pref-option.component.ts index c1a8048..a53e56f 100644 --- a/frontend/src/app/components/pref-option/pref-option.component.ts +++ b/frontend/src/app/components/pref-option/pref-option.component.ts @@ -3,7 +3,7 @@ import { AbstractControl, FormControl, ValidationErrors } from '@angular/forms'; import { AutoUnsubscribe } from 'ngx-auto-unsubscribe-decorator'; import { DecodedPref, - PrefValueType + PrefValueType, } from 'picsur-shared/dist/dto/preferences.dto'; import { AsyncFailable, HasFailed } from 'picsur-shared/dist/types'; import { filter } from 'rxjs'; diff --git a/frontend/src/app/i18n/sys-pref.i18n.ts b/frontend/src/app/i18n/sys-pref.i18n.ts index 4aca002..ed42bf2 100644 --- a/frontend/src/app/i18n/sys-pref.i18n.ts +++ b/frontend/src/app/i18n/sys-pref.i18n.ts @@ -9,7 +9,8 @@ export const SysPreferenceUI: { } = { [SysPreference.HostOverride]: { name: 'Host Override', - helpText: 'Override the hostname for the server, useful for when you are accessing the server from a different domain.', + helpText: + 'Override the hostname for the server, useful for when you are accessing the server from a different domain.', category: 'General', }, @@ -70,7 +71,8 @@ export const SysPreferenceUI: { }, [SysPreference.TrackingUrl]: { name: 'Ackee tracking URL', - helpText: 'URL of the Ackee tracking server. Requests are proxied, so ensure the X-Forwarded-For header is handled.', + helpText: + 'URL of the Ackee tracking server. Requests are proxied, so ensure the X-Forwarded-For header is handled.', category: 'Usage', }, [SysPreference.TrackingId]: { diff --git a/frontend/src/app/routes/errors/errors.module.ts b/frontend/src/app/routes/errors/errors.module.ts index 1f5ace3..4b58e6c 100644 --- a/frontend/src/app/routes/errors/errors.module.ts +++ b/frontend/src/app/routes/errors/errors.module.ts @@ -8,4 +8,4 @@ import { ErrorsRoutingModule } from './errors.routing.module'; declarations: [E404Component, E401Component], imports: [CommonModule, ErrorsRoutingModule], }) -export default class ErrorsRouteModule {} +export default class ErrorsRouteModule {} diff --git a/frontend/src/app/routes/settings/general/settings-general.component.ts b/frontend/src/app/routes/settings/general/settings-general.component.ts index 5b400b4..3735b8c 100644 --- a/frontend/src/app/routes/settings/general/settings-general.component.ts +++ b/frontend/src/app/routes/settings/general/settings-general.component.ts @@ -3,7 +3,7 @@ import { DecodedPref } from 'picsur-shared/dist/dto/preferences.dto'; import { Observable } from 'rxjs'; import { UsrPreferenceFriendlyNames, - UsrPreferenceHelpText + UsrPreferenceHelpText, } from 'src/app/i18n/usr-pref.i18n'; import { UsrPrefService } from 'src/app/services/api/usr-pref.service'; diff --git a/frontend/src/app/routes/settings/settings.module.ts b/frontend/src/app/routes/settings/settings.module.ts index 9c6ef69..5bf7160 100644 --- a/frontend/src/app/routes/settings/settings.module.ts +++ b/frontend/src/app/routes/settings/settings.module.ts @@ -15,4 +15,4 @@ import { SettingsSidebarComponent } from './sidebar/settings-sidebar.component'; ], exports: [SettingsRoutingModule], }) -export default class SettingsRouteModule {} +export default class SettingsRouteModule {} diff --git a/frontend/src/app/routes/settings/sys-pref/settings-sys-pref.component.ts b/frontend/src/app/routes/settings/sys-pref/settings-sys-pref.component.ts index b5eee77..4669c83 100644 --- a/frontend/src/app/routes/settings/sys-pref/settings-sys-pref.component.ts +++ b/frontend/src/app/routes/settings/sys-pref/settings-sys-pref.component.ts @@ -2,7 +2,7 @@ import { Component } from '@angular/core'; import { DecodedPref } from 'picsur-shared/dist/dto/preferences.dto'; import { SysPreference, - SysPreferenceValidators + SysPreferenceValidators, } from 'picsur-shared/dist/dto/sys-preferences.enum'; import { map, Observable } from 'rxjs'; import { SysPreferenceUI } from 'src/app/i18n/sys-pref.i18n'; diff --git a/frontend/src/app/routes/settings/sys-pref/settings-sys-pref.module.ts b/frontend/src/app/routes/settings/sys-pref/settings-sys-pref.module.ts index 835570d..0008e83 100644 --- a/frontend/src/app/routes/settings/sys-pref/settings-sys-pref.module.ts +++ b/frontend/src/app/routes/settings/sys-pref/settings-sys-pref.module.ts @@ -6,10 +6,6 @@ import { SettingsSysprefRoutingModule } from './settings-sys-pref.routing.module @NgModule({ declarations: [SettingsSysprefComponent], - imports: [ - CommonModule, - SettingsSysprefRoutingModule, - PrefOptionModule, - ], + imports: [CommonModule, SettingsSysprefRoutingModule, PrefOptionModule], }) export default class SettingsSysprefRouteModule {} diff --git a/frontend/src/app/routes/view/view-speeddial/view-speeddial.component.ts b/frontend/src/app/routes/view/view-speeddial/view-speeddial.component.ts index 0cc646d..54b1632 100644 --- a/frontend/src/app/routes/view/view-speeddial/view-speeddial.component.ts +++ b/frontend/src/app/routes/view/view-speeddial/view-speeddial.component.ts @@ -17,11 +17,11 @@ import { ErrorService } from 'src/app/util/error-manager/error.service'; import { UtilService } from 'src/app/util/util.service'; import { CustomizeDialogComponent, - CustomizeDialogData + CustomizeDialogData, } from '../customize-dialog/customize-dialog.component'; import { EditDialogComponent, - EditDialogData + EditDialogData, } from '../edit-dialog/edit-dialog.component'; @Component({ diff --git a/frontend/src/app/routes/view/view.component.ts b/frontend/src/app/routes/view/view.component.ts index ff4c413..b7a4be6 100644 --- a/frontend/src/app/routes/view/view.component.ts +++ b/frontend/src/app/routes/view/view.component.ts @@ -3,7 +3,7 @@ import { ChangeDetectorRef, Component, OnDestroy, - OnInit + OnInit, } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { ImageMetaResponse } from 'picsur-shared/dist/dto/api/image.dto'; @@ -11,7 +11,7 @@ import { ImageLinks } from 'picsur-shared/dist/dto/image-links.class'; import { AnimFileType, ImageFileType, - SupportedFileTypeCategory + SupportedFileTypeCategory, } from 'picsur-shared/dist/dto/mimes.dto'; import { EImage } from 'picsur-shared/dist/entities/image.entity'; import { EUser } from 'picsur-shared/dist/entities/user.entity'; @@ -94,7 +94,7 @@ export class ViewComponent implements OnInit, OnDestroy { const links = this.imageService.CreateImageLinksFromID( this.id, format === 'original' ? null : format, - this.image?.file_name + this.image?.file_name, ); this.imageLinksCache[format] = links; diff --git a/frontend/src/app/services/api/api.service.ts b/frontend/src/app/services/api/api.service.ts index f093848..d95ad89 100644 --- a/frontend/src/app/services/api/api.service.ts +++ b/frontend/src/app/services/api/api.service.ts @@ -7,7 +7,7 @@ import { Fail, FT, HasFailed, - HasSuccess + HasSuccess, } from 'picsur-shared/dist/types'; import { ZodDtoStatic } from 'picsur-shared/dist/util/create-zod-dto'; import { ParseMime2FileType } from 'picsur-shared/dist/util/parse-mime'; diff --git a/frontend/src/app/services/api/image.service.ts b/frontend/src/app/services/api/image.service.ts index 4fe16ab..0f6e456 100644 --- a/frontend/src/app/services/api/image.service.ts +++ b/frontend/src/app/services/api/image.service.ts @@ -6,11 +6,11 @@ import { ImageListResponse, ImageUpdateRequest, ImageUpdateResponse, - ImageUploadResponse + ImageUploadResponse, } from 'picsur-shared/dist/dto/api/image-manage.dto'; import { ImageMetaResponse, - ImageRequestParams + ImageRequestParams, } from 'picsur-shared/dist/dto/api/image.dto'; import { ImageLinks } from 'picsur-shared/dist/dto/image-links.class'; import { FileType2Ext } from 'picsur-shared/dist/dto/mimes.dto'; @@ -21,7 +21,7 @@ import { FT, HasFailed, HasSuccess, - Open + Open, } from 'picsur-shared/dist/types/failable'; import { ImageUploadRequest } from '../../models/dto/image-upload-request.dto'; import { ApiService } from './api.service'; @@ -126,7 +126,11 @@ export class ImageService { // Non api calls // Use for native images - public GetImageURL(image: string, filetype: string | null, allowOverride = false): string { + public GetImageURL( + image: string, + filetype: string | null, + allowOverride = false, + ): string { const baseURL = this.infoService.getHostname(allowOverride); const extension = FileType2Ext(filetype ?? ''); diff --git a/frontend/src/app/services/api/user.service.ts b/frontend/src/app/services/api/user.service.ts index 3b5ad79..8795cfc 100644 --- a/frontend/src/app/services/api/user.service.ts +++ b/frontend/src/app/services/api/user.service.ts @@ -7,7 +7,7 @@ import { UserLoginResponse, UserMeResponse, UserRegisterRequest, - UserRegisterResponse + UserRegisterResponse, } from 'picsur-shared/dist/dto/api/user.dto'; import { JwtDataSchema } from 'picsur-shared/dist/dto/jwt.dto'; import { EUser } from 'picsur-shared/dist/entities/user.entity'; @@ -16,7 +16,7 @@ import { Fail, FT, HasFailed, - Open + Open, } from 'picsur-shared/dist/types'; import { BehaviorSubject } from 'rxjs'; import { Logger } from '../logger/logger.service'; diff --git a/frontend/src/app/util/util.service.ts b/frontend/src/app/util/util.service.ts index 69bd72f..2bd6302 100644 --- a/frontend/src/app/util/util.service.ts +++ b/frontend/src/app/util/util.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { FileType2Ext, - SupportedFileTypes + SupportedFileTypes, } from 'picsur-shared/dist/dto/mimes.dto'; import { HasFailed } from 'picsur-shared/dist/types'; import { Logger } from '../services/logger/logger.service'; diff --git a/frontend/src/assets/css/normalize.min.css b/frontend/src/assets/css/normalize.min.css index 0d686e9..5e1d925 100644 --- a/frontend/src/assets/css/normalize.min.css +++ b/frontend/src/assets/css/normalize.min.css @@ -1 +1,146 @@ -html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type='button'],[type='reset'],[type='submit'],button{-webkit-appearance:button}[type='button']::-moz-focus-inner,[type='reset']::-moz-focus-inner,[type='submit']::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type='button']:-moz-focusring,[type='reset']:-moz-focusring,[type='submit']:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type='checkbox'],[type='radio']{box-sizing:border-box;padding:0}[type='number']::-webkit-inner-spin-button,[type='number']::-webkit-outer-spin-button{height:auto}[type='search']{-webkit-appearance:textfield;outline-offset:-2px}[type='search']::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} +html { + line-height: 1.15; + -webkit-text-size-adjust: 100%; +} +body { + margin: 0; +} +main { + display: block; +} +h1 { + font-size: 2em; + margin: 0.67em 0; +} +hr { + box-sizing: content-box; + height: 0; + overflow: visible; +} +pre { + font-family: monospace, monospace; + font-size: 1em; +} +a { + background-color: transparent; +} +abbr[title] { + border-bottom: none; + text-decoration: underline; + text-decoration: underline dotted; +} +b, +strong { + font-weight: bolder; +} +code, +kbd, +samp { + font-family: monospace, monospace; + font-size: 1em; +} +small { + font-size: 80%; +} +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sub { + bottom: -0.25em; +} +sup { + top: -0.5em; +} +img { + border-style: none; +} +button, +input, +optgroup, +select, +textarea { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; +} +button, +input { + overflow: visible; +} +button, +select { + text-transform: none; +} +[type='button'], +[type='reset'], +[type='submit'], +button { + -webkit-appearance: button; +} +[type='button']::-moz-focus-inner, +[type='reset']::-moz-focus-inner, +[type='submit']::-moz-focus-inner, +button::-moz-focus-inner { + border-style: none; + padding: 0; +} +[type='button']:-moz-focusring, +[type='reset']:-moz-focusring, +[type='submit']:-moz-focusring, +button:-moz-focusring { + outline: 1px dotted ButtonText; +} +fieldset { + padding: 0.35em 0.75em 0.625em; +} +legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; +} +progress { + vertical-align: baseline; +} +textarea { + overflow: auto; +} +[type='checkbox'], +[type='radio'] { + box-sizing: border-box; + padding: 0; +} +[type='number']::-webkit-inner-spin-button, +[type='number']::-webkit-outer-spin-button { + height: auto; +} +[type='search'] { + -webkit-appearance: textfield; + outline-offset: -2px; +} +[type='search']::-webkit-search-decoration { + -webkit-appearance: none; +} +::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; +} +details { + display: block; +} +summary { + display: list-item; +} +template { + display: none; +} +[hidden] { + display: none; +} diff --git a/shared/src/util/common-regex.ts b/shared/src/util/common-regex.ts index 92c4a0e..e8b7116 100644 --- a/shared/src/util/common-regex.ts +++ b/shared/src/util/common-regex.ts @@ -5,4 +5,5 @@ export const URLRegex = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)/; export const UUIDRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; -export const HostNameRegex = /^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/; +export const HostNameRegex = + /^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/;