Skip to content

Commit

Permalink
Update SettingsPage.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
Cleboost committed Jul 13, 2023
1 parent f4f456f commit e061770
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/views/SettingsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {getVersionApp} from "../data/version";
let versionChecker: Ref<UnwrapRef<string>> = ref('Aucune mise a jour disponible');
let noFamilly: Ref<UnwrapRef<boolean>> = ref(localStorage.getItem("famillyState") == null);
let famillyCode: Ref<UnwrapRef<string>> = ref(localStorage.getItem("famillyCode") === null ? "Aucun code" : localStorage.getItem("famillyCode")!);
let famillyCode: Ref<UnwrapRef<string>> = ref(localStorage.getItem("famillyCode") == null ? "Aucun code" : localStorage.getItem("famillyCode")!);
let localState = localStorage.getItem("famillyState")
let localCode = localStorage.getItem("famillyCode")
Expand All @@ -40,7 +40,11 @@ fetch('https://raw.githubusercontent.com/Cleboost/frite-counter/main/package.jso
const createFamilly = () => {
localStorage.setItem("famillyState", "true");
localStorage.setItem("famillyCode", Math.random().toString(36).substring(2, 8) + Math.random().toString(36).substring(2, 8));
localStorage.setItem("famillyCode", localStorage.getItem("famillyCode").toUpperCase());
const famillyCode = localStorage.getItem("famillyCode");
if (famillyCode !== null) {
localStorage.setItem("famillyCode", famillyCode.toUpperCase());
}
noFamilly = ref(false)
location.reload();
};
Expand Down

0 comments on commit e061770

Please sign in to comment.