Skip to content

Commit cca97fd

Browse files
authored
Merge pull request #16 from MikiraSora/master
feat(maimai2): add circle/festa page for sdez160 support
2 parents 2f8accf + a604dee commit cca97fd

31 files changed

+1854
-56
lines changed

src/app/app.module.ts

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
import {BrowserModule} from '@angular/platform-browser';
2-
import {NgModule} from '@angular/core';
3-
import {AppComponent} from './app.component';
4-
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
5-
import {AppRoutingModule} from './app-routing.module';
6-
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
7-
import {MessageModule} from './message/message.module';
8-
import {DashboardModule} from './dashboard/dashboard.module';
9-
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
10-
import {V2Module} from './sega/chunithm/v2/v2.module';
11-
import {DatabaseModule} from './database/database.module';
12-
import {NgxPaginationModule} from 'ngx-pagination';
13-
import {OngekiModule} from './sega/ongeki/ongeki.module';
14-
import {Maimai2Module} from './sega/maimai2/maimai2.module';
15-
import {ErrorInterceptorService} from './auth/error-interceptor.service';
16-
import {LoadingInterceptorService} from './auth/loading-interceptor.service';
17-
import {ImporterModule} from './importer/importer.module';
18-
import {ServiceWorkerModule} from '@angular/service-worker';
19-
import {environment} from '../environments/environment';
1+
import { BrowserModule } from '@angular/platform-browser';
2+
import { NgModule } from '@angular/core';
3+
import { AppComponent } from './app.component';
4+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
5+
import { AppRoutingModule } from './app-routing.module';
6+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
7+
import { MessageModule } from './message/message.module';
8+
import { DashboardModule } from './dashboard/dashboard.module';
9+
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
10+
import { V2Module } from './sega/chunithm/v2/v2.module';
11+
import { DatabaseModule } from './database/database.module';
12+
import { NgxPaginationModule } from 'ngx-pagination';
13+
import { OngekiModule } from './sega/ongeki/ongeki.module';
14+
import { Maimai2Module } from './sega/maimai2/maimai2.module';
15+
import { ErrorInterceptorService } from './auth/error-interceptor.service';
16+
import { LoadingInterceptorService } from './auth/loading-interceptor.service';
17+
import { ImporterModule } from './importer/importer.module';
18+
import { ServiceWorkerModule } from '@angular/service-worker';
19+
import { environment } from '../environments/environment';
2020
import {
2121
Maimai2UploadUserPortraitDialog
2222
} from './sega/maimai2/maimai2-setting/maimai2-upload-user-portrait/maimai2-upload-user-portrait.dialog';
2323

2424
import Aegis from 'aegis-web-sdk';
25-
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
26-
import {TokenInterceptorService} from './auth/token-interceptor.service';
27-
import {NgIconsModule} from '@ng-icons/core';
28-
import {HomeComponent} from './home/home.component';
29-
import {ToastsContainer} from './toasts-container.component';
30-
import {CardsComponent} from './cards/cards.component';
25+
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
26+
import { TokenInterceptorService } from './auth/token-interceptor.service';
27+
import { NgIconsModule } from '@ng-icons/core';
28+
import { HomeComponent } from './home/home.component';
29+
import { ToastsContainer } from './toasts-container.component';
30+
import { CardsComponent } from './cards/cards.component';
3131
import {
3232
bootstrapChevronUp,
3333
bootstrapChevronDown,
@@ -62,6 +62,7 @@ import { LanguageService } from './language.service';
6262
import { lastValueFrom } from 'rxjs';
6363
import { KeychipComponent } from './keychip/keychip.component';
6464
import { ClipboardModule } from '@angular/cdk/clipboard';
65+
import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
6566
import { OauthCallbackComponent } from './oauth-callback/oauth-callback.component';
6667
import { SignInComponent } from './sign-in/sign-in.component';
6768
import { SignUpComponent } from './sign-up/sign-up.component';
@@ -86,10 +87,10 @@ export function HttpLoaderFactory(http: HttpClient) {
8687
export function initializeApp(
8788
translateService: TranslateService,
8889
languageService: LanguageService) {
89-
return async () => {
90-
const userLang = languageService.getCurrentLang();
91-
await lastValueFrom(translateService.use(userLang));
92-
};
90+
return async () => {
91+
const userLang = languageService.getCurrentLang();
92+
await lastValueFrom(translateService.use(userLang));
93+
};
9394
}
9495

9596
@NgModule({
@@ -109,7 +110,7 @@ export function initializeApp(
109110
AnnouncementsComponent,
110111
EditComponent,
111112
AdminComponent
112-
],
113+
],
113114
imports: [
114115
BrowserModule,
115116
BrowserAnimationsModule,
@@ -127,7 +128,7 @@ export function initializeApp(
127128
Maimai2Module,
128129

129130
ReactiveFormsModule,
130-
ServiceWorkerModule.register('ngsw-worker.js', {enabled: environment.production}),
131+
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),
131132
NgbModule,
132133
FormsModule,
133134
ToastsContainer,
@@ -162,15 +163,16 @@ export function initializeApp(
162163
deps: [HttpClient],
163164
}
164165
}),
165-
ClipboardModule
166+
ClipboardModule,
167+
NgbModule,
166168
],
167169
providers: [
168-
{provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptorService, multi: true},
169-
{provide: HTTP_INTERCEPTORS, useClass: LoadingInterceptorService, multi: true},
170-
{provide: HTTP_INTERCEPTORS, useClass: TokenInterceptorService, multi: true},
171-
{provide: APP_INITIALIZER, useFactory: initializeApp, deps: [TranslateService, LanguageService], multi: true},
170+
{ provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptorService, multi: true },
171+
{ provide: HTTP_INTERCEPTORS, useClass: LoadingInterceptorService, multi: true },
172+
{ provide: HTTP_INTERCEPTORS, useClass: TokenInterceptorService, multi: true },
173+
{ provide: APP_INITIALIZER, useFactory: initializeApp, deps: [TranslateService, LanguageService], multi: true },
172174
],
173-
bootstrap: [AppComponent]
175+
bootstrap: [AppComponent],
174176
})
175177
export class AppModule {
176178
}

src/app/menu.service.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,18 @@ export class MenuService {
165165
url: 'mai2/dxpass',
166166
displayCondition: DisplayCondition.HasProfile,
167167
},
168+
{
169+
id: 8,
170+
name: 'Circle',
171+
url: 'mai2/circle',
172+
displayCondition: DisplayCondition.HasProfile,
173+
},
174+
{
175+
id: 9,
176+
name: 'Festa',
177+
url: 'mai2/festa',
178+
displayCondition: DisplayCondition.HasProfile,
179+
},
168180
{
169181
id: 7,
170182
name: 'Rival',

src/app/model/ApiResponse.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export interface ApiResponse<T> {
2+
data: T;
3+
time: string;
4+
status: number;
5+
}

src/app/model/Page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export interface Page<T> {
2-
content: T;
2+
content: T[];
33
page: number;
44
totalPages: number;
55
totalElements: number;
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
.freedom-pass {
2+
border: 1px solid #3d91cd;
3+
color: transparent;
4+
background: #e625bf linear-gradient(to right, #6db1f6, #11c1ea);
5+
-webkit-background-clip: text;
6+
background-clip: text;
7+
}
8+
9+
.gold-pass {
10+
border: 1px solid #995014;
11+
color: transparent;
12+
background: #d1aa79 linear-gradient(45deg, #f4b400, #d1aa79, #b77a3b);
13+
-webkit-background-clip: text;
14+
background-clip: text;
15+
}
16+
17+
.normal-pass {
18+
background: #451d0c;
19+
border: 1px solid #374908;
20+
color: white;
21+
}
22+
23+
.silver-pass {
24+
background: #09343c;
25+
border: 1px solid #3a4165;
26+
color: #6394d5;
27+
}
28+
29+
.expired-pass {
30+
background: #686363;
31+
border: 1px solid #c6b1b1;
32+
color: white;
33+
}
34+
35+
/*.pass-text {*/
36+
/* display: flex;*/
37+
/* align-items: center;*/
38+
/* b {*/
39+
/* padding: 0 3px;*/
40+
/* }*/
41+
/*}*/
42+
43+
.card {
44+
position: relative; /* 使子元素可以绝对定位 */
45+
}
46+
47+
.overlay-image {
48+
position: absolute; /* 用绝对定位确保图像重叠 */
49+
top: 0; /* 根据需求设置偏移 */
50+
left: 0; /* 根据需求设置偏移 */
51+
width: 100%; /* 确保图像填满父容器 */
52+
height: auto; /* 高度自适应 */
53+
opacity: 1; /* 如果需要,可以调整此值以实现透明效果 */
54+
z-index: 1; /* 设置图层顺序 */
55+
}
56+
57+
/* 框架图像可能需要更高的 z-index */
58+
.frame-image {
59+
z-index: 2; /* 若要确保框架在最上层 */
60+
}
61+
62+
.horizon-margin {
63+
margin-left: 5px;
64+
margin-right: 5px;
65+
}
66+
67+
.vertical-margin {
68+
margin-top: 5px;
69+
margin-bottom: 5px;
70+
}
71+
72+
.multi-line-ellipsis {
73+
display: -webkit-box;
74+
-webkit-box-orient: vertical;
75+
overflow: hidden;
76+
text-overflow: ellipsis;
77+
}
78+
79+
.user-table {
80+
width: 100%;
81+
border-collapse: collapse;
82+
}
83+
84+
.user-table th, .user-table td {
85+
padding: 8px;
86+
text-align: left;
87+
}
88+
89+
.pagination {
90+
margin-top: 10px;
91+
}
92+
93+
.comment-text {
94+
white-space: pre-wrap; /* 保留换行符,并允许换行 */
95+
word-break: break-word; /* 遇到长单词或连续字符自动换行 */
96+
overflow-wrap: break-word; /* 兼容旧浏览器 */
97+
max-height: 100px; /* 可选:限制高度 */
98+
overflow: auto; /* 可选:超出出现滚动条 */
99+
}

0 commit comments

Comments
 (0)