aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-09-03 09:49:04 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-09-05 10:17:02 +0200
commit8ae03c37181822617418d1fc372982b245ac0a9a (patch)
treee98e4a57ca85f2fd982aa8054476c9983cbb2398 /client
parent589d9f55f6f3f0d069d4bbb207d3d20769cc4ded (diff)
downloadPeerTube-8ae03c37181822617418d1fc372982b245ac0a9a.tar.gz
PeerTube-8ae03c37181822617418d1fc372982b245ac0a9a.tar.zst
PeerTube-8ae03c37181822617418d1fc372982b245ac0a9a.zip
Add creation reason
Diffstat (limited to 'client')
-rw-r--r--client/src/app/+about/about-instance/about-instance.component.html12
-rw-r--r--client/src/app/+about/about-instance/about-instance.component.ts2
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html26
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss4
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts2
5 files changed, 34 insertions, 12 deletions
diff --git a/client/src/app/+about/about-instance/about-instance.component.html b/client/src/app/+about/about-instance/about-instance.component.html
index 80acfcce0..8b21137af 100644
--- a/client/src/app/+about/about-instance/about-instance.component.html
+++ b/client/src/app/+about/about-instance/about-instance.component.html
@@ -24,19 +24,25 @@
24 </div> 24 </div>
25 25
26 <div class="block administrator" *ngIf="html.administrator"> 26 <div class="block administrator" *ngIf="html.administrator">
27 <div i18n class="section-title">Who are we?</div> 27 <div i18n class="section-title">Who we are</div>
28 28
29 <div [innerHTML]="html.administrator"></div> 29 <div [innerHTML]="html.administrator"></div>
30 </div> 30 </div>
31 31
32 <div class="block creation-reason" *ngIf="creationReason">
33 <div i18n class="section-title">Why we created this instance</div>
34
35 <p>{{ creationReason }}</p>
36 </div>
37
32 <div class="block maintenance-lifetime" *ngIf="maintenanceLifetime"> 38 <div class="block maintenance-lifetime" *ngIf="maintenanceLifetime">
33 <div i18n class="section-title">How long do we plan to maintain this instance?</div> 39 <div i18n class="section-title">How long we plan to maintain this instance</div>
34 40
35 <p>{{ maintenanceLifetime }}</p> 41 <p>{{ maintenanceLifetime }}</p>
36 </div> 42 </div>
37 43
38 <div class="block business-model" *ngIf="businessModel"> 44 <div class="block business-model" *ngIf="businessModel">
39 <div i18n class="section-title">How will we pay this instance?</div> 45 <div i18n class="section-title">How we will pay this instance</div>
40 46
41 <p>{{ businessModel }}</p> 47 <p>{{ businessModel }}</p>
42 </div> 48 </div>
diff --git a/client/src/app/+about/about-instance/about-instance.component.ts b/client/src/app/+about/about-instance/about-instance.component.ts
index e2c448501..b6cade4fe 100644
--- a/client/src/app/+about/about-instance/about-instance.component.ts
+++ b/client/src/app/+about/about-instance/about-instance.component.ts
@@ -25,6 +25,7 @@ export class AboutInstanceComponent implements OnInit {
25 administrator: '' 25 administrator: ''
26 } 26 }
27 27
28 creationReason = ''
28 maintenanceLifetime = '' 29 maintenanceLifetime = ''
29 businessModel = '' 30 businessModel = ''
30 31
@@ -61,6 +62,7 @@ export class AboutInstanceComponent implements OnInit {
61 async ([ about, translations ]) => { 62 async ([ about, translations ]) => {
62 this.shortDescription = about.instance.shortDescription 63 this.shortDescription = about.instance.shortDescription
63 64
65 this.creationReason = about.instance.creationReason
64 this.maintenanceLifetime = about.instance.maintenanceLifetime 66 this.maintenanceLifetime = about.instance.maintenanceLifetime
65 this.businessModel = about.instance.businessModel 67 this.businessModel = about.instance.businessModel
66 68
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
index 5aa6fda3c..ef24e5b24 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
@@ -21,7 +21,7 @@
21 <div class="form-group"> 21 <div class="form-group">
22 <label i18n for="instanceShortDescription">Short description</label> 22 <label i18n for="instanceShortDescription">Short description</label>
23 <textarea 23 <textarea
24 id="instanceShortDescription" formControlName="shortDescription" 24 id="instanceShortDescription" formControlName="shortDescription" class="small"
25 [ngClass]="{ 'input-error': formErrors['instance.shortDescription'] }" 25 [ngClass]="{ 'input-error': formErrors['instance.shortDescription'] }"
26 ></textarea> 26 ></textarea>
27 <div *ngIf="formErrors.instance.shortDescription" class="form-error">{{ formErrors.instance.shortDescription }}</div> 27 <div *ngIf="formErrors.instance.shortDescription" class="form-error">{{ formErrors.instance.shortDescription }}</div>
@@ -130,14 +130,26 @@
130 <div i18n class="inner-form-title">You and your instance</div> 130 <div i18n class="inner-form-title">You and your instance</div>
131 131
132 <div class="form-group"> 132 <div class="form-group">
133 <label i18n for="instanceAdministrator">Who is behind the instance? </label> 133 <label i18n for="instanceAdministrator">Who is behind the instance?</label>
134 <div class="label-small-info">A single person? A non profit? A company?</div> 134 <div class="label-small-info">A single person? A non profit? A company?</div>
135 135
136 <my-markdown-textarea
137 id="instanceAdministrator" formControlName="administrator" textareaWidth="500px" textareaHeight="75px" [previewColumn]="true"
138 [classes]="{ 'input-error': formErrors['instance.administrator'] }"
139 ></my-markdown-textarea>
140
141 <div *ngIf="formErrors.instance.administrator" class="form-error">{{ formErrors.instance.administrator }}</div>
142 </div>
143
144 <div class="form-group">
145 <label i18n for="instanceCreationReason">Why did you create this instance?</label>
146 <div class="label-small-info">To share your personal videos? To open registrations and allow people to upload what they want?</div>
147
136 <textarea 148 <textarea
137 id="instanceAdministrator" formControlName="administrator" 149 id="instanceCreationReason" formControlName="creationReason" class="small"
138 [ngClass]="{ 'input-error': formErrors['instance.administrator'] }" 150 [ngClass]="{ 'input-error': formErrors['instance.creationReason'] }"
139 ></textarea> 151 ></textarea>
140 <div *ngIf="formErrors.instance.administrator" class="form-error">{{ formErrors.instance.administrator }}</div> 152 <div *ngIf="formErrors.instance.creationReason" class="form-error">{{ formErrors.instance.creationReason }}</div>
141 </div> 153 </div>
142 154
143 <div class="form-group"> 155 <div class="form-group">
@@ -145,7 +157,7 @@
145 <div class="label-small-info">It's important to know for users who want to register on your instance</div> 157 <div class="label-small-info">It's important to know for users who want to register on your instance</div>
146 158
147 <textarea 159 <textarea
148 id="instanceMaintenanceLifetime" formControlName="maintenanceLifetime" 160 id="instanceMaintenanceLifetime" formControlName="maintenanceLifetime" class="small"
149 [ngClass]="{ 'input-error': formErrors['instance.maintenanceLifetime'] }" 161 [ngClass]="{ 'input-error': formErrors['instance.maintenanceLifetime'] }"
150 ></textarea> 162 ></textarea>
151 <div *ngIf="formErrors.instance.maintenanceLifetime" class="form-error">{{ formErrors.instance.maintenanceLifetime }}</div> 163 <div *ngIf="formErrors.instance.maintenanceLifetime" class="form-error">{{ formErrors.instance.maintenanceLifetime }}</div>
@@ -156,7 +168,7 @@
156 <div class="label-small-info">With you own funds? With users donations? Advertising?</div> 168 <div class="label-small-info">With you own funds? With users donations? Advertising?</div>
157 169
158 <textarea 170 <textarea
159 id="instanceBusinessModel" formControlName="businessModel" 171 id="instanceBusinessModel" formControlName="businessModel" class="small"
160 [ngClass]="{ 'input-error': formErrors['instance.businessModel'] }" 172 [ngClass]="{ 'input-error': formErrors['instance.businessModel'] }"
161 ></textarea> 173 ></textarea>
162 <div *ngIf="formErrors.instance.businessModel" class="form-error">{{ formErrors.instance.businessModel }}</div> 174 <div *ngIf="formErrors.instance.businessModel" class="form-error">{{ formErrors.instance.businessModel }}</div>
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss
index 68f1b01b7..2b4d0da2c 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss
@@ -44,8 +44,8 @@ textarea {
44 44
45 display: block; 45 display: block;
46 46
47 &#instanceShortDescription { 47 &.small {
48 height: 100px; 48 height: 75px;
49 } 49 }
50} 50}
51 51
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
index 3119ab040..e6f56bc97 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
@@ -100,6 +100,8 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
100 100
101 terms: null, 101 terms: null,
102 codeOfConduct: null, 102 codeOfConduct: null,
103
104 creationReason: null,
103 moderationInformation: null, 105 moderationInformation: null,
104 administrator: null, 106 administrator: null,
105 maintenanceLifetime: null, 107 maintenanceLifetime: null,