mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Prettier
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import TextUtils from "./text";
|
||||
|
||||
const secondsToString = (seconds : number) => {
|
||||
const secondsToString = (seconds: number) => {
|
||||
let ret = TextUtils.secondsToTimestamp(seconds);
|
||||
|
||||
if (ret.startsWith("00:")) {
|
||||
@@ -12,9 +12,9 @@ const secondsToString = (seconds : number) => {
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
|
||||
const stringToSeconds = (v : string) => {
|
||||
const stringToSeconds = (v: string) => {
|
||||
if (!v) {
|
||||
return 0;
|
||||
}
|
||||
@@ -27,7 +27,7 @@ const stringToSeconds = (v : string) => {
|
||||
|
||||
let seconds = 0;
|
||||
let factor = 1;
|
||||
while(splits.length > 0) {
|
||||
while (splits.length > 0) {
|
||||
const thisSplit = splits.pop();
|
||||
if (thisSplit === undefined) {
|
||||
return 0;
|
||||
@@ -43,7 +43,7 @@ const stringToSeconds = (v : string) => {
|
||||
}
|
||||
|
||||
return seconds;
|
||||
}
|
||||
};
|
||||
|
||||
export default {
|
||||
secondsToString,
|
||||
|
||||
@@ -2,4 +2,4 @@ export { default as ImageUtils } from "./image";
|
||||
export { default as NavUtils } from "./navigation";
|
||||
export { default as TableUtils } from "./table";
|
||||
export { default as TextUtils } from "./text";
|
||||
export { default as DurationUtils } from './duration';
|
||||
export { default as DurationUtils } from "./duration";
|
||||
|
||||
@@ -55,8 +55,8 @@ const renderInputGroup = (options: {
|
||||
placeholder?: string;
|
||||
value: string | undefined;
|
||||
isEditing: boolean;
|
||||
asURL?: boolean,
|
||||
urlPrefix?: string,
|
||||
asURL?: boolean;
|
||||
urlPrefix?: string;
|
||||
onChange: (value: string) => void;
|
||||
}) => (
|
||||
<tr>
|
||||
|
||||
@@ -42,7 +42,7 @@ const fileNameFromPath = (path: string) => {
|
||||
return path.replace(/^.*[\\/]/, "");
|
||||
};
|
||||
|
||||
const getAge = (dateString?: string|null, fromDateString?: string) => {
|
||||
const getAge = (dateString?: string | null, fromDateString?: string) => {
|
||||
if (!dateString) return 0;
|
||||
|
||||
const birthdate = new Date(dateString);
|
||||
|
||||
Reference in New Issue
Block a user