Skip to content
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
10 changes: 1 addition & 9 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,7 @@
"plugins": ["prettier"],
"extends": ["plugin:prettier/recommended"],
"rules": {
"prettier/prettier": ["error", {
"parser": "angular",
"endOfLine": "auto",
"printWidth": 150,
"useTabs": true,
"singleQuote": true,
"htmlWhitespaceSensitivity": "css",
"bracketSameLine": true
}]
"prettier/prettier": ["error"]
}
},
{
Expand Down
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"parser": "angular",
"endOfLine": "auto",
"printWidth": 150,
"useTabs": true,
"singleQuote": true,
"htmlWhitespaceSensitivity": "css",
"bracketSameLine": true
}
17 changes: 8 additions & 9 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"mike-co.import-sorter",
"sibiraj-s.vscode-scss-formatter",
"hbenl.vscode-mocha-test-adapter",
"angular.ng-template",
"bradlc.vscode-tailwindcss",
"csstools.postcss"
]
"recommendations": [
"dbaeumer.vscode-eslint",
"mike-co.import-sorter",
"hbenl.vscode-mocha-test-adapter",
"angular.ng-template",
"bradlc.vscode-tailwindcss",
"csstools.postcss"
]
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"files.trimTrailingWhitespace": false
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<img align="center" src="./src-angular/assets/images/example.png"/>
<hr>

**Bridge** is a desktop application that allows you to search for and download charts that can be played in games like Clone Hero, YARG, etc...
**Bridge** is a desktop application that allows you to search for and download charts that can be played in games like Clone Hero, YARG, etc...

This is the desktop version of [Chorus Encore](https://www.enchor.us/).

Expand All @@ -23,6 +23,7 @@ Head over to the [Releases](https://github.com/Geomitron/Bridge/releases) page t
- ✅ A variety of themes.
- ✅ Advanced song search.
- ✅ Chart issue scanner (for people making charts).
- ✅ Auto generate difficulties for songs. (Experimental)

### What's new in v3.4.0

Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
"scripts": {
"start": "concurrently \"npm run start:angular\" \"npm run start:electron\" -n angular,electron -c red,yellow",
"start:angular": "ng serve",
"start:electron": "nodemon --exec \"tsc -p src-electron/tsconfig.electron.json && node src-electron/rename-to-mjs.js && electron ./dist/electron/src-electron/main.js --dev\" --watch src-electron/ -e ts",
"start:electron": "nodemon --exec \"tsc -p src-electron/tsconfig.electron.json && node src-electron/rename-to-mjs.js && electron ./dist/electron/src-electron/main.js --no-sandbox --dev\" --watch src-electron/ -e ts",
"build:windows": "ng build -c production && tsc -p src-electron/tsconfig.electron.json && node src-electron/rename-to-mjs.js && electron-builder build --windows",
"build:mac": "ng build -c production && tsc -p src-electron/tsconfig.electron.json && node src-electron/rename-to-mjs.js && electron-builder build --mac",
"build:linux": "ng build -c production && tsc -p src-electron/tsconfig.electron.json && node src-electron/rename-to-mjs.js && electron-builder build --linux",
"release": "ng build -c production && tsc -p src-electron/tsconfig.electron.json && node src-electron/rename-to-mjs.js && electron-builder build"
"release": "ng build -c production && tsc -p src-electron/tsconfig.electron.json && node src-electron/rename-to-mjs.js && electron-builder build",
"lint": "eslint . --ext .ts,.html"
},
"dependencies": {
"@angular/animations": "19.2.1",
Expand All @@ -45,6 +46,7 @@
"exceljs": "^4.4.0",
"fs-extra": "11.2.0",
"lodash": "4.17.21",
"midi-file": "^1.2.4",
"parse-sng": "4.0.3",
"rxjs": "7.8.1",
"sanitize-filename": "1.6.3",
Expand Down Expand Up @@ -92,6 +94,7 @@
},
"pnpm": {
"onlyBuiltDependencies": [
"@parcel/watcher",
"electron",
"esbuild",
"exifreader",
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<i class="bi bi-search -ml-9"></i>
}
</div>
<div class="flex">
<div class="flex items-center">
<!-- Instrument Dropdown -->
<div class="dropdown">
<label tabindex="0" class="btn btn-neutral rounded-btn rounded-r-none uppercase">
Expand Down Expand Up @@ -52,6 +52,12 @@
}
</ul>
</div>
@if (settingsService.generateMissingDifficulties) {
<p class="ml-4 text-xs font-bold">
<i class="bi bi-lightbulb-fill text-sm hover:border-b-secondary-focus mr-1 text-yellow-500"></i>
Missing Difficulties Generation is enabled
</p>
}
@if (instrument === 'drums') {
<!-- Drum Type Dropdown -->
<div class="dropdown">
Expand Down Expand Up @@ -123,34 +129,70 @@
</thead>
<tbody>
<tr class="border-b-0" formGroupName="name">
<td><input type="text" placeholder="Name" class="input input-bordered input-sm" formControlName="value" /></td>
<td><input type="checkbox" class="checkbox" formControlName="exact" /></td>
<td><input type="checkbox" class="checkbox" formControlName="exclude" /></td>
<td>
<input type="text" placeholder="Name" class="input input-bordered input-sm" formControlName="value" />
</td>
<td>
<input type="checkbox" class="checkbox" formControlName="exact" />
</td>
<td>
<input type="checkbox" class="checkbox" formControlName="exclude" />
</td>
</tr>
<tr class="border-b-0" formGroupName="artist">
<td><input type="text" placeholder="Artist" class="input input-bordered input-sm" formControlName="value" /></td>
<td><input type="checkbox" class="checkbox" formControlName="exact" /></td>
<td><input type="checkbox" class="checkbox" formControlName="exclude" /></td>
<td>
<input type="text" placeholder="Artist" class="input input-bordered input-sm" formControlName="value" />
</td>
<td>
<input type="checkbox" class="checkbox" formControlName="exact" />
</td>
<td>
<input type="checkbox" class="checkbox" formControlName="exclude" />
</td>
</tr>
<tr class="border-b-0" formGroupName="album">
<td><input type="text" placeholder="Album" class="input input-bordered input-sm" formControlName="value" /></td>
<td><input type="checkbox" class="checkbox" formControlName="exact" /></td>
<td><input type="checkbox" class="checkbox" formControlName="exclude" /></td>
<td>
<input type="text" placeholder="Album" class="input input-bordered input-sm" formControlName="value" />
</td>
<td>
<input type="checkbox" class="checkbox" formControlName="exact" />
</td>
<td>
<input type="checkbox" class="checkbox" formControlName="exclude" />
</td>
</tr>
<tr class="border-b-0" formGroupName="genre">
<td><input type="text" placeholder="Genre" class="input input-bordered input-sm" formControlName="value" /></td>
<td><input type="checkbox" class="checkbox" formControlName="exact" /></td>
<td><input type="checkbox" class="checkbox" formControlName="exclude" /></td>
<td>
<input type="text" placeholder="Genre" class="input input-bordered input-sm" formControlName="value" />
</td>
<td>
<input type="checkbox" class="checkbox" formControlName="exact" />
</td>
<td>
<input type="checkbox" class="checkbox" formControlName="exclude" />
</td>
</tr>
<tr class="border-b-0" formGroupName="year">
<td><input type="text" placeholder="Year" class="input input-bordered input-sm" formControlName="value" /></td>
<td><input type="checkbox" class="checkbox" formControlName="exact" /></td>
<td><input type="checkbox" class="checkbox" formControlName="exclude" /></td>
<td>
<input type="text" placeholder="Year" class="input input-bordered input-sm" formControlName="value" />
</td>
<td>
<input type="checkbox" class="checkbox" formControlName="exact" />
</td>
<td>
<input type="checkbox" class="checkbox" formControlName="exclude" />
</td>
</tr>
<tr class="border-b-0" formGroupName="charter">
<td><input type="text" placeholder="Charter" class="input input-bordered input-sm" formControlName="value" /></td>
<td><input type="checkbox" class="checkbox" formControlName="exact" /></td>
<td><input type="checkbox" class="checkbox" formControlName="exclude" /></td>
<td>
<input type="text" placeholder="Charter" class="input input-bordered input-sm" formControlName="value" />
</td>
<td>
<input type="checkbox" class="checkbox" formControlName="exact" />
</td>
<td>
<input type="checkbox" class="checkbox" formControlName="exclude" />
</td>
</tr>
</tbody>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import dayjs from 'dayjs'
import { distinctUntilChanged, switchMap, throttleTime } from 'rxjs'
import { Difficulty, Instrument } from 'scan-chart'
import { SearchService } from 'src-angular/app/core/services/search.service'
import { SettingsService } from 'src-angular/app/core/services/settings.service'
import { difficulties, difficultyDisplay, drumsReviewedDisplay, drumTypeDisplay, DrumTypeName, drumTypeNames, instrumentDisplay, instruments } from 'src-shared/UtilFunctions'

@Component({
Expand Down Expand Up @@ -38,6 +39,7 @@ export class SearchBarComponent implements OnInit, AfterViewInit {
constructor(
private searchService: SearchService,
private fb: FormBuilder,
public settingsService: SettingsService,
) { }

ngOnInit() {
Expand Down
70 changes: 42 additions & 28 deletions src-angular/app/components/settings/settings.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="p-8 flex flex-col gap-3">
<div class="p-8 flex flex-col gap-3 overflow-y-auto h-full">
<label class="form-control w-full">
<div class="label">
<span class="label-text">Chart library directory</span>
Expand Down Expand Up @@ -104,6 +104,18 @@ <h2 class="menu-title text-neutral-content text-opacity-50">Light</h2>
</div>
</div>

<div class="form-control">
<div class="label">
<span class="label-text">Chart Missing Difficulties (experimental)</span>
</div>
<div class="flex">
<label class="label cursor-pointer" for="generateMissingDifficulties">
<input id="generateMissingDifficulties" type="checkbox" checked="checked" class="checkbox mr-1" [formControl]="generateMissingDifficulties" />
Auto generate missing difficulties
</label>
</div>
</div>

<div class="form-control">
<div class="label">
<span class="label-text">
Expand Down Expand Up @@ -225,35 +237,37 @@ <h2 class="menu-title text-neutral-content text-opacity-50">Light</h2>
</div>
</div>

<div class="absolute bottom-8 left-8 flex">
<a class="btn btn-link" (click)="openUrl('https://github.com/Geomitron/Bridge')"><i class="bi bi-github text-2xl"></i>Github</a>
<a class="btn btn-link" (click)="openUrl('https://discord.gg/cqaUXGm')"><i class="bi bi-discord text-2xl"></i>Discord</a>
<a class="btn btn-link" (click)="openUrl('https://www.patreon.com/ChorusEncore701')">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" id="patreon">
<path
fill="currentColor"
fill-rule="evenodd"
d="M0 9.71C0 1.63 10.32-3.476 16.916 2.818c3.532 3.36 4.143 8.902 1.248 12.951-3.591 4.92-8.282 4.193-12.76 4.193v-9.588c.041-2.117.747-3.943 3.324-4.816 2.245-.664 4.863.581 5.653 2.947.832 2.533-.374 4.234-1.787 5.272-1.413 1.039-3.616 1.039-5.07.042v3.279c3.138 1.5 8.105-.303 9.684-4.4 1.08-2.864.332-6.185-1.912-8.26-2.701-2.2-5.653-2.74-8.811-1.204-2.204 1.12-3.741 3.404-4.116 5.894v10.834H.042L0 9.71z"></path>
</svg>
Patreon
</a>
</div>

<div class="absolute bottom-8 right-8 flex gap-6">
<div class="join">
<button *ngIf="updateAvailable === 'yes'" class="join-item btn btn-primary" (click)="downloadUpdate()">
<i class="bi text-xl" [ngClass]="updateDownloaded ? 'bi-arrow-repeat' : 'bi-cloud-arrow-down'"></i>{{ downloadUpdateText }}
</button>
<button *ngIf="updateAvailable === 'error'" class="join-item btn btn-warning" [class.disabled]="updateRetrying" (click)="retryUpdate()">
<i class="bi bi-arrow-repeat text-xl" [class.loading]="updateRetrying"></i>{{ retryUpdateText }}
</button>
<button class="join-item btn btn-outline btn-disabled">{{ currentVersion }}</button>
<div class="flex justify-between sticky bottom-0 bg-base-100 rounded-xl p-2 mt-2">
<div class="flex">
<a class="btn btn-link" (click)="openUrl('https://github.com/Geomitron/Bridge')"><i class="bi bi-github text-2xl"></i>Github</a>
<a class="btn btn-link" (click)="openUrl('https://discord.gg/cqaUXGm')"><i class="bi bi-discord text-2xl"></i>Discord</a>
<a class="btn btn-link" (click)="openUrl('https://www.patreon.com/ChorusEncore701')">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" id="patreon">
<path
fill="currentColor"
fill-rule="evenodd"
d="M0 9.71C0 1.63 10.32-3.476 16.916 2.818c3.532 3.36 4.143 8.902 1.248 12.951-3.591 4.92-8.282 4.193-12.76 4.193v-9.588c.041-2.117.747-3.943 3.324-4.816 2.245-.664 4.863.581 5.653 2.947.832 2.533-.374 4.234-1.787 5.272-1.413 1.039-3.616 1.039-5.07.042v3.279c3.138 1.5 8.105-.303 9.684-4.4 1.08-2.864.332-6.185-1.912-8.26-2.701-2.2-5.653-2.74-8.811-1.204-2.204 1.12-3.741 3.404-4.116 5.894v10.834H.042L0 9.71z"></path>
</svg>
Patreon
</a>
</div>

<div class="tooltip tooltip-left" data-tip="Toggle developer tools">
<button class="btn btn-primary btn-square btn-neutral" (click)="toggleDevTools()">
<i class="bi bi-gear text-lg"></i>
</button>
<div class="flex gap-6">
<div class="join">
<button *ngIf="updateAvailable === 'yes'" class="join-item btn btn-primary" (click)="downloadUpdate()">
<i class="bi text-xl" [ngClass]="updateDownloaded ? 'bi-arrow-repeat' : 'bi-cloud-arrow-down'"></i>{{ downloadUpdateText }}
</button>
<button *ngIf="updateAvailable === 'error'" class="join-item btn btn-warning" [class.disabled]="updateRetrying" (click)="retryUpdate()">
<i class="bi bi-arrow-repeat text-xl" [class.loading]="updateRetrying"></i>{{ retryUpdateText }}
</button>
<button class="join-item btn btn-outline btn-disabled">{{ currentVersion }}</button>
</div>

<div class="tooltip tooltip-left" data-tip="Toggle developer tools">
<button class="btn btn-primary btn-square btn-neutral" (click)="toggleDevTools()">
<i class="bi bi-gear text-lg"></i>
</button>
</div>
</div>
</div>
</div>
7 changes: 6 additions & 1 deletion src-angular/app/components/settings/settings.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChangeDetectorRef, Component, ElementRef, OnInit, ViewChild } from '@angular/core'
import { ChangeDetectorRef, Component, ElementRef, HostBinding, OnInit, ViewChild } from '@angular/core'
import { FormControl } from '@angular/forms'

import _ from 'lodash'
Expand All @@ -11,12 +11,15 @@ import { themes } from 'src-shared/Settings'
standalone: false,
})
export class SettingsComponent implements OnInit {
@HostBinding('class.contents') contents = true

@ViewChild('themeDropdown', { static: true }) themeDropdown: ElementRef

public chartFolderName: FormControl<string>
public isSng: FormControl<boolean>
public downloadVideos: FormControl<boolean>
public isCompactTable: FormControl<boolean>
public generateMissingDifficulties: FormControl<boolean>

public artistColumn: FormControl<boolean>
public albumColumn: FormControl<boolean>
Expand Down Expand Up @@ -49,6 +52,8 @@ export class SettingsComponent implements OnInit {
this.isSng.valueChanges.subscribe(value => settingsService.isSng = value)
this.downloadVideos = new FormControl<boolean>(ss.downloadVideos, { nonNullable: true })
this.downloadVideos.valueChanges.subscribe(value => settingsService.downloadVideos = value)
this.generateMissingDifficulties = new FormControl<boolean>(ss.generateMissingDifficulties, { nonNullable: true })
this.generateMissingDifficulties.valueChanges.subscribe(value => settingsService.generateMissingDifficulties = value)
this.isCompactTable = new FormControl<boolean>(settingsService.isCompactTable, { nonNullable: true })
this.isCompactTable.valueChanges.subscribe(value => ss.isCompactTable = value)

Expand Down
Loading