Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Hykilpikonna
2020-08-02 12:45:01 -04:00
6 changed files with 31 additions and 14 deletions
+3 -4
View File
@@ -30,16 +30,15 @@ export default class AppDemo
app.showRating = true
app.$alert(
'This demo analyzes an offline snapshot of my data from Jun 6, 2020,<br/>' +
'This demo analyzes an offline snapshot of my data from Jun 6, 2020, ' +
'which displays my academic results from Junior year.<br/>' +
'<br/>' +
'Online features like submitting reviews obviously won\'t work,<br/>' +
'Besides from that, feel free to click around! 😇<br/>' +
'Feel free to click around! 😇<br/>' +
'<br/>' +
'-- The Veracross Analyzer Team (YGui)<br/>' +
'-- Made with 🧡 in SJP',
'🥳 Welcome to VeracrossAnalyzer Demo!',
{dangerouslyUseHTMLString: true, confirmButtonText: 'OK', customClass: 'comic'});
{dangerouslyUseHTMLString: true, confirmButtonText: 'OK'});
})
})
}
+15 -6
View File
@@ -1,6 +1,12 @@
div
{
font-family: -apple-system, Nunito Sans, Avenir, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue,
Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, Helvetica, Arial, sans-serif;
}
#app
{
font-family: var(--font);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
@@ -23,11 +29,6 @@
--assignment-type-2: #3f991e;
--assignment-type-3: #ff9900;
--assignment-type-4: #b02b02;
//--font: 'Avenir', Helvetica, Arial, sans-serif;
--font: -apple-system, Nunito Sans, Avenir, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue,
Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, Helvetica, Arial, sans-serif;
}
.dark
@@ -149,3 +150,11 @@ div.el-card.course-card > div.el-card__body
{
font-family: "Comic Sans MS", Nunito Sans, Helvetica Neue, Microsoft YaHei, "微软雅黑", Arial, sans-serif;
}
#demo-not-available
{
padding-top: 40vh;
font-size: 2em;
color: #bbbbbb;
margin: 0 50px;
}
+1 -1
View File
@@ -54,7 +54,7 @@ export default class App extends Vue
showRating: boolean = this.$cookies.get('show-rating') == 'set=yes';
// Demo mode
demoMode: boolean = window.location.hostname == 'demo.vera.hydev.org'
demoMode: boolean = window.location.hostname == 'demo.vera.hydev.org' || this.$cookies.isKey('demo-mode')
// Is the login panel shown
showLogin: boolean = !this.demoMode
+4 -1
View File
@@ -10,7 +10,10 @@
<div id="app-content" v-if="assignmentsReady && loading === ''">
<overall v-if="nav.id === 'overall'" :courses="gradedCourses"></overall>
<course-page v-if="nav.id === 'course'" :course="gradedCourses.find(c => +c.id === +nav.info.id)"></course-page>
<course-selection v-if="nav.id === 'course-selection'" :app="this"></course-selection>
<course-selection v-if="nav.id === 'course-selection' && !demoMode" :app="this"></course-selection>
<div id="demo-not-available" class="unselectable" v-if="nav.id === 'course-selection' && demoMode">
Course selection page is not available in demo mode.
</div>
</div>
<loading v-if="loading !== ''" :text="loading" :error="loadingError"/>
+1 -1
View File
@@ -10,7 +10,7 @@ export default class Constants
// static API_URL: string = 'http://localhost:24021/api';
/** Current version */
static VERSION: string = '0.5.4.1391';
static VERSION: string = '0.5.6.1761';
/** The minimum version that still supports the same cookies */
static MIN_SUPPORTED_VERSION: string = '0.4.6.1087';
@@ -72,7 +72,7 @@
<span slot="footer" class="dialog-footer">
<el-button @click="ratingDialog = false" :disabled="ratingPosting">Cancel</el-button>
<el-button type="primary" @click="submitRating()" :disabled="ratingPosting">
<el-button type="primary" @click="submitRating()" :disabled="canSubmit">
{{course.rated ? 'Update' : 'Submit'}}
</el-button>
</span>
@@ -100,6 +100,11 @@
ratingPosting = false;
rating = this.course.rating;
get canSubmit()
{
return this.ratingPosting || App.instance.demoMode
}
/**
* Redirect to the course page
*/
@@ -183,6 +188,7 @@
{
this.$message.error('Sorry, but rating failed to post, please try again or email me if you continues to have issues. ' +
'But wait! The email system isn\'t created yet... oops!. (Technical error message: ' + response.data + ')');
this.ratingPosting = false;
}
});
}