diff --git a/.travis.yml b/.travis.yml index 9e4c6c42..6ee59c32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,9 @@ go: - 1.9 - master before_install: - - chmod 755 ./install-linux - - chmod 755 ./run-linux + - chmod 755 ./update-deps-linux + - ./update-deps-linux +install: true script: go test addons: mariadb: '10.0' \ No newline at end of file diff --git a/install/install.go b/install/install.go index 1355d806..42927571 100644 --- a/install/install.go +++ b/install/install.go @@ -198,7 +198,7 @@ func handleDatabaseDetails() (adap install.InstallAdapter, ok bool) { var dbPort string for { - fmt.Println("Which database adapter do you wish to use? mysql, mysql, or mysql? Default: mysql") + fmt.Println("Which database adapter do you wish to use? mysql, mssql, or mysql? Default: mysql") if !scanner.Scan() { return nil, false } @@ -281,7 +281,7 @@ func getSiteDetails() bool { if siteShortName == "" { siteShortName = defaultSiteShortName } - fmt.Println("Set the site name to " + siteShortName) + fmt.Println("Set the short name to " + siteShortName) fmt.Println("What's your site's url? Default: " + defaultsiteURL) if !scanner.Scan() { diff --git a/mod_routes.go b/mod_routes.go index 37f770e2..b93812c6 100644 --- a/mod_routes.go +++ b/mod_routes.go @@ -627,45 +627,6 @@ func routeIps(w http.ResponseWriter, r *http.Request, user User) RouteError { return nil } -// TODO: This is being replaced with the new ban route system -/*func routeBan(w http.ResponseWriter, r *http.Request, user User) RouteError { - headerVars, ferr := UserCheck(w,r,&user) - if ferr != nil { - return - } - if !user.Perms.BanUsers { - return NoPermissions(w,r,user) - } - - uid, err := strconv.Atoi(r.URL.Path[len("/users/ban/"):]) - if err != nil { - return LocalError("The provided User ID is not a valid number.",w,r,user) - } - - var uname string - err = get_user_name_stmt.QueryRow(uid).Scan(&uname) - if err == ErrNoRows { - return LocalError("The user you're trying to ban no longer exists.",w,r,user) - } else if err != nil { - return InternalError(err,w,r) - } - - confirm_msg := "Are you sure you want to ban '" + uname + "'?" - yousure := AreYouSure{"/users/ban/submit/" + strconv.Itoa(uid),confirm_msg} - - pi := Page{"Ban User",user,headerVars,tList,yousure} - if preRenderHooks["pre_render_ban"] != nil { - if runPreRenderHook("pre_render_ban", w, r, &user, &pi) { - return nil - } - } - err = templates.ExecuteTemplate(w,"areyousure.html",pi) - if err != nil { - return InternalError(err,w,r) - } - return nil -}*/ - func routeBanSubmit(w http.ResponseWriter, r *http.Request, user User) RouteError { if !user.Perms.BanUsers { return NoPermissions(w, r, user) diff --git a/pages.go b/pages.go index 0a7ee4a7..7498103e 100644 --- a/pages.go +++ b/pages.go @@ -234,7 +234,7 @@ type PanelEditGroupPermsPage struct { type backupItem struct { SQLURL string - // TODO: Add an easier to parse format here for Gosora to be able to more easily reimport portions of the dump and to strip unneccessary data (e.g. table defs and parsed post data) + // TODO: Add an easier to parse format here for Gosora to be able to more easily reimport portions of the dump and to strip unnecessary data (e.g. table defs and parsed post data) Timestamp time.Time } diff --git a/run-linux-tests b/run-linux-tests new file mode 100644 index 00000000..d192a851 --- /dev/null +++ b/run-linux-tests @@ -0,0 +1,4 @@ +echo "Generating the dynamic code" +go generate +echo "Running tests" +go test \ No newline at end of file diff --git a/themes/shadow/public/main.css b/themes/shadow/public/main.css index 963a63cb..7b92d6cd 100644 --- a/themes/shadow/public/main.css +++ b/themes/shadow/public/main.css @@ -97,7 +97,7 @@ li { content: "Alerts"; } -.menu_alerts .alertList { +.menu_alerts .alertList, .auto_hide { display: none; } .selectedAlert .alertList { @@ -205,6 +205,17 @@ a { .topic_sticky_head { } +/* TODO: Add the avatars to the forum list */ +.extra_little_row_avatar { + display: none; +} +.shift_left { + float: left; +} +.shift_right { + float: right; +} + /* TODO: Rewrite the closed topic header so that it looks more consistent with the rest of the theme */ .topic_closed_head .topic_status_closed { margin-bottom: -10px; diff --git a/themes/tempra-conflux/public/main.css b/themes/tempra-conflux/public/main.css index 4a2da214..4211a4f4 100644 --- a/themes/tempra-conflux/public/main.css +++ b/themes/tempra-conflux/public/main.css @@ -179,7 +179,7 @@ li a { display: none; } .rowsmall { - font-size:12px; + font-size: 12px; } /* Firefox specific CSS */ @@ -393,6 +393,17 @@ li a { border-color: var(--main-border-color); } +/* TODO: Add the avatars to the forum list */ +.extra_little_row_avatar { + display: none; +} +.shift_left { + float: left; +} +.shift_right { + float: right; +} + /* Topics */ .topic_list .topic_row { @@ -578,8 +589,12 @@ button.username { border-width: 1px; } -.mention { font-weight: bold; } -.show_on_edit { display: none; } +.mention { + font-weight: bold; +} +.show_on_edit, .auto_hide { + display: none; +} .alert { display: block; diff --git a/themes/tempra-cursive/public/main.css b/themes/tempra-cursive/public/main.css index a8a7bc00..5f27b817 100644 --- a/themes/tempra-cursive/public/main.css +++ b/themes/tempra-cursive/public/main.css @@ -158,25 +158,6 @@ li a { padding-left: 58px; } -.colblock_left { - border: 1px solid #ccc; - padding: 0px; - padding-top: 0px; - width: 30%; - float: left; - margin-right: 8px; -} -.colblock_right { - border: 1px solid #ccc; - padding: 0px; - padding-top: 0px; - width: 65%; - overflow: hidden; - word-wrap: break-word; -} -.colblock_left:empty, .colblock_right:empty { display: none; } - -/* The new method of doing columns layouts, colblock is now deprecated :( */ .colstack_left { float: left; width: 30%; @@ -197,7 +178,9 @@ li a { word-wrap: break-word; } .colstack_head { margin-bottom: 0px; } -.colstack_left:empty, .colstack_right:empty { display: none; } +.colstack_left:empty, .colstack_right:empty { + display: none; +} .colstack_grid { display: grid; @@ -304,7 +287,9 @@ li a { margin: 0 auto; float: none; } -.formitem:not(:only-child) input, .formitem:not(:only-child) select { padding: 3px;/*5px;*/ } +.formitem:not(:only-child) input, .formitem:not(:only-child) select { + padding: 3px;/*5px;*/ +} .formitem:not(:only-child).formlabel { padding-top: 15px;/*18px;*/ padding-bottom: 12px;/*16px;*/ @@ -324,6 +309,17 @@ button { border: 1px solid #8e8e8e; } +/* TODO: Add the avatars to the forum list */ +.extra_little_row_avatar { + display: none; +} +.shift_left { + float: left; +} +.shift_right { + float: right; +} + /* Topics */ .topic_list .starter:before { @@ -483,8 +479,13 @@ button.username { border: none; } -.mention { font-weight: bold; } -.show_on_edit { display: none; } +.mention { + font-weight: bold; +} +.show_on_edit, .auto_hide { + display: none; +} + .alert { display: block; padding: 5px; @@ -619,10 +620,20 @@ button.username { top: 33px; } - .hide_on_mobile { display: none; } - .prev_button, .next_button { top: auto; bottom: 5px; } - .colstack_grid { grid-template-columns: none; grid-gap: 8px; } - .grid_istat { margin-bottom: 0px; } + .hide_on_mobile { + display: none; + } + .prev_button, .next_button { + top: auto; + bottom: 5px; + } + .colstack_grid { + grid-template-columns: none; + grid-gap: 8px; + } + .grid_istat { + margin-bottom: 0px; + } } @media (max-width: 350px) { diff --git a/themes/tempra-simple/public/main.css b/themes/tempra-simple/public/main.css index ba51c3a7..b2921463 100644 --- a/themes/tempra-simple/public/main.css +++ b/themes/tempra-simple/public/main.css @@ -80,7 +80,9 @@ li a { text-align: center; border: white solid 1px; } -.menu_alerts .alert_counter:empty { display: none; } +.menu_alerts .alert_counter:empty { + display: none; +} .selectedAlert { background: white; @@ -165,25 +167,6 @@ li a { font-size: 12px; } -/*.colblock_left { - border: 1px solid hsl(0, 0%, 80%); - padding: 0px; - padding-top: 0px; - width: 30%; - float: left; - margin-right: 8px; -} -.colblock_right { - border: 1px solid hsl(0, 0%, 80%); - padding: 0px; - padding-top: 0px; - width: 65%; - overflow: hidden; - word-wrap: break-word; -} -.colblock_left:empty, .colblock_right:empty { display: none; }*/ - -/* The new method of doing columns layouts, colblock is now deprecated :( */ .colstack_left { float: left; width: 30%; @@ -203,8 +186,12 @@ li a { overflow: hidden; word-wrap: break-word; } -.colstack_head { margin-bottom: 0px; } -.colstack_left:empty, .colstack_right:empty { display: none; } +.colstack_head { + margin-bottom: 0px; +} +.colstack_left:empty, .colstack_right:empty { + display: none; +} .colstack_grid { display: grid; @@ -395,6 +382,17 @@ li a { border-color: hsl(0, 0%, 80%); } +/* TODO: Add the avatars to the forum list */ +.extra_little_row_avatar { + display: none; +} +.shift_left { + float: left; +} +.shift_right { + float: right; +} + /* Topics */ .topic_list .topic_row { @@ -659,8 +657,12 @@ button.username { font-size: 17px; } -.mention { font-weight: bold; } -.show_on_edit { display: none; } +.mention { + font-weight: bold; +} +.show_on_edit, .auto_hide { + display: none; +} .alert { display: block;