Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Short paths #752

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
"build": "npm run electron:serve-tsc && ng build --base-href ./",
"build:prod": "npm run build -- -c production",
"buildsize": "sh ./bin/buildSizeCheck.sh",
"check": "npm run check:tsc && npm run check:lint",
"check:lint": "tslint --project ./tsconfig.json && tslint --project ./tsconfig-serve.json && tslint --project ./tsconfig.worker.json",
"check:tsc": "tsc --project ./tsconfig.json --noEmit && tsc --project ./tsconfig-serve.json --noEmit && tsc --project ./tsconfig.worker.json --noEmit",
"hasRemote": "sh ./bin/hasRemoteCheck.sh",
"electron": "npm run hasRemote && npm run build:prod && electron-builder build && npm run buildsize",
Expand Down
12 changes: 7 additions & 5 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ import { HomeComponent } from './components/home.component';
import { ImageElementService } from './services/image-element.service';
import { ManualTagsService } from './components/tags-manual/manual-tags.service';
import { ModalService } from './components/modal/modal.service';
import { PipeSideEffectService } from './pipes/pipe-side-effect.service';
import { ResolutionFilterService } from './pipes/resolution-filter.service';
import { ShortcutsService } from './components/shortcuts/shortcuts.service';
import { SimilarityService } from './pipes/similarity.service';
import { SourceFolderService } from './components/statistics/source-folder.service';
import { StarFilterService } from './pipes/star-filter.service';
import { WordFrequencyService } from './pipes/word-frequency.service';

// Pipe Services
import { PipeSideEffectService } from '@pipes';
import { ResolutionFilterService } from '@pipes';
import { SimilarityService } from '@pipes';
import { StarFilterService } from '@pipes';
import { WordFrequencyService } from '@pipes';

// Components
import { AddTagComponent } from './components/tags-manual/add-tag.component';
Expand Down
4 changes: 2 additions & 2 deletions src/app/common/app-state.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SortType } from '../pipes/sorting.pipe';
import type { SupportedView } from '../../../interfaces/shared-interfaces';
import type { SortType } from '@pipes';
import type { SupportedView } from '@my/shared-interfaces';

// Please conform the supported languages exactly to the first two characters from here:
// https://github.com/electron/electron/blob/master/docs/api/locales.md
Expand Down
26 changes: 14 additions & 12 deletions src/app/components/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,44 @@ import { FilePathService } from './views/file-path.service';
import { ImageElementService } from '../services/image-element.service';
import { ManualTagsService } from './tags-manual/manual-tags.service';
import { ModalService } from './modal/modal.service';
import { PipeSideEffectService } from '../pipes/pipe-side-effect.service';
import { ResolutionFilterService } from '../pipes/resolution-filter.service';
import { ShortcutsService, CustomShortcutAction } from './shortcuts/shortcuts.service';
import { SourceFolderService } from './statistics/source-folder.service';
import { StarFilterService } from '../pipes/star-filter.service';
import { WordFrequencyService, WordFreqAndHeight } from '../pipes/word-frequency.service';

// Pipe Services
import { PipeSideEffectService } from '@pipes';
import { ResolutionFilterService } from '@pipes';
import { StarFilterService } from '@pipes';
import { WordFrequencyService, WordFreqAndHeight } from '@pipes';

// Components
import { SortOrderComponent } from './sort-order/sort-order.component';

// Interfaces
import type { FinalObject, ImageElement, ScreenshotSettings, ResolutionString } from '../../../interfaces/final-object.interface';
import type { FinalObject, ImageElement, ScreenshotSettings, ResolutionString } from '@my/final-object.interface';
import type { ImportStage } from '../../../node/main-support';
import type { ServerDetails } from './statistics/statistics.component';
import type { RemoteSettings, SettingsButtonSavedProperties, SettingsObject } from '../../../interfaces/settings-object.interface';
import type { SortType } from '../pipes/sorting.pipe';
import type { WizardOptions } from '../../../interfaces/wizard-options.interface';
import type { RemoteSettings, SettingsButtonSavedProperties, SettingsObject } from '@my/settings-object.interface';
import type { SortType } from '@pipes';
import type { SupportedLanguage, RowNumbers } from '../common/app-state';
import type { SettingsButtonKey, SettingsButtonsType } from '../common/settings-buttons';
import type { WizardOptions } from '@my/wizard-options.interface';
import type {
HistoryItem,
RemoteVideoClick,
RenameFileResponse,
SupportedTrayView,
SupportedView,
VideoClickEmit} from '../../../interfaces/shared-interfaces';
VideoClickEmit} from '@my/shared-interfaces';
import {
AllSupportedBottomTrayViews,
AllSupportedViews
} from '../../../interfaces/shared-interfaces';
} from '@my/shared-interfaces';

// Constants, etc
import type { SupportedLanguage, RowNumbers } from '../common/app-state';
import { AppState, DefaultImagesPerRow } from '../common/app-state';
import { Filters, filterKeyToIndex, FilterKeyNames } from '../common/filters';
import { GLOBALS } from '../../../node/main-globals';
import { LanguageLookup } from '../common/languages';
import type { SettingsButtonKey, SettingsButtonsType } from '../common/settings-buttons';
import { SettingsButtons, SettingsButtonsGroups } from '../common/settings-buttons';

// Animations
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/meta/meta.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { FilePathService } from '../views/file-path.service';
import { ImageElementService } from './../../services/image-element.service';
import { ManualTagsService } from '../tags-manual/manual-tags.service';

import type { StarRating, ImageElement } from '../../../../interfaces/final-object.interface';
import type { TagEmit, RenameFileResponse } from '../../../../interfaces/shared-interfaces';
import type { StarRating, ImageElement } from '@my/final-object.interface';
import type { TagEmit, RenameFileResponse } from '@my/shared-interfaces';

import {SettingsButtons } from '../../common/settings-buttons';

Expand Down
4 changes: 2 additions & 2 deletions src/app/components/rename-file/rename-file.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import type { Observable, Subscription } from 'rxjs';
import { ElectronService } from '../../providers/electron.service';
import { FilePathService } from '../views/file-path.service';

import type { ImageElement } from '../../../../interfaces/final-object.interface';
import type { RenameFileResponse } from '../../../../interfaces/shared-interfaces';
import type { ImageElement } from '@my/final-object.interface';
import type { RenameFileResponse } from '@my/shared-interfaces';

@Component({
selector: 'app-rename-file',
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/rename-modal/rename-modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
import type { BehaviorSubject } from 'rxjs';

import type { AppStateInterface } from '../../common/app-state';
import type { ImageElement } from '../../../../interfaces/final-object.interface';
import type { RenameFileResponse } from '../../../../interfaces/shared-interfaces';
import type { ImageElement } from '@my/final-object.interface';
import type { RenameFileResponse } from '@my/shared-interfaces';
import type { SettingsButtonsType } from '../../common/settings-buttons';

@Component({
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/sheet/sheet.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { FilePathService } from '../views/file-path.service';
import { ImageElementService } from './../../services/image-element.service';
import { ManualTagsService } from '../tags-manual/manual-tags.service';

import type { StarRating, ImageElement } from '../../../../interfaces/final-object.interface';
import type { TagEmit, RenameFileResponse } from '../../../../interfaces/shared-interfaces';
import type { StarRating, ImageElement } from '@my/final-object.interface';
import type { TagEmit, RenameFileResponse } from '@my/shared-interfaces';

import { metaAppear, textAppear, modalAnimation } from '../../common/animations';

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/similar-tray/similar-tray.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Component, Input, EventEmitter, Output } from '@angular/core';
import { ImageElementService } from './../../services/image-element.service';
import { SourceFolderService } from '../statistics/source-folder.service';

import type { RightClickEmit } from '../../../../interfaces/shared-interfaces';
import type { RightClickEmit } from '@my/shared-interfaces';
import type { SettingsButtonsType } from '../../common/settings-buttons';
import { modalAnimation, similarResultsText } from '../../common/animations';

Expand Down
5 changes: 3 additions & 2 deletions src/app/components/sort-order/sort-order.component.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import type { ElementRef} from '@angular/core';
import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';

import type { SortType } from '../../pipes/sorting.pipe';
import { filterItemAppear } from '../../common/animations';
import type { SortType } from '@pipes';
import type { SettingsButtonsType } from '../../common/settings-buttons';

import { filterItemAppear } from '../../common/animations';

@Component({
selector: 'app-sort-order',
templateUrl: './sort-order.component.html',
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/statistics/source-folder.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';

import type { InputSources } from '../../../../interfaces/final-object.interface';
import type { InputSources } from '@my/final-object.interface';

export type InputSourceConnected = Record<number, boolean>; // matches InputSources number, boolean represents if folder is connected

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/statistics/statistics.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ImageElementService } from './../../services/image-element.service';
import { SourceFolderService } from './source-folder.service';

import type { AppStateInterface } from '../../common/app-state';
import type { ImageElement, ScreenshotSettings, InputSources } from '../../../../interfaces/final-object.interface';
import type { ImageElement, ScreenshotSettings, InputSources } from '@my/final-object.interface';

import { metaAppear, breadcrumbWordAppear } from '../../common/animations';

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/tag-tray/tag-tray.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
import { ManualTagsService } from '../tags-manual/manual-tags.service';

import type { AppStateInterface } from '../../common/app-state';
import type { TagEmit } from '../../../../interfaces/shared-interfaces';
import type { TagEmit } from '@my/shared-interfaces';
import { modalAnimation } from '../../common/animations';
import type { SettingsButtonsType } from '../../common/settings-buttons';

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/tags-auto/autotags.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';

import { AutoTagsSaveService } from './tags-save.service';

import type { ImageElement } from '../../../../interfaces/final-object.interface';
import type { ImageElement } from '@my/final-object.interface';

export interface WordAndFreq {
word: string;
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/tags-auto/tag-display.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { Pipe } from '@angular/core';
import { autoFileTagsRegex } from './autotags.service';

import { Colors } from '../../common/colors';
import type { ImageElement } from '../../../../interfaces/final-object.interface';
import type { Tag } from '../../../../interfaces/shared-interfaces';
import type { ImageElement } from '@my/final-object.interface';
import type { Tag } from '@my/shared-interfaces';

@Pipe({
name: 'tagDisplayPipe'
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/tags-manual/manual-tags.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';

import type { ImageElement } from '../../../../interfaces/final-object.interface';
import type { ImageElement } from '@my/final-object.interface';

@Injectable()
export class ManualTagsService {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/tags-manual/view-tags.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core

import { ManualTagsService } from './manual-tags.service';

import type { Tag, TagEmit } from '../../../../interfaces/shared-interfaces';
import type { Tag, TagEmit } from '@my/shared-interfaces';

@Component({
selector: 'app-view-tags-component',
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/views/clip/clip.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { DomSanitizer } from '@angular/platform-browser';

import { FilePathService } from '../file-path.service';

import type { ImageElement } from '../../../../../interfaces/final-object.interface';
import type { RightClickEmit, VideoClickEmit } from '../../../../../interfaces/shared-interfaces';
import type { ImageElement } from '@my/final-object.interface';
import type { RightClickEmit, VideoClickEmit } from '@my/shared-interfaces';

import { metaAppear, textAppear } from '../../../common/animations';

Expand Down
6 changes: 3 additions & 3 deletions src/app/components/views/details/details.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import type { BehaviorSubject } from 'rxjs';

import { FilePathService } from '../file-path.service';
import { ManualTagsService } from '../../tags-manual/manual-tags.service';

import type { StarRating, ImageElement } from '../../../../../interfaces/final-object.interface';
import type { VideoClickEmit, RightClickEmit, TagEmit, RenameFileResponse } from '../../../../../interfaces/shared-interfaces';
import { ImageElementService } from './../../../services/image-element.service';

import type { StarRating, ImageElement } from '@my/final-object.interface';
import type { VideoClickEmit, RightClickEmit, TagEmit, RenameFileResponse } from '@my/shared-interfaces';

export interface YearEmission {
index: number;
year: number;
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/views/file-path.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as path from 'path';

import { SourceFolderService } from '../statistics/source-folder.service';

import type { ImageElement } from '../../../../interfaces/final-object.interface';
import type { ImageElement } from '@my/final-object.interface';

type FolderType = 'thumbnails' | 'filmstrips' | 'clips';

Expand Down
3 changes: 2 additions & 1 deletion src/app/components/views/file/file.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Component, Input } from '@angular/core';

import type { ImageElement } from '../../../../../interfaces/final-object.interface';
import { ImageElementService } from './../../../services/image-element.service';

import type { ImageElement } from '@my/final-object.interface';

@Component({
selector: 'app-file-item',
templateUrl: './file.component.html',
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/views/filmstrip/filmstrip.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { Component, Input, ViewChild, Output, EventEmitter } from '@angular/core
import { DomSanitizer } from '@angular/platform-browser';

import { FilePathService } from '../file-path.service';
import { ImageElementService } from './../../../services/image-element.service';

import { metaAppear, textAppear } from '../../../common/animations';

import type { ImageElement } from '../../../../../interfaces/final-object.interface';
import { ImageElementService } from './../../../services/image-element.service';
import type { RightClickEmit, VideoClickEmit } from '../../../../../interfaces/shared-interfaces';
import type { ImageElement } from '@my/final-object.interface';
import type { RightClickEmit, VideoClickEmit } from '@my/shared-interfaces';

@Component({
selector: 'app-filmstrip-item',
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/views/full/full.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';

import { FilePathService } from '../file-path.service';
import { ImageElementService } from './../../../services/image-element.service';

import { metaAppear, textAppear } from '../../../common/animations';

import type { ImageElement } from '../../../../../interfaces/final-object.interface';
import { ImageElementService } from './../../../services/image-element.service';
import type { RightClickEmit, VideoClickEmit } from '../../../../../interfaces/shared-interfaces';
import type { ImageElement } from '@my/final-object.interface';
import type { RightClickEmit, VideoClickEmit } from '@my/shared-interfaces';

@Component({
selector: 'app-full-item',
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/views/thumbnail/thumbnail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import type { OnInit, ElementRef, OnDestroy } from '@angular/core';
import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';

import { FilePathService } from '../file-path.service';
import { ImageElementService } from './../../../services/image-element.service';

import { metaAppear, textAppear } from '../../../common/animations';

import { ImageElementService } from './../../../services/image-element.service';
import type { ImageElement } from '../../../../../interfaces/final-object.interface';
import type { VideoClickEmit, RightClickEmit } from '../../../../../interfaces/shared-interfaces';
import type { ImageElement } from '@my/final-object.interface';
import type { VideoClickEmit, RightClickEmit } from '@my/shared-interfaces';

@Component({
selector: 'app-thumbnail',
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/wizard/wizard.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Component, Input, Output, EventEmitter } from '@angular/core';

import type { AllowedScreenshotHeight, AllowedScreenshotHeightString } from '../../../../interfaces/final-object.interface';
import type { HistoryItem } from '../../../../interfaces/shared-interfaces';
import type { AllowedScreenshotHeight, AllowedScreenshotHeightString } from '@my/final-object.interface';
import type { HistoryItem } from '@my/shared-interfaces';
import type { ImportStage } from '../../../../node/main-support';
import type { WizardOptions } from '../../../../interfaces/wizard-options.interface';
import type { WizardOptions } from '@my/wizard-options.interface';

import { historyItemRemove, slowFadeIn } from '../../common/animations';

Expand Down
2 changes: 1 addition & 1 deletion src/app/pipes/count.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Pipe } from '@angular/core';

import { PipeSideEffectService } from './pipe-side-effect.service';

import type { ImageElement } from '../../../interfaces/final-object.interface';
import type { ImageElement } from '@my/final-object.interface';

@Pipe({
name: 'countPipe'
Expand Down
2 changes: 1 addition & 1 deletion src/app/pipes/delete-file.pipe.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { PipeTransform } from '@angular/core';
import { Pipe } from '@angular/core';

import type { ImageElement } from '../../../interfaces/final-object.interface';
import type { ImageElement } from '@my/final-object.interface';

@Pipe({
name: 'deleteFilePipe'
Expand Down
2 changes: 1 addition & 1 deletion src/app/pipes/duplicateFinder.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Pipe } from '@angular/core';

import { SortingPipe } from './sorting.pipe';

import type { ImageElement } from '../../../interfaces/final-object.interface';
import type { ImageElement } from '@my/final-object.interface';

type DupeType = 'length' | 'size' | 'hash';
type SortBy = 'timeDesc' | 'sizeDesc' | 'hash';
Expand Down
2 changes: 1 addition & 1 deletion src/app/pipes/file-search.pipe.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { PipeTransform } from '@angular/core';
import { Pipe } from '@angular/core';

import type { ImageElement } from '../../../interfaces/final-object.interface';
import type { ImageElement } from '@my/final-object.interface';

type SearchType = 'folder' | 'file' | 'tag' | 'notes';

Expand Down
2 changes: 1 addition & 1 deletion src/app/pipes/file-size-filter.pipe.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { PipeTransform } from '@angular/core';
import { Pipe } from '@angular/core';

import type { ImageElement } from '../../../interfaces/final-object.interface';
import type { ImageElement } from '@my/final-object.interface';

@Pipe({
name: 'fileSizeFilterPipe'
Expand Down
4 changes: 2 additions & 2 deletions src/app/pipes/folder-view.pipe.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { PipeTransform } from '@angular/core';
import { Pipe } from '@angular/core';

import type { ImageElement, StarRating} from '../../../interfaces/final-object.interface';
import { NewImageElement } from '../../../interfaces/final-object.interface';
import type { ImageElement, StarRating} from '@my/final-object.interface';
import { NewImageElement } from '@my/final-object.interface';
import type { SettingsButtonsType} from '../common/settings-buttons';
import { SettingsButtons } from '../common/settings-buttons';

Expand Down
2 changes: 1 addition & 1 deletion src/app/pipes/fuzzy-search.pipe.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { PipeTransform } from '@angular/core';
import { Pipe } from '@angular/core';

import type { ImageElement } from '../../../interfaces/final-object.interface';
import type { ImageElement } from '@my/final-object.interface';

import Fuse from 'fuse.js';

Expand Down
Loading
Loading