Skip to content

Commit

Permalink
Merge pull request #34 from Wonder-Technology/amy
Browse files Browse the repository at this point in the history
Amy finish modal show info
  • Loading branch information
yyc-git authored Mar 3, 2019
2 parents ec8df1f + 6a82759 commit 4c09821
Show file tree
Hide file tree
Showing 52 changed files with 1,705 additions and 922 deletions.
17 changes: 17 additions & 0 deletions .bumpedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
files:
- package.json
plugins:
prerelease:
test:
plugin: bumped-terminal
command: 'npm run bsb:build && npm run test:coverage'
postrelease:
Generating CHANGELOG file:
plugin: bumped-terminal
command: 'npm run version'
Committing new version:
plugin: bumped-terminal
command: 'npm run updatePwaCacheVersion && npm run updateCopyRightVersion && git add CHANGELOG.md package.json src/Copyright.re && git commit -m "chore(release): v$newVersion"'
Publishing tag to GitHub:
plugin: bumped-terminal
command: 'git tag v$newVersion && git push origin master:master && git push origin v$newVersion'
22 changes: 19 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,30 @@ var _safeExec = (commandStr, handleErrFunc, handleSuccessFunc, done) => exec(com
handleSuccessFunc(done);
});


gulp.task("updateVersion", function (done) {
gulp.task("updatePwaCacheVersion", function (done) {
const packageJsonFilePath = path.join(__dirname, "package.json");
const copyrightFilePath = path.join(__dirname, "src/Copyright.re");
const serviceWorkerFilePath = path.join(__dirname, "service-worker.js");

var packageJson = JSON.parse(fs.readFileSync(packageJsonFilePath, "utf8"));

var data = fs.readFileSync(serviceWorkerFilePath, "utf8");

var result = data.replace(/(var\scacheName\s=\s')(.+)'/img, function (match, p1, p2) {
return p1 + "wonder-editor-cache-" + packageJson.version + "\'";
});

fs.writeFileSync(
serviceWorkerFilePath, result, "utf8"
);

done();
});

gulp.task("updateCopyRightVersion", function (done) {
const packageJsonFilePath = path.join(__dirname, "package.json");
const copyrightFilePath = path.join(__dirname, "src/Copyright.re");

var packageJson = JSON.parse(fs.readFileSync(packageJsonFilePath, "utf8"));

var data = fs.readFileSync(copyrightFilePath, "utf8");

Expand Down
4 changes: 4 additions & 0 deletions jest_coverage.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
"<rootDir>/lib/es6_global/src/core/.+/PublishLocalModal.js",
"<rootDir>/lib/es6_global/src/core/.+/Canvas.js",
"<rootDir>/lib/es6_global/src/core/.+/SingleInputModal.js",
"<rootDir>/lib/es6_global/src/core/.+/HeaderFile.js",
"<rootDir>/lib/es6_global/src/core/.+/HeaderEdit.js",
"<rootDir>/lib/es6_global/src/core/.+/HeaderPublish.js",
"<rootDir>/lib/es6_global/src/core/.+/HeaderHelp.js",
"<rootDir>/lib/es6_global/src/module/"
],
"collectCoverageFrom": [
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"test:ci": "npm run bsb:build && jest --maxWorkers=4 --config jest_coverage.json",
"codecov": "cat coverage/lcov.info | codecov",
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md",
"updateVersion": "gulp updateVersion"
"updatePwaCacheVersion": "gulp updatePwaCacheVersion",
"updateCopyRightVersion": "gulp updateCopyRightVersion"
},
"config": {
"commitizen": {
Expand Down Expand Up @@ -77,4 +78,4 @@
"wonder-commonlib": "0.2.28",
"wonder-bs-jest": "0.2.26"
}
}
}
43 changes: 33 additions & 10 deletions public/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ html, body {
position: relative; }
html ul, body ul {
list-style-type: none; }
html a, body a {
text-decoration: none; }
html a:visited, body a:visited {
text-decoration: none; }
html a:hover, body a:hover {
text-decoration: none; }
html a:active, body a:active {
text-decoration: none; }
html .inline-component, body .inline-component {
display: inline-block; }
html .block-component, body .block-component {
Expand Down Expand Up @@ -98,9 +106,8 @@ html, body {
z-index: 150; }
.wonder-modal .modal-item .modal-item-header {
width: 100%;
height: 30px;
line-height: 30px;
font-size: 14px;
height: 22px;
line-height: 22px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
text-align: center;
Expand All @@ -112,7 +119,7 @@ html, body {
position: relative; }
.wonder-modal .modal-item .modal-item-header img {
position: absolute;
top: 10px;
top: 8px;
cursor: hand;
right: 20px;
width: 15px;
Expand All @@ -121,6 +128,7 @@ html, body {
color: #000;
height: 213px;
overflow-y: auto;
overflow-x: hidden;
width: 90%;
margin-left: 5%;
padding-top: 10px;
Expand All @@ -139,6 +147,11 @@ html, body {
border-radius: 4px; }
.wonder-modal .modal-item .modal-item-content::-webkit-scrollbar-thumb:hover {
background: #fc7100; }
.wonder-modal .modal-item .modal-item-content .content-text {
width: 100%; }
.wonder-modal .modal-item .modal-item-content .content-white {
width: 100%;
height: 30px; }
.wonder-modal .modal-item .modal-item-content .content-field {
width: 100%;
height: 26px;
Expand All @@ -155,17 +168,25 @@ html, body {
text-align: left;
height: 26px;
line-height: 26px; }
.wonder-modal .modal-item .modal-item-content .content-field .field-content a {
white-space: nowrap; }
.wonder-modal .modal-item .modal-item-footer {
height: 50px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
position: relative; }
.wonder-modal .modal-item .modal-item-footer .footer-submit {
width: 100px;
background: #db7d35;
border: 1px solid #f3c9a9;
color: #555;
font-weight: normal;
width: 80px;
position: absolute;
top: 5px;
top: 12px;
right: 30px;
padding-top: 5px; }
.wonder-modal .modal-item .modal-item-footer .footer-submit:hover {
color: #000; }

.wonder-singleInput-modal {
position: fixed;
Expand Down Expand Up @@ -210,8 +231,8 @@ html, body {
z-index: 150; }
.wonder-singleInput-modal .modal-item .modal-item-header {
width: 100%;
height: 30px;
line-height: 30px;
height: 22px;
line-height: 22px;
font-size: 14px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
Expand All @@ -224,7 +245,7 @@ html, body {
position: relative; }
.wonder-singleInput-modal .modal-item .modal-item-header img {
position: absolute;
top: 10px;
top: 8px;
cursor: hand;
right: 20px;
width: 15px;
Expand Down Expand Up @@ -266,6 +287,8 @@ html, body {
text-align: center;
height: 24px;
line-height: 24px; }
.wonder-singleInput-modal .modal-item .modal-item-content .content-field .field-content a {
white-space: nowrap; }
.wonder-singleInput-modal .modal-item .modal-item-footer {
height: 50px;
border-bottom-left-radius: 5px;
Expand Down Expand Up @@ -353,7 +376,7 @@ html, body {
color: #cfcdcd;
text-align: center; }
.wonder-app-component .wonder-header-component .header-nav .header-item .modal-item-content {
padding-top: 50px; }
padding-top: 25px; }
.wonder-app-component .wonder-controller-component {
width: 100%;
height: 45px; }
Expand Down
12 changes: 12 additions & 0 deletions public/sass/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ html,body{
ul{
list-style-type: none;
}
a{
text-decoration: none;
&:visited {
text-decoration: none;
}
&:hover {
text-decoration: none;
}
&:active{
text-decoration:none;
}
}
.inline-component{
display: inline-block;
}
Expand Down
2 changes: 1 addition & 1 deletion public/sass/components/header/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
}
}
.modal-item-content {
padding-top: 50px;
padding-top: 25px;
}
}
}
Expand Down
29 changes: 23 additions & 6 deletions public/sass/components/ui/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
z-index: 150;
.modal-item-header {
width: 100%;
height: 30px;
line-height: 30px;
font-size: 14px;
height: 22px;
line-height: 22px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
text-align: center;
Expand All @@ -31,7 +30,7 @@
position: relative;
img {
position: absolute;
top: 10px;
top: 8px;
cursor: hand;
right: 20px;
width: 15px;
Expand All @@ -43,11 +42,19 @@
color: #000;
height: 213px;
overflow-y: auto;
overflow-x: hidden;
width: 90%;
margin-left: 5%;
padding-top: 10px;
box-sizing: border-box;
font-size: 16px;
.content-text{
width:100%;
}
.content-white{
width:100%;
height:30px;
}
.content-field {
width: 100%;
height: 26px;
Expand All @@ -65,6 +72,9 @@
text-align: left;
height: 26px;
line-height: 26px;
a{
white-space: nowrap;
}
}
}
}
Expand All @@ -74,9 +84,16 @@
border-bottom-right-radius: 5px;
position: relative;
.footer-submit {
width: 100px;
background: rgb(219, 125, 53);
border:1px solid rgb(243, 201, 169);
color:#555;
font-weight: normal;
&:hover{
color:#000;
}
width: 80px;
position: absolute;
top: 5px;
top: 12px;
right: 30px;
padding-top: 5px;
}
Expand Down
6 changes: 3 additions & 3 deletions public/sass/components/ui/_singleInputModal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
z-index: 150;
.modal-item-header {
width: 100%;
height: 30px;
line-height: 30px;
height: 22px;
line-height: 22px;
font-size: 14px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
Expand All @@ -32,7 +32,7 @@
position: relative;
img {
position: absolute;
top: 10px;
top: 8px;
cursor: hand;
right: 20px;
width: 15px;
Expand Down
3 changes: 3 additions & 0 deletions public/sass/utils/_modalUtils.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@
text-align: center;
height: 24px;
line-height: 24px;
a{
white-space: nowrap;
}
}
4 changes: 2 additions & 2 deletions service-worker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var dataCacheName = 'wonder-editor';
var cacheName = 'wonder-editor-1';
var cacheName = 'wonder-editor-cache-1.0.0-beta.2';
var filesToCache = [
'/',
'/index.html',
Expand Down Expand Up @@ -88,7 +88,7 @@ self.addEventListener('activate', function (e) {
});

self.addEventListener('fetch', function (e) {
console.log('[Service Worker] Fetch', e.request.url);
// console.log('[Service Worker] Fetch', e.request.url);
var dataUrl = 'https://query.yahooapis.com/v1/public/yql';
if (e.request.url.indexOf(dataUrl) > -1) {
/*
Expand Down
Loading

0 comments on commit 4c09821

Please sign in to comment.