Skip to content

Commit

Permalink
UI改善
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanasu committed Oct 8, 2023
1 parent ed746ba commit 5510701
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/app/class/stand-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export class StandList extends DataElement {
@SyncVar() position = 5;
@SyncVar() height = 35;
@SyncVar() overviewIndex = -1;
@SyncVar() isSortNameList = true;

get standElements(): DataElement[] {
return this.getElementsByName('stand');
Expand Down
4 changes: 2 additions & 2 deletions src/app/component/chat-input/chat-input.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="table" [ngClass]="{ 'direct-message': isDirect }">
<div class="table-cell imagebox" (contextmenu)="onContextMenu($event)" style="cursor: context-menu; padding-left: 4px">
<div class="table-cell imagebox" (contextmenu)="onContextMenu($event)" style="cursor: context-menu; padding-left: 4px; padding-right: 2px">
<div *ngIf="!character; else isCharacter" class="imagebox">
<img *ngIf="0 < imageFile.url.length" class="image face-icon" [src]="imageFile.url | safe: 'resourceUrl'" />
</div>
Expand All @@ -18,7 +18,7 @@
</div>
<div class="table-cell">
<div>
<label style="margin-right: 5px">
<label style="margin-right: 3px">
<input *ngIf="character" type="checkbox" [(ngModel)]="isUseFaceIcon" checked="{{isUseFaceIcon ? 'checked' : ''}}" (change)="isUseFaceIcon = (isUseFaceIcon ? true : false)" />
<b *ngIf="character" style="font-size: smaller;">顔IC</b>
</label>
Expand Down
4 changes: 2 additions & 2 deletions src/app/component/chat-input/chat-input.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ export class ChatInputComponent implements OnInit, OnDestroy {
let ret: string[] = [];
for (let standElement of this.character.standList.standElements) {
let nameElement = standElement.getFirstElementByName('name');
if (nameElement && nameElement.value && ret.indexOf(nameElement.value.toString()) < 0) {
if (nameElement && nameElement.value != null && nameElement.value.toString().trim() != '' && ret.indexOf(nameElement.value.toString()) < 0) {
ret.push(nameElement.value.toString());
}
}
return ret.sort();
return this.character.standList.isSortNameList ? ret.sort() : ret;
}
standName: string = '';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<ng-container *ngIf="applyDialogElement">
<label style="margin-right: 0.2em">
<input type="checkbox" [(ngModel)]="applyDialogElement.value" checked="{{applyDialogElement.value ? 'checked' : ''}}" (change)="applyDialogElement.value = (applyDialogElement.value ? 'applyDialog' : '')">
<b style="font-size: smaller;">💭</b>
<b style="font-size: smaller">💭</b>
</label>
</ng-container>
<button (click)="openSpeakingModal()" style="font-size: 9px" [style.font-weight]="isSpeakable ? 'bolder' : 'normal'">口パク画像 (APNGなど)</button>
Expand Down
4 changes: 4 additions & 0 deletions src/app/component/stand-setting/stand-setting.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<b>Pos: </b>
<input style="width: 350px" type="range" min="0" max="100" [(ngModel)]="position">
<input style="width: 3em; text-align: right; margin-right: 3px;" type="number" min="0" max="100" [(ngModel)]="position"><b sytle="margin-left: 3px; margin-right: 1em ">% </b>
<label style="margin-left: 1em; white-space: nowrap">
<input type="checkbox" [(ngModel)]="isSortNameList" checked="{{isSortNameList ? 'checked' : ''}}" (change)="isSortNameList = (isSortNameList ? true : false)" />
<b style="font-size: smaller">チャット入力で名前をソート</b>
</label>
</div>
<div class="position-indicate">
<b>Height (0=元画像のまま): </b>
Expand Down
10 changes: 10 additions & 0 deletions src/app/component/stand-setting/stand-setting.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ export class StandSettingComponent implements OnInit, OnDestroy, AfterViewInit {
this.character.standList.overviewIndex = overviewIndex;
}

set isSortNameList(isSortNameList: boolean) {
if (!this.character || !this.character.standList) return;
this.character.standList.isSortNameList = isSortNameList;
}

get isSortNameList(): boolean {
if (!this.character || !this.character.standList) return true;
return this.character.standList.isSortNameList;
}

ngOnInit() {
Promise.resolve().then(() => this.updatePanelTitle());
EventSystem.register(this)
Expand Down

0 comments on commit 5510701

Please sign in to comment.