mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
⚡ reorganize poll display page and urls in config
This commit is contained in:
parent
52587428dd
commit
051e4d8ee4
@ -1,6 +1,8 @@
|
||||
/**
|
||||
* une option de date dans les sondages spéciaux
|
||||
*/
|
||||
import {environment} from "../../environments/environment";
|
||||
|
||||
export interface DateOption {
|
||||
timeList: any;
|
||||
literal: string;
|
||||
@ -63,8 +65,8 @@ export class PollConfig {
|
||||
passwordAccess = 0;
|
||||
password = '';
|
||||
customUrl = '';
|
||||
urlPublic = 'https://framadate.org/default-url';
|
||||
urlAdmin = 'https://framadate.org/default-url/admin/d65es45fd45sdf45sd345f312sdf31sgfd345';
|
||||
urlPublic = environment.baseApiHref + '/default-url';
|
||||
urlAdmin = environment.baseApiHref + '/default-url/admin/d65es45fd45sdf45sd345f312sdf31sgfd345';
|
||||
canModifyAnswers = 1;// everybody, self, nobody (= just admin)
|
||||
whoModifiesAnswers = "self";// everybody, self, nobody (= just admin)
|
||||
whoCanChangeAnswers = 'everybody';// everybody, self, nobody (= just admin)
|
||||
|
@ -15,6 +15,7 @@ import {PollDisplayComponent} from "../pages/poll-display/poll-display.component
|
||||
|
||||
import {VotingComponent} from "../pages/voting/voting.component";
|
||||
import {PasswordComponent} from "../pages/password/password.component";
|
||||
|
||||
/**
|
||||
* each step in the form is a component
|
||||
*/
|
||||
@ -36,8 +37,8 @@ export const Routes =
|
||||
{path: 'graphic/:poll', component: PollGraphicComponent},
|
||||
{path: 'vote/poll/id/:poll', component: PollDisplayComponent},
|
||||
{path: 'votechoice', component: VoteChoiceComponent},
|
||||
{path: '**', redirectTo: '/home', pathMatch: 'full'},
|
||||
{path: 'voting', component: VotingComponent},
|
||||
{path: 'step/password', component: PasswordComponent},
|
||||
{path: '**', redirectTo: '/home', pathMatch: 'full'},
|
||||
]
|
||||
;
|
||||
|
@ -107,7 +107,7 @@
|
||||
class="input-lg"
|
||||
name="url"
|
||||
id="url"
|
||||
[(ngModel)]="config.customUrl">
|
||||
[value]="baseUrl+'/'+config.customUrl">
|
||||
|
||||
<sub class="instructions">
|
||||
{{"visibility.access_instructions"|translate}}
|
||||
@ -139,7 +139,9 @@
|
||||
min="8"
|
||||
*ngIf="showCustomPassword"
|
||||
[(ngModel)]="config.password">
|
||||
<button class="btn btn--default" (click)="showCustomPassword = !showCustomPassword">
|
||||
<button (click)="showCustomPassword = !showCustomPassword" [disabled]="!config.password"
|
||||
class="btn btn--default">
|
||||
<i class="fa fa-eye"></i>
|
||||
{{"visibility.see_pass"|translate}}
|
||||
</button>
|
||||
</div>
|
||||
|
@ -1,6 +1,7 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {BaseComponent} from '../base-page/base.component';
|
||||
import {ConfigService} from '../../services/config.service';
|
||||
import {environment} from "../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'framadate-visibility',
|
||||
@ -9,6 +10,7 @@ import {ConfigService} from '../../services/config.service';
|
||||
})
|
||||
export class VisibilityComponent extends BaseComponent implements OnInit {
|
||||
showCustomPassword = false;
|
||||
baseUrl = environment.baseApiHref;
|
||||
|
||||
constructor(public config: ConfigService) {
|
||||
super(config);
|
||||
|
@ -77,22 +77,17 @@ label {
|
||||
}
|
||||
}
|
||||
|
||||
form {
|
||||
display: flex;
|
||||
margin: auto;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
input {
|
||||
&:not([id]) {
|
||||
color: $dusty-orange;
|
||||
|
||||
.popup {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
z-index: 2222222222;
|
||||
}
|
||||
|
||||
.row {
|
||||
flex-direction: row;
|
||||
&:before {
|
||||
content: "cet input n'a pas d'attribut id, c'est mal.";
|
||||
color: $violet;
|
||||
display: block;
|
||||
padding: 1em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
label {
|
||||
@ -108,14 +103,6 @@ label {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.comment {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.commeny span {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.cname {
|
||||
padding-left: 17px;
|
||||
font-weight: bold;
|
||||
|
@ -1,4 +1,5 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
baseHref: "https://framadate-api.cipherbliss.com/",
|
||||
baseApiHref: 'https://framadate-api.cipherbliss.com/api/v1'
|
||||
};
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
export const environment = {
|
||||
production: false,
|
||||
baseHref: "https://framadate-api.cipherbliss.com/",
|
||||
baseApiHref: "https://framadate-api.cipherbliss.com/api/v1"
|
||||
// baseApiHref: "http://localhost:8000/api/v1"
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user