2
0
mirror of https://github.com/Ride-The-Lightning/RTL synced 2024-11-15 18:13:00 +00:00
RTL/src/app/shared/services/consts-enums-functions.ts

108 lines
3.2 KiB
TypeScript
Raw Normal View History

2019-11-24 22:56:57 +00:00
import { MatPaginatorIntl } from '@angular/material';
export function getPaginatorLabel(field: string) {
const appPaginator = new MatPaginatorIntl();
appPaginator.itemsPerPageLabel = field + ' per page:';
return appPaginator;
}
2019-11-20 05:49:11 +00:00
export const CURRENCY_UNITS = [ 'Sats', 'BTC' ];
export const CURRENCY_UNIT_FORMATS = { Sats: '1.0-0', BTC: '1.6-6', OTHER: '1.2-2'};
2019-12-23 03:07:50 +00:00
export const FIAT_CURRENCY_UNITS = [
{id: 'USD', name: 'United States Dollar'},
{id: 'AUD', name: 'AUD'}, {id: 'BRL', name: 'BRL'}, {id: 'CAD', name: 'CAD'},
{id: 'CHF', name: 'CHF'}, {id: 'CLP', name: 'CLP'}, {id: 'CNY', name: 'CNY'},
{id: 'DKK', name: 'DKK'}, {id: 'EUR', name: 'EUR'}, {id: 'GBP', name: 'Pound'},
{id: 'HKD', name: 'HKD'}, {id: 'INR', name: 'Indian Rupee'}, {id: 'ISK', name: 'ISK'},
{id: 'JPY', name: 'JPY'}, {id: 'KRW', name: 'KRW'}, {id: 'NZD', name: 'NZD'},
{id: 'PLN', name: 'PLN'}, {id: 'RUB', name: 'RUB'}, {id: 'SEK', name: 'SEK'},
{id: 'SGD', name: 'SGD'}, {id: 'THB', name: 'THB'}, {id: 'TWD', name: 'TWD'}
];
export const TIME_UNITS = ['SECS', 'MINS', 'HOURS', 'DAYS'];
2019-11-21 20:33:23 +00:00
export const PAGE_SIZE = 10;
export const PAGE_SIZE_OPTIONS = [5, 10, 25, 100];
2019-11-20 05:49:11 +00:00
export const ADDRESS_TYPES = [
{ addressId: '0', addressTp: 'Bech32 (P2WKH)', addressDetails: 'Pay to witness key hash'},
{ addressId: '1', addressTp: 'P2SH (NP2WKH)', addressDetails: 'Pay to nested witness key hash (default)'}
2019-11-20 05:49:11 +00:00
];
2019-11-21 20:33:23 +00:00
export const TRANS_TYPES = [
{id: '0', name: 'Priority (Default)'},
2019-11-21 20:33:23 +00:00
{id: '1', name: 'Target Confirmation Blocks'},
{id: '2', name: 'Fee'}
];
export const FEE_LIMIT_TYPES = [
{id: 'none', name: 'No Limit'},
{id: 'fixed', name: 'Fixed in Sats'},
{id: 'fixed_msat', name: 'Fixed in mSats'},
{id: 'percent', name: 'Percentage of Payment Amount'}
];
export const NODE_SETTINGS = {
themes: [
{id: 'purple', name: 'Diogo'},
2019-12-30 22:19:10 +00:00
{id: 'teal', name: 'My2Sats'},
{id: 'indigo', name: 'RTL'},
{id: 'pink', name: 'BK'}
],
modes: [{id: 'day', name: 'Day'}, {id: 'night', name: 'Night'}],
fontSize: [{id: 1, name: 'Small', class: 'small-font'}, {id: 2, name: 'Regular', class: 'regular-font'}, {id: 3, name: 'Large', class: 'large-font'}],
menuTypes: [{id: 'regular', name: 'Regular'}, {id: 'compact', name: 'Compact'}, {id: 'mini', name: 'Mini'}],
menus: [{id: 'vertical', name: 'Vertical'}, {id: 'horizontal', name: 'Horizontal'}]
};
export enum UserPersonaEnum {
OPERATOR = 'operator',
2019-12-27 00:58:29 +00:00
MERCHANT = 'merchant',
ALL = 'all'
}
export enum AlertTypeEnum {
INFORMATION = 'Information',
WARNING = 'Warning',
ERROR = 'Error',
SUCCESS = 'Success',
CONFIRM = 'Confirm'
}
export enum AuthenticateWith {
TOKEN = 'TOKEN',
PASSWORD = 'PASSWORD'
}
export enum TimeUnitEnum {
SECS = 'SECS',
MINS = 'MINS',
HOURS = 'HOURS',
DAYS = 'DAYS'
}
export enum CurrencyUnitEnum {
2019-11-20 05:49:11 +00:00
SATS = 'Sats',
BTC = 'BTC',
LITOSHIS = 'LITOSHIS',
LTC = 'LTC',
OTHER = 'OTHER'
}
export enum DataTypeEnum {
ARRAY = 'ARRAY',
NUMBER = 'NUMBER',
STRING = 'STRING',
BOOLEAN = 'BOOLEAN',
PASSWORD = 'PASSWORD',
DATE = 'DATE',
DATE_TIME = 'DATE_TIME'
}
export enum ScreenSizeEnum {
XS = 'XS', // < 600 => mobile handsets
SM = 'SM', // 600 - 839 => tab portrait
MD = 'MD', // 840 - 1439 => tab landscape & small laptops
LG = 'LG' // >1440 => big laptops
}