Skip to content

Commit

Permalink
fix: minor enum mismatch with rust types
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger committed Sep 28, 2024
1 parent 421d6db commit 495ccc7
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 35 deletions.
6 changes: 3 additions & 3 deletions packages/client-api/src/desktop/windows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { getCurrentWindow } from '@tauri-apps/api/window';

import { desktopCommands } from './desktop-commands';

export type ZOrder = 'always_on_bottom' | 'always_on_top' | 'normal';
export type ZOrder = 'bottom_most' | 'top_most' | 'normal';

export interface Window {
/**
Expand All @@ -29,9 +29,9 @@ export function currentWindow(): Window {
}

async function setZOrder(zOrder: ZOrder) {
if (zOrder === 'always_on_bottom') {
if (zOrder === 'bottom_most') {
await getCurrentWindow().setAlwaysOnBottom(true);
} else if (zOrder === 'always_on_top') {
} else if (zOrder === 'top_most') {
await desktopCommands.setAlwaysOnTop();
} else {
await getCurrentWindow().setAlwaysOnTop(false);
Expand Down
35 changes: 17 additions & 18 deletions packages/client-api/src/providers/network/network-provider-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,23 @@ export interface NetworkGateway {
signalStrength: number | null;
}

export enum InterfaceType {
UNKNOWN = 'unknown',
ETHERNET = 'ethernet',
TOKEN_RING = 'token_ring',
FDDI = 'fddi',
PPP = 'ppp',
LOOPBACK = 'loopback',
SLIP = 'slip',
ATM = 'atm',
GENERIC_MODEM = 'generic_modem',
ISDN = 'isdn',
WIFI = 'wifi',
DSL = 'dsl',
TUNNEL = 'tunnel',
HIGH_PERFORMANCE_SERIAL_BUS = 'high_performance_serial_bus',
MOBILE_BROADBAND = 'mobile_broadband',
BRIDGE = 'bridge',
}
export type InterfaceType =
| 'unknown'
| 'ethernet'
| 'token_ring'
| 'fddi'
| 'ppp'
| 'loopback'
| 'slip'
| 'atm'
| 'generic_modem'
| 'isdn'
| 'wifi'
| 'dsl'
| 'tunnel'
| 'high_performance_serial_bus'
| 'mobile_broadband'
| 'bridge';

export interface NetworkTraffic {
received: NetworkTrafficMeasure;
Expand Down
27 changes: 13 additions & 14 deletions packages/client-api/src/providers/weather/weather-provider-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,16 @@ export interface WeatherOutput {
windSpeed: number;
}

export enum WeatherStatus {
CLEAR_DAY = 'clear_day',
CLEAR_NIGHT = 'clear_night',
CLOUDY_DAY = 'cloudy_day',
CLOUDY_NIGHT = 'cloudy_night',
LIGHT_RAIN_DAY = 'light_rain_day',
LIGHT_RAIN_NIGHT = 'light_rain_night',
HEAVY_RAIN_DAY = 'heavy_rain_day',
HEAVY_RAIN_NIGHT = 'heavy_rain_night',
SNOW_DAY = 'snow_day',
SNOW_NIGHT = 'snow_night',
THUNDER_DAY = 'thunder_day',
THUNDER_NIGHT = 'thunder_night',
}
export type WeatherStatus =
| 'clear_day'
| 'clear_night'
| 'cloudy_day'
| 'cloudy_night'
| 'light_rain_day'
| 'light_rain_night'
| 'heavy_rain_day'
| 'heavy_rain_night'
| 'snow_day'
| 'snow_night'
| 'thunder_day'
| 'thunder_night';

0 comments on commit 495ccc7

Please sign in to comment.