Added status text to character profile
This commit is contained in:
		
							parent
							
								
									bc6dd13cfe
								
							
						
					
					
						commit
						4d06ed691d
					
				| @ -66,7 +66,7 @@ | |||||||
|                 <div class="progress-bar" :style="{width: importProgress * 100 + '%'}"></div> |                 <div class="progress-bar" :style="{width: importProgress * 100 + '%'}"></div> | ||||||
|             </div> |             </div> | ||||||
|         </modal> |         </modal> | ||||||
|         <modal :buttons="false" ref="profileViewer" dialogClass="profile-viewer"> |         <modal :buttons="false" ref="profileViewer" dialogClass="profile-viewer" > | ||||||
|             <character-page :authenticated="true" :oldApi="true" :name="profileName" :image-preview="true" ref="characterPage"></character-page> |             <character-page :authenticated="true" :oldApi="true" :name="profileName" :image-preview="true" ref="characterPage"></character-page> | ||||||
|             <template slot="title"> |             <template slot="title"> | ||||||
|                 {{profileName}} |                 {{profileName}} | ||||||
| @ -76,6 +76,8 @@ | |||||||
| 
 | 
 | ||||||
|                 <i class="fas fa-circle-notch fa-spin profileRefreshSpinner" v-show="isRefreshingProfile()"></i> |                 <i class="fas fa-circle-notch fa-spin profileRefreshSpinner" v-show="isRefreshingProfile()"></i> | ||||||
| 
 | 
 | ||||||
|  |                 <bbcode :text="profileStatus" v-show="!!profileStatus" class="status-text"></bbcode> | ||||||
|  | 
 | ||||||
|                 <div class="profile-title-right"> |                 <div class="profile-title-right"> | ||||||
|                   <button class="btn" @click="prevProfile" :disabled="!prevProfileAvailable()"><i class="fas fa-arrow-left"></i></button> |                   <button class="btn" @click="prevProfile" :disabled="!prevProfileAvailable()"><i class="fas fa-arrow-left"></i></button> | ||||||
|                   <button class="btn" @click="nextProfile" :disabled="!nextProfileAvailable()"><i class="fas fa-arrow-right"></i></button> |                   <button class="btn" @click="nextProfile" :disabled="!nextProfileAvailable()"><i class="fas fa-arrow-right"></i></button> | ||||||
| @ -138,6 +140,7 @@ | |||||||
|     import { EventBus } from '../chat/preview/event-bus'; |     import { EventBus } from '../chat/preview/event-bus'; | ||||||
| 
 | 
 | ||||||
|     import BBCodeTester from '../bbcode/Tester.vue'; |     import BBCodeTester from '../bbcode/Tester.vue'; | ||||||
|  |     import { BBCodeView } from '../bbcode/view'; | ||||||
| 
 | 
 | ||||||
|     // import ImagePreview from '../chat/preview/ImagePreview.vue'; |     // import ImagePreview from '../chat/preview/ImagePreview.vue'; | ||||||
|     // import Bluebird from 'bluebird'; |     // import Bluebird from 'bluebird'; | ||||||
| @ -196,7 +199,8 @@ | |||||||
|           characterPage: CharacterPage, |           characterPage: CharacterPage, | ||||||
|           logs: Logs, |           logs: Logs, | ||||||
|           'word-definition': WordDefinition, |           'word-definition': WordDefinition, | ||||||
|           BBCodeTester: BBCodeTester |           BBCodeTester: BBCodeTester, | ||||||
|  |           bbcode: BBCodeView(core.bbCodeParser) | ||||||
|         } |         } | ||||||
|     }) |     }) | ||||||
|     export default class Index extends Vue { |     export default class Index extends Vue { | ||||||
| @ -213,6 +217,7 @@ | |||||||
|         hasCompletedUpgrades!: boolean; |         hasCompletedUpgrades!: boolean; | ||||||
|         importProgress = 0; |         importProgress = 0; | ||||||
|         profileName = ''; |         profileName = ''; | ||||||
|  |         profileStatus = ''; | ||||||
|         adName = ''; |         adName = ''; | ||||||
|         fixCharacters: ReadonlyArray<string> = []; |         fixCharacters: ReadonlyArray<string> = []; | ||||||
|         fixCharacter = ''; |         fixCharacter = ''; | ||||||
| @ -303,7 +308,9 @@ | |||||||
| 
 | 
 | ||||||
|             electron.ipcRenderer.on('open-profile', (_e: Event, name: string) => { |             electron.ipcRenderer.on('open-profile', (_e: Event, name: string) => { | ||||||
|                 const profileViewer = <Modal>this.$refs['profileViewer']; |                 const profileViewer = <Modal>this.$refs['profileViewer']; | ||||||
|                 this.profileName = name; | 
 | ||||||
|  |                 this.openProfile(name); | ||||||
|  | 
 | ||||||
|                 profileViewer.show(); |                 profileViewer.show(); | ||||||
|             }); |             }); | ||||||
| 
 | 
 | ||||||
| @ -321,7 +328,7 @@ | |||||||
|                   return; |                   return; | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
|                 this.profileName = name; |                 this.openProfile(name); | ||||||
|                 profileViewer.show(); |                 profileViewer.show(); | ||||||
|               } |               } | ||||||
|             }); |             }); | ||||||
| @ -516,7 +523,8 @@ | |||||||
|           } |           } | ||||||
| 
 | 
 | ||||||
|           this.profilePointer++; |           this.profilePointer++; | ||||||
|           this.profileName = this.profileNameHistory[this.profilePointer]; | 
 | ||||||
|  |           this.openProfile(this.profileNameHistory[this.profilePointer]); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -531,7 +539,8 @@ | |||||||
|           } |           } | ||||||
| 
 | 
 | ||||||
|           this.profilePointer--; |           this.profilePointer--; | ||||||
|           this.profileName = this.profileNameHistory[this.profilePointer]; | 
 | ||||||
|  |           this.openProfile(this.profileNameHistory[this.profilePointer]); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -539,6 +548,13 @@ | |||||||
|           return (this.profilePointer > 0); |           return (this.profilePointer > 0); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |         openProfile(name: string) { | ||||||
|  |           this.profileName = name; | ||||||
|  | 
 | ||||||
|  |           const character = core.characters.get(name); | ||||||
|  | 
 | ||||||
|  |           this.profileStatus = character.statusText || ''; | ||||||
|  |         } | ||||||
| 
 | 
 | ||||||
|         get styling(): string { |         get styling(): string { | ||||||
|             try { |             try { | ||||||
| @ -617,10 +633,15 @@ | |||||||
| 
 | 
 | ||||||
|         .profile-title-right { |         .profile-title-right { | ||||||
|           float: right; |           float: right; | ||||||
|           bottom: 7px; |           top: -7px; | ||||||
|           right: 0; |           right: 0; | ||||||
|           position: absolute; |           position: absolute; | ||||||
|         } |         } | ||||||
|  | 
 | ||||||
|  |         .status-text { | ||||||
|  |           font-size: 12pt; | ||||||
|  |           display: block; | ||||||
|  |         } | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user