mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
up env
This commit is contained in:
parent
ee429e37cc
commit
c95f481af9
@ -6,6 +6,9 @@
|
||||
</a>
|
||||
<a class="navbar-item title is-size-1-fullhd is-size-4-touch has-text-black" routerLink="/">
|
||||
{{ appTitle }}
|
||||
<sub>
|
||||
{{ environment.appVersion }}
|
||||
</sub>
|
||||
</a>
|
||||
</div>
|
||||
<div class="navbar-start">
|
||||
|
@ -124,7 +124,7 @@ export class ApiService {
|
||||
console.log('this.baseHref', this.baseHref);
|
||||
const headers = ApiService.makeHeaders(vote_stack);
|
||||
console.log('headers', headers);
|
||||
const url = `${this.baseHref}/poll/${poll.custom_url}/answer`;
|
||||
const url = `${this.baseHref}/vote/poll/${poll.custom_url}/answer`;
|
||||
|
||||
const axiosconf = {
|
||||
url,
|
||||
|
@ -2,11 +2,14 @@
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<label for="title">
|
||||
{{ 'creation.choose_title' | translate }}
|
||||
<span>
|
||||
{{ 'creation.choose_title' | translate }}
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<br />
|
||||
<input
|
||||
class="input"
|
||||
matInput
|
||||
[placeholder]="'creation.choose_title_placeholder' | translate"
|
||||
formControlName="title"
|
||||
id="title"
|
||||
@ -15,13 +18,12 @@
|
||||
#title
|
||||
/>
|
||||
<button
|
||||
(click)="form.patchValue({ title: '' })"
|
||||
*ngIf="form.value.title"
|
||||
aria-label="Clear"
|
||||
mat-button
|
||||
mat-icon-button
|
||||
*ngIf="form.value.title"
|
||||
matSuffix
|
||||
maxlength="400"
|
||||
mat-icon-button
|
||||
aria-label="Clear"
|
||||
(click)="form.patchValue({ title: '' })"
|
||||
>
|
||||
<i class="fa fa-close"></i>
|
||||
</button>
|
||||
|
@ -0,0 +1,4 @@
|
||||
#title {
|
||||
display: block;
|
||||
width: 80%;
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
#kind {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
display: block;
|
||||
}
|
48
src/environments/endpoints.ts
Normal file
48
src/environments/endpoints.ts
Normal file
@ -0,0 +1,48 @@
|
||||
const backendApiUrlsInDev = {
|
||||
local: 'http://tktest.lan/api/v1',
|
||||
remote: 'http://tktest.lan/api/v1',
|
||||
// remote: 'https://framadate-api.cipherbliss.com/api/v1',
|
||||
};
|
||||
const apiV1 = {
|
||||
baseHref: 'http://tktest.lan/api/v1',
|
||||
// baseHref: 'https://framadate-api.cipherbliss.com/api/v1',
|
||||
api_new_poll: '/poll/',
|
||||
api_get_poll: '/poll/{id}',
|
||||
api_new_vote_stack: '/poll/{id}/answer',
|
||||
'api_test-mail-poll': '/api/v1/poll/mail/test-mail-poll/{emailChoice}',
|
||||
'app.swagger': '/api/doc.json',
|
||||
};
|
||||
|
||||
export const endpoints = {
|
||||
versionToUse: 'apiV1',
|
||||
version: {
|
||||
apiV1,
|
||||
},
|
||||
baseHref: backendApiUrlsInDev.local,
|
||||
endpoints: {
|
||||
polls: {
|
||||
name: '/poll',
|
||||
choices: {
|
||||
name: '/choices',
|
||||
},
|
||||
comments: {
|
||||
name: '/comments',
|
||||
},
|
||||
slugs: {
|
||||
name: '/slugs',
|
||||
},
|
||||
answers: {
|
||||
name: '/answers',
|
||||
},
|
||||
},
|
||||
users: {
|
||||
name: '/users',
|
||||
polls: {
|
||||
name: '/polls',
|
||||
sendEmail: {
|
||||
name: '/send-email',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
@ -1,3 +1,6 @@
|
||||
import { endpoints } from './endpoints';
|
||||
import { poll_conf } from './poll_conf';
|
||||
|
||||
const backendApiUrlsInDev = {
|
||||
local: '/api/v1',
|
||||
remote: 'https://framadate-api.cipherbliss.com/api/v1',
|
||||
@ -15,56 +18,15 @@ export const environment = {
|
||||
production: true,
|
||||
display_routes: true,
|
||||
showDemoWarning: true,
|
||||
autofill: false,
|
||||
autofill: true,
|
||||
autoSendNewPoll: false,
|
||||
interval_days_default: 7,
|
||||
appTitle: 'FramaDate Funky',
|
||||
appVersion: '2.1.0',
|
||||
appVersion: '0.6.0',
|
||||
appLogo: 'assets/img/logo.png',
|
||||
api: {
|
||||
versionToUse: 'apiV1',
|
||||
version: {
|
||||
apiV1,
|
||||
},
|
||||
baseHref: backendApiUrlsInDev.remote,
|
||||
endpoints: {
|
||||
polls: {
|
||||
name: '/poll',
|
||||
choices: {
|
||||
name: '/choices',
|
||||
},
|
||||
comments: {
|
||||
name: '/comments',
|
||||
},
|
||||
slugs: {
|
||||
name: '/slugs',
|
||||
},
|
||||
answers: {
|
||||
name: '/answers',
|
||||
},
|
||||
},
|
||||
users: {
|
||||
name: '/users',
|
||||
polls: {
|
||||
name: '/polls',
|
||||
sendEmail: {
|
||||
name: '/send-email',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
poll: {
|
||||
defaultConfig: {
|
||||
maxCountOfAnswers: 150,
|
||||
expiresDaysDelay: 60,
|
||||
expiracyAfterLastModificationInDays: 180,
|
||||
whoCanChangeAnswers: 'everybody',
|
||||
visibility: 'link_only',
|
||||
voteChoices: 'only_yes',
|
||||
},
|
||||
},
|
||||
api: endpoints,
|
||||
poll: poll_conf,
|
||||
localStorage: {
|
||||
key: 'FramaSondage',
|
||||
key: 'FramaDateFunky',
|
||||
},
|
||||
};
|
||||
|
@ -2,77 +2,24 @@
|
||||
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
|
||||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
const backendApiUrlsInDev = {
|
||||
local: 'http://127.0.0.1:8000/api/v1',
|
||||
remote: 'http://127.0.0.1:8000/api/v1',
|
||||
// remote: 'https://framadate-api.cipherbliss.com/api/v1',
|
||||
};
|
||||
const apiV1 = {
|
||||
baseHref: 'http://127.0.0.1:8000/api/v1',
|
||||
// baseHref: 'https://framadate-api.cipherbliss.com/api/v1',
|
||||
api_new_poll: '/poll/',
|
||||
api_get_poll: '/poll/{id}',
|
||||
api_new_vote_stack: '/poll/{id}/answer',
|
||||
'api_test-mail-poll': '/api/v1/poll/mail/test-mail-poll/{emailChoice}',
|
||||
'app.swagger': '/api/doc.json',
|
||||
};
|
||||
import { endpoints } from './endpoints';
|
||||
import { poll_conf } from './poll_conf';
|
||||
|
||||
export const environment = {
|
||||
frontDomain: 'http://127.0.0.1:8000',
|
||||
frontDomain: 'http://127.0.0.1:4200',
|
||||
production: false,
|
||||
display_routes: false,
|
||||
display_routes: true,
|
||||
autofill: true,
|
||||
showDemoWarning: false,
|
||||
autoSendNewPoll: false,
|
||||
interval_days_default: 7,
|
||||
appTitle: 'FramaDate Funky',
|
||||
appVersion: '2.1.0',
|
||||
appTitle: 'FDFunky',
|
||||
appVersion: '0.6.0',
|
||||
appLogo: 'assets/img/logo.png',
|
||||
api: {
|
||||
versionToUse: 'apiV1',
|
||||
version: {
|
||||
apiV1,
|
||||
},
|
||||
baseHref: backendApiUrlsInDev.local,
|
||||
endpoints: {
|
||||
polls: {
|
||||
name: '/poll',
|
||||
choices: {
|
||||
name: '/choices',
|
||||
},
|
||||
comments: {
|
||||
name: '/comments',
|
||||
},
|
||||
slugs: {
|
||||
name: '/slugs',
|
||||
},
|
||||
answers: {
|
||||
name: '/answers',
|
||||
},
|
||||
},
|
||||
users: {
|
||||
name: '/users',
|
||||
polls: {
|
||||
name: '/polls',
|
||||
sendEmail: {
|
||||
name: '/send-email',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
poll: {
|
||||
defaultConfig: {
|
||||
maxCountOfAnswers: 150,
|
||||
expiresDaysDelay: 60,
|
||||
expiracyAfterLastModificationInDays: 180,
|
||||
whoCanChangeAnswers: 'everybody',
|
||||
visibility: 'link_only',
|
||||
voteChoices: 'only_yes',
|
||||
},
|
||||
},
|
||||
api: endpoints,
|
||||
poll: poll_conf,
|
||||
localStorage: {
|
||||
key: 'FramaSondage',
|
||||
key: 'FramaDateFunky',
|
||||
},
|
||||
};
|
||||
|
||||
@ -83,4 +30,5 @@ export const environment = {
|
||||
* This import should be commented out in production mode because it will have a negative impact
|
||||
* on performance if an error is thrown.
|
||||
*/
|
||||
import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
||||
import 'zone.js/dist/zone-error';
|
||||
// Included with Angular CLI.
|
||||
|
10
src/environments/poll_conf.ts
Normal file
10
src/environments/poll_conf.ts
Normal file
@ -0,0 +1,10 @@
|
||||
export const poll_conf = {
|
||||
defaultConfig: {
|
||||
maxCountOfAnswers: 150,
|
||||
expiresDaysDelay: 60,
|
||||
expiracyAfterLastModificationInDays: 180,
|
||||
whoCanChangeAnswers: 'everybody',
|
||||
visibility: 'link_only',
|
||||
voteChoices: 'only_yes',
|
||||
},
|
||||
};
|
@ -15,3 +15,7 @@ $input-shadow: none;
|
||||
.notification {
|
||||
margin: 1em 0;
|
||||
}
|
||||
.select {
|
||||
display: block !important;
|
||||
width: 80%;
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ mat-checkbox {
|
||||
}
|
||||
.ng-pristine,
|
||||
.ng-dirty {
|
||||
border-left: blue 3px solid;
|
||||
//border-left: #ccc 3px solid;
|
||||
padding-left: 1em;
|
||||
}
|
||||
.ng-touched.ng-invalid {
|
||||
|
@ -6,7 +6,7 @@
|
||||
width: 45%;
|
||||
}
|
||||
.date-choice > input:first-of-type {
|
||||
width: 80%;
|
||||
width: 75%;
|
||||
}
|
||||
.date-choice .btn--primary,
|
||||
.several-times {
|
||||
@ -15,7 +15,7 @@
|
||||
}
|
||||
.time-choice {
|
||||
input {
|
||||
width: 70%;
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user