-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #710 from eyra/rank-prefer
Rank prefer
- Loading branch information
Showing
145 changed files
with
5,842 additions
and
1,823 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
export const TimeZone = { | ||
mounted() { | ||
timezone = Intl.DateTimeFormat().resolvedOptions().timeZone; | ||
console.log("TimeZone", timezone); | ||
this.pushEventTo(".timezone", "timezone", timezone); | ||
}, | ||
sendToServer() { | ||
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone; | ||
|
||
console.log("[TimeZone]", timezone); | ||
|
||
let csrfToken = document | ||
.querySelector("meta[name='csrf-token']") | ||
.getAttribute("content"); | ||
|
||
if (typeof window.localStorage != "undefined") { | ||
try { | ||
var xhr = new XMLHttpRequest(); | ||
xhr.open("POST", "/api/timezone", true); | ||
xhr.setRequestHeader("Content-Type", "application/json"); | ||
xhr.setRequestHeader("x-csrf-token", csrfToken); | ||
xhr.onreadystatechange = function () { | ||
console.log( | ||
"[TimeZone] POST onreadystatechange", | ||
this.status, | ||
this.readyState | ||
); | ||
}; | ||
xhr.send(`{"timezone": "${timezone}"}`); | ||
} catch (e) { | ||
console.log("[TimeZone] Error while sending timezone to server", e); | ||
} | ||
} | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.