Merge pull request #203 from NicolasConstant/develop

0.19.1 PR
This commit is contained in:
Nicolas Constant 2019-11-30 22:06:09 -05:00 committed by GitHub
commit 2064940361
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 105 additions and 10 deletions

View File

@ -1,6 +1,6 @@
{
"name": "sengi",
"version": "0.19.0",
"version": "0.19.1",
"license": "AGPL-3.0-or-later",
"main": "main-electron.js",
"description": "A multi-account desktop client for Mastodon and Pleroma",

View File

@ -101,7 +101,11 @@ export class AddNewAccountComponent implements OnInit {
if (instanceApps.length !== 0) {
return Promise.resolve(instanceApps[0].app);
} else {
const redirect_uri = this.getLocalHostname();
let redirect_uri = this.getLocalHostname();
if (process && process.versions && typeof((<any>process.versions).electron) === 'string') {
redirect_uri += '/register';
}
return this.authService.createNewApplication(instance, 'Sengi', redirect_uri, 'read write follow', 'https://nicolasconstant.github.io/sengi/')
.then((appData: AppData) => {
return this.saveNewApp(instance, appData)

View File

@ -9,24 +9,25 @@
<h4 class="panel__subtitle">Notifications</h4>
<div class="sub-section">
<input class="sub-section__checkbox" [(ngModel)]="disableAutofocusEnabled"
(change)="onDisableAutofocusChanged()" type="checkbox" name="disableAutofocus"
value="disableAutofocus" id="disableAutofocus">
(change)="onDisableAutofocusChanged()" type="checkbox" name="disableAutofocus" value="disableAutofocus"
id="disableAutofocus">
<label class="noselect sub-section__label" for="disableAutofocus">disable account's panel autofocus</label>
<br>
<input class="sub-section__checkbox" [(ngModel)]="disableAvatarNotificationsEnabled"
(change)="onDisableAvatarNotificationsChanged()" type="checkbox" name="disableAvatarNotifications"
value="disableAvatarNotifications" id="disableAvatarNotifications">
<label class="noselect sub-section__label" for="disableAvatarNotifications">disable all avatar(s) notifications</label>
<label class="noselect sub-section__label" for="disableAvatarNotifications">disable all avatar(s)
notifications</label>
<br>
<input class="sub-section__checkbox" [(ngModel)]="disableSoundsEnabled"
(change)="onDisableSoundsEnabledChanged()" type="checkbox" name="disableSounds"
value="disableSounds" id="disableSounds">
(change)="onDisableSoundsEnabledChanged()" type="checkbox" name="disableSounds" value="disableSounds"
id="disableSounds">
<label class="noselect sub-section__label" for="disableSounds">disable sounds</label>
<br>
<span class="sound__title">notification sound:</span><br/>
<span class="sound__title">notification sound:</span><br />
<form [formGroup]="notificationForm">
<select formControlName="countryControl" (change)="onChange($event.target.value)" class="sound__select">
<option [value]="s.id" *ngFor="let s of notificationSounds"> {{s.name}}</option>
@ -38,6 +39,22 @@
<h4 class="panel__subtitle">About</h4>
<p class="version">Sengi version: {{version}}</p>
<h4 class="panel__subtitle">RESET</h4>
<div class="sub-section">
<p>
If you run into bugs or want to clear all stored Sengi data, please procede:
</p>
<a *ngIf="!isCleanningAll" class="sengi-btn sengi-btn__red" href (click)="startClearAllLocalData()">
Clear all local data
</a>
<a *ngIf="isCleanningAll" class="sengi-btn sengi-btn__red sengi-btn__medium" href (click)="confirmClearAll()">
Confirm Clear All
</a>
<a *ngIf="isCleanningAll" class="sengi-btn sengi-btn__blue sengi-btn__medium" href (click)="cancelClearAll()">
Cancel
</a>
</div>
</div>
</div>

View File

@ -2,6 +2,7 @@
@import "commons";
@import "panel";
@import "mixins";
@import "buttons";
.panel {
padding-left: 0px;

View File

@ -80,4 +80,21 @@ export class SettingsComponent implements OnInit {
this.toolsService.saveSettings(settings);
}
isCleanningAll: boolean = false;
startClearAllLocalData(): boolean {
this.isCleanningAll = !this.isCleanningAll;
return false;
}
confirmClearAll(): boolean{
localStorage.clear();
location.reload();
return false;
}
cancelClearAll(): boolean {
this.isCleanningAll = false;
return false;
}
}

View File

@ -28,7 +28,7 @@
</a>
<a class="left-bar-button left-bar-button--cog left-bar-button--bottom left-bar-link" href title="settings" (click)="openSettings()"
(contextmenu)="openSettings()" *ngIf="hasAccounts">
(contextmenu)="openSettings()">
<fa-icon [icon]="faCog"></fa-icon>
</a>
</div>

View File

@ -5,6 +5,7 @@
border-color: $btn-primary-color;
color: $btn-primary-font-color;
font-size: 14px;
&:hover,
&:focus,
&:active,
@ -12,7 +13,9 @@
background-color: $btn-primary-color-hover;
border-color: $btn-primary-color-hover;
box-shadow: none;
} // &:focus {
}
// &:focus {
// background-color: $btn-primary-color-hover;
// border-color: $btn-primary-color-hover;
// outline: none;
@ -39,8 +42,61 @@
background-color: $button-background-color;
color: $button-color;
transition: all .2s;
&:hover {
background-color: $button-background-color-hover;
color: $button-color-hover;
}
}
.sengi-btn {
transition: all .2s;
text-decoration: none;
display: block; // width: calc(100% - 20px);
width: calc(100% - 15px); // height: 30px;
padding: 5px 10px; // border: solid 1px black;
margin-left: 5px;
&--icon {
float: right;
}
&--disabled {
cursor: default;
background-color: darken($color-primary, 4);
&:hover {
background-color: darken($color-primary, 4);
}
}
&--margin-bottom {
&:not(:last-child) {
margin-bottom: 5px;
}
}
&__blue {
background-color: $color-primary;
color: #fff;
&:hover {
background-color: lighten($color-primary, 15);
}
}
&__red {
$red-button-color: rgb(65, 3, 3);
background-color: $red-button-color !important;
color: #fff;
&:hover {
background-color: lighten($red-button-color, 15) !important;
}
}
&__medium {
float: left;
width: calc((100% - 15px)/2 - 5px);
}
}