Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
cairthenn committed Mar 21, 2019
2 parents 23f582d + ce6451a commit 4fb902d
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 35 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Blink",
"version": "1.2.4",
"version": "1.2.5",
"description": "Blink",
"license": "GPL-3.0",
"main": "main.js",
Expand Down
6 changes: 3 additions & 3 deletions src/app/chat.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


import { MessagesComponent } from './messages/messages.component';
import { WebApiService as WebApiService } from './web-api.service';
import { FfzBttvService } from './ffz-bttv.service';
import { SettingsService } from './settings.service';
import { ElectronService } from './electron.service';
import { Message } from './message';
Expand Down Expand Up @@ -195,7 +195,7 @@ export class ChatService {
}

private updateFFZ() {
WebApiService.getFfzEmotes(this.channel).then(emotes => {
FfzBttvService.getFfzEmotes(this.channel).then(emotes => {
this.emotes.ffz.channel = emotes[0];
this.emotes.ffz.global = emotes[1];
this.emotes.ffz.lookup = emotes.flat().reduce((obj, item) => {
Expand All @@ -209,7 +209,7 @@ export class ChatService {
}

private updateBTTV() {
WebApiService.getBttvEmotes(this.channel).then(emotes => {
FfzBttvService.getBttvEmotes(this.channel).then(emotes => {
this.emotes.bttv.channel = emotes[0];
this.emotes.bttv.global = emotes[1];
this.emotes.bttv.lookup = emotes.flat().reduce((obj, item) => {
Expand Down
17 changes: 17 additions & 0 deletions src/app/emote-menu/emote-menu.component.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
Blink, a chat client for Twitch
Copyright (C) 2019 cairthenn
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Component, OnInit, Input } from '@angular/core';

@Component({
Expand Down
3 changes: 1 addition & 2 deletions src/app/web-api.service.ts → src/app/ffz-bttv.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ const bttvChannelUrl = 'https://api.betterttv.net/2/channels/';
const ffzGlobalUrl = 'https://api.frankerfacez.com/v1/set/global';
const ffzChannelUrl = 'https://api.frankerfacez.com/v1/room/';

export class WebApiService {
export class FfzBttvService {

public static ffz: any = {};
public static bttv: any = {};


public static getBttvGlobal(update: boolean = false) {
return !update && this.bttv._global || Web.get(bttvGlobalUrl).then(global => {
return this.bttv._global = global.emotes;
Expand Down
2 changes: 1 addition & 1 deletion src/app/messages/messages.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class MessagesComponent implements OnInit, AfterViewInit, OnDestroy {
}

public openUserCard(name: string, event: MouseEvent) {
event.stopPropagation();
this.closeUserCard(event);
this.service.twitch.getChannel(name).then(channel => {
const overhang = event.offsetX + this.userCard.width - this.el.nativeElement.clientWidth;
this.userCard.left = overhang > 0 ? event.offsetX - overhang : event.offsetX;
Expand Down
54 changes: 27 additions & 27 deletions src/app/settings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,34 +103,34 @@ export class SettingsService {

public load() {
const settings = ElectronService.settings;
this.drawer = settings.get('drawer');
this.lightTheme = settings.get('lightTheme');
if(settings.has('drawer')) { this.drawer = settings.get('drawer'); }
if(settings.has('lightTheme')) { this.lightTheme = settings.get('lightTheme'); }
this.lightThemeView = this.lightTheme;
this.alternate = settings.get('alternate');
this.separators = settings.get('separators');
this.flash = settings.get('flash');
this.timestamps = settings.get('timestamps');
this.modIcons = settings.get('modIcons');
this.banIcon = settings.get('banIcon');
this.purgeIcon = settings.get('purgeIcon');
this.timeoutIcon = settings.get('timeoutIcon');
this.deleteIcon = settings.get('deleteIcon');
this.timeoutTime = settings.get('timeoutTime');
this.subs = settings.get('subs');
this.bits = settings.get('bits');
this.badges = settings.get('badges');
this.twitchEmotes = settings.get('twitchEmotes');
this.bttvEmotes = settings.get('bttvEmotes');
this.ffzEmotes = settings.get('ffzEmotes');
this.duplicates = settings.get('duplicates');
this.emotePriority = settings.get('emotePriority');
this.anonymous = settings.get('anonymous');
this.maxHistory = settings.get('maxHistory');
this.highlightName = settings.get('highlightName');
this.highlight = settings.get('highlight');
this.blacklist = settings.get('blacklist');
this.friends = settings.get('friends');
this.ignored = settings.get('ignored');
if(settings.has('alternate')) { this.alternate = settings.get('alternate'); }
if(settings.has('separators')) { this.separators = settings.get('separators'); }
if(settings.has('flash')) { this.flash = settings.get('flash'); }
if(settings.has('timestamps')) { this.timestamps = settings.get('timestamps'); }
if(settings.has('modIcons')) { this.modIcons = settings.get('modIcons'); }
if(settings.has('banIcon')) { this.banIcon = settings.get('banIcon'); }
if(settings.has('purgeIcon')) { this.purgeIcon = settings.get('purgeIcon'); }
if(settings.has('timeoutIcon')) { this.timeoutIcon = settings.get('timeoutIcon'); }
if(settings.has('deleteIcon')) { this.deleteIcon = settings.get('deleteIcon'); }
if(settings.has('timeoutTime')) { this.timeoutTime = settings.get('timeoutTime'); }
if(settings.has('subs')) { this.subs = settings.get('subs'); }
if(settings.has('bits')) { this.bits = settings.get('bits'); }
if(settings.has('badges')) { this.badges = settings.get('badges'); }
if(settings.has('twitchEmotes')) { this.twitchEmotes = settings.get('twitchEmotes'); }
if(settings.has('bttvEmotes')) { this.bttvEmotes = settings.get('bttvEmotes'); }
if(settings.has('ffzEmotes')) { this.ffzEmotes = settings.get('ffzEmotes'); }
if(settings.has('duplicates')) { this.duplicates = settings.get('duplicates'); }
if(settings.has('emotePriority')) { this.emotePriority = settings.get('emotePriority'); }
if(settings.has('anonymous')) { this.anonymous = settings.get('anonymous'); }
if(settings.has('maxHistory')) { this.maxHistory = settings.get('maxHistory'); }
if(settings.has('highlightName')) { this.highlightName = settings.get('highlightName'); }
if(settings.has('highlight')) { this.highlight = settings.get('highlight'); }
if(settings.has('blacklist')) { this.blacklist = settings.get('blacklist'); }
if(settings.has('friends')) { this.friends = settings.get('friends'); }
if(settings.has('ignored')) { this.ignored = settings.get('ignored'); }
}

save() {
Expand Down
19 changes: 19 additions & 0 deletions src/assets/emoji/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2018 Twitter, Inc and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

0 comments on commit 4fb902d

Please sign in to comment.