Skip to content

Commit

Permalink
When session expired and user login, return him to previous page
Browse files Browse the repository at this point in the history
  • Loading branch information
RadhiFadlillah committed Aug 29, 2019
1 parent 3f43424 commit 531c66c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions internal/view/js/page/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export default {
props: {
activeAccount: {
type: Object,
default () {
default() {
return {
id: 0,
username: "",
Expand All @@ -12,7 +12,7 @@ export default {
},
appOptions: {
type: Object,
default () {
default() {
return {
showId: false,
listMode: false,
Expand Down Expand Up @@ -99,8 +99,11 @@ export default {
mainClick: () => {
this.dialog.visible = false;
if (sessionError) {
var loginUrl = new Url("/login");
loginUrl.query.dst = window.location.href;

document.cookie = "session-id=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
location.href = "/login";
location.href = loginUrl.toString();
}
}
});
Expand Down
6 changes: 3 additions & 3 deletions internal/webserver/assets-prod.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,10 @@ var assets = func() http.FileSystem {
},
"/js/page/base.js": &vfsgen۰CompressedFileInfo{
name: "base.js",
modTime: time.Date(2019, 8, 29, 2, 30, 24, 386307281, time.UTC),
uncompressedSize: 3510,
modTime: time.Date(2019, 8, 29, 9, 10, 47, 599911808, time.UTC),
uncompressedSize: 3645,

compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x57\xcd\x6e\xe3\x36\x10\xbe\xe7\x29\xa6\xc2\x02\x6b\xa3\xae\xe3\x9c\x8a\xca\x70\x8b\x45\xba\x28\xda\x6e\x90\xa0\x9b\x4b\xd1\x14\x58\x9a\x1a\x4b\x6c\x24\x52\xe0\x50\x71\x16\x81\xdf\xbd\x20\x45\xd9\x92\x45\x2a\x68\x0f\x21\x72\xf0\x70\xe6\x9b\x8f\x9c\x3f\x31\xf8\x5c\x2b\x6d\x20\xc3\x1d\x6b\x4a\x03\x2f\x17\x00\x00\xb5\x56\x35\xa5\x5e\xb0\x8b\x71\x23\x9e\xf0\x03\xe7\xaa\x91\xa6\xaf\xb0\xcb\x7c\xad\x31\x85\xdb\xed\x3f\xc8\xcd\x62\xa0\xe9\xbc\xce\xe6\x67\x10\xbb\x34\x9a\x46\xcb\x80\xc2\x2e\x91\xa5\xb0\x5a\x04\x55\x0d\xa1\x96\xac\xc2\x14\x92\x24\x6c\xa1\xf6\x12\x75\x0a\x3b\x56\x12\x8e\x2d\x0e\x17\x61\xe9\x70\x32\x65\x75\x7d\x5b\x1b\xa1\x24\xbd\xc5\x5d\xa9\x50\xfb\x5f\xb3\xe8\x79\xed\x2a\x05\x99\x1b\x95\xe1\xa4\x91\x14\x79\x31\xb4\x0a\x9a\x3d\x22\xd6\x37\x68\x58\xc6\x0c\x9b\xf4\xd7\x10\x7e\xd0\xbc\x10\x4f\xd3\xb4\x15\x7b\xc4\xbb\x66\x5b\x0a\x1e\x0f\xf9\x3a\x16\x73\xf7\xcb\x47\xde\x1e\x68\x10\xbd\x60\xd4\x32\xc1\x4a\x95\xa7\xf0\x12\xf1\x52\xa1\x29\x54\x36\x48\x9c\x4f\xcd\xcf\x0e\x39\xca\x4f\x34\x37\x4f\x82\xc4\xb6\x8c\x5f\xbe\x54\x2c\x13\x32\x8f\xea\x8d\x30\x16\xfd\xfe\xfd\x58\xc5\x95\x34\x68\x3b\x29\xa4\xdc\x09\x2c\xed\x05\xfe\xfa\x7b\xac\xb3\xb5\xf2\x89\x6d\xb1\x8c\xb2\x56\x4c\xc8\x7b\x7c\xb6\xbe\xff\x44\x0a\xb8\x27\xe4\x4a\x66\xde\x24\xa0\xb7\x0e\xae\x4b\xc1\x1f\x53\x5b\xcb\x9b\x1f\x23\x55\x6b\x0a\x41\xcb\x36\x19\x4b\x1f\x29\xd8\xb4\x87\x5a\x8f\x0b\x20\x76\x8c\x37\x20\x42\xe2\x77\x1a\x89\x30\x9b\xe6\x11\x3b\x98\x7d\xe3\xc8\x7c\x62\xe7\xff\x91\xfa\xf5\xb9\x62\xb3\xe7\xab\x90\xef\xf2\xf3\x42\x7c\x62\x1a\xb6\x8c\x2c\x45\x4b\x3c\x2c\xdb\x21\xa3\x35\xec\x9d\xc9\xe8\xe6\xec\x48\xf6\x3a\x7c\x97\x9f\x2e\xe3\x10\x5e\x82\x0d\xf4\x74\x61\xa0\x2b\x5f\x0f\x73\xbf\x3d\xc8\xfd\x0e\x43\x7c\x59\x7b\x90\x97\x3c\xcc\x4b\x61\x60\x5b\xf2\x1e\xd7\x0a\x1e\xd6\x0a\x61\xd4\xb1\x19\x3c\xf0\x28\x7b\xec\x51\x0e\xc3\xbb\x4e\xf1\xe8\x4e\xf4\xe0\x4e\x8c\x50\x1f\x9b\xa8\xe3\x3e\x6e\x74\xe4\xc7\x8d\x38\xbb\xab\xfe\x1e\xbd\x93\x7b\xfc\x4e\x9e\x3a\x40\xdf\x41\x6f\x67\x70\x84\x09\x27\xa7\xd6\xf0\x3e\x4e\x1b\xde\xc5\x69\x63\xe8\xa1\xd7\x19\xb0\x71\xd8\x75\xf0\x43\x4a\x5f\x25\x87\x1c\xcd\x47\xad\x95\xbe\x41\x22\x96\xe3\x0c\xb5\x3e\xaf\x7d\xda\x0b\xc3\x0b\xb0\x2a\x5b\x29\x64\x74\xc3\x8d\x1a\x99\xd9\xc5\x6d\x8b\x38\x7f\x69\xb0\x8f\xfd\x3c\xb7\x9e\xaa\x96\x70\xdc\xab\xce\xc7\x1f\x48\xb5\x92\x84\x61\x37\xb6\x1b\x4d\x9b\x4e\xb6\x67\xc2\x38\x87\x76\xe3\xbc\x13\xcf\x78\xbf\xbc\x7b\xb1\x56\x07\x98\xbd\x7b\xb1\x10\x32\xcc\x34\x74\x98\x7f\x19\xa3\x7c\x83\xbf\x76\x8d\xe8\xc7\xf3\x14\x67\x41\x9f\x91\x48\x28\xe9\xe2\xf2\x5a\x80\x35\xd6\x25\xe3\x38\xbb\x7c\x98\x3d\x64\xdf\x3e\xcc\x2f\xf3\x05\x24\xc9\x7c\x69\xb4\xa8\x66\xf3\xa5\x51\x9f\xd4\x1e\xf5\x35\x23\x9c\xcd\xa3\x19\x48\xa8\x65\x04\x41\x20\x95\x01\x7c\x16\x64\x92\xf1\x5d\x86\xc6\x05\x23\xd8\x22\x4a\xc0\xe7\x5a\x68\xcc\x02\x80\xde\xe5\xed\x54\xfb\x5f\x51\x0b\x8c\xe8\xe8\x40\x76\x21\xf3\x43\xb6\xa2\xe0\x54\xa6\x5e\x70\xbb\xe9\x7c\x16\x72\x8b\x1c\x7f\x7b\xda\x0e\xb9\x3e\x0e\xc2\x81\xa3\x9f\x20\xf9\xdc\x0b\x8b\x8f\xc8\x02\xea\x12\x6d\xcc\x4a\x95\x0b\x09\x2c\x67\x42\x2e\x13\x48\xa1\xa2\x7c\x7d\x31\x6e\xc2\xde\x37\x65\xe2\x09\x63\x23\x19\x7f\xa1\xb8\xf3\x4c\x3d\x53\x06\xf7\x98\x7c\x73\xdc\xfe\xfe\x46\x4f\x0a\xf0\x73\xac\x1f\xd2\x50\xb1\x76\x2b\x53\xbc\xa9\x50\x9a\x25\x57\xea\x51\x58\xc7\x5d\x51\x7e\x27\xb2\xcd\x1a\xee\x98\x29\x36\x97\x6b\xf8\xe8\xd2\x40\x9b\xfb\xa2\x59\xc0\xea\x0a\x7e\x63\x12\xae\x7e\xf8\x7e\x05\xab\x55\x6a\xff\xae\xe0\x97\x9b\xfb\x75\x12\x3e\x10\xb8\x67\x21\x67\xf6\x7f\x87\x65\xa1\x71\x67\x69\x2e\x5d\x26\x23\x88\xc3\x6b\xef\x88\xf9\x68\xb0\x1e\x2e\x0e\xff\x06\x00\x00\xff\xff\xcb\x67\xe9\xf6\xb6\x0d\x00\x00"),
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x57\x51\x6f\xe3\x36\x0c\x7e\xef\xaf\xe0\x8c\x03\xce\xc1\x32\x37\x7d\x1a\xe6\x20\x1b\x0e\xdd\x61\xd8\x76\x45\x8b\xb5\xf7\x30\xac\x03\x4e\x91\x19\x5b\xab\x2d\x79\xa2\xdc\xb4\x28\xf2\xdf\x07\xc9\x4a\x62\xc7\xb2\x8b\xdd\x43\x85\x3e\x84\x22\x3f\x92\xfa\x44\xd2\x2a\x3e\xd5\x4a\x1b\xc8\x70\xc3\x9a\xd2\xc0\xcb\x19\x00\x40\xad\x55\x4d\xa9\x17\xec\x62\xdc\x88\x47\xfc\xc0\xb9\x6a\xa4\xe9\x2a\xec\x32\xcf\x35\xa6\x70\xbd\xfe\x07\xb9\x99\xf7\x34\xde\x6b\x3c\x3b\x41\xd8\xa5\xd1\x34\x5a\x06\x14\x76\x89\x2c\x85\xc5\x3c\xa8\x6a\x08\xb5\x64\x15\xa6\x10\x45\x61\x0b\xb5\x95\xa8\x53\xd8\xb0\x92\x70\x68\xb1\x3b\x0b\x4b\xbb\xa3\x29\xab\xeb\xeb\xda\x08\x25\xe9\x0d\x8e\x4a\x85\xda\xfe\x9a\x8d\xa6\x6b\x57\x29\xc8\x5c\xa9\x0c\x27\x8d\xa4\xc8\x8b\xbe\x55\xd0\xec\x01\xb1\xbe\x42\xc3\x32\x66\xd8\xa4\xbf\x86\xf0\x83\xe6\x85\x78\x9c\x0e\x5b\xb1\x07\xbc\x69\xd6\xa5\xe0\xe3\x8c\x2f\xc7\x28\x77\xbf\x3c\xf1\x36\xa1\x1e\x7b\x41\xd6\x32\xc1\x4a\x95\xa7\xf0\x32\xe2\xa5\x42\x53\xa8\xac\x77\x6f\xfe\x66\x7e\x76\xc8\xc1\xfd\x8c\xde\xcd\xa3\x20\xb1\x2e\xc7\x0f\x5f\x2a\x96\x09\x99\x8f\xea\x8d\x30\x16\xfd\xfe\xfd\x50\xc5\x95\x34\x68\xfb\x28\xa4\xdc\x08\x2c\xed\x01\xfe\xfa\x7b\xa8\xb3\xb5\xf2\x89\xad\xb1\x1c\x8d\x5a\x31\x21\xef\xf0\xc9\xfa\xfe\x13\x29\xe0\x9e\x90\x2b\x99\x79\x93\x80\xde\x3a\xb8\x2c\x05\x7f\x48\x21\x9e\xc1\xea\xc7\x91\xaa\x35\x85\xa0\xa4\xbd\x8c\xc4\x33\x05\xab\x36\xa9\xe5\xb0\x00\xc6\xd2\x78\x83\x40\x48\xfc\x46\x23\x11\x66\xd3\x71\xc4\x06\xe2\x6f\x5c\x30\x7f\xb1\xb3\xff\x19\xfa\xf5\xb1\x62\x6f\xcf\x57\x21\xdf\xe4\xa7\x85\xf8\xc8\x34\xac\x19\xd9\x10\x6d\xe0\x7e\xd9\xf6\x23\x5a\xc3\x4e\x4e\x46\x37\x27\x29\xd9\xe3\xf0\x4d\x7e\x3c\x8c\x43\x78\x09\x56\xd0\xd1\x85\x81\xae\x7c\x3d\xcc\xfd\xf6\x20\xf7\x3b\x0c\xf1\x65\xed\x41\x5e\xf2\x30\x2f\x85\x81\x6d\xc9\x7b\x5c\x2b\x78\x58\x2b\x84\x51\x87\x66\xf0\xc0\x83\xec\xb1\x07\x39\x0c\xdf\x77\x8a\x47\xef\x45\x0f\xde\x8b\x23\xa1\x0f\x4d\xb4\x8f\x7d\xd8\xd8\x07\x3f\x6c\x8c\x47\x77\xd5\xdf\x09\xef\xe4\x4e\x7c\x27\x4f\x25\xd0\x75\xd0\xd9\xe9\xa5\x30\xe1\xe4\xd8\x1a\xde\xc7\x71\xc3\xbb\x38\x6e\xf4\x3d\x74\x3a\x03\x56\x0e\xbb\x0c\x7e\x47\xe9\x59\x72\xc8\xd1\x7c\xd4\x5a\xe9\x2b\x24\x62\x39\xc6\xa8\xf5\x69\xed\xd3\x56\x18\x5e\x80\x55\xd9\x4a\x21\xa3\x1b\x6e\xd4\xc0\xcc\x2e\x6e\x5b\xc4\xf9\x4b\x83\x7d\xec\xe7\xb9\xf5\x54\xb5\x01\x87\xbd\xea\x7c\xfc\x81\x54\x2b\x49\x18\x76\x63\xbb\xd1\xb4\xd7\xc9\xb6\x4c\x18\xe7\xd0\x6e\x9c\x76\xe2\x49\xdc\x2f\xef\x5e\xac\xd5\x0e\xe2\x77\x2f\x16\x42\x86\x99\x86\x76\xb3\x2f\x43\x94\x6f\xf0\xd7\x8e\x31\xfa\xf1\x3c\xf2\x2c\xe8\x16\x89\x84\x92\x8e\x97\xd7\x08\xd6\x58\x97\x8c\x63\x7c\x7e\x1f\xdf\x67\xdf\xde\xcf\xce\xf3\x39\x44\xd1\x2c\x31\x5a\x54\xf1\x2c\x31\xea\x93\xda\xa2\xbe\x64\x84\xf1\x6c\xf4\x06\x22\x6a\x23\x82\x20\x90\xca\x00\x3e\x09\x32\xd1\xf0\x2c\x7d\xe3\x82\x11\xac\x11\x25\xe0\x53\x2d\x34\x66\x01\x40\xe7\xf0\x76\xaa\x7d\x15\x6b\x81\x11\x3d\x3a\x90\x1d\x65\x7e\xc8\x56\x14\x9c\xca\xd4\x21\x77\x3f\x9d\x4f\x28\xb7\xc8\xe1\xb7\xa7\xed\x90\xcb\xc3\x20\xec\x39\xfa\x09\xa2\xdb\x0e\x2d\x9e\x91\x39\xd4\x25\x5a\xce\x4a\x95\x0b\x09\x2c\x67\x42\x26\x11\xa4\x50\x51\xbe\x3c\x1b\x36\x61\xe7\x9b\x32\xf1\x84\xb1\x4c\x8e\xbf\x50\x5c\x3e\x53\xcf\x94\xde\x39\x26\xdf\x1c\xd7\xbf\xbf\xd1\x93\x02\xfc\x1c\xeb\x52\x1a\x2a\xd6\x03\x15\x4c\xb7\x94\x7e\xd6\xf6\xfb\x20\x71\x0b\x9f\x75\x19\x47\xe7\x6e\x33\x1a\x69\x6a\x70\xef\xbc\x16\x95\xfc\xdb\xa0\x7e\x4e\x32\xb2\x37\xb9\x15\x32\x53\xdb\xa4\x54\x9c\xd9\xff\x13\x92\x42\xe3\x66\x19\x7e\x70\xdb\x95\x29\xde\x54\x28\x4d\xc2\x95\x7a\x10\xf6\x58\xfb\x96\xf8\x4e\x64\xab\x25\xdc\x30\x53\xac\xce\x97\xf0\xd1\x15\x01\xad\xee\x8a\x66\x0e\x8b\x0b\xf8\x8d\x49\xb8\xf8\xe1\xfb\x05\x2c\x16\xa9\xfd\xbb\x80\x5f\xae\xee\x96\xd1\x54\xb2\x9d\x84\x60\x75\x4c\xde\xa8\x5b\xa3\x85\x1c\x3c\x24\xf6\x6b\xf7\xda\x83\x66\x36\x98\xf0\xbb\xb3\xdd\x7f\x01\x00\x00\xff\xff\x8b\xdb\x5e\x2b\x3d\x0e\x00\x00"),
},
"/js/page/home.js": &vfsgen۰CompressedFileInfo{
name: "home.js",
Expand Down

0 comments on commit 531c66c

Please sign in to comment.