Release 0.1.0-beta.4

This commit is contained in:
Toby Zerner 2015-11-05 16:29:13 +10:30
parent 783a14610a
commit 4734dbf46d
3 changed files with 56 additions and 20 deletions

View File

@ -2,6 +2,16 @@
All notable changes to Flarum and its bundled extensions will be documented in this file. All notable changes to Flarum and its bundled extensions will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/). This project adheres to [Semantic Versioning](http://semver.org/).
## [0.1.0-beta.4] - 2015-11-05
### Added
- Add an icon/label to the back button to indicate where it leads
- Add "Loading..." text while the JavaScript payload is loading
### Fixed
- Fix some admin actions resulting in "You do not have permission to do that"
- Fix translation keys persisting after enabling an initial language pack
- Fix translation `=>` references not being parsed in some cases
## [0.1.0-beta.3] - 2015-11-03 ## [0.1.0-beta.3] - 2015-11-03
### Architecture improvements ### Architecture improvements
- **Composer-driven extension architecture.** All extensions are Composer packages installable via Packagist. - **Composer-driven extension architecture.** All extensions are Composer packages installable via Packagist.
@ -93,6 +103,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## 0.1.0-beta - 2015-08-27 ## 0.1.0-beta - 2015-08-27
First Version First Version
[unreleased]: https://github.com/flarum/core/compare/v0.1.0-beta.2...HEAD [0.1.0-beta.4]: https://github.com/flarum/core/compare/v0.1.0-beta.3...v0.1.0-beta.4
[0.1.0-beta.3]: https://github.com/flarum/core/compare/v0.1.0-beta.2...v0.1.0-beta.3 [0.1.0-beta.3]: https://github.com/flarum/core/compare/v0.1.0-beta.2...v0.1.0-beta.3
[0.1.0-beta.2]: https://github.com/flarum/core/compare/v0.1.0-beta...v0.1.0-beta.2 [0.1.0-beta.2]: https://github.com/flarum/core/compare/v0.1.0-beta...v0.1.0-beta.2

View File

@ -18996,10 +18996,13 @@ System.register('flarum/components/Navigation', ['flarum/Component', 'flarum/com
var _app2 = app; var _app2 = app;
var history = _app2.history; var history = _app2.history;
var previous = history.getPrevious() || {};
return LinkButton.component({ return LinkButton.component({
className: 'Button Button--icon Navigation-back', className: 'Button Navigation-back ' + (previous.title ? '' : 'Button--icon'),
href: history.backUrl(), href: history.backUrl(),
icon: 'chevron-left', icon: 'chevron-left',
children: previous.title,
config: function config() {}, config: function config() {},
onclick: function onclick(e) { onclick: function onclick(e) {
if (e.shiftKey || e.ctrlKey || e.metaKey || e.which === 2) return; if (e.shiftKey || e.ctrlKey || e.metaKey || e.which === 2) return;
@ -20663,6 +20666,7 @@ System.register('flarum/initializers/boot', ['flarum/utils/ScrollListener', 'fla
canGoBack: function canGoBack() { canGoBack: function canGoBack() {
return true; return true;
}, },
getPrevious: function getPrevious() {},
backUrl: function backUrl() { backUrl: function backUrl() {
return app.forum.attribute('baseUrl'); return app.forum.attribute('baseUrl');
}, },

58
js/forum/dist/app.js vendored
View File

@ -21026,6 +21026,7 @@ System.register('flarum/components/DiscussionPage', ['flarum/components/Page', '
value: function show(discussion) { value: function show(discussion) {
this.discussion = discussion; this.discussion = discussion;
app.history.push('discussion', discussion.title());
app.setTitle(discussion.title()); app.setTitle(discussion.title());
app.setTitleCount(0); app.setTitleCount(0);
@ -21145,7 +21146,7 @@ System.register('flarum/components/DiscussionPage', ['flarum/components/Page', '
m.route(url, true); m.route(url, true);
window.history.replaceState(null, document.title, url); window.history.replaceState(null, document.title, url);
app.history.push('discussion'); app.history.push('discussion', discussion.title());
// If the user hasn't read past here before, then we'll update their read // If the user hasn't read past here before, then we'll update their read
// state and redraw. // state and redraw.
@ -22406,7 +22407,7 @@ System.register('flarum/components/HeaderSecondary', ['flarum/Component', 'flaru
} }
}; };
});; });;
System.register('flarum/components/IndexPage', ['flarum/extend', 'flarum/components/Page', 'flarum/utils/ItemList', 'flarum/helpers/listItems', 'flarum/components/DiscussionList', 'flarum/components/WelcomeHero', 'flarum/components/DiscussionComposer', 'flarum/components/LogInModal', 'flarum/components/DiscussionPage', 'flarum/components/Select', 'flarum/components/Button', 'flarum/components/LinkButton', 'flarum/components/SelectDropdown'], function (_export) { System.register('flarum/components/IndexPage', ['flarum/extend', 'flarum/components/Page', 'flarum/utils/ItemList', 'flarum/helpers/listItems', 'flarum/helpers/icon', 'flarum/components/DiscussionList', 'flarum/components/WelcomeHero', 'flarum/components/DiscussionComposer', 'flarum/components/LogInModal', 'flarum/components/DiscussionPage', 'flarum/components/Select', 'flarum/components/Button', 'flarum/components/LinkButton', 'flarum/components/SelectDropdown'], function (_export) {
/** /**
* The `IndexPage` component displays the index page, including the welcome * The `IndexPage` component displays the index page, including the welcome
@ -22414,7 +22415,7 @@ System.register('flarum/components/IndexPage', ['flarum/extend', 'flarum/compone
*/ */
'use strict'; 'use strict';
var extend, Page, ItemList, listItems, DiscussionList, WelcomeHero, DiscussionComposer, LogInModal, DiscussionPage, Select, Button, LinkButton, SelectDropdown, IndexPage; var extend, Page, ItemList, listItems, icon, DiscussionList, WelcomeHero, DiscussionComposer, LogInModal, DiscussionPage, Select, Button, LinkButton, SelectDropdown, IndexPage;
return { return {
setters: [function (_flarumExtend) { setters: [function (_flarumExtend) {
extend = _flarumExtend.extend; extend = _flarumExtend.extend;
@ -22424,6 +22425,8 @@ System.register('flarum/components/IndexPage', ['flarum/extend', 'flarum/compone
ItemList = _flarumUtilsItemList['default']; ItemList = _flarumUtilsItemList['default'];
}, function (_flarumHelpersListItems) { }, function (_flarumHelpersListItems) {
listItems = _flarumHelpersListItems['default']; listItems = _flarumHelpersListItems['default'];
}, function (_flarumHelpersIcon) {
icon = _flarumHelpersIcon['default'];
}, function (_flarumComponentsDiscussionList) { }, function (_flarumComponentsDiscussionList) {
DiscussionList = _flarumComponentsDiscussionList['default']; DiscussionList = _flarumComponentsDiscussionList['default'];
}, function (_flarumComponentsWelcomeHero) { }, function (_flarumComponentsWelcomeHero) {
@ -22491,7 +22494,7 @@ System.register('flarum/components/IndexPage', ['flarum/extend', 'flarum/compone
app.cache.discussionList = new DiscussionList({ params: params }); app.cache.discussionList = new DiscussionList({ params: params });
} }
app.history.push('index'); app.history.push('index', icon('bars'));
this.bodyClass = 'App--index'; this.bodyClass = 'App--index';
} }
@ -23701,10 +23704,13 @@ System.register('flarum/components/Navigation', ['flarum/Component', 'flarum/com
var _app2 = app; var _app2 = app;
var history = _app2.history; var history = _app2.history;
var previous = history.getPrevious() || {};
return LinkButton.component({ return LinkButton.component({
className: 'Button Button--icon Navigation-back', className: 'Button Navigation-back ' + (previous.title ? '' : 'Button--icon'),
href: history.backUrl(), href: history.backUrl(),
icon: 'chevron-left', icon: 'chevron-left',
children: previous.title,
config: function config() {}, config: function config() {},
onclick: function onclick(e) { onclick: function onclick(e) {
if (e.shiftKey || e.ctrlKey || e.metaKey || e.which === 2) return; if (e.shiftKey || e.ctrlKey || e.metaKey || e.which === 2) return;
@ -28854,6 +28860,7 @@ System.register('flarum/components/UserPage', ['flarum/components/Page', 'flarum
value: function show(user) { value: function show(user) {
this.user = user; this.user = user;
app.history.push('user', user.username());
app.setTitle(user.username()); app.setTitle(user.username());
m.redraw(); m.redraw();
@ -29651,7 +29658,7 @@ System.register("flarum/helpers/username", [], function (_export) {
execute: function () {} execute: function () {}
}; };
});; });;
System.register('flarum/initializers/boot', ['flarum/utils/ScrollListener', 'flarum/utils/Pane', 'flarum/utils/Drawer', 'flarum/utils/mapRoutes', 'flarum/components/Navigation', 'flarum/components/HeaderPrimary', 'flarum/components/HeaderSecondary', 'flarum/components/Composer', 'flarum/components/ModalManager', 'flarum/components/AlertManager'], function (_export) { System.register('flarum/initializers/boot', ['flarum/utils/ScrollListener', 'flarum/utils/Pane', 'flarum/utils/Drawer', 'flarum/utils/mapRoutes', 'flarum/helpers/icon', 'flarum/components/Navigation', 'flarum/components/HeaderPrimary', 'flarum/components/HeaderSecondary', 'flarum/components/Composer', 'flarum/components/ModalManager', 'flarum/components/AlertManager'], function (_export) {
/*global FastClick*/ /*global FastClick*/
/** /**
@ -29662,7 +29669,7 @@ System.register('flarum/initializers/boot', ['flarum/utils/ScrollListener', 'fla
*/ */
'use strict'; 'use strict';
var ScrollListener, Pane, Drawer, mapRoutes, Navigation, HeaderPrimary, HeaderSecondary, Composer, ModalManager, AlertManager; var ScrollListener, Pane, Drawer, mapRoutes, icon, Navigation, HeaderPrimary, HeaderSecondary, Composer, ModalManager, AlertManager;
_export('default', boot); _export('default', boot);
@ -29679,7 +29686,7 @@ System.register('flarum/initializers/boot', ['flarum/utils/ScrollListener', 'fla
} }
app.routes[defaultAction].path = '/'; app.routes[defaultAction].path = '/';
app.history.push(defaultAction, '/'); app.history.push(defaultAction, icon('bars'), '/');
m.startComputation(); m.startComputation();
@ -29737,6 +29744,8 @@ System.register('flarum/initializers/boot', ['flarum/utils/ScrollListener', 'fla
Drawer = _flarumUtilsDrawer['default']; Drawer = _flarumUtilsDrawer['default'];
}, function (_flarumUtilsMapRoutes) { }, function (_flarumUtilsMapRoutes) {
mapRoutes = _flarumUtilsMapRoutes['default']; mapRoutes = _flarumUtilsMapRoutes['default'];
}, function (_flarumHelpersIcon) {
icon = _flarumHelpersIcon['default'];
}, function (_flarumComponentsNavigation) { }, function (_flarumComponentsNavigation) {
Navigation = _flarumComponentsNavigation['default']; Navigation = _flarumComponentsNavigation['default'];
}, function (_flarumComponentsHeaderPrimary) { }, function (_flarumComponentsHeaderPrimary) {
@ -32171,26 +32180,39 @@ System.register('flarum/utils/History', [], function (_export) {
* Get the item on the top of the stack. * Get the item on the top of the stack.
* *
* @return {Object} * @return {Object}
* @protected * @public
*/ */
babelHelpers.createClass(History, [{ babelHelpers.createClass(History, [{
key: 'getTop', key: 'getCurrent',
value: function getTop() { value: function getCurrent() {
return this.stack[this.stack.length - 1]; return this.stack[this.stack.length - 1];
} }
/**
* Get the previous item on the stack.
*
* @return {Object}
* @public
*/
}, {
key: 'getPrevious',
value: function getPrevious() {
return this.stack[this.stack.length - 2];
}
/** /**
* Push an item to the top of the stack. * Push an item to the top of the stack.
* *
* @param {String} name The name of the route. * @param {String} name The name of the route.
* @param {String} title The title of the route.
* @param {String} [url] The URL of the route. The current URL will be used if * @param {String} [url] The URL of the route. The current URL will be used if
* not provided. * not provided.
* @public * @public
*/ */
}, { }, {
key: 'push', key: 'push',
value: function push(name) { value: function push(name, title) {
var url = arguments.length <= 1 || arguments[1] === undefined ? m.route() : arguments[1]; var url = arguments.length <= 2 || arguments[2] === undefined ? m.route() : arguments[2];
// If we're pushing an item with the same name as second-to-top item in the // If we're pushing an item with the same name as second-to-top item in the
// stack, we will assume that the user has clicked the 'back' button in // stack, we will assume that the user has clicked the 'back' button in
@ -32204,11 +32226,11 @@ System.register('flarum/utils/History', [], function (_export) {
// If we're pushing an item with the same name as the top item in the stack, // If we're pushing an item with the same name as the top item in the stack,
// then we'll overwrite it with the new URL. // then we'll overwrite it with the new URL.
var top = this.getTop(); var top = this.getCurrent();
if (top && top.name === name) { if (top && top.name === name) {
top.url = url; babelHelpers._extends(top, { url: url, title: title });
} else { } else {
this.stack.push({ name: name, url: url }); this.stack.push({ name: name, url: url, title: title });
} }
} }
@ -32234,7 +32256,7 @@ System.register('flarum/utils/History', [], function (_export) {
value: function back() { value: function back() {
this.stack.pop(); this.stack.pop();
m.route(this.getTop().url); m.route(this.getCurrent().url);
} }
/** /**
@ -32258,7 +32280,7 @@ System.register('flarum/utils/History', [], function (_export) {
}, { }, {
key: 'home', key: 'home',
value: function home() { value: function home() {
this.stack.splice(1); this.stack.splice(0);
m.route('/'); m.route('/');
} }