Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
Layout and lib updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Jul 19, 2022
1 parent ec6b39c commit 9a3fc2c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 22 deletions.
18 changes: 1 addition & 17 deletions interface/layout/app.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
<script lang="ts">
import { Route, router } from "tinro"
import { onMount } from "svelte"
import { getSettings } from "../stores/settings"
import { navigate } from "../../libraries/navigate"
import { state } from "../stores/state"
// import UpdateAlert from "../components/updateAlert.svelte"
Expand All @@ -35,7 +32,7 @@
import Codes from "../windows/codes/codes.svelte"
import Settings from "../windows/settings.svelte"
import Import from "../windows/import/import.svelte"
import Export from "../windows/export.svelte"
import Export from "../windows/export/export.svelte"
import Confirm from "../windows/confirm.svelte"
import Navigation from "../components/navigation.svelte"
import Edit from "../windows/edit.svelte"
Expand All @@ -44,18 +41,5 @@
router.subscribe(() => {
document.querySelector(".top").scrollIntoView()
})
const settings = getSettings()
if (settings.security.requireAuthentication === false) {
// eslint-disable-next-line no-undef
state.update((data: LibState) => {
data.authenticated = true
return data
})
navigate("codes")
}
})
</script>
4 changes: 0 additions & 4 deletions interface/layout/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ const getSettingsPath = async () => {

getSettingsPath()

const mainWindow = new window.WindowManager("Authme")

console.log(mainWindow)

const app = new App({
target: document.body,
})
Expand Down
7 changes: 7 additions & 0 deletions interface/libraries/time.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Returns the current timestamp
* @return {string} Timestamp
*/
export const generateTimestamp = (): string => {
return new Date().toISOString().replace("T", "-").replaceAll(":", "-").substring(0, 19)
}
5 changes: 4 additions & 1 deletion interface/libraries/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ declare global {

interface LibState {
authenticated: boolean
importData: null | boolean
importData: null | string
}

interface LibSettings {
Expand All @@ -43,6 +43,9 @@ declare global {
interface Element {
/** Element styles */
style: CSSStyleDeclaration

/* value */
value: string
}

/** HTML dialog element types */
Expand Down

0 comments on commit 9a3fc2c

Please sign in to comment.